:root {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-2: #f8f9fc;
  --text: #18202f;
  --muted: #667085;
  --line: #e3e7ef;
  --accent: #ff7a1a;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e6;
  --side: #0f1a2e;
  --side-text: #b8c3d6;
  --side-active: #1c2a45;
  --ok: #16a34a; --ok-soft: #e7f7ed;
  --warn: #d97706; --warn-soft: #fdf3e2;
  --err: #dc2626; --err-soft: #fdecec;
  --info: #2563eb; --info-soft: #e8effd;
  --yellow: #a16207; --yellow-soft: #fef9c3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  color-scheme: light;
}
/* Donker: automatisch volgens de computer, tenzij de gebruiker "licht" of "donker" kiest. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --panel: #121a2b; --panel-2: #172036; --text: #e6eaf2; --muted: #94a0b8; --line: #243049;
    --accent-soft: #3a2414; --side: #080d19; --side-active: #16213a;
    --ok-soft: #10301d; --warn-soft: #36270d; --err-soft: #3a1414; --info-soft: #14244a;
    --yellow: #facc15; --yellow-soft: #3a330d;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0b1120; --panel: #121a2b; --panel-2: #172036; --text: #e6eaf2; --muted: #94a0b8; --line: #243049;
    --accent-soft: #3a2414; --side: #080d19; --side-active: #16213a;
    --ok-soft: #10301d; --warn-soft: #36270d; --err-soft: #3a1414; --info-soft: #14244a;
    --yellow: #facc15; --yellow-soft: #3a330d;
    --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 22px; margin: 0; font-weight: 650; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.hidden { display: none !important; }

/* ---------- opbouw ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; color: #fff; font-weight: 750; letter-spacing: .4px; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.brand small { display: block; font-weight: 500; color: var(--side-text); font-size: 11.5px; letter-spacing: 0; }
.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: var(--side-text); font-weight: 500; }
.nav a:hover { background: var(--side-active); color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav .sep { height: 1px; background: #1e2a42; margin: 10px 6px; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.side-foot { padding: 14px 14px 16px; border-top: 1px solid #1e2a42; font-size: 12.5px; display: grid; gap: 10px; }
.side-foot .user { color: #fff; font-weight: 600; font-size: 13px; }
.side-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.side-who { min-width: 0; }
.side-who > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-role { color: var(--side-text); }
.side-prefs { display: grid; grid-template-columns: 1fr; gap: 6px; }
.side-sel { position: relative; display: block; min-width: 0; }
.side-sel svg { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--side-text); pointer-events: none; }
.side-foot .side-sel select { width: 100% !important; min-width: 0; height: 32px; padding: 0 22px 0 28px; font-size: 12.5px;
  background-color: var(--side-active); color: #e6ecf5; border: 1px solid #2a3a5c; border-radius: 8px; cursor: pointer;
  appearance: none; -webkit-appearance: none; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: linear-gradient(45deg, transparent 50%, #9fb0cc 50%), linear-gradient(135deg, #9fb0cc 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.side-foot .side-sel select:hover { border-color: #3b4f78; }
.side-foot .side-sel select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-foot .side-sel select option { background: #16223a; color: #e6ecf5; }
.side-foot .side-logout { width: 100%; justify-content: center; margin: 0; background: transparent; color: #e6ecf5; border-color: #2a3a5c; }
.side-foot .side-logout:hover { background: var(--side-active); color: #fff; }
.main { min-width: 0; padding: 26px 32px 60px; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .spacer { flex: 1; }
.btn.menu-btn { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; width: 250px; left: -260px; transition: left .2s; }
  .side.open { left: 0; }
  .main { padding: 16px 16px 60px; }
  .btn.menu-btn { display: inline-flex; }
}

/* ---------- onderdelen ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .stack-col > .card + .card { margin-top: 0; }
.stack-col > .card:last-child { flex: 1; }
.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cols-2, .cols-4 { grid-template-columns: minmax(0, 1fr); } }
/* Rasterkaarten nooit breder dan hun kolom (lange meldingen/namen breken af in plaats van de pagina op te rekken) */
.grid > .card { min-width: 0; }
.event-row > span:not(.lvl):not(.badge) { min-width: 0; flex: 1; overflow-wrap: anywhere; }
table.list td { overflow-wrap: anywhere; }
@media (max-width: 760px) { .event-row time { min-width: 64px; } }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .value { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12.5px; color: var(--muted); }
a.stat:hover .value { color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  padding: 7px 13px; border-radius: 8px; font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c9d0dc; background: var(--panel-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn svg { width: 16px; height: 16px; }
.badge svg { width: 12px; height: 12px; vertical-align: -2px; }
/* Icoon direct in een kop (bijv. Synchroon afspelen bij Planning): altijd een vaste maat. */
h1 > svg, h2 > svg, h3 > svg { width: 18px; height: 18px; flex: none; }
/* Licenties → Facturen: totalen */
.inv-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0 8px; }
.inv-totals > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.inv-totals b { font-size: 17px; }
.share-list svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.folder-row svg { width: 16px; height: 16px; flex: none; }
.seg { display: inline-flex; gap: 4px; }
.side .btn { background: transparent; color: var(--side-text); border-color: #2a3954; }
.side .btn:hover { color: #fff; background: var(--side-active); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input[type=color] { padding: 2px; height: 36px; width: 56px; }
label.field { display: flex; flex-direction: column; gap: 5px; font-weight: 550; font-size: 13px; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
label.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.form { display: grid; gap: 14px; }
.form .row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.search { max-width: 260px; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--panel-2); }
.table-wrap { overflow-x: auto; margin: -18px; }
.table-wrap table.list th:first-child, .table-wrap table.list td:first-child { padding-left: 18px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .5; display: block; margin: 0 auto 10px; }

.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow); }
/* Hoofdstatus van een speler: vaste breedte = breedste label in 4 talen ("Bildschirm aus"). */
.badge.st-main { min-width: 112px; justify-content: center; box-sizing: border-box; }
/* Stabiel/Instabiel: vaste breedte = breedste in 4 talen ("Unstable"). */
.badge.st-stab { min-width: 81px; justify-content: center; box-sizing: border-box; }
.badge.white { background: var(--panel); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { background: none; border: 0; padding: 9px 14px; font: inherit; font-weight: 550; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--text); border-color: var(--accent); }

.alert { padding: 11px 14px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-weight: 500; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.danger { background: var(--err-soft); color: var(--err); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.restart-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }

/* ---------- inloggen ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login .art { background: var(--side); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login .art h2 { font-size: 34px; line-height: 1.15; max-width: 420px; margin: 0 0 14px; font-weight: 700; }
.login .art p { color: var(--side-text); max-width: 420px; margin: 0; }
.login .art .tiles { position: absolute; right: -60px; bottom: -40px; display: grid; grid-template-columns: repeat(6, 54px); gap: 8px; opacity: .55; transform: rotate(-8deg); }
.login .art .tiles span { height: 54px; border-radius: 8px; background: #1c2a45; }
.login .art .tiles span.on { background: var(--accent); }
.login .box { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login form { width: 100%; max-width: 360px; }
.login h1 { margin-bottom: 4px; font-size: 26px; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login .art { display: none; } }

/* ---------- modaal venster ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8,13,25,.55); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 520px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal.wide { max-width: 900px; }
.modal.xwide { max-width: 1200px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; flex: 1; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--side); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 380px; animation: tin .2s; }
.toast.err { background: var(--err); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* ---------- materiaal ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.media-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; }
.media-tile:hover { border-color: var(--accent); }
.media-tile.sel { outline: 2px solid var(--accent); border-color: var(--accent); }
.media-tile .thumb { aspect-ratio: 16/10; background: #0b1120; display: grid; place-items: center; overflow: hidden; color: #8a96ad; }
.media-tile .thumb img, .media-tile .thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-tile .thumb svg { width: 36px; height: 36px; }
.media-tile .meta { padding: 8px 10px; }
.media-tile .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-tile .type { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 5px; font-weight: 600; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); margin-bottom: 16px; transition: .15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.upload-item { display: grid; grid-template-columns: 1fr 120px 50px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.bar { height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ---------- programma-editor ---------- */
.editor { display: grid; grid-template-columns: 260px 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 1250px) { .editor { grid-template-columns: 1fr; } }
.canvas-wrap { background: repeating-conic-gradient(var(--panel-2) 0 25%, var(--panel) 0 50%) 0 0 / 20px 20px; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; justify-content: center; align-items: center; min-height: 420px; }
.canvas { position: relative; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.25); user-select: none; }
.zone { position: absolute; border: 1px solid rgba(255,255,255,.55); background: rgba(255,122,26,.18); color: #fff; font-size: 12px; overflow: hidden; cursor: move; }
.zone .zlabel { position: absolute; left: 4px; top: 3px; background: rgba(0,0,0,.6); padding: 0 6px; border-radius: 4px; pointer-events: none; white-space: nowrap; z-index: 2; }
.zone .zthumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; pointer-events: none; }
.zone.sel { border: 2px solid var(--accent); background: rgba(255,122,26,.3); z-index: 5; }
.zone .h { position: absolute; width: 12px; height: 12px; background: var(--accent); border: 2px solid #fff; border-radius: 3px; z-index: 3; display: none; }
.zone.sel .h { display: block; }
.h.nw { left: -2px; top: -2px; cursor: nwse-resize; } .h.ne { right: -2px; top: -2px; cursor: nesw-resize; }
.h.sw { left: -2px; bottom: -2px; cursor: nesw-resize; } .h.se { right: -2px; bottom: -2px; cursor: nwse-resize; }
.zone-list { display: flex; flex-direction: column; gap: 4px; }
.zone-list button { text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--text); cursor: pointer; display: flex; gap: 8px; align-items: center; }
.zone-list button.sel { border-color: var(--accent); background: var(--accent-soft); }
.zone-list .n { margin-left: auto; color: var(--muted); font-size: 12px; }
.playlist { display: flex; flex-direction: column; gap: 6px; }
.pl-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.pl-item .pt { width: 44px; height: 30px; border-radius: 4px; background: #0b1120; overflow: hidden; display: grid; place-items: center; color: #8a96ad; }
.pl-item .pt img { width: 100%; height: 100%; object-fit: cover; }
.pl-item .pt svg { width: 16px; height: 16px; }
.pl-item .pn { font-weight: 550; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item .pd { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.pl-item .pd input { width: 64px; padding: 2px 6px; font-size: 12px; }
.pl-item .acts { display: flex; gap: 2px; }
.pl-item .acts button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 3px; border-radius: 4px; }
.pl-item .acts button:hover { background: var(--line); color: var(--text); }
.pl-item .acts svg { width: 15px; height: 15px; }
.preview-box { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 8px; overflow: hidden; }

.days { display: flex; gap: 4px; flex-wrap: wrap; }
.days label { border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; cursor: pointer; font-weight: 550; user-select: none; }
.days input { display: none; }
.days label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.target-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.screenshot { width: 100%; border-radius: 8px; background: #000; display: block; }
.shot-box { margin-top: 16px; position: relative; container-type: inline-size; }
/* staand beeld: zo hoog als een liggend beeld breed is, in het midden, randje strak om het beeld; liggend: volle breedte */
.shot-box img.screenshot.staand { width: auto; max-width: 100%; height: 100cqw; margin: 0 auto; border: 1px solid var(--line); }
.shot-empty { aspect-ratio: 16 / 9; border-radius: 8px; border: 1px dashed var(--line); background: var(--panel-2); display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }
.shot-empty svg { width: 28px; height: 28px; }
.shot-box.busy .shot-empty svg { color: var(--warn); animation: shotpulse 1.2s ease-in-out infinite; }
.shot-box.busy img { opacity: .6; }
@keyframes shotpulse { 50% { opacity: .35; } }
.shot-time { margin-top: 6px; }
.shot-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.shot-thumb { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel-2); cursor: pointer; color: var(--muted); font: inherit; font-size: 11px; text-align: center; }
.shot-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; background: var(--panel-2); }   /* staand: heel beeld in het midden */
.shot-thumb span { display: block; padding: 3px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-thumb:hover, .shot-thumb:focus-visible { border-color: var(--accent); color: var(--text); }
.event-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.event-row:last-child { border-bottom: 0; }
.event-row time { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 92px; }
.lvl { width: 8px; height: 8px; border-radius: 50%; flex: none; transform: translateY(-1px); background: var(--info); }
.lvl.warning { background: var(--warn); } .lvl.error { background: var(--err); }
.progress-line { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; display: flex; }
.progress-line i { display: block; height: 100%; }

input[type=range] { accent-color: var(--accent); }

/* ---------- organisatie-boom ---------- */
.org-node { margin: 2px 0; }
.org-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.org-row:hover { background: var(--panel-2); }
.org-name { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.org-name svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.org-name b { font-weight: 600; }
.org-acts { display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.org-row:hover .org-acts { opacity: 1; }
.org-children { margin-left: 18px; padding-left: 12px; border-left: 1px solid var(--line); }
@media (max-width: 760px) { .org-acts { opacity: 1; } }

/* ---------- rollen ---------- */
.perm-grid { display: grid; gap: 8px; }
.perm-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.perm-item:hover { background: var(--panel-2); }
.perm-item input { margin-top: 2px; }
.perm-item .pl { font-weight: 600; }
.perm-item.locked { opacity: .55; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- aanpasbaar logo ---------- */
.brand-logo { max-height: 40px; max-width: 180px; object-fit: contain; display: block; }
/* zijbalk: logo over (bijna) de hele kolombreedte, rechts dezelfde marge als links */
.brand:has(> .brand-logo) { padding: 20px 18px 18px; }
.brand > .brand-logo { width: 100%; max-width: 100%; height: auto; max-height: 90px; object-position: left center; }
.logo-preview { display: flex; align-items: center; justify-content: center; min-height: 90px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.logo-preview img { max-height: 70px; max-width: 100%; object-fit: contain; }
.logo-preview.dark { background: var(--side); }

.badge.orange { background: var(--accent-soft); color: var(--accent); }

/* ---------- aan/uit-planning ---------- */
.timing-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timing-row:last-child { border-bottom: 0; }
.timing-times { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.timing-times input[type=time] { width: auto; }

/* ---------- nieuwe speler op dashboard ---------- */
.pending-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pending-row:last-child { border-bottom: 0; }
.pending-ico { width: 38px; height: 38px; flex: none; border-radius: 9px; background: var(--info-soft); color: var(--info); display: grid; place-items: center; }
.pending-ico.foreign { background: var(--warn-soft); color: var(--warn); }
.pending-ico svg { width: 20px; height: 20px; }
.pending-info { flex: 1; min-width: 180px; }
.pending-info b { font-weight: 650; }

.alert svg { width: 20px; height: 20px; flex: none; }

.side select { background: transparent; color: var(--side-text); border-color: #2a3954; padding: 3px 6px; font-size: 12px; }
.side select option { color: #000; }
.login-lang { position: absolute; top: 18px; right: 22px; }
/* inlogpagina links: groot logo en tekst gecentreerd, kop en tekst elk op één regel (schalen mee met de breedte) */
.login .art { align-items: center; text-align: center; }
.login .art #brand { justify-content: center; }
.login .art .login-logo { width: auto; max-width: 80%; max-height: min(280px, 30vh); margin: 0 auto; object-fit: contain; }
.login .art { justify-content: flex-start; }
.login .art .login-intro { position: relative; z-index: 1; width: 100%; margin: auto 0 310px; }   /* net boven de tegelafbeelding */
.login .art > .login-copy { align-self: flex-start; text-align: left; position: relative; z-index: 1; }   /* copyright linksonder */
.login .art .login-intro h2 { max-width: none; white-space: nowrap; font-size: clamp(20px, 2.5vw, 40px); }
.login .art .login-intro p { max-width: none; white-space: nowrap; font-size: clamp(11px, 1.02vw, 16px); }
.login .box { position: relative; }

/* ---------- materiaalmappen ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; font-weight: 550; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; color: var(--text); }
.crumbs a:hover, .crumbs a.dragover { background: var(--accent-soft); color: var(--accent); }
.crumbs svg { width: 15px; height: 15px; }
.folder-tile .thumb { background: var(--panel-2); color: #f2a516; }
.folder-tile .thumb svg { width: 46px; height: 46px; }
.tile-acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.media-tile:hover .tile-acts { opacity: 1; }
.tile-acts .btn { background: var(--panel); padding: 3px 6px; }
.media-tile.dragover { outline: 2px dashed var(--accent); }
@media (max-width: 760px) { .tile-acts { opacity: 1; } }

.tile-prev { position: absolute; top: 6px; right: 6px; background: var(--panel); padding: 3px 6px; opacity: .85; }
.tile-prev:hover { opacity: 1; }

.btn.tile-prev { background: var(--panel); border-color: var(--line); color: var(--text); }

/* ---------- soort publicatie (vervangen / toevoegen / tijdelijk) ---------- */
.mode-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.mode-opt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 550; }
.mode-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mode-opt input { margin: 0; }
.info-i { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor;
  font: 700 11px/1 Georgia, serif; font-style: italic; color: var(--muted); cursor: help; flex: none; }
.info-i:hover, .info-i:focus { color: var(--accent); outline: none; }
.info-tip { display: none; position: absolute; z-index: 50; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 260px;
  padding: 10px 12px; border-radius: 10px; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.18); font: 400 13px/1.45 system-ui, sans-serif; font-style: normal; text-align: left; }
.info-i:hover .info-tip, .info-i:focus .info-tip { display: block; }
.cond-box { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel-2); }
.field-label { display: inline-flex; align-items: center; gap: 6px; }   /* label + (i) op één regel */
.field .info-i { width: 16px; height: 16px; font-size: 10px; }
.form .row { align-items: end; }   /* invoervelden in een rij onderaan uitlijnen, ook als een label een (i) of hint heeft */

/* ---------- kiezers (programma / spelers) ---------- */
.picker-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); cursor: pointer; font: inherit; }
.picker-btn:hover { border-color: var(--accent); }
.picker-change { margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 600; }
.picker-search { width: 100%; margin-bottom: 12px; }
.picker-list, .picker-tree { max-height: 52vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.picker-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); cursor: pointer; font: inherit; }
.picker-row:hover, .picker-row.sel { border-color: var(--accent); background: var(--accent-soft); }
.picker-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.picker-check { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.picker-check:hover { background: var(--panel-2); }
.picker-check.off { opacity: .5; cursor: not-allowed; }
.picker-check svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.picker-check.folder svg { color: var(--accent); }
.picker-check > span:last-child { margin-left: auto; }
.target-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); font-size: 13px; }
.chip svg { width: 14px; height: 14px; }
.chip.folder { background: var(--accent-soft); color: var(--accent); }

/* ---------- opstartscherm spelers ---------- */
.pbg-grid { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.pbg-prev { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, #15305c, #0b1a33 60%, #070f20); }
.pbg-prev.landscape { width: min(320px, 100%); height: auto; aspect-ratio: 16 / 9; }
.pbg-prev.portrait { width: 101px; height: 180px; }
.pbg-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pbg-prev .muted { color: #c9d4e6; text-align: center; padding: 6px; }
.tile-edit { right: 44px; }   /* naast de voorbeeldknop */

/* ---------- publicaties op een speler ---------- */
.pub-list { display: flex; flex-direction: column; gap: 8px; }
.pub-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.events-table th:nth-child(1), .events-table td:nth-child(1) { width: 140px; }
.events-table th:nth-child(2), .events-table td:nth-child(2) { width: 190px; }

/* meldingen per e-mail: soorten in kolommen */
.notify-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; margin-top: 8px; }

/* ---------- live meekijken (popup) ---------- */
.modal.live { width: auto; max-width: 96vw; }
.live-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
/* beeldvlak houdt de verhouding van het scherm aan (16:9 of 9:16), zo groot als past: niet uitgerekt */
.live-stage { --ar: 16 / 9; --arn: 1.7778; background: #000; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  aspect-ratio: var(--ar); width: min(calc(96vw - 48px), calc(74vh * var(--arn)), 1600px); margin: 0 auto; }
.live-stage img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .2s; }   /* meeschalen tot de volle popup */
.live-stage { position: relative; }
.live-stage img.remote { cursor: crosshair; touch-action: none; user-select: none; }
.live-dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid var(--accent, #f59e0b); pointer-events: none; animation: livedot .6s ease-out forwards; }
@keyframes livedot { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
/* bediening op afstand: 6 gelijke kolommen; regel 1 richting/OK/wissen, regel 2 Terug/Menu/speler-app + tekst, regel 3 Stop/Play */
.live-remote { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.live-remote .btn { width: 100%; height: 36px; min-width: 0; justify-content: center; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-text input { height: 36px; }
/* met bediening eronder: beeld iets lager zodat alles in het venster past */
.live-stage.rc { width: min(calc(96vw - 48px), calc(60vh * var(--arn)), 1600px); }
.live-text { grid-column: span 3; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.live-text input { min-width: 0; height: 100%; }
@supports (grid-template-columns: subgrid) { .live-text { grid-template-columns: subgrid; } .live-text input { grid-column: span 2; } }
.live-remote .live-playstop { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .live-remote { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .live-text { grid-column: 1 / -1; }
}
.live-remote-note { margin-top: 10px; }

/* spelerpagina: beide kolommen eindigen op dezelfde hoogte (laatste kaart rekt mee) */
.pd-cols > div { display: flex; flex-direction: column; gap: 16px; }
.pd-cols > div > .card { margin: 0; }
.pd-cols > div > .card:last-child { flex: 1; }

/* ---------- speler inrichten via USB ---------- */
.usb-dev { margin-bottom: 8px; padding: 8px 12px; }
.usb-dev .usb-ico svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--accent, currentColor); }
.usb-log { margin-top: 12px; max-height: 300px; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.usb-log .ok, .usb-log b.ok { color: var(--ok); }
.usb-log .err, .usb-log b.err { color: var(--err); }

/* ---------- Mobiel (smal scherm) ---------- */
@media (max-width: 760px) {
  /* Tabellen als kaarten: geen zijwaarts scrollen meer */
  .table-wrap:has(table.stack) { overflow-x: visible; }
  table.list.stack, table.list.stack tbody, table.list.stack tr, table.list.stack td { display: block; width: 100%; }
  table.list.stack thead { display: none; }
  table.list.stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  table.list.stack tr:last-child { border-bottom: 0; }
  table.list.stack td { border: 0; padding: 3px 0; display: flex; gap: 12px; align-items: baseline; text-align: left !important; min-width: 0; overflow-wrap: anywhere; }
  table.list.stack td[data-label]::before { content: attr(data-label); flex: 0 0 104px; color: var(--muted); font: 12px/1.4 system-ui, "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: 0; }
  table.list.stack .badge, table.list.stack .chips { white-space: normal; flex-wrap: wrap; }
  table.list.stack td:first-child::before { display: none; }
  table.list.stack td:first-child { font-size: 15px; padding-bottom: 6px; }
  table.list.stack td:empty { display: none; }
  table.list.stack td.stack-acts { justify-content: flex-end; padding-top: 8px; }
  table.list.stack tr.click:hover td { background: none; }
  /* Tabs en kopregels laten doorlopen in plaats van uitsteken */
  .tabs { flex-wrap: wrap; }
  .tabs button { padding: 8px 10px; }
  .pbg-grid { gap: 16px; }
  img, video, canvas { max-width: 100%; }
}

/* Meldingen bij de speler: ca. tien regels zichtbaar, kop blijft staan bij scrollen */
.events-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--panel, var(--card, #fff)); }

/* Zijbalk past zich aan de schermhoogte aan, zodat scrollen (bijna) nooit nodig is: afstanden, logo en voet
   schalen met de hoogte; op lagere schermen staat de voet op één regel (naam + icoonknoppen taal/thema/uitloggen). */
.brand { padding: clamp(10px, 2.6vh, 20px) 18px clamp(8px, 2.3vh, 18px); }
.brand:has(> .brand-logo) { padding: clamp(10px, 2.6vh, 20px) 18px clamp(8px, 2.3vh, 18px); }
/* --nav-py, --nav-gap, --nav-sep en --brand-h zet fitSide() (app.js) als het menu anders niet past. */
.brand > .brand-logo { max-height: var(--brand-h, clamp(34px, 9.5vh, 90px)); }
.nav { gap: var(--nav-gap, clamp(0px, .3vh, 2px)); padding-top: clamp(2px, .8vh, 6px); padding-bottom: clamp(2px, .8vh, 6px); }
.nav a { padding-top: var(--nav-py, clamp(4px, .85vh, 9px)); padding-bottom: var(--nav-py, clamp(4px, .85vh, 9px)); font-size: var(--nav-fs, inherit); line-height: var(--nav-lh, normal); }
.nav { scrollbar-width: none; }   /* schuift wel met het muiswiel, maar zonder balk die het menu laat verspringen */
.nav::-webkit-scrollbar { display: none; }
.nav .sep { margin: var(--nav-sep, clamp(3px, .8vh, 10px)) 6px; }
.side-foot { padding: clamp(8px, 1.8vh, 14px) 14px clamp(8px, 2vh, 16px); gap: clamp(6px, 1.2vh, 10px); }
@media (min-width: 901px) and (max-height: 920px) {
  .side-foot { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 6px; }
  .side-foot .side-user { grid-column: 1 / -1; }
  .side-prefs { display: flex; gap: 4px; }
  .side-foot .side-sel select { width: 32px !important; height: 30px; padding: 0; color: transparent; background-image: none; cursor: pointer; }
  .side-foot .side-sel svg { left: 50%; transform: translate(-50%, -50%); }
  .side-foot .lp-btn { width: 32px; height: 30px; padding: 0; justify-content: center; }   /* smalle stand: alleen de vlag */
  .side-foot .lp-name, .side-foot .lp-caret { display: none; }
  .side-foot .side-logout { height: 30px; min-height: 30px; padding: 0 10px; }
  .side-foot .side-logout svg { width: 16px; height: 16px; }
  .side-avatar { width: 28px; height: 28px; font-size: 12px; }
}
@media (min-width: 901px) and (max-height: 830px) {
  .side-role { display: none; }
  .brand > .brand-logo { max-height: var(--brand-h, 56px); }
}
@media (min-width: 901px) and (max-height: 720px) {
  .nav a { padding-top: 4px; padding-bottom: 4px; }
  .nav .sep { margin: 3px 6px; }
  .brand > .brand-logo { max-height: 44px; }
}
@media (min-width: 901px) and (max-height: 620px) {
  .nav a { font-size: 13px; gap: 9px; padding-top: 2px; padding-bottom: 2px; }
  .nav svg { width: 16px; height: 16px; }
  .nav .sep { margin: 1px 6px; }
  .brand { padding-top: 6px; padding-bottom: 4px; }
  .brand > .brand-logo { max-height: 30px; }
}

/* Berichten (dashboard + pagina Berichten) */
.msg { border-left: 3px solid var(--accent); }
.msg.msg-read { border-left-color: var(--line); opacity: .85; }
.msg-thread { margin-top: 10px; display: grid; gap: 8px; }
.msg-reply { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-right: 15%; }
.msg-reply.from-admin { margin-right: 0; margin-left: 15%; border-color: var(--accent); }
.msg-body.clamp { max-height: 8.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
/* Formulier in een raster van 12 kolommen (bijv. gebruiker aanmaken): breedte per veld naar de verwachte inhoud. */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid > [class^="fg-"] > .field { margin: 0; }
.fg-3 { grid-column: span 3; } .fg-4 { grid-column: span 4; } .fg-5 { grid-column: span 5; } .fg-6 { grid-column: span 6; }
.fg-7 { grid-column: span 7; } .fg-8 { grid-column: span 8; } .fg-9 { grid-column: span 9; } .fg-12 { grid-column: span 12; }
.fg-title { font-weight: 650; font-size: 13px; margin: 14px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.fg-title:first-child { margin-top: 0; }
@media (max-width: 700px) { .form-grid > [class^="fg-"] { grid-column: span 12; } }

/* Handleiding */
.help-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-toc { position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow: auto; }
.help-toc nav a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--text); font-weight: 550; font-size: 13.5px; }
.help-toc nav a:hover, .help-toc nav a.active { background: var(--panel-2); color: var(--accent); }
.help-toc-sub a { font-weight: 400 !important; font-size: 12.5px !important; padding: 4px 8px 4px 20px !important; color: var(--muted) !important; }
.help-content { line-height: 1.65; max-width: 900px; }
.help-content h2 { margin-top: 0; }
.help-content h3 { margin: 22px 0 6px; font-size: 16px; }
.help-content ul { margin: 6px 0 10px 20px; padding: 0; }
.help-content li { margin: 3px 0; }
.help-content mark { background: #ffd8b5; color: inherit; padding: 0 2px; border-radius: 3px; }
.help-hit { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.help-print-title { display: none; }
.help-btn svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .help-layout { grid-template-columns: 1fr; } .help-toc { position: static; max-height: none; } }
@media print {
  body.help-printing .side, body.help-printing .page-head, body.help-printing .help-toc, body.help-printing #toasts { display: none !important; }
  body.help-printing, body.help-printing .main, body.help-printing .help-content { background: #fff !important; color: #000 !important; }
  body.help-printing .help-layout { display: block; }
  body.help-printing .help-content { border: 0; box-shadow: none; max-width: none; padding: 0; }
  body.help-printing .help-content * { color: #000 !important; }
  body.help-printing .help-print-title { display: block; }
  body.help-printing .help-content h2 { page-break-before: always; }
  body.help-printing .help-content h2:first-of-type { page-break-before: avoid; }
}

/* Gebruikers per klant (beheerder) */
.ugroup-h { margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.ugroup-h svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
#utabs + .ugroup-h, #utabs + .empty { margin-top: 6px; }
#utabs ~ .table-wrap table.list { table-layout: fixed; }
#utabs ~ .table-wrap th:first-child { width: 26%; }
#utabs ~ .table-wrap th:last-child { width: 120px; }

/* Kolomkeuze spelersoverzicht */
.col-list { display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.col-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; border-radius: 8px; }
.col-row:hover { background: var(--panel-2); }
.col-row label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.col-row input { width: auto; }
.players-table th, .players-table td { white-space: nowrap; }

/* Gebruikersnaam controleren tijdens het typen */
.uname-check { display: block; min-height: 1.2em; margin-top: 4px; }
.uname-check.ok { color: var(--ok, #22a559); }
.uname-check.bad { color: var(--err, #e5484d); }

/* Abonnement / licenties */
.lic-banner { margin-bottom: 16px; border-left: 4px solid var(--warn, #f59e0b); }
.lic-banner.err { border-left-color: var(--err, #e5484d); background: color-mix(in srgb, var(--err, #e5484d) 8%, var(--panel, #fff)); }
.lic-banner.warn { background: color-mix(in srgb, var(--warn, #f59e0b) 9%, var(--panel, #fff)); }
.lic-banner-ic svg { width: 22px; height: 22px; color: var(--warn, #f59e0b); }
.lic-banner.err .lic-banner-ic svg { color: var(--err, #e5484d); }
.lic-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 6px; }
.lic-tier { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; text-decoration: none; color: inherit; }
.lic-tier b { font-size: 20px; }
.lic-tier input { display: none; }
.lic-tier.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lic-tier.dis { opacity: .45; cursor: not-allowed; }
.lic-sum { margin-top: 10px; }
/* Proefperiode-pagina: langer formulier, mag scrollen; tekst links mag afbreken */
.trial-page .box { align-items: flex-start; padding-top: 76px; overflow-y: auto; max-height: 100vh; }
.trial-page .art .login-intro h2, .trial-page .art .login-intro p { white-space: normal; max-width: 520px; margin-left: auto; margin-right: auto; }
.trial-page .art .login-intro { margin-bottom: auto; margin-top: 60px; }
.trial-page form > .btn.ghost { margin-bottom: 24px; }
.lic-tier.ent { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.lic-method { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 6px 0; cursor: pointer; }
.lic-method.sel { border-color: var(--accent); }
.lic-method.dis { opacity: .5; cursor: not-allowed; }
.lic-method input { margin-top: 3px; }

/* Handleiding: schermafbeeldingen met genummerde bolletjes */
.help-fig { margin: 14px 0 22px; }
.help-shot { position: relative; width: 100%; max-width: 980px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0b1220; }
.help-shot img { display: block; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.help-spot { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: var(--accent); color: #fff;
  font: 700 13px/1 system-ui, sans-serif; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.45); cursor: pointer; padding: 0; z-index: 2; }
.help-spot.on, .help-spot:hover { transform: translate(-50%, -50%) scale(1.25); background: #fff; color: var(--accent); }
.help-tip { display: none; position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 260px; background: #111827; color: #fff;
  font: 500 12.5px/1.4 system-ui, sans-serif; padding: 7px 10px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.35); text-align: left; white-space: normal; }
.help-spot:hover .help-tip, .help-spot:focus .help-tip { display: block; }
.help-spots { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 4px; max-width: 980px; }
.help-spots li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 8px; border-radius: 8px; }
.help-spots li.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.help-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.help-zoom { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.8); display: flex; align-items: center; justify-content: center; padding: 3vw; cursor: zoom-out; }
.help-zoom .help-shot { max-width: min(1500px, 94vw); max-height: 92vh; }
@media print { .help-fig { break-inside: avoid; } .help-fig .btn { display: none; } .help-shot { max-width: 100%; } .help-tip { display: none !important; } }
.lic-prices { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.lic-prices > [class^="fg-"] { grid-column: auto; }
@media (max-width: 700px) { .lic-prices { grid-template-columns: 1fr 1fr; } }
.loc-map { width: 100%; height: 300px; border: 1px solid var(--line); border-radius: 10px; display: block; }
.loc-grid { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .loc-grid { grid-template-columns: 1fr; } }
.shop-ic svg { width: 54px; height: 54px; color: var(--accent); }
.shop-tiers { max-width: 360px; margin-top: 6px; }
.shop-tiers tr.on td { background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 600; }

/* Slogan op de inlogpagina (login-intro: altijd binnen het kader): één regel; login.js verkleint het lettertype als het nodig is. */
.login .art .login-intro { box-sizing: border-box; max-width: 100%; }
.login .art .login-intro h2, .login .art .login-intro p { white-space: nowrap; overflow: hidden; }
/* Schakelaar AAN/UIT (aan/uit-planning) */
.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; min-width: 92px; }
.sw input { display: none; }
.sw .knob { width: 40px; height: 22px; border-radius: 11px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.sw .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.sw input:checked + .knob { background: var(--ok); }
.sw input:checked + .knob::after { left: 21px; }
.sw.is-on b { color: var(--ok); }
.sw.is-off b { color: var(--muted); }
.timing-row input[type=time] { width: auto; }
.btn.orange { background: var(--warn); border-color: var(--warn); color: #fff; min-width: 110px; }
.btn.orange:hover:not(:disabled) { filter: brightness(.93); }
.upd-bar { width: 100%; flex-wrap: wrap; padding: 14px 16px; font-size: 14px; }
/* Pictogram in een tekstregel: zo groot als de tekst (anders vult het hele vlak) */
p > svg, span > svg, td > svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
.card.flash { box-shadow: 0 0 0 3px var(--accent); transition: box-shadow .4s; }

/* Telefoonnummer met landcode (keuzemenu met vlag) */
.phone-in { position: relative; display: flex; align-items: stretch; margin-top: 4px; }
.phone-in .pc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; background: var(--panel-2, var(--bg)); color: inherit; cursor: pointer; font: inherit; white-space: nowrap; }
.phone-in .pc-btn svg { width: 14px; height: 14px; opacity: .6; }
.phone-in .pc-num { flex: 1; min-width: 0; border-radius: 0 8px 8px 0; margin: 0; }
.pc-flag { width: 20px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; object-fit: cover; }
.pc-pop { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; width: min(300px, 90vw); max-height: 320px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; }
.pc-pop .pc-zoek { width: 100%; margin: 0 0 6px; }
.pc-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; border-radius: 6px; cursor: pointer; }
.pc-opt:hover, .pc-opt.on { background: var(--accent-soft, rgba(232,114,12,.12)); }
.pc-opt .pc-naam { flex: 1; }

/* waarschuwing automatisch uitloggen */
.idle-warn { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px; background: var(--panel); color: var(--text); border: 1px solid var(--warn, #d97706); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.idle-warn .idle-txt { font-weight: 550; }

/* spelerpagina, Bediening op afstand: knoppen in paren, twee gelijke kolommen */
.ctl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ctl-grid .btn { width: 100%; min-width: 0; margin: 0; justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctl-grid .ctl-wide, .ctl-grid > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Instellingen: twee kolommen even lang; de onderste kaart van elke kolom rekt mee */
.inst-cols { align-items: stretch; }
.inst-cols > .stack-col > .card:last-child { flex: 1; }

/* tweestap: goedkeuren op telefoon en passkeys */
.tfa-extra h3 { font-size: 14px; margin: 14px 0 6px; display: flex; align-items: center; gap: 8px; }
.push-wait { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.push-wait .push-num { font-size: 32px; font-weight: 700; letter-spacing: 2px; color: var(--accent); min-width: 56px; text-align: center; }
.approve-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.approve-card { width: min(420px, 100%); }
.approve-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.approve-nums .btn { font-size: 26px; font-weight: 700; padding: 14px 0; justify-content: center; }

/* taalkeuze met vlaggen (web/js/langpick.js) */
.lp { position: relative; display: inline-block; vertical-align: middle; }
.lp-btn { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; width: 100%; white-space: nowrap; }
.lp-btn:hover { border-color: var(--accent); }
.lp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lp-flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.lp-caret { width: 14px; height: 14px; margin-left: auto; opacity: .7; flex: none; }
.lp-pop { position: fixed; z-index: 3000; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35); display: grid; gap: 2px; }
.lp-opt { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-radius: 7px; background: none; color: var(--text);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.lp-opt .lp-flag { width: 28px; height: 21px; border-radius: 3px; }
.lp-opt:hover, .lp-opt.focus { background: var(--accent-soft, rgba(127, 127, 127, .14)); outline: none; }
.lp-opt.on { font-weight: 600; }
.lp-check { margin-left: auto; color: var(--accent); font-weight: 700; padding-left: 12px; }
/* in de zijbalk: past bij de andere knoppen onderin; het wereldbolletje vervalt (de vlag zegt genoeg) */
.side-sel:has(.lp) > svg { display: none; }
.side-foot .lp { display: block; }
.side-foot .lp-btn { height: 32px; background: transparent; border-color: #2a3a5c; color: #e6ecf5; font-size: 12.5px; }
.side-foot .lp-btn:hover { background: var(--side-active); border-color: #3b4f78; }

/* kaartje bij de locatie (tegels van OpenStreetMap) */
.tile-map { position: relative; overflow: hidden; background: #dfe6ee; }
.tile-map img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; }
.tile-map .tm-range { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255, 122, 26, .18); border: 2px solid rgba(255, 122, 26, .7); }
.tile-map .tm-pin { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--accent, #ff7a1a); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.tile-map .tm-attr { position: absolute; right: 0; bottom: 0; background: rgba(255, 255, 255, .8); color: #333; font-size: 11px; padding: 1px 6px; border-top-left-radius: 6px; }
.tile-map .tm-attr a { color: #333; }
