/* MiniPark HQ — brand: mørkegrøn, guld, creme */
:root {
  --bg: #0d1510;
  --bg2: #111a14;
  --card: #16221a;
  --card2: #1c2b21;
  --line: #2a3b2f;
  --line2: #34493a;
  --cream: #f2ece0;
  --text: #e9e3d6;
  --muted: #a3ab9f;
  --faint: #6f7b70;
  --gold: #c9a84c;
  --gold2: #e8cc72;
  --gold-soft: rgba(201, 168, 76, .14);
  --red: #e0705f;
  --red-soft: rgba(224, 112, 95, .15);
  --green: #6fcf8e;
  --green-soft: rgba(111, 207, 142, .13);
  --blue: #7fb2e6;
  --blue-soft: rgba(127, 178, 230, .14);
  --purple: #b79be8;
  --radius: 14px;
  --radius-sm: 9px;
  --side: 236px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 'DM Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; color: var(--cream); font-weight: 700; margin: 0; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 .6em; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
.ic { flex: none; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Skal ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 40;
  background: var(--bg2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: calc(18px + var(--safe-t)) 14px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; color: var(--cream); }
.brand:hover { text-decoration: none; }
.brand b { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 900; display: block; line-height: 1; }
.brand small { color: var(--gold); letter-spacing: .32em; font-size: 10.5px; font-weight: 700; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold2), var(--gold)); color: var(--bg2);
  font-family: 'Playfair Display', serif; font-weight: 900; font-size: 20px;
  box-shadow: 0 0 0 1px rgba(232,204,114,.35), 0 6px 18px rgba(201,168,76,.25);
}
.brand.big { justify-content: center; padding-bottom: 8px; }
.side nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.side nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; transition: background .15s, color .15s;
}
.side nav a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.side nav a.on { background: var(--gold-soft); color: var(--gold2); }
.side-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.me { display: flex; gap: 10px; align-items: center; font-size: 13.5px; line-height: 1.2; }
.me small { display: block; font-size: 11.5px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--card2); border: 1px solid var(--line2); color: var(--gold2); font-weight: 700; font-size: 12px;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.main { flex: 1; margin-left: var(--side); padding: 30px 36px 60px; max-width: calc(1240px + var(--side)); min-width: 0; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.top .sub { color: var(--muted); margin: 4px 0 0; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.scrim { display: none; }
.tabbar { display: none; }

/* ---------- Kort & grid ---------- */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { display: flex; align-items: center; gap: 9px; }
.card-head h2 .ic { color: var(--gold); }
.card-head a.more { font-size: 13px; }
.stack > * + * { margin-top: 18px; }

.stat { position: relative; overflow: hidden; }
.stat .label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.stat .value { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 900; color: var(--cream); line-height: 1.15; margin: 4px 0 2px; }
.stat .foot { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stat.pending .value { color: var(--faint); font-size: 22px; }
.delta { font-weight: 700; font-size: 12.5px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }

.hero {
  background: radial-gradient(120% 140% at 100% 0%, rgba(201,168,76,.16), transparent 55%), var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 26px; height: 26px;
  border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); border-radius: 0 6px 0 0; opacity: .7;
}
.hero h2 { font-size: 24px; }
.hero .meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px;
  background: var(--card2); border: 1px solid var(--line2); color: var(--text); white-space: nowrap; font-weight: 500;
}
.pill.gold { background: var(--gold-soft); border-color: rgba(201,168,76,.35); color: var(--gold2); }
.pill.red { background: var(--red-soft); border-color: rgba(224,112,95,.35); color: #f2a497; }
.pill.green { background: var(--green-soft); border-color: rgba(111,207,142,.3); color: var(--green); }
.pill.blue { background: var(--blue-soft); border-color: rgba(127,178,230,.3); color: var(--blue); }
.pill.dim { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); flex: none; }
.dot.p1 { background: var(--red); } .dot.p2 { background: var(--gold); } .dot.p3 { background: var(--faint); }

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px;
  border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); color: var(--text);
  font: 500 14px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn.primary { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1a1406; border-color: transparent; font-weight: 700; }
