:root { --navy: #05002d; --navy-2: #120b45; --blue: #79b2ea; --blue-d: #2f7fc7; --bg: #f3f5f9; --card: #fff; --line: #dfe4ec; --text: #171a2b; --muted: #636b7e; --ok: #1a9f5c; --bad: #d23b3b; --r: 10px;
  --field: #fff; --field-line: #c8cfdc; --primary: #05002d; --primary-fg: #fff; --soft: #eef5fc; --hover: #f6f9fd; --head: #f8f9fc; color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
small { color: var(--muted); font-size: 12.5px; }

.shell { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 16px; }
.brand img { width: 38px; height: 38px; border-radius: 9px; }
.brand strong { display: block; font-size: 16px; line-height: 1.1; }
.brand span { font-size: 12px; color: var(--blue); letter-spacing: .08em; text-transform: uppercase; }
.client-pick { padding: 0 6px 14px; }
.client-pick label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #9aa3c7; margin-bottom: 4px; }
.client-pick select { width: 100%; background: var(--navy-2); color: #fff; border: 1px solid #2c2569; border-radius: 8px; padding: 7px 8px; }
.client-name { padding: 0 6px 14px; font-weight: 600; color: var(--blue); }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; min-height: 0; margin-bottom: 8px; }
.side nav button { text-align: left; background: none; border: 0; color: #cdd3ee; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.side nav button:hover { background: var(--navy-2); color: #fff; }
.side nav button.on { background: var(--blue); color: var(--navy); font-weight: 700; }
.side nav button.sep { margin-top: 14px; }
.me { border-top: 1px solid #2c2569; padding: 12px 6px 0; display: flex; flex-direction: column; gap: 8px; }
.me span { display: flex; flex-direction: column; font-weight: 600; }
.me small { color: #9aa3c7; font-weight: 400; }
.me .btn { background: transparent; color: #fff; border-color: #3b3480; align-self: flex-start; }

main { flex: 1; min-width: 0; padding: 26px 30px 60px; }
.page { max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; line-height: 1.2; }
.page-head p { color: var(--muted); margin-top: 3px; }
.grow { flex: 1; min-width: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.title-input { font-size: 22px; font-weight: 700; width: 100%; max-width: 520px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--field); color: var(--text);}
.hint { color: var(--muted); font-size: 13px; margin-bottom: 16px; max-width: 760px; }

.btn { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: #b9c2d3; }
a.btn { text-decoration: none; color: inherit; display: inline-block; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn.primary:hover { filter: brightness(1.25); }
.btn.accent { background: var(--blue); border-color: var(--blue); color: var(--navy); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost-danger { color: var(--bad); border-color: transparent; background: transparent; }
.btn.ghost-danger:hover { border-color: var(--bad); }
.icon { border: 1px solid var(--line); background: var(--card); border-radius: 7px; width: 30px; height: 30px; cursor: pointer; flex: none; }
.icon:disabled { opacity: .35; cursor: default; }
:focus-visible { outline: 2px solid var(--blue-d); outline-offset: 2px; }

section { margin-bottom: 26px; }
.group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.group-head h2 { font-size: 16px; flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.grid.media { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card.is-live { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.card-top { display: flex; align-items: flex-start; gap: 8px; }
.card-top h3 { font-size: 16px; flex: 1; overflow-wrap: anywhere; }
.status { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #b3bacb; }
.status.on { color: var(--ok); } .status.on::before { background: var(--ok); }
.status.bad { color: var(--bad); white-space: normal; text-align: right; } .status.bad::before { background: var(--bad); flex: none; }
.live-badge { margin-top: 8px; background: #fdecec; color: #a52222; font-weight: 700; font-size: 12.5px; padding: 5px 9px; border-radius: 6px; display: inline-block; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 12px 0; font-size: 13.5px; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.tile { padding: 0; overflow: hidden; display: flex; flex-direction: column; text-align: left; }
button.tile { cursor: pointer; }
.tile.sel { border-color: var(--blue-d); box-shadow: 0 0 0 2px var(--blue-d); }
.thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: #0d0a2b; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb .ph, .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; background: var(--navy-2); }
.ph.type-wayfinding { background: #1d5e9d; } .ph.type-programme { background: #3a2f8f; } .ph.type-text { background: #2b6b63; }
.thumb .tag { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 11.5px; padding: 1px 6px; border-radius: 4px; }
.thumb.sm { width: 84px; flex: none; border-radius: 6px; overflow: hidden; }
.thumb.sm .ph { font-size: 18px; }
.tile-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.tile-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-body .card-actions { margin-top: 6px; }

.table { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.tr { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tr:first-child { border-top: 0; }
.tr .grow strong { display: block; overflow-wrap: anywhere; }
.tr.muted .grow { opacity: .55; }
.tr.current { background: var(--soft); }
.when { font-size: 13.5px; min-width: 190px; display: flex; flex-direction: column; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; color: var(--muted); }
.pl-list { display: flex; flex-direction: column; gap: 8px; }
.pl-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; flex-wrap: wrap; }
.pl-row.over { border-color: var(--blue-d); box-shadow: 0 -2px 0 var(--blue-d); }
.grip { cursor: grab; color: #a7afc1; letter-spacing: -3px; padding: 0 4px; user-select: none; }
.pl-main { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.pl-main strong { overflow-wrap: anywhere; }
.dur { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; min-width: 128px; }
.dur input { width: 64px; }
.pl-row input, .pl-row select { border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; background: var(--field); color: var(--text);}

.empty { background: var(--card); border: 1px dashed #c3cad9; border-radius: var(--r); padding: 34px 20px; text-align: center; }
.empty strong { font-size: 16px; } .empty p { color: var(--muted); margin-top: 4px; }

.progress { position: relative; background: #e3e8f1; border-radius: 8px; height: 26px; margin-bottom: 14px; overflow: hidden; }
.progress div { position: absolute; inset: 0 auto 0 0; background: var(--blue); width: 0; transition: width .2s; }
.progress span { position: relative; display: block; padding: 0 10px; line-height: 26px; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.modal-back { position: fixed; inset: 0; background: rgba(5,0,45,.55); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 14px; overflow: auto; z-index: 50; }
.modal { background: var(--card); border-radius: 14px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; flex: 1; }
.x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-body { padding: 18px 20px 20px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; width: 100%; }
.form { display: flex; flex-wrap: wrap; gap: 14px 12px; }
.field { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.field.half { width: calc(50% - 6px); }
.field > label { font-weight: 600; font-size: 13.5px; }
.field input:not([type=checkbox]):not([type=color]), .field select, .field textarea { border: 1px solid var(--field-line); border-radius: 8px; padding: 8px 10px; background: var(--field); width: 100%; color: var(--text);}
.field input[type=color] { width: 64px; height: 36px; padding: 2px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--card); }
.field.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks label { font-weight: 400; display: inline-flex; align-items: center; gap: 4px; }
.rows-field { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rf-row { display: flex; gap: 6px; width: 100%; align-items: center; }
.rf-row select { width: 170px !important; flex: none; }
.rf-row input[type=time] { width: 110px !important; flex: none; }
.rf-row .grow { flex: 1; min-width: 0; }
.preview-frame { width: 100%; max-height: 72vh; border: 0; border-radius: 8px; background: #000; display: block; margin: 0 auto; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 99; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: 90vw; }
.toast.bad { background: var(--bad); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); padding: 20px; }
.login { background: var(--card); border-radius: 16px; padding: 30px 28px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.login img { width: 64px; height: 64px; border-radius: 14px; }
.login h1 { font-size: 22px; }
.login label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13.5px; }
.login input { border: 1px solid var(--field-line); border-radius: 8px; padding: 10px; font-weight: 400; background: var(--field); color: var(--text);}
.login a { color: var(--blue-d); font-size: 13.5px; }
.error { color: var(--bad); font-weight: 600; }

@media (max-width: 820px) {
  .field.half { width: 100%; }
  .rf-row { flex-wrap: wrap; }
  .when { min-width: 0; width: 100%; }
}

.help { max-width: 760px; }
.help h3 { margin-bottom: 8px; }
.help ol { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.help a { color: var(--blue-d); }
.help .hint { margin: 0; }
.confirm-what { font-size: 18px; font-weight: 700; margin: 10px 0 6px; }
.confirm-list { margin: 0 0 12px; padding-left: 20px; }
.led-detail h3 { font-size: 15px; margin: 16px 0 8px; }
.led-detail dl { margin-top: 0; }

.link-input { width: 100%; border: 1px solid var(--field-line); border-radius: 8px; padding: 9px 10px; font: 13px ui-monospace, Menlo, Consolas, monospace; margin: 10px 0; background: var(--field); color: var(--text);}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13.5px; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); font-weight: 600; }

.share { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }

/* Poster-editor */
.poster-editor { display: flex; gap: 20px; align-items: flex-start; }
.poster-left { flex: 1; min-width: 0; display: flex; justify-content: center; background: #dfe4ec; border-radius: var(--r); padding: 18px; position: sticky; top: 16px; }
.poster-stage { position: relative; line-height: 0; touch-action: none; box-shadow: 0 4px 24px rgba(0,0,0,.18); }
.poster-canvas { display: block; max-width: 100%; max-height: calc(100vh - 170px); width: auto; height: auto; background: var(--card); cursor: default; }
.poster-sel { position: absolute; border: 2px solid var(--blue-d); box-sizing: border-box; cursor: move; }
.poster-sel.locked { border-style: dashed; cursor: default; }
.poster-sel .hd { position: absolute; width: 14px; height: 14px; background: var(--card); border: 2px solid var(--blue-d); border-radius: 3px; }
.poster-sel .hd-e { right: -8px; top: calc(50% - 7px); cursor: ew-resize; }
.poster-sel .hd-s { bottom: -8px; left: calc(50% - 7px); cursor: ns-resize; }
.poster-sel .hd-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.poster-sel.t-text .hd-s, .poster-sel.t-text .hd-se, .poster-sel.locked .hd { display: none; }
.poster-panel { width: 340px; flex: none; display: flex; flex-direction: column; gap: 12px; }
.pp-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pp-sec.sel { border-color: var(--blue-d); }
.pp-sec summary { cursor: pointer; font-weight: 700; }
.pp-sec textarea, .pp-row input:not([type=color]), .pp-row select { border: 1px solid var(--field-line); border-radius: 7px; padding: 6px 8px; background: var(--field); width: 100%; min-width: 0; color: var(--text);}
.pp-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.pp-row > span { width: 130px; flex: none; color: var(--muted); }
.pp-row input[type=color] { width: 54px; height: 30px; padding: 1px; border: 1px solid var(--field-line); border-radius: 6px; background: var(--card); }
.pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.pp-grid .pp-row > span { width: 62px; }
.pp-check { font-size: 13.5px; display: flex; gap: 6px; align-items: flex-start; }
.pp-layer { display: flex; gap: 4px; align-items: center; }
.pp-layer .name { flex: 1; min-width: 0; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 5px 8px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-layer.on .name { border-color: var(--blue-d); background: var(--soft); font-weight: 600; }
.pick-h { font-size: 15px; margin: 4px 0 10px; }
.grid.media.pick + .pick-h { margin-top: 18px; }
@media (max-width: 900px) { .poster-editor { flex-direction: column; } .poster-panel { width: 100%; } .poster-left { position: static; width: 100%; } .poster-canvas { max-height: 60vh; } }

/* Installeren */
.side .install { align-self: flex-start; margin: 0 6px 12px; background: var(--blue); border-color: var(--blue); color: var(--navy); }
.install-hint { font-size: 12.5px; color: #9aa3c7; margin: 0 6px 12px; }

/* Mobiele app-indeling */
.shell.m { display: block; min-height: 100vh; }
.m-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: calc(8px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 8px calc(14px + env(safe-area-inset-left)); }
.m-top img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.m-top strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-top select { flex: 1; min-width: 0; background: var(--navy-2); color: #fff; border: 1px solid #2c2569; border-radius: 8px; padding: 8px; font-size: 16px; }
.shell.m main { padding: 16px 14px calc(84px + env(safe-area-inset-bottom)); }
.m-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--navy); border-top: 1px solid #2c2569; padding: 4px calc(4px + env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) calc(4px + env(safe-area-inset-left)); }
.m-tabs button { flex: 1; min-width: 0; background: none; border: 0; color: #aab2d6; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 11px; border-radius: 10px; cursor: pointer; }
.m-tabs button.on { color: #fff; background: var(--navy-2); font-weight: 700; }
.m-tabs .ic { width: 24px; height: 24px; display: block; }
.m-tabs .ic svg { width: 100%; height: 100%; display: block; }
.m-tabs button.on .ic { color: var(--blue); }
.more-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.more-list button { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-weight: 600; cursor: pointer; }
.more-me { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.more-me span { display: flex; flex-direction: column; font-weight: 600; }
.modal .install { margin-bottom: 14px; background: var(--primary); border-color: var(--primary); color: var(--primary-fg); padding: 10px 14px; }
.modal .install-hint { color: var(--muted); margin: 0 0 14px; }

@media (max-width: 820px) {
  input, select, textarea { font-size: 16px !important; } /* voorkomt inzoomen op iPhone */
  .page-head { margin-bottom: 14px; gap: 10px; }
  .page-head h1 { font-size: 21px; }
  .page-head > .grow { flex-basis: 100%; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; text-align: center; }
  .title-input { font-size: 19px !important; max-width: none; }
  .btn { padding: 10px 14px; }
  .btn.small { padding: 8px 12px; font-size: 14px; }
  .icon { width: 40px; height: 40px; }
  .grid { grid-template-columns: 1fr; }
  .grid.media { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .group-head h2 { flex-basis: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 14px; padding: 0 14px 2px; }
  .chip { white-space: nowrap; padding: 8px 14px; }
  .tr { padding: 12px; }
  .tr .grow { flex-basis: 100%; }
  .pl-row { padding: 10px; }
  .pl-main { flex-basis: calc(100% - 140px); }
  .modal-back { padding: 0; align-items: flex-end; }
  .modal, .modal.wide { max-width: none; border-radius: 16px 16px 0 0; max-height: 92vh; overflow: auto; padding-bottom: env(safe-area-inset-bottom); }
  .modal-head { position: sticky; top: 0; background: var(--card); z-index: 2; border-radius: 16px 16px 0 0; }
  .actions { flex-wrap: wrap; }
  .actions .btn { flex: 1; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .poster-left { padding: 10px; }
  .preview-frame { max-height: 60vh; }
}

/* Bedrijfsmodules */
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: #e8ebf2; color: #454d61; }
.badge.green { background: #dff3e8; color: #0f6a3c; } .badge.amber { background: #fcefcf; color: #7a5200; } .badge.blue { background: #dfeefb; color: #1b5a94; } .badge.red { background: #fde3e3; color: #a52222; }
.tr.click { cursor: pointer; } .tr.click:hover { background: var(--hover); }
.bform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 8px; }
.bf { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }
.bf > span { font-weight: 600; }
.bf.full { grid-column: 1 / -1; }
.bf.check { flex-direction: row; align-items: center; gap: 8px; }
.bf input:not([type=checkbox]), .bf select, .bf textarea { border: 1px solid var(--field-line); border-radius: 8px; padding: 8px 10px; background: var(--field); width: 100%; color: var(--text);}
.bh { font-size: 16px; margin: 22px 0 8px; }
.lines table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 8px; }
.lines th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); background: var(--head); }
.lines td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines tr:last-child td { border-bottom: 0; }
.lines td input:not([type=checkbox]), .lines td select { width: 100%; min-width: 64px; border: 1px solid var(--field-line); border-radius: 7px; padding: 6px 7px; background: var(--field); color: var(--text);}
.lines td.wide { width: 34%; } .lines td select { max-width: 190px; }
.lines td.r, .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lines td.short { color: var(--bad); font-weight: 700; } .lines td.okk { color: var(--ok); font-weight: 600; }
.totals { display: flex; justify-content: flex-end; gap: 22px; flex-wrap: wrap; padding: 10px 4px 0; color: var(--muted); }
.install-plan { padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 4px; }
.ip-row { display: flex; align-items: center; gap: 12px; padding: 7px 6px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.ip-row:hover { background: var(--hover); } .ip-row small { display: block; color: var(--muted); }
.ip-date { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 92px; } .ip-date.late { color: var(--bad); }
.margin { max-width: 460px; margin-left: auto; padding: 10px 14px; }
.mg-row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; color: var(--muted); } .mg-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.mg-row.big { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-size: 16px; color: var(--text); } .mg-row.pos strong { color: var(--ok); } .mg-row.neg strong { color: var(--bad); }
.lines td .muted { color: var(--muted); font-size: 13px; }
.totals strong { color: var(--text); font-variant-numeric: tabular-nums; } .totals .big { font-size: 17px; color: var(--text); }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kcol { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.khead { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kcard { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; }
.kcard:hover { border-color: #b9c2d3; }
.tl { position: relative; margin-bottom: 16px; overflow: hidden; }
.tl-weeks { display: grid; grid-template-columns: repeat(6, 1fr); font-size: 12px; color: var(--muted); margin: 8px 0 6px; }
.tl-weeks span { border-left: 1px solid var(--line); padding-left: 5px; }
.tl-row { position: relative; height: 30px; }
.tl-bar { position: absolute; top: 3px; height: 24px; border: 0; border-radius: 6px; padding: 0 8px; font-size: 12.5px; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; background: #e8ebf2; color: #454d61; }
.tl-bar.green { background: #bfe6cf; color: #0b4d2c; } .tl-bar.amber { background: #f7dc9a; color: #5c3e00; } .tl-bar.blue { background: #bcd9f3; color: #134774; }
.tl-today { position: absolute; top: 34px; bottom: 10px; width: 2px; background: var(--bad); opacity: .6; pointer-events: none; }
.stat { display: flex; flex-direction: column; align-items: flex-end; min-width: 74px; } .stat strong { font-variant-numeric: tabular-nums; } .stat.bad strong { color: var(--bad); }
.res { margin-top: 6px; font-size: 13.5px; }

/* Afdrukken: offerte, paklijst, servicerapport */
.print-doc { display: none; }
@media print {
  body.printing > *:not(.print-doc) { display: none !important; }
  body.printing { background: #fff; }
  .print-doc { display: block; color: #000; font: 11pt/1.4 Arial, sans-serif; padding: 0; }
  .pd-top { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
  .pd-co { font-size: 15pt; } .pd-to { min-width: 40%; }
  .print-doc h1 { font-size: 18pt; margin: 0 0 4px; } .print-doc h2 { font-size: 12pt; margin: 16px 0 4px; }
  .pd-meta { color: #555; margin: 0 0 14px; } .pd-pre { white-space: pre-line; }
  .pd-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
  .pd-table th { text-align: left; border-bottom: 1.5pt solid #000; padding: 5px 6px; font-size: 10pt; }
  .pd-table td { border-bottom: .5pt solid #bbb; padding: 5px 6px; vertical-align: top; }
  .pd-table .r, .pd-totals .r { text-align: right; white-space: nowrap; }
  .pd-line { width: 28%; }
  .pd-totals { margin: 8px 0 0 auto; border-collapse: collapse; } .pd-totals td { padding: 3px 6px; } .pd-totals .sum td { font-weight: 700; border-top: 1.5pt solid #000; }
  .pd-foot { color: #444; font-size: 9.5pt; margin-top: 18px; }
}

@media (max-width: 820px) {
  .bform { grid-template-columns: 1fr; }
  .lines table, .lines tbody, .lines tr, .lines td { display: block; width: auto; }
  .lines thead { display: none; }
  .lines table { border: 0; background: none; }
  .lines tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; margin-bottom: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
  .lines td { border: 0; padding: 0; text-align: left !important; }
  .lines td.wide, .lines td:first-child { grid-column: 1 / -1; width: auto; }
  .lines td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--muted); }
  .lines td select { max-width: none; }
  .kanban { grid-template-columns: repeat(5, 78vw); }
  .totals { justify-content: flex-start; gap: 10px 18px; }
  .stat { min-width: 60px; }
}

dd.warn { color: #8a5a00; font-weight: 600; }

/* ---------- Keuzelijsten: overal dezelfde opmaak (ook in Safari) ---------- */
select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-color: var(--field); color: var(--text); border: 1px solid var(--field-line); border-radius: 8px;
  padding: 8px 34px 8px 10px; padding-right: 34px !important; line-height: 1.3; min-height: 38px; max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2305002d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
  cursor: pointer; text-overflow: ellipsis;
}
/* Andere regels zetten 'background' in één keer; het pijltje moet daar altijd overheen blijven staan. */
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2305002d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 14px !important; }
select:hover { border-color: #9aa6bd; }
select:focus { outline: 2px solid var(--blue-d); outline-offset: 1px; border-color: var(--blue-d); }
select:disabled { opacity: .6; cursor: default; }
.btn.small + select, .pl-row select, .lines td select, .pp-row select { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], textarea { -webkit-appearance: none; appearance: none; }
input[type=date], input[type=time], input[type=datetime-local] { min-height: 38px; background-color: var(--card); }

/* ---------- Modules ---------- */
.side nav button { display: flex; align-items: center; gap: 10px; }
.side nav .ic, .more-list .ic { width: 20px; height: 20px; flex: none; display: block; }
.ic svg { width: 100%; height: 100%; display: block; }
.side nav button.on .ic { color: var(--navy); }
.modbar { display: flex; align-items: center; gap: 14px; max-width: 1180px; margin: -6px auto 20px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--primary); border-bottom-color: var(--blue-d); }
.client-pick { display: flex; align-items: center; gap: 8px; padding: 0 0 6px; flex: none; }
.client-pick span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.client-pick select { width: auto; min-width: 180px; max-width: 280px; font-weight: 600; }
.grid.mods { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mod { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 18px; transition: border-color .15s, box-shadow .15s; }
.mod:hover { border-color: var(--blue-d); box-shadow: 0 2px 12px rgba(5,0,45,.08); }
.mod .ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--soft); color: var(--blue-d); margin-bottom: 8px; display: block; }
.mod strong { font-size: 17px; }
.mod span:not(.ic) { color: var(--muted); font-size: 13.5px; }
.mod small { margin-top: 8px; color: var(--text); font-weight: 600; font-size: 13px; }
.more-list button { display: flex; align-items: center; gap: 10px; }

/* Inlogpagina's: platform (donker) en klantportaal (licht) */
.login-sub { color: var(--muted); margin-top: -8px; }
.login-other { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.login-wrap.portal { background: linear-gradient(160deg, #e8f1fb 0%, #f6f8fc 60%); }
.login-wrap.portal .login { box-shadow: 0 10px 40px rgba(5,0,45,.12); border: 1px solid var(--line); }
.login-wrap.portal .btn.primary { background: var(--blue-d); border-color: var(--blue-d); }

.m-top small { color: #aab2d6; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
@media (max-width: 820px) {
  .modbar { flex-direction: column-reverse; align-items: stretch; gap: 6px; margin: -6px -14px 14px; padding: 0 14px; }
  .client-pick { padding: 0; } .client-pick select { flex: 1; max-width: none; }
  .tabs button { padding: 10px 12px; }
  .grid.mods { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mod { padding: 14px; }
}
.client-pick select { background-color: var(--card); color: var(--text); border: 1px solid var(--field-line); padding: 7px 34px 7px 10px; }

/* ---------- Donkere weergave ---------- */
html[data-theme=dark] {
  --bg: #0d0c1f; --card: #181730; --line: #2d2c4d; --text: #e9ebf5; --muted: #a0a7c2; --blue-d: #79b2ea; --ok: #3ecf8e; --bad: #ff7676;
  --field: #211f3d; --field-line: #403e68; --primary: #79b2ea; --primary-fg: #05002d; --soft: #1f2947; --hover: #1e1d39; --head: #1d1c36; color-scheme: dark;
}
html[data-theme=dark] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e9ebf5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") !important; }
html[data-theme=dark] .side, html[data-theme=dark] .m-top, html[data-theme=dark] .m-tabs { background: #07051f; border-color: var(--line); }
html[data-theme=dark] .side { border-right: 1px solid var(--line); }
html[data-theme=dark] .btn { color: var(--text); }
html[data-theme=dark] .btn:hover, html[data-theme=dark] select:hover { border-color: #5a5890; }
html[data-theme=dark] .btn.primary { color: var(--primary-fg); }
html[data-theme=dark] .btn.accent { color: #05002d; }
html[data-theme=dark] .btn.danger { color: #fff; }
html[data-theme=dark] .btn.ghost-danger { color: var(--bad); }
html[data-theme=dark] .me .btn { color: #fff; }
html[data-theme=dark] .icon { background: var(--field); border-color: var(--field-line); color: var(--text); }
html[data-theme=dark] .toast { background: #2c2a55; }
html[data-theme=dark] .toast.bad { background: #b3261e; }
html[data-theme=dark] .modal-back { background: rgba(0,0,0,.65); }
html[data-theme=dark] .modal { box-shadow: 0 20px 60px rgba(0,0,0,.6); border: 1px solid var(--line); }
html[data-theme=dark] .empty { border-color: #45436e; }
html[data-theme=dark] .progress { background: #2a2848; }
html[data-theme=dark] .live-badge { background: #4a1c1c; color: #ffb4b4; }
html[data-theme=dark] dd.warn { color: #f0c36a; }
html[data-theme=dark] .badge { background: #2d2c4d; color: #c9cee3; }
html[data-theme=dark] .badge.green { background: #143a2a; color: #7fe3b0; } html[data-theme=dark] .badge.amber { background: #453410; color: #f5cf75; }
html[data-theme=dark] .badge.blue { background: #18335a; color: #9fcbf5; } html[data-theme=dark] .badge.red { background: #4a1c1c; color: #ffb4b4; }
html[data-theme=dark] .tl-bar { background: #3a395c; color: #e9ebf5; }
html[data-theme=dark] .tl-bar.green { background: #1f6b47; color: #fff; } html[data-theme=dark] .tl-bar.amber { background: #8a6410; color: #fff; } html[data-theme=dark] .tl-bar.blue { background: #2b5f96; color: #fff; }
html[data-theme=dark] .poster-left { background: #24233f; }
html[data-theme=dark] .status::before { background: #6b6f8a; }
html[data-theme=dark] .status.on::before { background: var(--ok); } html[data-theme=dark] .status.bad::before { background: var(--bad); }
html[data-theme=dark] .card.is-live { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
html[data-theme=dark] .mod:hover { box-shadow: 0 2px 14px rgba(0,0,0,.5); }
html[data-theme=dark] .mod .ic { color: var(--blue); }
html[data-theme=dark] .login-wrap { background: #07051f; }
html[data-theme=dark] .login-wrap.portal { background: linear-gradient(160deg, #141a35 0%, #0d0c1f 60%); }
html[data-theme=dark] .login-wrap.portal .btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
html[data-theme=dark] .login a, html[data-theme=dark] .help a { color: var(--blue); }
html[data-theme=dark] .lines td.okk { color: var(--ok); } html[data-theme=dark] .lines td.short { color: var(--bad); }
html[data-theme=dark] .grip { color: #6b6f8a; }
html[data-theme=dark] input::placeholder, html[data-theme=dark] textarea::placeholder { color: #7d83a3; }
.theme-btn { background: transparent; border: 1px solid #3b3480; color: #cdd3ee; border-radius: 8px; padding: 5px 10px; font-size: 13px; cursor: pointer; align-self: flex-start; margin: 0 6px 10px; }
.theme-btn:hover { color: #fff; border-color: #5a52b0; }
.modal .theme-btn { border-color: var(--line); color: var(--text); margin: 0 0 14px; padding: 9px 14px; }
@media print { body.printing { background: #fff !important; } .print-doc, .print-doc * { color: #000; } .pd-meta, .pd-foot { color: #444 !important; } }

/* Schermenoverzicht */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.kpi strong { font-size: 22px; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi:hover { border-color: var(--field-line); } .kpi.on { border-color: var(--blue-d); box-shadow: 0 0 0 1px var(--blue-d); }
.kpi.bad strong { color: var(--bad); } .kpi.live strong { color: var(--bad); }
.scr-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.scr-search { flex: 1; min-width: 220px; border: 1px solid var(--field-line); border-radius: 8px; padding: 8px 12px; background: var(--field); color: var(--text); font: inherit; min-height: 38px; }
.scr-search:focus { outline: 2px solid var(--blue-d); outline-offset: 1px; }
.seg { display: inline-flex; border: 1px solid var(--field-line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--card); color: var(--text); padding: 8px 14px; font: inherit; font-size: 13.5px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--field-line); } .seg button.on { background: var(--primary); color: var(--primary-fg); font-weight: 600; }
.scr-fold { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 8px; color: var(--muted); font-size: 13px; }
.linkbtn { border: 0; background: none; color: var(--blue-d); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 0; text-decoration: underline; }
.sgroup { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; }
.sgroup-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 6px; background: var(--head); flex-wrap: wrap; }
.sgroup-t { flex: 1; min-width: 200px; display: flex; align-items: baseline; gap: 8px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; padding: 4px 6px; flex-wrap: wrap; }
.sgroup-t h2 { font-size: 15.5px; margin: 0; } .sgroup-t small { color: var(--muted); font-size: 13px; } .sgroup-t .off { color: var(--bad); font-weight: 600; }
.sgroup-t .chev { display: inline-block; width: 14px; color: var(--muted); transition: transform .12s; } .sgroup.closed .chev { transform: rotate(-90deg); }
.srow { display: grid; grid-template-columns: minmax(170px, 2fr) minmax(140px, 1.5fr) minmax(120px, 170px) auto; gap: 12px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line); }
.srow:hover { background: var(--hover); } .srow.is-live { box-shadow: inset 3px 0 0 var(--bad); } .srow.is-off { box-shadow: inset 3px 0 0 var(--bad); }
.srow-main { border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; padding: 2px 0; min-width: 0; }
.srow-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .srow-main small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow-main:hover strong { text-decoration: underline; }
.srow-play { min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .srow-play small { color: var(--muted); margin-left: 6px; } .srow-play .none { color: var(--muted); font-style: italic; }
.srow-play .live-badge { margin: 0; display: inline-block; }
.srow .status.bad { white-space: nowrap; text-align: left; }
.srow-act { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: nowrap; }
.sgrid { padding: 12px; }
.detail .card { border: 0; padding: 0; box-shadow: none; background: none; }
.pkg-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); margin-top: 4px; }
@media (max-width: 1100px) { .srow { grid-template-columns: minmax(0, 1fr) auto; } .srow-play { grid-column: 1; } .srow .status { grid-column: 2; grid-row: 1; justify-self: end; } .srow-act { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; } }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .kpi { padding: 8px 10px; } .kpi strong { font-size: 19px; } .seg { width: 100%; } .seg button { flex: 1; } .sgroup-head .btn { flex: 1; } }
.modal .help h3 { margin-top: 16px; } .modal .help p { margin-bottom: 8px; } .help a.btn { color: var(--text); text-decoration: none; display: inline-block; } .help a.btn.primary { color: var(--primary-fg); }

/* Bedragen verbergen */
.sps-private .sens, .sps-private .margin strong, .sps-private .mg-row strong,
.sps-private .lines td[data-l="Prijs"] input, .sps-private .lines td[data-l="Inkoopprijs"] input, .sps-private .lines td[data-l="Tarief"] input, .sps-private .lines td[data-l="Korting %"] input,
.sps-private .lines td[data-l^="Prijs per scherm"] input, .sps-private .field input[name=license], .sps-private .field input[name=rate], .sps-private .field input[name=hour_cost], .sps-private .field input[name=cost], .sps-private .field input[name=sale_price], .sps-private .field input[name=rent_price],
.sps-private .ov-table td.m, .sps-private .kpis .kpi.static:nth-child(2) small, .sps-private .ov-kind b { filter: blur(7px); user-select: none; -webkit-user-select: none; }
.sps-private .lines td[data-l="Prijs"] input:focus, .sps-private .lines td[data-l="Inkoopprijs"] input:focus, .sps-private .lines td[data-l="Tarief"] input:focus, .sps-private .lines td[data-l="Korting %"] input:focus { filter: none; }
@media print { .sps-private .sens { filter: none; } }
/* Overzicht en planning */
.kpi.static { cursor: default; } .kpi small { font-size: 12px; color: var(--muted); margin-top: 2px; } .kpi.good strong { color: var(--ok); }
.ov-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ov-kind { padding: 10px 14px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; } .ov-kind strong { color: var(--text); font-size: 15px; } .ov-kind b { color: var(--text); font-variant-numeric: tabular-nums; } .ov-kind b.neg { color: var(--bad); } .ov-kind b.pos { color: var(--ok); }
.ov-table { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.ov-table table { width: 100%; border-collapse: collapse; min-width: 820px; }
.ov-table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 9px 12px; background: var(--head); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ov-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; } .ov-table td small { display: block; color: var(--muted); font-size: 12.5px; }
.ov-table th.r, .ov-table td.r { text-align: right; white-space: nowrap; } .ov-table td.neg { color: var(--bad); font-weight: 700; }
.ov-table tr.click { cursor: pointer; } .ov-table tr.click:hover td { background: var(--hover); } .ov-table tr.warn td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.ov-table tfoot td { font-weight: 700; border-bottom: 0; background: var(--head); }
.ip-date small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.plan-sum { justify-content: flex-start; padding: 6px 4px 0; } .plan-sum .over, .plan-sum .over strong { color: var(--bad); }
.gcal-links { font-size: 13px; color: var(--muted); margin: 2px 0 6px; display: flex; gap: 6px 12px; flex-wrap: wrap; } .gcal-links a { color: var(--blue-d); }
.lines td input[type=time] { min-width: 96px; } .lines td input[type=date] { min-width: 130px; }
@media (max-width: 700px) { .ov-split { grid-template-columns: 1fr; } }

/* Voorraad per stuk: QR, scannen, schades */
.qr { display: inline-block; line-height: 0; background: #fff; padding: 4px; border-radius: 6px; } .qr svg { display: block; }
.unit-top { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; }
.unit-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; text-align: center; } .unit-qr strong { font-size: 17px; letter-spacing: .02em; }
.unit-actions { margin: 14px 0 4px; }
.tr.is-damage { box-shadow: inset 3px 0 0 var(--bad); }
.scan-box { position: relative; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; max-width: 640px; margin-bottom: 12px; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px; pointer-events: none; }
.scan-over .btn { pointer-events: auto; margin-bottom: auto; margin-top: auto; }
.scan-state { background: rgba(0,0,0,.6); color: #fff; padding: 5px 12px; border-radius: 999px; font-size: 13px; margin: 0; text-align: center; }
.scan-proj { display: flex; flex-direction: column; gap: 4px; max-width: 640px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.scan-results { max-width: 640px; }
.labels { display: none; }
@media print {
  .labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .label { display: flex; align-items: center; gap: 3mm; border: .3pt solid #999; border-radius: 2mm; padding: 2.5mm; break-inside: avoid; page-break-inside: avoid; min-height: 30mm; }
  .label .qr { padding: 0; } .label .qr svg { width: 25mm; height: 25mm; }
  .label strong { display: block; font: 700 12pt Arial, sans-serif; } .label span { display: block; font: 8.5pt/1.25 Arial, sans-serif; } .label small { display: block; font: 7pt Arial, sans-serif; color: #555 !important; margin-top: 1mm; }
}
@media (max-width: 700px) { .unit-top { grid-template-columns: 1fr; } .scan-box { aspect-ratio: 1 / 1; } }

/* Scoreborden: instellingen per hal */
.sport-list { display: grid; gap: 10px; }
.bf input[type=color] { padding: 3px; height: 38px; max-width: 120px; cursor: pointer; }
.sport-card { padding: 10px 14px; } .sport-card.on { border-color: var(--blue-d); }
.sport-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.sport-head .bf.check { flex: 1; min-width: 240px; } .sport-head .bf.check.def { flex: none; min-width: 0; color: var(--muted); font-size: 13px; }
.sport-head strong { display: block; } .sport-head small { display: block; color: var(--muted); font-size: 12.5px; }
.sport-fields { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sport-head > span { flex: 1; min-width: 200px; }

/* Boog-bouwer */
.arch-stage { position: relative; width: 100%; background: #000; border-radius: 8px; overflow: hidden; margin: 6px 0 12px; }
.arch-zone { position: absolute; border: 1px dashed rgba(255,255,255,.45); background: rgba(47,127,199,.18); color: #fff; padding: 0; margin: 0; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; font: inherit; }
.arch-zone.all { border-color: transparent; background: transparent; } .arch-zone.all.empty { pointer-events: none; }
.arch-zone.sel { outline: 3px solid #ffd84a; outline-offset: -3px; z-index: 2; }
.arch-zone img, .arch-zone video { position: absolute; inset: 0; width: 100%; height: 100%; }
.arch-zone span { position: relative; font-weight: 800; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } .arch-zone span.v { writing-mode: vertical-rl; transform: rotate(180deg); max-height: 100%; }
.arch-zone small { position: relative; font-size: 10px; opacity: .8; }
.arch-hole { position: absolute; display: flex; align-items: center; justify-content: center; color: #6b7390; font-size: 12px; pointer-events: none; z-index: 3; background: repeating-linear-gradient(45deg, #0d0f1a, #0d0f1a 10px, #151829 10px, #151829 20px); }
.arch-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.arch-size { margin: 10px 0; } .arch-size summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

/* Uitvoer opknippen */
.cut-maps { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin: 10px 0; align-items: start; } .cut-maps strong { display: block; font-size: 12.5px; margin-bottom: 4px; }
.cut-map { position: relative; width: 100%; background: repeating-linear-gradient(45deg, #0d0f1a, #0d0f1a 8px, #151829 8px, #151829 16px); border-radius: 6px; overflow: hidden; }
.cut-piece { position: absolute; box-sizing: border-box; border: 1px solid rgba(255,255,255,.7); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.cut-table { display: grid; gap: 4px; margin: 8px 0; } .cut-row { display: grid; grid-template-columns: 28px repeat(6, minmax(0, 1fr)) 34px; gap: 6px; align-items: center; } .cut-row.head span { font-size: 12px; color: var(--muted); }
.cut-row input { border: 1px solid var(--field-line); border-radius: 6px; padding: 5px 7px; background: var(--field); color: var(--text); width: 100%; min-width: 0; }
@media (max-width: 760px) { .cut-maps { grid-template-columns: 1fr; } }

/* Evenementen: aangeleverde content beoordelen */
.ev-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ev-th { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); } .ev-th img, .ev-th span { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #05002d; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; }
.ev-th small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status.warn { color: #b06a00; } .status.warn::before { background: #d99a00; }

.tr.muted .grow { opacity: .6; }

/* Veel tabbladen: iets compacter, zodat ze naast de klantkeuze passen */
.tabs button { padding: 10px 9px; font-size: 14px; }
.client-pick select { min-width: 150px; max-width: 220px; }

/* Melding dat er een nieuwe versie klaarstaat */
.update-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9000; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: #05002d; color: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.35); font-size: 14px; max-width: calc(100vw - 32px); }
@media (max-width: 820px) { .update-bar { bottom: 84px; } }
