/* SPOTR Beheer — de controlekamer. Tokens, knoppen, velden en tabellen komen
   uit de gedeelde stylesheet van de club-app; hier staat alleen de schil. */
:root {
  --kamer: #0B2C1E;
  --kamer-licht: #12402C;
  --kalk: #D8F45A;
  --color-topbar: #0B2C1E;
  --ok: #1BA94C;
  --let-op: #D99A1E;
  --mis: #D23B3B;
}
body { background: var(--color-bg); }

/* ── aanmelden ─────────────────────────────────────────────────────────── */
body.aanmeld { min-height: 100vh; background: var(--kamer); color: #F4F5F2; display: grid; place-items: center; padding: 24px; box-sizing: border-box; }
body.aanmeld::before { content: ''; position: fixed; inset: -40vmax auto auto -20vmax; width: 90vmax; height: 90vmax; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); pointer-events: none; }
.aanmeld-vlak { width: 100%; max-width: 400px; }
.aanmeld-kaart { display: flex; flex-direction: column; gap: 18px; }
.merk { display: flex; align-items: baseline; gap: 12px; }
.merk .spotr-woordmerk { font-family: var(--font-kop); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; color: #F4F5F2; --lok-accent: var(--kalk); display: inline-flex; align-items: center; }
.spotr-woordmerk .spotr-o { width: .84em; height: .84em; margin: 0 .09em 0 .05em; }
.spotr-o-lijn { stroke: var(--lok-accent); stroke-width: 9; }
.spotr-o-stip { fill: var(--lok-accent); }
.merk-sub { font-family: var(--font-mono); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; font-size: 11px; color: var(--kalk); }
.aanmeld-intro { margin: 0; color: rgba(244,245,242,.72); font-size: 14px; max-width: 34ch; }
body.aanmeld form { display: flex; flex-direction: column; gap: 14px; }
body.aanmeld .field > label { color: rgba(244,245,242,.7); }
body.aanmeld .input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #F4F5F2; }
body.aanmeld .input:focus { border-color: var(--kalk); box-shadow: none; }
body.aanmeld .btn-primary { margin-top: 6px; }
.fout { color: #FFB4B4; font-size: 13px; }

/* ── schil: zijbalk + inhoud ───────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.zijbalk { background: var(--kamer); color: #F4F5F2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; box-sizing: border-box; padding: 22px 14px 18px; }
.zijbalk .merk { padding: 0 10px 22px; }
.zijbalk .merk .spotr-woordmerk { font-size: 22px; }
.zijbalk nav { display: flex; flex-direction: column; gap: 2px; }
.zijbalk a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); color: rgba(244,245,242,.78); text-decoration: none; font-size: 14px; font-weight: 500; }
.zijbalk a svg { width: 18px; height: 18px; opacity: .8; }
.zijbalk a:hover { background: rgba(255,255,255,.06); color: #fff; }
.zijbalk a.actief { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--kalk); }
.zijbalk a .tel { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; padding: 1px 7px; border-radius: 999px; background: var(--kalk); color: #062015; }
.zijbalk a .tel.stil { background: rgba(255,255,255,.14); color: #F4F5F2; }
.zijbalk .groep { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(244,245,242,.42); padding: 16px 10px 6px; }
.zijbalk .onder { margin-top: auto; padding: 12px 10px 0; font-size: 12px; color: rgba(244,245,242,.55); display: flex; flex-direction: column; gap: 6px; }
.zijbalk .onder button { background: none; border: 0; color: rgba(244,245,242,.75); padding: 0; font: inherit; cursor: pointer; text-align: left; }
.zijbalk .onder button:hover { color: #fff; text-decoration: underline; }

.inhoud { padding: 30px 36px 60px; min-width: 0; max-width: 1240px; }
.kop { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 2px solid var(--color-text); }
.kop .kicker { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--color-accent-tekst, #0F7A38); margin-bottom: 4px; }
.kop h1 { margin: 0; font-size: 30px; letter-spacing: -0.02em; }
.kop p { margin: 6px 0 0; color: var(--color-neutral-600); font-size: 14px; max-width: 64ch; }
.kop .acties { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── bouwstenen ────────────────────────────────────────────────────────── */
.tegels { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tegel { background: var(--color-surface); border: 1px solid var(--color-neutral-300); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: border-color .1s; }
.tegel:hover { border-color: var(--color-text); }
.tegel .lab { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-neutral-600); }
.tegel .val { font-family: var(--font-kop); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tegel .sub { font-size: 12px; color: var(--color-neutral-600); }
.tegel.let-op { border-color: var(--let-op); } .tegel.let-op .val { color: #9A6A0A; }
.tegel.mis { border-color: var(--mis); } .tegel.mis .val { color: var(--mis); }

.kolommen { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.kolommen > .card { min-width: 0; }
@media (max-width: 1000px) { .kolommen { grid-template-columns: 1fr; } }
.card h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h2 .meer { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--color-accent-tekst, #0F7A38); }
.card h2 .meer:hover { text-decoration: underline; cursor: pointer; }

.lijst { display: flex; flex-direction: column; }
.rij { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: var(--hairline); font-size: 14px; }
.rij:last-child { border-bottom: 0; }
.rij .groei { flex: 1; min-width: 0; }
.rij .tekst { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rij .meta { font-size: 12px; color: var(--color-neutral-600); }
.rij.klik { cursor: pointer; } .rij.klik:hover { background: var(--color-neutral-100); margin: 0 -10px; padding-left: 10px; padding-right: 10px; }

.stip { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--color-neutral-400); flex: none; }
.stip.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(27,169,76,.18); }
.stip.mis { background: var(--mis); box-shadow: 0 0 0 3px rgba(210,59,59,.18); }
.stip.let-op { background: var(--let-op); }

.tag.ok { border-color: var(--ok); color: #0F7A38; }
.tag.let-op { border-color: var(--let-op); color: #9A6A0A; }
.tag.mis { border-color: var(--mis); color: var(--mis); }
.tag.stil { border-color: var(--color-neutral-400); color: var(--color-neutral-600); }
.tag.vol { background: var(--color-text); color: #fff; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters .input { max-width: 280px; min-height: 40px; padding: 8px 12px; font-size: 14px; }
.filters .chip { min-height: 34px; }

.tablewrap { overflow-x: auto; }
.table td .sub { display: block; font-size: 12px; color: var(--color-neutral-600); }
.table tbody tr.klik { cursor: pointer; }
.table .knoppen { display: flex; gap: 6px; justify-content: flex-end; }

.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.formgrid .breed { grid-column: 1 / -1; }
@media (max-width: 720px) { .formgrid { grid-template-columns: 1fr; } }
.field textarea.input { min-height: 90px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--color-neutral-600); }

.sleutel { font-family: var(--font-mono); font-size: 12px; background: var(--color-neutral-100); border: 1px solid var(--color-neutral-300); border-radius: var(--r-sm); padding: 8px 10px; word-break: break-all; user-select: all; }
.codeblok { font-family: var(--font-mono); font-size: 12px; background: var(--kamer); color: #E6F2EA; border-radius: var(--r-sm); padding: 12px 14px; white-space: pre-wrap; word-break: break-all; line-height: 1.55; }

.detailkop { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.kenmerken { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 18px; }
.kenmerken .k { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-neutral-600); }
.kenmerken .w { font-weight: 600; font-size: 15px; }
.tabs { display: flex; gap: 4px; border-bottom: var(--hairline); margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; font-size: 14px; color: var(--color-neutral-600); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--color-text); border-bottom-color: var(--color-text); }

.balkjes { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 6px; }
.balkjes .b { flex: 1; background: var(--color-accent); border-radius: 2px 2px 0 0; min-height: 2px; position: relative; }
.balkjes .b:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--color-text); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 3px; white-space: nowrap; margin-bottom: 4px; font-family: var(--font-mono); }
.uptime { display: flex; gap: 2px; }
.uptime i { flex: 1; height: 22px; background: var(--ok); border-radius: 2px; opacity: .85; }
.uptime i.mis { background: var(--mis); }
.uptime i.leeg { background: var(--color-neutral-200); }
.verdeling { display: flex; flex-direction: column; gap: 6px; }
.verdeling .v { display: grid; grid-template-columns: 120px 1fr 48px; gap: 10px; align-items: center; font-size: 13px; }
.verdeling .baan { height: 8px; background: var(--color-neutral-200); border-radius: 4px; overflow: hidden; }
.verdeling .vul { height: 100%; background: var(--color-accent); }
.verdeling .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.stapel { display: flex; flex-direction: column; gap: 18px; }
.regels { display: flex; flex-direction: column; gap: 8px; }
.regel { display: grid; grid-template-columns: 1fr 80px 120px 36px; gap: 8px; align-items: center; }
.regel .input { min-height: 40px; padding: 8px 10px; font-size: 14px; }
.totaal { display: flex; justify-content: flex-end; gap: 18px; font-size: 14px; }
.totaal b { font-family: var(--font-kop); font-size: 18px; }

.leeg { padding: 24px 0; color: var(--color-neutral-600); font-size: 14px; }
.uitleg { font-size: 13px; color: var(--color-neutral-600); line-height: 1.55; }
.uitleg code { font-family: var(--font-mono); font-size: 12px; background: var(--color-neutral-100); padding: 1px 5px; border-radius: 3px; }
.dialog { max-width: 640px; width: calc(100% - 32px); }
.dialog.breed { max-width: 820px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .zijbalk { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 12px 14px; }
  .zijbalk .merk { padding: 0 8px 0 0; width: 100%; }
  .zijbalk nav { flex-direction: row; flex-wrap: wrap; }
  .zijbalk .groep, .zijbalk .onder { display: none; }
  .zijbalk a { padding: 7px 10px; font-size: 13px; }
  .inhoud { padding: 18px 16px 40px; }
  .kop h1 { font-size: 24px; }
  .regel { grid-template-columns: 1fr 60px 90px 32px; }
}

/* ── overgenomen uit app.css van de club-app (niet geladen hier) ───────── */
.chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-radius: var(--r-sm); padding: 8px 14px; min-height: 40px; background: var(--color-neutral-100); color: var(--color-text); border: 2px solid var(--color-neutral-400); font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .08s, border-color .08s, color .08s; }
.chip:hover { border-color: var(--color-text); }
.chip.on { background: var(--color-text); border-color: var(--color-text); color: #fff; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 10px); background: var(--kamer); color: #F4F5F2; border-left: 6px solid var(--kalk); border-radius: var(--r-md); padding: 13px 20px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; z-index: 2000; max-width: calc(100vw - 32px); opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── tweede ronde: tabbalk, zoeken, tabellen, donkere modus, details ─────── */
.zoekknop { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: rgba(244,245,242,.75); font: inherit; font-size: 13px; cursor: pointer; width: 100%; }
.zoekknop:hover { background: rgba(255,255,255,.1); color: #fff; }
.zoekknop kbd { margin-left: auto; font-family: var(--font-mono); font-size: 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 3px; padding: 1px 5px; }
.zoekdialoog { padding: 12px; }
.zoekdialoog .input { font-size: 16px; }
.zoekuit { margin-top: 8px; max-height: 50vh; overflow: auto; }
.zoekgroep { padding: 6px 0; }
.zoekgroep .groep { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--color-neutral-600); padding: 6px 8px 2px; }
.zoekgroep a { display: block; padding: 8px 10px; border-radius: var(--r-sm); color: inherit; text-decoration: none; font-size: 14px; }
.zoekgroep a:hover, .zoekgroep a:focus { background: var(--color-neutral-100); outline: none; }
.zoekgroep .meta { color: var(--color-neutral-600); font-size: 12.5px; }

.tabelvoet { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; font-size: 12px; color: var(--color-neutral-600); }
.table th.sorteerbaar { cursor: pointer; user-select: none; white-space: nowrap; }
.table th.sorteerbaar:hover { color: var(--color-text); }
.table th.sort-op::after { content: ' ↑'; } .table th.sort-neer::after { content: ' ↓'; }
.table tr.gedempt { opacity: .55; }
.knoppenrij { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vink { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; font-family: var(--font-body) !important; text-transform: none !important; letter-spacing: 0 !important; color: inherit !important; }
.vink input { width: 18px; height: 18px; accent-color: var(--color-accent); }
.vink.licht { color: rgba(244,245,242,.8) !important; }
.input.klein { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.input.code { font-family: var(--font-mono); font-size: 22px; letter-spacing: .25em; text-align: center; }
.demo-regel { margin-top: 8px; font-size: 14px; padding: 6px 10px; background: var(--color-neutral-100); border-radius: var(--r-sm); display: inline-block; }
.agenda-dag { width: 48px; text-align: center; line-height: 1.05; flex: none; }
.agenda-dag b { display: block; font-family: var(--font-kop); font-size: 22px; }
.agenda-dag span { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--color-neutral-600); }
.qr svg { width: 180px; height: 180px; border: 1px solid var(--color-neutral-300); border-radius: var(--r-sm); background: #fff; padding: 6px; }
.weken { display: flex; gap: 3px; font-family: var(--font-mono); font-size: 9px; color: var(--color-neutral-600); margin-top: 4px; }
.weken span { flex: 1; text-align: center; }
.balkjes .b.stapel-balk { display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; }
.balkjes .b.stapel-balk i { display: block; background: #CFEBD8; }
.tabbalk { display: none; }
.dialog .sleutel { font-size: 14px; }

/* Tabbalk op gsm, zoals de club-app: vijf vaste ingangen onderaan. */
@media (max-width: 860px) {
  .zijbalk { padding: 10px 14px; gap: 8px; }
  .zijbalk .merk { width: auto; padding: 0; flex: 1; }
  .zijbalk .zoekknop { width: auto; margin: 0; padding: 6px 10px; }
  .zijbalk .zoekknop span, .zijbalk .zoekknop kbd { display: none; }
  .zijbalk nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px; padding-bottom: 2px; }
  .zijbalk nav::-webkit-scrollbar { display: none; }
  .zijbalk nav a { font-size: 12.5px; padding: 6px 9px; white-space: nowrap; flex: none; }
  .zijbalk nav a svg { display: none; }
  .zijbalk a.actief { box-shadow: inset 0 -2px 0 var(--kalk); }
  .inhoud { padding-bottom: 90px; }
  .tabbalk { position: fixed; bottom: 0; left: 0; right: 0; z-index: 900; display: flex; justify-content: space-around; background: var(--kamer); color: #F4F5F2; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.1); }
  .tabbalk a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: rgba(244,245,242,.7); text-decoration: none; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; position: relative; padding: 4px 8px; min-width: 56px; }
  .tabbalk a.actief { color: var(--kalk); }
  .tabbalk a .tel { position: absolute; top: 0; right: 4px; background: var(--kalk); color: #062015; font-style: normal; font-size: 9px; border-radius: 999px; padding: 0 5px; }
  .tegels { grid-template-columns: repeat(2, 1fr); }
  .kop .acties { width: 100%; }
}

/* Donkere modus: Deep Pitch als grond, kaarten iets lichter, zelfde accenten. */
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="licht"]) { --color-bg: #0E1A14; --color-surface: #15231C; --color-text: #ECEEE9; --color-neutral-100: #1B2B23; --color-neutral-200: #22352B; --color-neutral-300: #2E4337; --color-neutral-400: #4A5F53; --color-neutral-500: #6E8276; --color-neutral-600: #9AAA9F; --color-neutral-700: #C0CAC3; --color-neutral-800: #DCE2DC; --color-neutral-900: #ECEEE9; --color-divider: #ECEEE9; --color-accent-tekst: #5FD487; }
}
:root[data-thema="donker"] { --color-bg: #0E1A14; --color-surface: #15231C; --color-text: #ECEEE9; --color-neutral-100: #1B2B23; --color-neutral-200: #22352B; --color-neutral-300: #2E4337; --color-neutral-400: #4A5F53; --color-neutral-500: #6E8276; --color-neutral-600: #9AAA9F; --color-neutral-700: #C0CAC3; --color-neutral-800: #DCE2DC; --color-neutral-900: #ECEEE9; --color-divider: #ECEEE9; --color-accent-tekst: #5FD487; }
@media (prefers-color-scheme: dark) { :root:not([data-thema="licht"]) .tegel.let-op .val { color: #F2C35B; } :root:not([data-thema="licht"]) .tag.let-op { color: #F2C35B; } :root:not([data-thema="licht"]) .tag.ok { color: #5FD487; } :root:not([data-thema="licht"]) .tag.vol { background: var(--kalk); color: #062015; } :root:not([data-thema="licht"]) .codeblok { background: #07120C; } :root:not([data-thema="licht"]) .balkjes .b.stapel-balk i { background: #2E5A3E; } :root:not([data-thema="licht"]) .btn-secondary { background: var(--color-surface); color: var(--color-text); } }
:root[data-thema="donker"] .tegel.let-op .val, :root[data-thema="donker"] .tag.let-op { color: #F2C35B; }
:root[data-thema="donker"] .tag.ok { color: #5FD487; }
:root[data-thema="donker"] .tag.vol { background: var(--kalk); color: #062015; }
:root[data-thema="donker"] .codeblok { background: #07120C; }
:root[data-thema="donker"] .balkjes .b.stapel-balk i { background: #2E5A3E; }
:root[data-thema="donker"] .btn-secondary { background: var(--color-surface); color: var(--color-text); }

/* Meldingen boven een lijst: rustig als er niets te doen is, opvallend als wel. */
.kader-stil, .kader-let-op { border-radius: var(--r-sm); padding: 10px 14px; font-size: 13.5px; line-height: 1.5; margin-bottom: 4px; }
.kader-stil { background: var(--color-neutral-100); border: 1px solid var(--color-neutral-300); color: var(--color-neutral-700); }
.kader-let-op { background: #FFF4D6; border: 1px solid var(--let-op); color: #5E4300; }
:root[data-thema="donker"] .kader-let-op { background: #2A2110; color: #F2C35B; }
@media (prefers-color-scheme: dark) { :root:not([data-thema="licht"]) .kader-let-op { background: #2A2110; color: #F2C35B; } }

/* Bevestigingsvenster van een uitrol: wie krijgt wat. */
.uitrol-lijst { border: 1px solid var(--color-neutral-300); border-radius: var(--r-sm); padding: 4px 12px; margin-bottom: 4px; max-height: 34vh; overflow: auto; }
.uitrol-lijst .rij:last-child { border-bottom: 0; }
.nieuwlijst { font-size: 13.5px; margin: 4px 0; }
.nieuwlijst summary { cursor: pointer; color: var(--color-accent-tekst, #0F7A38); font-weight: 600; }
.nieuwlijst ul { margin: 6px 0 0; padding-left: 20px; color: var(--color-neutral-700); }
.nieuwlijst li { margin-bottom: 3px; }