.btn.danger { color: #f2a497; border-color: rgba(224,112,95,.4); background: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { height: 31px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.wide { width: 100%; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--card2); color: var(--text); border-color: var(--line); }
.icon-btn.danger:hover { color: var(--red); }
form.inline { display: inline; margin: 0; }

/* ---------- Formularer ---------- */
label { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line2); color: var(--text);
  font: 400 15px 'DM Sans', sans-serif; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input[type=checkbox], input[type=radio] { width: auto; display: inline-block; margin: 0 8px 0 0; accent-color: var(--gold); vertical-align: middle; }
input[type=file] { padding: 8px; }
label.check { display: flex; align-items: center; color: var(--text); font-size: 14px; cursor: pointer; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }
.form-actions .left { margin-right: auto; }
.days { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.days label { margin: 0; }
.days input { display: none; }
.days span {
  display: inline-grid; place-items: center; min-width: 44px; height: 34px; padding: 0 8px; border-radius: 9px;
  border: 1px solid var(--line2); color: var(--muted); cursor: pointer; font-size: 13px; text-transform: capitalize;
}
.days input:checked + span { background: var(--gold-soft); border-color: var(--gold); color: var(--gold2); }
.pw { position: relative; display: block; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 2px; background: none; border: 0; cursor: pointer; font-size: 16px; opacity: .6; }
.hint { font-size: 12.5px; color: var(--faint); margin-top: -6px; margin-bottom: 12px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin: 0 0 14px; }
legend { color: var(--gold2); font-size: 13px; padding: 0 6px; }

/* ---------- Flash ---------- */
.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; background: var(--green-soft); border: 1px solid rgba(111,207,142,.3); color: var(--green); }
.flash.err { background: var(--red-soft); border-color: rgba(224,112,95,.35); color: #f2a497; }
.flash.info { background: var(--gold-soft); border-color: rgba(201,168,76,.35); color: var(--gold2); }

/* ---------- Lister ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.list .meta { color: var(--muted); font-size: 13px; display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.list .actions { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.list > li:hover .actions { opacity: 1; }
.done .title { text-decoration: line-through; color: var(--faint); }

.tick {
  width: 26px; height: 26px; border-radius: 8px; border: 1.8px solid var(--line2); background: transparent;
  display: grid; place-items: center; cursor: pointer; color: transparent; flex: none; padding: 0; transition: all .15s;
}
.tick:hover { border-color: var(--gold); }
.tick.on { background: var(--gold); border-color: var(--gold); color: #1a1406; }
.tick.round { border-radius: 50%; }

.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty p { margin: 0; }
.empty small { display: block; margin-top: 4px; color: var(--faint); }

/* ---------- Tabs / filtre ---------- */
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--card2); color: var(--cream); box-shadow: 0 1px 0 var(--line2) inset; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=search] { margin: 0; max-width: 260px; height: 38px; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Idétavle ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 160px; }
.col-head { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.col-head h3 { font-size: 15px; }
.col.drop { border-color: var(--gold); background: var(--gold-soft); }
.note {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px;
  padding: 11px 12px; margin-bottom: 9px; cursor: grab; transition: transform .1s;
}
.note:active { cursor: grabbing; }
.note.dragging { opacity: .4; }
.note h4 { margin: 0 0 3px; font-size: 14.5px; color: var(--cream); font-weight: 500; }
.note p { font-size: 13px; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.note .note-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--faint); }
.note.c-gold { border-left-color: var(--gold); } .note.c-green { border-left-color: var(--green); }
.note.c-blue { border-left-color: var(--blue); } .note.c-red { border-left-color: var(--red); } .note.c-purple { border-left-color: var(--purple); }
.swatches { display: flex; gap: 8px; margin-top: 6px; }
.swatches label { margin: 0; }
.swatches input { display: none; }
.swatches span { width: 28px; height: 28px; border-radius: 50%; display: block; cursor: pointer; border: 2px solid transparent; }
.swatches input:checked + span { border-color: var(--cream); }

/* ---------- Kontakter ---------- */
.contact-card .company { font-family: 'Playfair Display', serif; font-size: 17px; color: var(--cream); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13.5px; margin-top: 10px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Links ---------- */
.link-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.link-tile {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px; background: var(--card);
  border: 1px solid var(--line); color: var(--text); position: relative; min-width: 0;
}
.link-tile:hover { border-color: var(--gold); text-decoration: none; }
.link-tile img { width: 22px; height: 22px; border-radius: 5px; flex: none; background: var(--card2); }
.link-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.link-tile small { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-tile .edit { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); opacity: 0; }
.link-tile:hover .edit { opacity: 1; }

/* ---------- Ugerapport ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--gold); letter-spacing: 1px; }
.rating { display: flex; gap: 6px; flex-direction: row-reverse; justify-content: flex-end; }
.rating input { display: none; }
.rating label { margin: 0; font-size: 26px; color: var(--line2); cursor: pointer; line-height: 1; }
.rating input:checked ~ label, .rating label:hover, .rating label:hover ~ label { color: var(--gold); }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.prose { overflow-wrap: anywhere; color: var(--text); }
.chart { width: 100%; height: auto; display: block; }
.week-nav { display: flex; align-items: center; gap: 8px; }

/* ---------- Modal ---------- */
dialog.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 20px 22px; border-radius: 18px;
  background: var(--card); color: var(--text); border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
dialog.modal::backdrop { background: rgba(5,9,6,.7); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* ---------- Auth ---------- */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(80% 60% at 50% 0%, rgba(201,168,76,.12), transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px 28px; }
.auth-card h1 { text-align: center; margin: 8px 0 14px; font-size: 26px; }
.auth-card .muted { text-align: center; }

/* ---------- Mobil ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  body { font-size: 15.5px; }
  .side { transform: translateX(-100%); transition: transform .25s ease; width: 270px; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30; }
  .main { margin-left: 0; padding: calc(18px + var(--safe-t)) 16px calc(96px + var(--safe-b)); }
  h1 { font-size: 26px; }
  .g2, .g3, .compare { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat .value { font-size: 24px; }
  .card { padding: 15px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgba(17,26,20,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b));
  }
  .tabbar a, .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--faint);
    font: 500 10.5px 'DM Sans', sans-serif; background: none; border: 0; padding: 4px 0; cursor: pointer;
  }
  .tabbar a.on { color: var(--gold2); }
  .tabbar a:hover { text-decoration: none; }
  .list .actions { opacity: 1; }
  .board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .toolbar input[type=search] { max-width: none; flex: 1; }
  .link-tile .edit { opacity: 1; }
  input, select, textarea { font-size: 16px; } /* undgå zoom på iPhone */
}

/* Kontaktpersoner */
.people { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 6px; }
.person { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.person .avatar { margin-top: 2px; }
.person .grow { flex: 1; min-width: 0; }
.person .title { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.person .meta { font-size: 13px; display: flex; flex-wrap: wrap; gap: 2px 12px; overflow-wrap: anywhere; }
.person-actions { display: flex; opacity: .5; transition: opacity .15s; }
.person:hover .person-actions { opacity: 1; }
.person-actions .icon-btn { width: 28px; height: 28px; }
.add-person { margin-top: 8px; }
@media (max-width: 860px) { .person-actions { opacity: 1; } }
