/* Webshoppen – eget udtryk: lyst "shop"-look med Best One-blå og guld-mønt.
   Bevidst forskelligt fra det mørke salgsdashboard. Mørkt tema som valg. */

:root {
  --bg: #f2f4f9;
  --card: #ffffff;
  --card-2: #f6f8fc;
  --line: rgba(16, 35, 61, 0.08);
  --line-2: rgba(16, 35, 61, 0.16);
  --text: #12223a;
  --muted: #5d6b82;
  --faint: #8b97ab;
  --brand: #225581;
  --brand-2: #2f74b5;
  --brand-soft: rgba(34, 85, 129, 0.08);
  --gold: #f6c344;
  --gold-deep: #a87204;
  --plus: #128657;
  --minus: #cf3c4a;
  --warn: #225581;
  --top: rgba(255, 255, 255, 0.88);
  --saldo: radial-gradient(420px 220px at 92% 10%, rgba(121, 176, 255, 0.35), transparent 70%),
           linear-gradient(135deg, #1d4a72 0%, #225581 45%, #2f74b5 100%);
  --shadow: 0 1px 2px rgba(16, 35, 61, 0.05), 0 8px 24px rgba(16, 35, 61, 0.06);
  --shadow-lg: 0 18px 50px rgba(16, 35, 61, 0.18);
  --radius: 20px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0f1424;
  --card: #171e33;
  --card-2: #1d2640;
  --line: rgba(190, 205, 235, 0.09);
  --line-2: rgba(190, 205, 235, 0.18);
  --text: #edf1f9;
  --muted: #a3adc4;
  --faint: #737e98;
  --brand: #3b7fc4;
  --brand-2: #79b0ff;
  --brand-soft: rgba(121, 176, 255, 0.12);
  --gold-deep: #7a5200;
  --plus: #4fd59a;
  --minus: #ff8590;
  --warn: #79b0ff;
  --top: rgba(15, 20, 36, 0.86);
  --saldo: radial-gradient(420px 220px at 92% 10%, rgba(121, 176, 255, 0.22), transparent 70%),
           linear-gradient(135deg, #17345a 0%, #1e4875 50%, #285f97 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- Mønt ---------- */

.coin { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.coin-lg { width: 46px; height: 46px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.coin-xl { width: 64px; height: 64px; display: block; margin: 0 auto 18px; filter: drop-shadow(0 6px 14px rgba(168, 114, 4, .3)); }
.coin-3d { display: inline-block; flex: none; perspective: 600px; font-style: normal; }
.coin-3d.coin-xl { display: block; }
.coin-rot { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; animation: coin-spin 4s linear infinite; }
.coin-rot > i { position: absolute; inset: 0; display: block; }
.coin-rot .cf { transform: translateZ(1.8px); backface-visibility: hidden; }
.coin-rot .cb { transform: rotateY(180deg) translateZ(1.8px); }
.coin-rot .ce { border-radius: 50%; background: var(--gold-deep); transform: translateZ(var(--z)); inset: 1px; }
.coin-3d .coin { width: 100%; height: 100%; display: block; }
@keyframes coin-spin { to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .coin-rot { animation: none; } }

/* ---------- Boot / login ---------- */

.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--brand-2); animation: spin .8s linear infinite; display: inline-block; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(600px 400px at 80% 0%, var(--brand-soft), transparent 70%), radial-gradient(700px 500px at 0% 100%, var(--brand-soft), transparent 70%), var(--bg); }
.login-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 40px 32px; box-shadow: var(--shadow-lg); text-align: center; }
.login-card h1 { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; margin: 4px 0 6px; }
.login-card p { color: var(--muted); margin: 0 0 26px; }
.login-card .gbtn { display: flex; justify-content: center; min-height: 44px; }
/* Googles knap-iframe er lys; uden dette maler browseren en hvid firkant bag den i mørkt tema */
.login-card .gbtn iframe { color-scheme: light; }
.demo-list { display: grid; gap: 8px; text-align: left; }
.demo-list button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); }
.demo-list button:hover { border-color: var(--brand-2); }
.demo-tag { display: inline-block; margin-bottom: 14px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--warn); background: var(--brand-soft); padding: 4px 10px; border-radius: 99px; }

/* ---------- Brand ---------- */

.bo-logo { display: block; height: 22px; width: auto; color: var(--brand); flex: none; }
:root[data-theme="dark"] .bo-logo, :root[data-theme="dark"] .brand-name { color: #fff; }
.bo-logo.logo-login { height: 30px; margin: 0 auto 6px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-sep { width: 1px; height: 22px; background: var(--line-2); }
.brand-name { font-weight: 800; color: var(--brand); font-size: 18px; line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }

/* ---------- Topmenu (medarbejder) ---------- */

.top { position: sticky; top: 0; z-index: 20; background: var(--top); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.top:not(.top-admin) .top-in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.tabs { display: flex; gap: 4px; background: var(--card-2); border: 1px solid var(--line); padding: 4px; border-radius: 99px; }
.tabs a { text-decoration: none; padding: 7px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.saldo-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 9px; border-radius: 99px; background: var(--brand-soft); font-weight: 800; font-size: 14px; white-space: nowrap; }
.me-menu { position: relative; }
.me-btn { display: block; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.me-drop { position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lg); z-index: 30; display: none; }
.me-menu.open .me-drop { display: block; }
.me-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-who b { display: block; font-size: 14px; }
.me-who small { color: var(--muted); font-size: 12px; }
.me-drop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.me-drop button:hover { background: var(--card-2); }
.me-drop svg { width: 16px; height: 16px; color: var(--muted); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line-2); display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--brand-2); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Profilbillede over initialerne (fjernes ved fejl, så initialerne vises) */
.has-img { position: relative; overflow: hidden; }
.has-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: var(--card); }
.mini-av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: var(--brand-soft); color: var(--brand); font-size: 8px; font-weight: 800; flex: none; }
:root[data-theme="dark"] .mini-av { color: var(--brand-2); }
.avatar.lg { width: 68px; height: 68px; font-size: 20px; }

.main { padding: 28px 24px 64px; min-width: 0; }
.wrap { max-width: 1180px; margin: 0 auto; }

/* ---------- Admin-sidepanel ---------- */

.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.shell-main { min-width: 0; }
.side { background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 14px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-head { padding: 0 8px 20px; }
.side .brand-sep, .side .brand-name { display: none; }
.nav-label { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 18px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--card-2); }
.nav a.on { color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.nav a.nav-vis { cursor: pointer; margin-top: 16px; position: relative; white-space: nowrap; }
.nav a.nav-vis::before { content: ''; position: absolute; left: 12px; right: 12px; top: -9px; border-top: 1px solid var(--line); }
/* Banner øverst, mens admin ser siden som en medarbejder */
.vis-som-bar { position: relative; z-index: 21; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 16px; background: var(--brand); color: #fff; font-size: 14px; white-space: nowrap; }
.vis-som-bar svg { width: 18px; height: 18px; flex: none; }
.vis-som-bar span { overflow: hidden; text-overflow: ellipsis; }
.vis-som-bar .btn { background: #fff; color: var(--brand); border-color: #fff; }
:root[data-theme="dark"] .nav a.on { color: var(--brand-2); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding-top: 14px; }
.me { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 14px 4px 0; }
.me .who { flex: 1; min-width: 0; }
.me b { display: block; font-size: 14px; }
.me small { color: var(--faint); font-size: 12px; }
.top-admin { display: none; }
.scrim { display: none; }

/* ---------- Kort og blokke ---------- */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 17px; font-weight: 800; margin: 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.block { margin-top: 34px; }
.block-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 14px; }
.block-head { display: flex; align-items: baseline; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.block-head .block-title { margin: 0; }
.note { font-size: 13px; color: var(--muted); }
.block-head .note { margin-left: auto; }
.banner { background: var(--brand-soft); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 16px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.closed { text-align: center; padding: 10px 6px 4px; }
.closed h2 { justify-content: center; font-size: 26px; font-weight: 900; margin: 0 0 8px; }
.closed p { color: var(--muted); margin: 0 0 6px; }
.closed .closed-when { color: var(--text); font-weight: 700; margin-bottom: 22px; }
.closed .btn { width: 100%; }
.link { font-size: 14px; font-weight: 700; color: var(--brand-2); text-decoration: none; }
.link:hover { text-decoration: underline; }
.empty { color: var(--faint); padding: 14px 0 4px; text-align: center; font-size: 14px; }
.card.empty { padding: 24px; }

/* 1. Saldo + teambudget */
.row-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; }
.row-top.solo { grid-template-columns: 1fr; }
.saldo-card { position: relative; background: var(--saldo); color: #fff; border-radius: 26px; padding: 24px 28px 26px; box-shadow: var(--shadow-lg); min-width: 0; }
.saldo-deco { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.saldo-deco .b-mark { position: absolute; right: -24px; bottom: -70px; height: 250px; width: auto; color: #fff; opacity: .09; }
.profile-card { position: relative; overflow: hidden; }
.profile-card > :not(.saldo-deco) { position: relative; }
.profile-card .saldo-deco .b-mark { height: 190px; right: 160px; bottom: -60px; }
.saldo-card > :not(.saldo-deco) { position: relative; }
.saldo-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hello { font-weight: 600; opacity: .9; }
.saldo-top + .saldo-big { margin-top: 30px; }
.saldo-label { margin-top: 26px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.saldo-big { display: flex; align-items: center; gap: 14px; margin: 6px 0 6px; flex-wrap: wrap; }
.saldo-big span { font-size: clamp(44px, 7vw, 64px); font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.saldo-big small { font-size: 20px; font-weight: 700; opacity: .8; align-self: flex-end; padding-bottom: 6px; }
.saldo-sub { font-size: 14px; opacity: .85; margin-top: 4px; }

.info { position: relative; }
.info-link { display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; color: #fff; padding: 0; }
.info-txt { font-size: 13px; font-weight: 600; opacity: .85; white-space: nowrap; }
.info-link:hover .info-txt { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.info-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; flex: none; }
.info-btn.dark { width: 32px; height: 32px; border: 0; background: var(--brand-soft); color: var(--brand); }
:root[data-theme="dark"] .info-btn.dark { color: var(--brand-2); }
.rules-box { background: var(--card-2); border-radius: 14px; padding: 6px 16px; }
.info-link:hover .info-btn { background: rgba(255, 255, 255, .22); }
.info-btn svg { width: 18px; height: 18px; }
.pop { position: absolute; right: 0; top: calc(100% + 10px); width: 280px; max-width: calc(100vw - 48px); background: var(--card); color: var(--text); border: 1px solid var(--line-2); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-lg); z-index: 10; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; }
.pop.pop-regler { width: max-content; min-width: 380px; }
.pop-title { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.info:hover .pop { opacity: 1; visibility: visible; transform: none; }
.modal-bg ~ * .pop, body:has(.modal-bg) .info .pop { opacity: 0; visibility: hidden; }
.rule { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rule:first-of-type { border-top: 0; }
.rule b { text-align: right; }
/* Regler må aldrig brække over 2 linjer */
.rule > span, .rule > b, .regel-liste li > span, .regel-liste li > b { white-space: nowrap; }
.rule > span, .regel-liste li > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.maaned-hoved { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line-2); text-align: center; }
.maaned-hoved h2 { margin: 12px 0 0; font-size: 30px; font-weight: 900; letter-spacing: -0.02em; }
.maaned-pill { display: inline-block; padding: 6px 16px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; }
.maaned-hoved + .block { margin-top: 28px; }
.afsloer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; margin: 4px 0 12px; border-radius: 14px; background: var(--brand-soft); }
.afsloer > div { display: grid; gap: 2px; }
.afsloer .btn { white-space: nowrap; }
.row.udsolgt .thumb, .row.udsolgt .row-price { opacity: .45; }
.lager { margin-bottom: 20px; }
.lager-liste { display: flex; flex-wrap: wrap; gap: 10px; }
.lager-item { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--card-2); white-space: nowrap; }
.lager-item.ud b { text-decoration: line-through; color: var(--minus); }
.gave-pop { text-align: center; }
.gave-pop h2 { justify-content: center; font-size: 26px; margin: 8px 0 18px; }
.gave-ikon { font-size: 56px; line-height: 1; margin-top: 8px; }
.gave-liste { display: grid; gap: 10px; text-align: left; }
.gave-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); white-space: nowrap; }
.gave-item .coin { width: 18px; height: 18px; vertical-align: -3px; }
.gave-item q { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; white-space: normal; }
.gave-pop .modal-acts { margin-top: 20px; }
.afsloer-res { text-align: center; }
.afsloer-res h2 { justify-content: center; text-align: center; font-size: 32px; margin: 6px 0 4px; }
.afsloer-res p { margin: 0; }
.afsloer-crown { font-size: 60px; line-height: 1; margin-top: 14px; }
.afsloer-praemie { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 4px; padding: 10px 18px; border-radius: 99px; background: var(--brand-soft); font-size: 15px; white-space: nowrap; }
.afsloer-praemie .coin { width: 22px; height: 22px; }
.afsloer-res .modal-acts { margin-top: 22px; }
.saldo-ret { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; font-weight: 700; white-space: nowrap; }
.saldo-ret input { width: 84px; padding: 6px 10px; text-align: right; font-weight: 700; border-color: transparent; background: transparent; }
.saldo-ret input:hover { border-color: var(--line-2); }
.saldo-ret input:focus { border-color: var(--brand); background: var(--card); }
.maal-liste { padding-top: 6px; padding-bottom: 6px; }
.maal-sub { font-size: 15px; font-weight: 800; margin: 22px 0 10px; color: var(--muted); }
.maal-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: center; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.maal-row.slut { grid-template-columns: 260px minmax(0, 1fr) 100px; }
.maal-status { justify-content: flex-end; }
@media (max-width: 700px) { .maal-row, .maal-row.slut { grid-template-columns: 1fr; gap: 8px; } .maal-status { justify-content: flex-start; } }
.maal-row:first-child { border-top: 0; }
.maal-txt { display: grid; gap: 2px; min-width: 0; }
.maal-txt small { color: var(--muted); font-size: 13px; }
.maal-status { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.rule-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.tb-card { display: flex; flex-direction: column; justify-content: center; }
.tb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tb-big { font-size: 32px; font-weight: 900; letter-spacing: -0.02em; margin: 10px 0 6px; }
.tb-sub { font-size: 14px; color: var(--muted); }
.tb-sub b { color: var(--text); }
.meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-2), var(--brand)); transition: width .4s ease; }

/* 2. Menu */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.item .ico { font-size: 38px; line-height: 1; width: 56px; height: 56px; display: grid; place-items: center; background: var(--card-2); border-radius: 14px; }
.price { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--muted); margin-top: 4px; }
.item b { font-size: 16px; }
.item .acts { display: flex; gap: 8px; }

/* Lister i fuld bredde (bestil + projekter). Samme kolonner: billede | indhold | beløb | knapper */
.list { padding: 0; overflow: hidden; }
.list .row { display: flex; align-items: center; gap: 18px; padding: 14px 22px; background: var(--card); }
.list .row:nth-child(even) { background: var(--card-2); }
.list .row:nth-child(even) .thumb { background: var(--card); }
.thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--card-2); display: grid; place-items: center; font-size: 28px; flex: none; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.row-main { flex: 1; min-width: 0; }
.row-main > b { font-size: 16px; }
.row-price { display: flex; align-items: center; gap: 8px; font-weight: 800; white-space: nowrap; min-width: 170px; }
.row-price small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.list .row-acts { display: flex; gap: 8px; flex: none; width: 280px; justify-content: flex-end; }
.list.compact .row { padding: 11px 22px; }
.list.compact .thumb { width: 42px; height: 42px; border-radius: 11px; font-size: 23px; margin: 0 5px; }
.list.compact .row-main > b { font-size: 15px; }
.proj-item { padding-top: 24px !important; padding-bottom: 24px !important; }
.proj-item .row-main { margin-right: 48px; }
.proj-item .row-main .bar { margin: 12px 0 0; max-width: 640px; }
.bar-big { position: relative; height: 30px; border-radius: 10px; }
.bar-big > i { background: linear-gradient(90deg, #cfe2f6, #a9cbee); }
:root[data-theme="dark"] .bar-big > i { background: linear-gradient(90deg, rgba(121, 176, 255, .22), rgba(121, 176, 255, .42)); }
.bar-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.bar-label b { color: var(--text); font-weight: 800; }
.bar-amt { display: inline-flex; align-items: center; white-space: pre; }
.bar-amt .coin { width: 15px; height: 15px; vertical-align: 0; margin-left: 6px; }
.top3-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--muted); max-width: 360px; }
.top3-list li { display: flex; align-items: center; gap: 8px; }
.top3-list li b { margin-left: 4px; color: var(--text); }
.top3-list li.mig, .top3-list li.mig b { color: var(--brand-2); font-weight: 700; }
.proj-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; width: 280px; }
.proj-acts .btn { padding: 13px 34px; font-size: 16px; border-radius: 14px; min-width: 150px; }
.donate { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; }
.proj-acts .dit { font-size: 10.5px; line-height: 1.2; color: var(--brand-2); font-weight: 700; text-align: center; max-width: 150px; }
.top3 { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.top3 b { color: var(--text); }
.top3 .mig b { color: var(--brand-2); }
.top3 .dit { margin-left: auto; color: var(--brand-2); font-weight: 700; }
.disclaimer { margin: 14px 0 0; font-size: 12px; color: var(--faint); }

/* 3. Projekter */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

/* 4. Statistik */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat .val { font-size: 26px; font-weight: 900; letter-spacing: -0.01em; margin: 8px 0 4px; }
.stat .val small { font-size: 14px; color: var(--muted); font-weight: 700; }
.stat .sub { font-size: 13px; color: var(--muted); }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.saldo-pill.big { margin-left: auto; font-size: 16px; padding: 10px 18px 10px 12px; }
.month-name { width: 150px; flex: none; }
.list .row.slim { padding: 12px 0; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.breakdown { display: grid; gap: 6px; margin-top: 12px; font-size: 14px; }
.breakdown div { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }
.breakdown span { color: var(--muted); }

/* 5. Bevægelser */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 34px; align-items: start; }
.grid-2.top0 { margin-top: 0; }
.mini-list { display: grid; }
.mini { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mini:first-child { border-top: 0; padding-top: 0; }
.mini .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini small { color: var(--faint); display: block; font-size: 12px; }

/* ---------- Knapper og tags ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 9px 16px; font-weight: 700; font-size: 14px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--brand-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.danger { color: var(--minus); }
.btn.danger:hover { border-color: var(--minus); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.grow { flex: 1; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--card); border-radius: 99px; padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--muted); }
.chip:hover { color: var(--text); }
.chip.on { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
:root[data-theme="dark"] .chip.on { color: var(--brand-2); border-color: var(--brand-2); }

.badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--brand); color: #fff; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.tag.ny { color: var(--warn); background: var(--brand-soft); }
.tag.udleveret { color: var(--plus); background: rgba(18, 134, 87, .1); }
.tag.annulleret { color: var(--minus); background: rgba(207, 60, 74, .1); }
.plus { color: var(--plus); font-weight: 700; white-space: nowrap; }
.minus { color: var(--minus); font-weight: 700; white-space: nowrap; }
.zero { color: var(--muted); font-weight: 700; white-space: nowrap; }

/* ---------- Tabeller ---------- */

.table-wrap { overflow-x: auto; margin: 0 -8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--faint); padding: 10px 8px; white-space: nowrap; text-transform: uppercase; }
td { padding: 12px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
td.r, th.r { text-align: right; }
.row-acts { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Profil og admin ---------- */

.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.profile-head h1, .page-head h1 { font-size: 32px; font-weight: 900; letter-spacing: -0.02em; margin: 4px 0 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

/* ---------- Formularer / modal ---------- */

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.input, select.input { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); outline: none; }
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search { max-width: 260px; }

.modal-bg { position: fixed; inset: 0; background: rgba(10, 20, 40, .45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s ease; }
.modal { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px; box-shadow: var(--shadow-lg); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal h2 { margin: 0 0 18px; font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.modal h2 .ico { font-size: 30px; }
.modal-acts { display: flex; gap: 10px; margin-top: 20px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.seg button { border: 0; background: transparent; border-radius: 10px; padding: 9px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.sum { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sum b { font-weight: 800; }
@keyframes fade { from { opacity: 0; } }

#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 60; max-width: calc(100vw - 36px); }
.toast { background: var(--card); border: 1px solid var(--line-2); border-left: 4px solid var(--brand-2); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14px; animation: fade .2s ease; max-width: 380px; }
.toast.err { border-left-color: var(--minus); }
.toast small { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }

/* ---------- Responsiv ---------- */

@media (max-width: 960px) {
  .row-top { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; }
  .shell.open .side { transform: none; box-shadow: var(--shadow-lg); }
  .shell.open .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 20, 40, .4); z-index: 30; }
  .top-admin { display: block; }
  .top-admin .top-in { gap: 12px; }
}
@media (max-width: 720px) {
  .top-in { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; }
  .top:not(.top-admin) .top-in { display: flex; }
  .brand-sep, .brand-name { display: none; }
  .tabs { order: 3; width: 100%; }
  .tabs a { flex: 1; text-align: center; }
  .top-r { gap: 8px; }
  .main { padding: 18px 16px 48px; }
  .saldo-card { padding: 20px; border-radius: 22px; }
  .card { padding: 18px; }
  .block { margin-top: 26px; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item { padding: 12px; }
  .item .ico { width: 46px; height: 46px; font-size: 30px; }
  .proj-grid { grid-template-columns: 1fr; }
  .stats, .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.saldo-pill.big { margin-left: auto; font-size: 16px; padding: 10px 18px 10px 12px; }
.month-name { width: 150px; flex: none; }
.list .row.slim { padding: 12px 0; }
.stats.two { grid-template-columns: 1fr; }
  .list .row { flex-wrap: wrap; }
  .row-price { min-width: 0; }
  .list .row-acts, .proj-acts { width: auto; }
  .row-2 { grid-template-columns: 1fr; }
  .search { max-width: none; width: 100%; }
}

/* Varianter og kommer snart */
.variants { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.row.snart .thumb, .row.snart .row-main { opacity: .55; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { border: 1px solid var(--line-2); background: var(--card-2); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 14px; }
.choice:hover { border-color: var(--brand-2); }
.choice.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
:root[data-theme="dark"] .choice.on { color: var(--brand-2); border-color: var(--brand-2); }

/* Feelin' Lucky? */
.lucky { display: flex; align-items: center; gap: 40px; padding: 28px 32px; }
.lucky-main { flex: 1; min-width: 0; }
.lucky-price { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.lp-label { font-size: 16px; font-weight: 700; }
.lucky-price .row-price { font-size: 14px; font-weight: 700; gap: 0; min-width: 0; }
.lucky-price .row-price .amt { min-width: 0; }
.prizes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.btn.lg { padding: 13px 30px; font-size: 16px; border-radius: 14px; }
.win-ico { font-size: 64px; line-height: 1; margin-bottom: 12px; }
@media (max-width: 720px) { .lucky { flex-direction: column; } }

/* Let animeret baggrund: to bløde farveskyer der glider langsomt.
   Kun transform animeres (GPU), ingen blur-filter, og den står stille ved "Reducer bevægelse". */
body::before, body::after { content: ''; position: fixed; z-index: -1; width: 70vmax; height: 70vmax; border-radius: 50%; pointer-events: none; will-change: transform; }
body::before { top: -30vmax; left: -20vmax; background: radial-gradient(circle, rgba(47, 116, 181, .16), transparent 62%); animation: sky1 45s ease-in-out infinite alternate; }
body::after { bottom: -35vmax; right: -20vmax; background: radial-gradient(circle, rgba(140, 160, 185, .16), transparent 62%); animation: sky2 60s ease-in-out infinite alternate; }
:root[data-theme="dark"] body::before { background: radial-gradient(circle, rgba(121, 176, 255, .12), transparent 62%); }
:root[data-theme="dark"] body::after { background: radial-gradient(circle, rgba(140, 160, 185, .10), transparent 62%); }
@keyframes sky1 { to { transform: translate(22vw, 18vh) scale(1.15); } }
@keyframes sky2 { to { transform: translate(-24vw, -16vh) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }

/* Priser i bestil-listen: mindre og højrestillede tal, så 1-3 cifre flugter */
.list.compact .row-price { font-size: 14px; font-weight: 700; gap: 0; min-width: 150px; }
.row-price .amt { display: inline-block; min-width: 3ch; text-align: right; font-weight: 800; }
.row-price .unit { margin-left: 5px; color: var(--muted); font-weight: 600; }
.row-price .amt + .unit + .coin { margin-left: 7px; width: 16px; height: 16px; }

/* Månedens kollega */
.mdk { display: flex; gap: 40px; align-items: stretch; padding: 26px 30px; }
.mdk-main { flex: 1; min-width: 0; }
.mdk-why { margin: 0 0 16px; color: var(--muted); max-width: 560px; }
.vote-form { display: flex; gap: 10px; max-width: 560px; margin-bottom: 8px; }
.vote-form .input { flex: 1; }
.voted { display: flex; align-items: center; gap: 14px; background: var(--brand-soft); border-radius: 14px; padding: 14px 16px; max-width: 560px; }
.voted small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.voted-ico { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.mdk-side { width: 280px; flex: none; display: grid; gap: 12px; align-content: start; }
.mdk-prize, .mdk-last { background: var(--card-2); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.mdk-prize { background: var(--brand-soft); }
.mdk-side b { font-size: 16px; }
@media (max-width: 720px) { .mdk { flex-direction: column; } .mdk-side { width: auto; } }

.vote-why { max-width: 560px; display: block; margin-bottom: 10px; resize: vertical; min-height: 64px; font-size: 14px; }
.vote-form + .vote-why { margin-top: 0; }
.mdk .vote-form:first-of-type { margin-bottom: 10px; }
.voted q { display: block; font-style: italic; color: var(--muted); margin-top: 4px; font-size: 14px; }
.why-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); display: grid; gap: 2px; }

/* Min profil v3: topkort, nøgletal, faner og én liste */
.profile-card { display: flex; align-items: center; gap: 18px; background: var(--brand); color: #fff; border-radius: 22px; padding: 22px 26px; box-shadow: var(--shadow-lg); }
:root[data-theme="dark"] .profile-card { background: #1e4875; }
.profile-card .avatar { background: rgba(255, 255, 255, .18); color: #fff; border-color: transparent; box-shadow: none; }
.pc-who { flex: 1; min-width: 0; }
.pc-who span { font-size: 13px; opacity: .8; }
.pc-who h1 { margin: 2px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.pc-saldo { text-align: right; }
.pc-saldo span { font-size: 13px; opacity: .8; }
.pc-saldo b { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 900; }
.pc-saldo .coin { width: 22px; height: 22px; }
.pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0 26px; }
.pstat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; display: grid; gap: 2px; box-shadow: var(--shadow); }
.pstat span { font-size: 13px; color: var(--muted); }
.pstat b { font-size: 20px; font-weight: 800; }
.pstat small { font-size: 12px; color: var(--muted); }
.pstat small.plus { color: var(--plus); }
.ptabs { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px; margin-bottom: 14px; }
.ptabs button { border: 0; background: transparent; border-radius: 99px; padding: 8px 18px; font-weight: 700; font-size: 14px; color: var(--muted); }
.ptabs button:hover { color: var(--text); }
.ptabs button.on { background: var(--brand-soft); color: var(--brand); }
:root[data-theme="dark"] .ptabs button.on { color: var(--brand-2); }
.plist { padding: 6px 24px 18px; }
.pmonth { font-size: 13px; font-weight: 700; color: var(--muted); padding: 16px 0 6px; }
.prow { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.pmonth + .prow { border-top: 0; }
.plist > .prow:first-child { border-top: 0; }
.prow .row-main > b { font-size: 14px; font-weight: 600; display: block; }
.prow .row-main small { font-size: 12px; color: var(--faint); }
.pico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.pico svg { width: 16px; height: 16px; }
.pico.in { background: rgba(18, 134, 87, .12); color: var(--plus); }
.pico.out { background: rgba(207, 60, 74, .1); color: var(--minus); }
.pico.gift { background: var(--brand-soft); color: var(--warn); }
.pico.neutral { background: var(--card-2); color: var(--muted); }
.pamt { min-width: 140px; text-align: right; font-size: 14px; }
.prow .tag { margin-right: 6px; }
@media (max-width: 720px) { .pstats { grid-template-columns: 1fr; } .profile-card { flex-wrap: wrap; } .pc-saldo { text-align: left; } .pamt { min-width: 0; } }

/* Visuelle nøgletal på profilen */
.pstat { gap: 6px; padding: 16px 18px; }
.pstat-top { display: flex; align-items: center; gap: 10px; }
.pstat-top .pico { width: 30px; height: 30px; }
.pstat-top span:last-child { font-size: 13px; color: var(--muted); }
.pstat b { font-size: 22px; }
.pstat .spark { max-width: none; height: 36px; margin: 2px 0 0; }
.split { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--card-2); margin-top: 4px; }
.split i { display: block; height: 100%; }
.split .s1, .legend i.s1 { background: var(--brand-2); }
.split .s2, .legend i.s2 { background: #a9c6e6; }
.split .s3, .legend i.s3 { background: var(--brand); }
:root[data-theme="dark"] .split .s3, :root[data-theme="dark"] .legend i.s3 { background: #c9dcf2; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.gift-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 26px; }
.gdot { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--brand-soft); color: var(--warn); }
.gdot svg { width: 14px; height: 14px; }

/* "Andet?"-rækker med Send forslag */
.forslag-row .row-main > b { color: var(--text); }
.forslag-row .btn { background: var(--card); }
.list .row.forslag-row .row-acts { width: 280px; }
.proj-item + .forslag-row, .list .forslag-row { padding-top: 14px; padding-bottom: 14px; }
#f-tekst { resize: vertical; min-height: 96px; }

/* Teambudget: brugt-beløbet i en mild rød */
.tb-sub .brugt { color: #c4545e; }
:root[data-theme="dark"] .tb-sub .brugt { color: #f19aa1; }

/* Feelin' Lucky?: køb et drej, derefter låses Drej hjulet op */
.lucky-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lucky-acts .tag { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; }
.lucky-acts .tag svg, .btn.lg svg { width: 16px; height: 16px; }
.btn.primary.locked:disabled { background: var(--card-2); border-color: var(--line-2); color: var(--muted); opacity: 1; }

/* Yehaw! + konfetti */
.btn.yehaw { background: var(--brand-2); border-color: var(--brand-2); }
.btn.yehaw:hover { background: var(--brand); border-color: var(--brand); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i { position: absolute; top: -20px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(16, 35, 61, .08); animation-name: konfetti; animation-timing-function: cubic-bezier(.25, .6, .4, 1); animation-fill-mode: forwards; }
@keyframes konfetti { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); } }

/* Månedens kollega v2: blåt spotlight + afstemning med personvælger */
.mdk2 { display: grid; grid-template-columns: 300px minmax(0, 1fr); padding: 0; overflow: hidden; }
.mdk-spot { position: relative; overflow: hidden; background: var(--saldo); color: #fff; padding: 26px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.mdk-spot > :not(.saldo-deco) { position: relative; }
.mdk-spot .saldo-deco .b-mark { height: 220px; right: -40px; bottom: -60px; }
.mdk-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.mdk-winner { position: relative; margin-top: 6px; }
.mdk-crown { position: absolute; top: -18px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 26px; }
.mdk-avatar { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 26px; background: rgba(255, 255, 255, .16); color: #fff; border: 3px solid rgba(255, 255, 255, .5); }
.mdk-avatar.empty { font-size: 32px; opacity: .8; }
.mdk-avatar.sm { width: 40px; height: 40px; font-size: 13px; border-width: 2px; background: var(--brand-soft); color: var(--brand); border-color: transparent; }
:root[data-theme="dark"] .mdk-avatar.sm { color: var(--brand-2); }
.mdk-name { font-size: 20px; font-weight: 800; }
.mdk-vote { padding: 24px 28px; min-width: 0; }
.mdk-q { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.mdk-vote .mdk-why { margin: 0 0 16px; color: var(--muted); font-size: 14px; max-width: 620px; }
.mdk-vote .vote-why { max-width: none; }
.mdk-send { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mdk-fine { font-size: 12px; color: var(--faint); }
.mdk-voted { display: flex; gap: 14px; align-items: flex-start; background: var(--card-2); border-radius: 14px; padding: 14px 16px; margin: 10px 0 10px; }
.mdk-voted q { display: block; font-style: italic; color: var(--muted); font-size: 14px; margin-top: 4px; }
@media (max-width: 720px) { .mdk2 { grid-template-columns: 1fr; } }

/* Hjulet: tekst i felterne, hovedpræmie i guld, ens knapper */
.prizes .tag.hoved { background: #f6c344; color: #3d2a00; }
.lucky-acts .btn.lg, .lucky-acts .tag { min-width: 170px; height: 48px; justify-content: center; padding: 0 22px; font-size: 15px; border-radius: 14px; }

/* Feelin' Lucky? – tombola-rulle i CS-kasse-stil (mørk rulle, sjældenhedsstriber, markørstreg) */
.lucky2 { padding: 22px 24px; }
.reel { position: relative; overflow: hidden; border-radius: 16px; background: #0f1e33; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 10px 30px rgba(0, 0, 0, .35); padding: 16px 0; }
.reel::before, .reel::after { content: ''; position: absolute; top: 0; bottom: 0; width: 110px; z-index: 2; pointer-events: none; }
.reel::before { left: 0; background: linear-gradient(90deg, #0f1e33, rgba(15, 30, 51, 0)); }
.reel::after { right: 0; background: linear-gradient(-90deg, #0f1e33, rgba(15, 30, 51, 0)); }
.reel-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, .85); box-shadow: 0 0 8px rgba(121, 176, 255, .9); z-index: 3; }
.reel-marker::before, .reel-marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border-left: 9px solid transparent; border-right: 9px solid transparent; }
.reel-marker::before { top: 0; border-top: 12px solid #fff; }
.reel-marker::after { bottom: 0; border-bottom: 12px solid #fff; }
.reel-track { display: flex; gap: 8px; padding-left: 8px; will-change: transform; }
.reel-card { position: relative; overflow: hidden; flex: none; width: 120px; height: 108px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px; background: linear-gradient(180deg, #1d3354, #172a46); color: #eef4fb; transition: transform .35s, box-shadow .35s, opacity .35s, filter .35s; }
.reel-card b.num { font-size: 28px; font-weight: 900; line-height: 1; }
.reel-card small { font-size: 12px; font-weight: 700; opacity: .75; margin-top: 3px; }
.reel-card b.txt { font-size: 14px; font-weight: 800; line-height: 1.15; white-space: nowrap; letter-spacing: -0.01em; }
.reel-card.nitte { color: #93a7bf; }
.reel-card.hoved { background: linear-gradient(180deg, #f8d26b, #f6c344); color: #3d2a00; }
.reel.stoppet .reel-card { opacity: .35; filter: saturate(.5); }
.reel.stoppet .reel-card.vinder { opacity: 1; filter: none; transform: scale(1.1); box-shadow: 0 0 0 2px #fff, 0 0 26px rgba(121, 176, 255, .8); z-index: 1; }
.reel.stoppet .reel-card.vinder.hoved { box-shadow: 0 0 0 2px #fff, 0 0 30px rgba(246, 195, 68, .95); }
.lucky-bund { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.lucky-bund .lucky-price { margin: 0; }
.btn-emoji { font-size: 18px; line-height: 1; }
.reel-card .rico { font-size: 24px; line-height: 1; margin-bottom: 6px; }
.reel-card b.num { font-size: 24px; }
.chance-info { display: inline-flex; margin-left: -6px; }
.info-mini { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); cursor: help; }
.info-mini:hover { color: var(--brand); }
.info-mini svg { width: 18px; height: 18px; }
.chance-info .pop { left: 0; right: auto; top: calc(100% + 8px); bottom: auto; z-index: 30; }
.chance-info:focus-within .pop { opacity: 1; visibility: visible; transform: none; }
.coin.coin-reel { width: 26px; height: 26px; vertical-align: 0; }
.reel-card .rico { display: flex; align-items: center; justify-content: center; height: 26px; }
.reel-card.hoved .coin-reel { filter: drop-shadow(0 0 0 1px #3d2a00); }
.chance-navn { display: inline-flex; align-items: center; gap: 6px; }
.chance-info .pop { width: 240px; }
.lucky-bund { position: relative; z-index: 5; }
.closed .win-besked { font-size: 13px; color: var(--muted); background: var(--card-2); border-radius: 10px; padding: 8px 12px; margin: 6px 0 18px; }

/* Tombola: lys rulle, så den passer til siden (overskriver den mørke CS-stil) */
.reel { background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); }
.reel::before { background: linear-gradient(90deg, var(--card), rgba(255, 255, 255, 0)); }
.reel::after { background: linear-gradient(-90deg, var(--card), rgba(255, 255, 255, 0)); }
:root[data-theme="dark"] .reel::before { background: linear-gradient(90deg, var(--card), rgba(23, 30, 51, 0)); }
:root[data-theme="dark"] .reel::after { background: linear-gradient(-90deg, var(--card), rgba(23, 30, 51, 0)); }
.reel-marker { background: var(--brand); box-shadow: none; }
.reel-marker::before { border-top-color: var(--brand); }
.reel-marker::after { border-bottom-color: var(--brand); }
:root[data-theme="dark"] .reel-marker { background: #fff; }
:root[data-theme="dark"] .reel-marker::before { border-top-color: #fff; }
:root[data-theme="dark"] .reel-marker::after { border-bottom-color: #fff; }
.reel-card { box-shadow: 0 1px 3px rgba(16, 35, 61, .12); }
.reel-card.coins { background: var(--brand); color: #fff; }
.reel-card.vare { background: var(--card); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand-2); }
:root[data-theme="dark"] .reel-card.vare { color: var(--brand-2); }
.reel-card.nitte { background: var(--card-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.reel.stoppet .reel-card { opacity: .4; }
.reel.stoppet .reel-card.vinder { box-shadow: 0 0 0 3px var(--brand), 0 10px 26px rgba(16, 35, 61, .3); }
.reel.stoppet .reel-card.vinder.hoved { box-shadow: 0 0 0 3px var(--brand), 0 0 28px rgba(246, 195, 68, .9); }
.reel-card { border-radius: 4px; }
.reel { border-radius: 8px; }

/* Top 3: faste kolonner (medalje | navn | beløb højrestillet), så det flugter uanset navn og antal cifre */
.top3-list { max-width: 400px; }
.top3-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 120px; align-items: center; gap: 6px; }
.top3-list .t3-navn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top3-list .t3-beloeb { text-align: right; white-space: nowrap; }
.top3-list .t3-beloeb b { margin: 0; color: var(--text); }
.top3-list li.mig .t3-beloeb b { color: var(--brand-2); }
.top3-list li.faint { display: block; }
/* Fuldt projekt: grøn progressbar */
/* Fuldt projekt: samme grøn som Yehaw! og hvid skrift for kontrasten */
.bar-big.fuld > i, :root[data-theme="dark"] .bar-big.fuld > i { background: linear-gradient(90deg, #34a874, #258a5a); }
.bar-big.fuld .bar-label, .bar-big.fuld .bar-label b { color: #fff; }

/* Projekter: Top donator + "Se resten" (top 10 ved hover) */
.top-don { margin-top: 12px; max-width: 400px; }
.top-don-titel { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.top-don .top3-list { margin: 0; }
.top10 { display: inline-block; margin-top: 4px; }
.se-resten { font-size: 12px; font-weight: 700; color: var(--brand-2); cursor: help; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(47, 116, 181, .35); }
.top10 .pop { left: 0; right: auto; top: calc(100% + 6px); width: 340px; z-index: 30; }
.top10 .pop .top3-list { gap: 4px; }
.top10:focus-within .pop { opacity: 1; visibility: visible; transform: none; }
/* Tombola-kort: næsten skarpe hjørner og meget diskrete kanter */
.reel-card { border-radius: 2px; box-shadow: none; }
.reel-card.vare { box-shadow: inset 0 0 0 1px var(--line-2); }
.reel-card.nitte { box-shadow: none; }
.reel { border-radius: 4px; }
/* Yehaw! er grøn ligesom den fulde progressbar */
.btn.yehaw { background: #2fa36f; border-color: #2fa36f; color: #fff; }
.btn.yehaw:hover { background: #258a5d; border-color: #258a5d; }

/* Teambudget-kortet: blå accent, ring med andel tilbage og svagt b-mærke */
.tb-card { position: relative; overflow: hidden; }
.tb-card > :not(.tb-deco) { position: relative; }
.tb-deco .b-mark { position: absolute; right: -18px; bottom: -46px; height: 170px; width: auto; color: var(--brand); opacity: .05; }
.tb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tb-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.tb-big { color: var(--brand); margin: 0; font-size: 34px; }
:root[data-theme="dark"] .tb-big { color: #fff; }
.tb-label { font-size: 13px; font-weight: 700; color: var(--muted); margin: 2px 0 8px; }
.tb-ring { width: 84px; height: 84px; flex: none; }
.tb-ring-bg { fill: none; stroke: var(--card-2); stroke-width: 8; }
.tb-ring-fg { fill: none; stroke: var(--brand-2); stroke-width: 8; stroke-linecap: round; }
.tb-ring text { font-size: 15px; font-weight: 800; fill: var(--text); font-family: 'Montserrat', system-ui, sans-serif; }
/* Lister må ikke klippe popups (fx top 10) – hjørnerne rundes på første/sidste række i stedet */
.list { overflow: visible; }
.list > .row:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.list > .row:last-child { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.list > .row { position: relative; }
.list > .row:hover, .list > .row:focus-within { z-index: 6; }

/* Månedens kollega: tydelig opdeling mellem sidste vinder og denne måneds afstemning */
.tb-card .tb-big { margin: 10px 0 6px; }

/* Tombola i tomgang: ruller langsomt i ring for at friste (pauser ved hover, slået fra ved "Reducer bevægelse") */
/* Top contributors: beløbet tæt på navnet, men stadig i fast kolonne */
.top3-list li { grid-template-columns: 24px 190px 110px; }
.top-don, .top3-list { max-width: 340px; }
.top10 .pop { width: 400px; padding: 18px 22px; }
.top10 .pop .top3-list { gap: 9px; max-width: none; }
.t3-navn .mini-av { width: 22px; height: 22px; }
.split .s4, .legend i.s4 { background: #8b97ab; }
.fb-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 16px 24px; }
.fb-card b { font-size: 15px; }
.beloeb-chips { margin-bottom: 14px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.beloeb-chips .chip { padding: 8px 0; text-align: center; }
.beloeb-chips .chip:disabled { opacity: .35; cursor: not-allowed; }
.proj-acts .dit.event { color: #2fa36f; }

/* Månedens kollega v3: venstre = kun sidste vinder (tom teaser ved start), højre = afstemning med præmie + deadline */
.mdk-spot { justify-content: center; }
.mdk-avatar.empty { border-style: dashed; background: rgba(255, 255, 255, .06); }
.mdk-crown.faded { opacity: .45; filter: grayscale(.6); }
.mdk-tease { font-size: 13px; opacity: .8; }
.mdk-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; }
.mdk-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); border-radius: 12px; padding: 8px 14px; font-size: 14px; }
.mdk-pill small { font-size: 12px; color: var(--muted); font-weight: 600; }
.mdk-pill b { color: var(--brand); font-weight: 800; }
:root[data-theme="dark"] .mdk-pill b { color: var(--brand-2); }
.mdk-pill .coin { width: 18px; height: 18px; }
/* "Vinder i <måned>" større og øverst i feltet */
.mdk-spot { justify-content: center; }
.mdk-spot .mdk-eyebrow { font-size: 15px; font-weight: 800; letter-spacing: .1em; opacity: .95; margin-bottom: 14px; }

/* Månedens kollega: pæn dropdown i stedet for kort */
.mdk-select { position: relative; margin-bottom: 10px; }
.mdk-select::after { content: ''; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.mdk-select select { appearance: none; -webkit-appearance: none; padding: 13px 40px 13px 14px; font-weight: 600; cursor: pointer; }

/* Min profil: forklaringen under "Brugt" står i to kolonner (2 linjer) */
.legend { display: grid; grid-template-columns: repeat(2, max-content); gap: 4px 16px; }
/* Min profil: "I alt" under Optjent i sort, ikke fed */
.pstat small.pstat-ialt { color: var(--text); font-weight: 400; white-space: nowrap; }

/* Admin-overblik */
.tag.ok { color: #1f7a4f; background: rgba(47, 163, 111, .12); }
:root[data-theme="dark"] .tag.ok { color: #6fd4a4; }
.adm-list { display: flex; flex-direction: column; }
.adm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.adm-row:first-child { border-top: 0; padding-top: 2px; }
.adm-main { min-width: 0; }
.adm-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mini-av.md { width: 34px; height: 34px; font-size: 10px; margin-right: 0; }
.nowrap { white-space: nowrap; }
.adm-main small { display: block; margin-top: 2px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-ev { padding: 8px 0; }
.adm-ev-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 6px; }
.adm-ev .bar.fuld > i { background: linear-gradient(90deg, #34a874, #258a5a); }

/* Sidepanel: fold sammen til kun ikoner (desktop) */
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-fold { width: 32px; height: 32px; flex: none; }
.side-fold svg { transition: transform .2s ease; }
@media (min-width: 961px) {
  .shell { transition: grid-template-columns .2s ease; }
  .shell.foldet { grid-template-columns: 72px 1fr; }
  .shell.foldet .side { padding: 22px 10px 14px; overflow-x: hidden; }
  .shell.foldet .side-head { justify-content: center; padding: 0 0 20px; }
  .shell.foldet .side-head .brand { display: none; }
  .shell.foldet .side-fold svg { transform: rotate(180deg); }
  .shell.foldet .nav a { justify-content: center; padding: 10px 0; position: relative; }
  .shell.foldet .nav a > span:not(.badge) { display: none; }
  .shell.foldet .nav .badge { position: absolute; top: 2px; right: 6px; margin: 0; font-size: 10px; min-width: 16px; padding: 0 4px; }
  .shell.foldet .me { flex-direction: column; padding: 14px 0 0; }
  .shell.foldet .me .who { display: none; }
}
@media (max-width: 960px) { .side-fold { display: none; } }
.adm-first { margin-bottom: 20px; }
.adm-stak { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.stat-grid.to { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-grid.tre { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .stat-grid.tre { grid-template-columns: 1fr; } }
tfoot td { border-top: 2px solid var(--line-2); padding-top: 12px; }
/* Nøgletal: lidt luft mellem "Webcoins" og mønten */
.stat .val .coin { margin-left: 8px; }
/* Sortérbare kolonner (Admin → Brugere) */
.th-sort { all: unset; cursor: pointer; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.th-sort:hover, .th-sort.on { color: var(--text); }
.th-sort:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }
/* Opgørelse: måneder der er sendt til RAB */
tr.afregnet td { color: var(--muted); }
.row-acts.rab { justify-content: flex-end; align-items: center; }

/* Admin-overblik: Events og Månedens kollega lige høje */
.grid-2.lige { align-items: stretch; }
.grid-2.lige > .card { height: 100%; box-sizing: border-box; }
/* Posteringer: Vis flere */
.vis-flere { display: flex; justify-content: center; padding-top: 16px; }
/* Regler: simpel liste pr. gruppe */
.regel-liste .card-title { margin: 22px 0 6px; }
.regel-liste .card-title:first-child { margin-top: 0; }
.regel-liste ul { list-style: none; margin: 0; padding: 0; }
.regel-liste li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.regel-liste p { margin: 0 0 4px; font-size: 14px; }
