:root {
  --bg: #f5f6f8; --panel: #fff; --text: #171a21; --muted: #667085; --line: #e4e7ec;
  --accent: #5b4dff; --accent-weak: #eeecff; --danger: #d92d20; --ok: #12b76a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
input, select { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; min-width: 0; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=color] { padding: 2px; width: 42px; height: 36px; cursor: pointer; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }

.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f2f4f7; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary:disabled { opacity: .45; cursor: default; filter: none; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: #fee4e2; color: var(--danger); }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 30px rgba(16,24,40,.06); }
.login-card .brand { margin-bottom: 8px; }
.error { color: var(--danger); margin: 0; font-size: 14px; }

/* App */
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.brand-dot { width: 12px; height: 12px; border-radius: 4px; background: conic-gradient(#e53935, #fdd835, #43a047, #1e88e5, #8e24aa, #e53935); }
.appbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tabs button { font: inherit; border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 600; white-space: nowrap; }
.tabs button.active { background: var(--accent-weak); color: var(--accent); }
.actions { display: flex; align-items: center; gap: 8px; }
.save-state { font-size: 13px; color: var(--muted); }
.save-state.dirty { color: #b54708; }

.content { max-width: 1180px; margin: 0 auto; padding: 24px 20px 80px; display: flex; flex-direction: column; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Bandjes-tabel */
.band-table { width: 100%; border-collapse: collapse; }
.band-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.band-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.band-table tr:last-child td { border-bottom: 0; }
.color-cell { display: flex; gap: 6px; align-items: center; }
.color-cell input[type=text] { width: 120px; }
.time-cell { display: flex; align-items: center; gap: 6px; }
.days { display: flex; gap: 3px; }
.days label { flex-direction: row; }
.days input { display: none; }
.days span { display: inline-grid; place-items: center; width: 30px; height: 28px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; }
.days input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.duration { font-size: 12px; color: var(--muted); white-space: nowrap; }

.generator { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 14px; background: var(--bg); border-radius: 10px; margin-bottom: 14px; }
.generator label { flex-direction: column; }
.generator .check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; color: var(--text); }

/* Tijdlijn */
.timeline { position: relative; padding-top: 22px; }
.tl-scale { position: absolute; inset: 0 0 auto 0; height: 18px; font-size: 11px; color: var(--muted); }
.tl-scale span { position: absolute; transform: translateX(-50%); }
.tl-rows { position: relative; display: flex; flex-direction: column; gap: 4px; }
.tl-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-row { position: relative; height: 22px; }
.tl-bar { position: absolute; top: 0; bottom: 0; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 0 8px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.tl-now { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--danger); z-index: 2; }
.tl-now::before { content: "nu"; position: absolute; top: -16px; left: -6px; font-size: 10px; font-weight: 700; color: var(--danger); }

/* Menu */
.cat { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cat-head { display: flex; gap: 8px; align-items: center; }
.cat-head input { font-weight: 700; flex: 1; }
.item-row { display: grid; grid-template-columns: 1fr 110px auto auto; gap: 8px; align-items: center; }
.price-input { display: flex; align-items: center; gap: 4px; }
.price-input input { width: 100%; }
.check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 13px; }

/* Schermen */
.screen-list { display: grid; gap: 10px; }
.screen-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.screen-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.slide-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.tv-url { font-size: 13px; color: var(--muted); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Eigen content */
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-weak); }
.slide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.slide-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #0c0e13; border-radius: 8px; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb .tag { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.slide-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.icon-btn.plain:hover { background: #f2f4f7; color: var(--text); }

/* Voorbeeld op tv */
.tv-btn { background: #171a21; border-color: #171a21; color: #fff; }
.tv-btn:hover { background: #2a2f3a; }
.tv-modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; }
.tv-modal[hidden] { display: none; }
.tv-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 18, .82); backdrop-filter: blur(4px); }
.tv-dialog { position: relative; width: min(1200px, 100%); max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.tv-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; background: var(--panel); border-radius: 12px; padding: 10px 14px; }
.tv-toolbar strong { margin-right: auto; align-self: center; }
.tv { display: flex; flex-direction: column; align-items: center; }
.tv-bezel { width: 100%; padding: 1.2%; background: linear-gradient(#1b1d22, #0b0c0f); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1px #2c2f36; }
.tv-screen .preview-frame { border: 0; border-radius: 4px; }
.tv-stand { width: 22%; height: 34px; background: linear-gradient(#22252b, #121317); clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); margin-top: -1px; }
.tv-note { margin: 0; text-align: center; color: #d0d5dd; font-size: 14px; }

/* Live bericht */
.live-now { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; background: var(--ac); color: var(--afg); }
.live-now .muted { color: inherit; opacity: .75; }
.live-now .btn { margin-left: auto; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #d92d20; box-shadow: 0 0 0 3px rgba(255,255,255,.6); animation: blink 1s infinite alternate; }
@keyframes blink { to { opacity: .3; } }
.preview-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.preview-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0c0e13; border: 1px solid var(--line); }
.preview-frame iframe { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; }
.hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
code { background: #f2f4f7; padding: 1px 6px; border-radius: 5px; font-size: 13px; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.settings-grid .help { font-size: 12px; color: var(--muted); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #171a21; color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.2); z-index: 10; }
.toast.err { background: var(--danger); }

@media (max-width: 760px) {
  .band-table thead { display: none; }
  .band-table tr { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .band-table td { border: 0; padding: 0; }
  .screen-row { grid-template-columns: 1fr; }
  .item-row { grid-template-columns: 1fr 90px; }
}

/* ---------- v2 ---------- */
.env-badge { font-size: 11px; font-weight: 800; background: #fef0c7; color: #93370d; padding: 2px 7px; border-radius: 6px; }
.preview-frame.portrait { aspect-ratio: 9 / 16; width: min(100%, calc((100vh - 220px) * 9 / 16)); margin: 0 auto; }
.tv-bezel:has(.portrait) { width: auto; }

/* Slim menu editor */
.cat-head .live-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.live-pill.on { background: #dcfae6; color: #067647; }
.live-pill.off { background: #f2f4f7; color: var(--muted); }
.daypart { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg); border-radius: 10px; }
.mi { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.mi.sold .mi-name { text-decoration: line-through; color: var(--muted); }
.mi-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mi-row { display: flex; gap: 8px; align-items: center; }
.mi-row.wrap { flex-wrap: wrap; }
.mi-name { flex: 1; font-weight: 600; }
.mi-desc { font-size: 13px; }
.mi .price-input { width: 120px; flex: none; }
.photo { position: relative; width: 64px; height: 64px; border-radius: 10px; border: 1px dashed var(--line); display: grid; place-items: center; cursor: pointer; overflow: hidden; background: var(--bg); font-size: 20px; }
.photo:hover { border-color: var(--accent); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; cursor: pointer; }
.chip-btn { font: inherit; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.chip-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-btn.happy.on { background: #ff3d8b; border-color: #ff3d8b; }
.sold-toggle { margin-left: auto; }
.happy-row { flex-wrap: wrap; font-size: 13px; background: #fff0f6; padding: 8px 10px; border-radius: 10px; }
.happy-row .price-input { width: 100px; }

/* Huisstijl */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.theme-card { font: inherit; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.theme-swatch { border-radius: 9px; padding: 10px; display: flex; flex-direction: column; gap: 5px; margin-bottom: 6px; font-size: 12px; }
.ts-head { font-weight: 800; border-bottom: 2px solid; padding-bottom: 2px; }
.ts-row { display: flex; justify-content: space-between; padding: 3px 6px; border-radius: 5px; }
.theme-card:nth-child(1) .ts-head { font-family: Georgia, serif; }
.theme-card:nth-child(3) .ts-head { text-transform: uppercase; text-shadow: 0 0 6px currentColor; }
.theme-card:nth-child(4) .ts-head { font-family: "Chalkboard SE", "Marker Felt", cursive; }
.logo-field { display: flex; flex-direction: column; gap: 6px; }
.logo-prev { height: 36px; max-width: 120px; object-fit: contain; background: #f2f4f7; border-radius: 6px; padding: 3px; }

/* Online-status */
.online-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #d0d5dd; vertical-align: 0; }
.online-dot.on { background: var(--ok); box-shadow: 0 0 0 3px #dcfae6; }
details.tv-url summary { cursor: pointer; }
@media (max-width: 760px) { .mi { grid-template-columns: 52px 1fr auto; } .photo { width: 52px; height: 52px; } }

/* ---------- Controlekamer ---------- */
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg); margin-bottom: 14px; }
.bulk.on { background: var(--accent-weak); }
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tv-card { border: 2px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.tv-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.tv-card-head { display: flex; align-items: center; gap: 8px; }
.tv-card-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.power-btn { margin-left: auto; font: inherit; font-size: 12px; font-weight: 700; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; background: #f2f4f7; color: var(--muted); }
.power-btn.on { background: #dcfae6; border-color: #abefc6; color: #067647; }
.tv-live { position: relative; cursor: zoom-in; border-radius: 10px; overflow: hidden; background: #000; }
.tv-live .preview-frame { border: 0; border-radius: 0; }
.tv-live .preview-frame.portrait { width: auto; height: 100%; max-height: 300px; }
.tv-live iframe { pointer-events: none; }
.off-label { position: absolute; inset: 0; display: grid; place-items: center; color: #98a2b3; font-weight: 700; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; }
.seg button { font: inherit; font-size: 12px; font-weight: 600; border: 0; background: transparent; padding: 7px 4px; border-radius: 7px; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.tv-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tv-card.is-off .seg { opacity: .5; }

.remember { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; }

/* =====================================================================
   App-opbouw met menu links
   ===================================================================== */
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:where(button, a, input, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ico { display: inline-flex; vertical-align: middle; }
.ico svg { display: block; }

.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); z-index: 20; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.side-brand .brand-dot { width: 26px; height: 26px; border-radius: 8px; flex: none; }
.side-biz { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; align-items: flex-start; }
.side-biz strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.side-close { display: none; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 10px 12px; display: flex; flex-direction: column; gap: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #98a2b3; padding: 4px 10px; }
.nav-item { font: inherit; font-weight: 600; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: #475467; cursor: pointer; text-align: left; }
.nav-item svg { flex: none; }
.nav-item:hover { background: #f2f4f7; color: var(--text); }
.nav-item.active { background: var(--accent-weak); color: var(--accent); }
.side-foot { border-top: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px; min-width: 0; }
.side-user div { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.side-user span:not(.avatar) { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: none; }
.side-link { font: inherit; font-weight: 600; display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 6px 10px; border: 0; border-radius: 9px; background: transparent; color: #475467; cursor: pointer; }
.side-link:hover { background: #f2f4f7; color: var(--text); }
.side-backdrop { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 28px; background: rgba(245, 246, 248, .9); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.topbar .save-state { margin-left: auto; color: #067647; font-weight: 600; }
.menu-btn { display: none; font-size: 20px; }
.tv-btn { display: inline-flex; align-items: center; gap: 8px; }
.app .content { max-width: 1160px; width: 100%; margin: 0; padding: 8px 28px 120px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head h1 { font-size: 26px; margin: 0 0 4px; }
.page-head p { margin: 0; max-width: 60ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-actions:empty { display: none; }
.panel h2 { font-size: 17px; }
.icon-btn { min-width: 36px; min-height: 36px; }

/* Overzicht */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { font: inherit; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; color: inherit; }
button.stat { cursor: pointer; }
button.stat:hover { border-color: #c7cdd8; box-shadow: 0 2px 8px rgba(16,24,40,.06); }
.stat-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.stat-value { font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.band-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.band-chip { font-size: 13px; padding: 2px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.checklist .progress { height: 6px; background: #f2f4f7; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.checklist .progress span { display: block; height: 100%; background: var(--ok); border-radius: 3px; transition: width .3s; }
.step { font: inherit; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 6px; border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; color: var(--text); }
.step:hover { background: #fafbfc; }
.step-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d0d5dd; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.step.done { color: var(--muted); text-decoration: line-through; }
.step.done .step-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-go { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 13px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; text-align: center; border: 2px dashed var(--line); border-radius: 14px; }

/* Publiceerbalk */
.savebar { position: fixed; left: 256px; right: 0; bottom: 0; z-index: 25; padding: 12px 20px 16px; pointer-events: none; display: flex; justify-content: center; }
.savebar[hidden] { display: none; }
.savebar-inner { pointer-events: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #171a21; color: #fff; padding: 10px 12px 10px 18px; border-radius: 14px; box-shadow: 0 12px 40px rgba(16,24,40,.35); animation: rise .25s ease-out; max-width: 100%; }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.savebar-dot { width: 9px; height: 9px; border-radius: 50%; background: #fdb022; flex: none; }
.savebar-text { margin-right: 8px; }
.btn.ghost-light { background: transparent; border-color: #475467; color: #fff; }
.btn.ghost-light:hover { background: #2a2f3a; }

/* Dialogen */
.dialog-host { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.dialog-host[hidden] { display: none; }
.dialog-backdrop { position: absolute; inset: 0; background: rgba(10,12,18,.55); }
.dialog { position: relative; width: min(460px, 100%); background: #fff; border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.35); animation: rise .2s ease-out; }
.dialog h2 { font-size: 18px; margin: 0; }
.dialog p { margin: 0; }
.dialog-body { display: flex; flex-direction: column; gap: 12px; }
.dialog-row { display: flex; gap: 12px; align-items: flex-end; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-fill:hover { filter: brightness(1.08); background: var(--danger); }
.code-input { font-size: 30px; font-weight: 800; letter-spacing: .35em; text-align: center; padding: 12px; font-variant-numeric: tabular-nums; }
.toast { z-index: 70; bottom: 84px; }
.tv-modal { z-index: 50; }

/* Mobiel: menu schuift in beeld */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; width: min(290px, 86vw); transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  .side-open .side { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.3); }
  .side-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,12,18,.5); z-index: 15; }
  .side-close, .menu-btn { display: inline-grid; place-items: center; }
  .topbar { padding: 8px 14px; background: #fff; border-bottom-color: var(--line); }
  .app .content { padding: 14px 14px 140px; }
  .page-head h1 { font-size: 22px; }
  .savebar { left: 0; padding: 10px; }
  .savebar-inner { width: 100%; justify-content: flex-end; }
  .savebar-text { flex: 1 1 100%; }
  .tv-grid { grid-template-columns: minmax(0, 1fr); }
  .seg { grid-template-columns: repeat(2, 1fr); }
  .tv-btn { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Tv-kaart: naam krijgt de ruimte, status eronder */
.tv-card-head { flex-wrap: wrap; row-gap: 0; }
.tv-card-head strong { flex: 1; min-width: 0; }
.tv-card-head .online-label { order: 5; flex-basis: 100%; padding-left: 46px; }
.power-btn { white-space: nowrap; min-height: 32px; }
.screen-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.screen-row .row-actions { grid-column: 1 / -1; align-items: center; }
.screen-row .row-actions .icon-btn { margin-left: auto; }
@media (max-width: 760px) { .screen-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.step-go { white-space: nowrap; }
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat-value { font-size: 15px; }
  .topbar .save-state { display: none; }
  .topbar .tv-btn { margin-left: auto; }
}

.thumb.cover img, .thumb.cover video { object-fit: cover; }

.thumb.blur::before { content: ""; position: absolute; inset: -12%; background: var(--img) center / cover; filter: blur(10px) brightness(.55) saturate(1.2); }
.thumb.blur img { position: relative; }

/* =====================================================================
   Live voorbeeld naast de editor, snel uitverkocht, ongedaan maken
   ===================================================================== */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 14px; }
.page-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.app .content { display: block; }
.app .content.has-side { max-width: 1640px; }
.has-side .page-grid { grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 480px); }
.page-side { position: sticky; top: 64px; }
.side-preview { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.side-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-preview-head strong { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.side-preview-head select { max-width: 55%; font-size: 13px; padding: 5px 8px; }
.side-preview p { margin: 0; }
.tv-bezel.mini { padding: 6px; border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.25), inset 0 0 0 1px #2c2f36; }
.tv-bezel.mini .preview-frame { border: 0; border-radius: 4px; }
.tv-bezel.mini .preview-frame.portrait { width: min(100%, 260px); }

.quick { display: flex; flex-direction: column; gap: 12px; }
.quick-cat { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: start; }
.quick-title { font-weight: 700; padding-top: 9px; overflow: hidden; text-overflow: ellipsis; }
.quick-items { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-item { font: inherit; font-weight: 600; min-height: 40px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.quick-item:hover { border-color: #c7cdd8; background: #fafbfc; }
.quick-item.sold { background: #fee4e2; border-color: #fda29b; color: #b42318; text-decoration: line-through; }
.quick-tag { font-size: 11px; text-transform: uppercase; font-weight: 800; text-decoration: none; display: inline-block; }
.mi-actions { display: flex; flex-direction: column; }
#undoBtn:disabled { opacity: .4; cursor: default; }
@media (max-width: 700px) { .quick-cat { grid-template-columns: minmax(0, 1fr); gap: 4px; } .quick-title { padding-top: 0; } }

/* =====================================================================
   Agenda
   ===================================================================== */
.cal-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-toolbar > strong { font-size: 16px; }
.cal-legend { display: flex; gap: 12px; margin-left: auto; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-tv::before { background: #5b4dff; } .lg-message::before { background: #f79009; } .lg-event::before { background: #12b76a; }
.cal-now { margin: 0 0 12px; padding: 9px 12px; background: var(--bg); border-radius: 10px; font-size: 14px; }
.cal { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; user-select: none; }
.cal-head, .cal-body { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line); background: #fafbfc; }
.cal-dayname { padding: 8px 6px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cal-dayname b { font-size: 16px; color: var(--text); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.cal-dayname.today b { background: var(--accent); color: #fff; }
.cal-body { max-height: 62vh; overflow-y: auto; }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-times span:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: crosshair; touch-action: none;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% var(--hour); }
.cal-col.today { background-color: #fbfaff; }
.cal-closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(102,112,133,.10) 0 6px, rgba(102,112,133,.04) 6px 12px); pointer-events: none; }
.cal-item { position: absolute; font: inherit; font-size: 12px; line-height: 1.25; text-align: left; border: 0; border-left: 3px solid; border-radius: 6px; padding: 3px 6px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 1px; z-index: 1; }
.cal-item b { font-variant-numeric: tabular-nums; }
.cal-item span { overflow: hidden; text-overflow: ellipsis; }
.cal-item:hover { filter: brightness(.96); z-index: 2; }
.cal-item.running { box-shadow: 0 0 0 2px currentColor; }
.t-tv { background: #eeecff; color: #3b2fc9; border-color: #5b4dff; }
.t-message { background: #fef0c7; color: #93370d; border-color: #f79009; }
.t-event { background: #dcfae6; color: #067647; border-color: #12b76a; }
.cal-ghost { position: absolute; left: 2px; right: 2px; background: rgba(91,77,255,.18); border: 2px dashed var(--accent); border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--accent); padding: 2px 5px; pointer-events: none; z-index: 3; }
.cal-nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.cal-nowline::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.cal-list-day { border-top: 1px solid var(--line); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.cal-list-day.today .cal-list-head strong { color: var(--accent); }
.cal-list-head { display: flex; justify-content: space-between; align-items: center; }
.cal-list-item { font: inherit; display: flex; gap: 10px; align-items: baseline; text-align: left; border: 0; border-left: 3px solid; border-radius: 8px; padding: 9px 10px; min-height: 40px; cursor: pointer; }
.seg.seg3 { grid-template-columns: repeat(3, 1fr); }
.seg.seg3 button { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.seg.seg3 button span { font-size: 11px; font-weight: 500; }
.seg.seg3 button b { font-size: 13px; }
.dialog { max-height: calc(100vh - 32px); overflow-y: auto; }
.hours { display: grid; gap: 6px; }
.hours.is-off { opacity: .55; }
.hours-row { display: grid; grid-template-columns: 110px 110px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 40px; }
.agenda-note { font: inherit; font-size: 12px; font-weight: 600; text-align: left; border: 0; border-radius: 8px; padding: 7px 10px; background: #eeecff; color: #3b2fc9; cursor: pointer; }
.slide-dates input { width: 100%; font-size: 13px; padding: 5px 6px; }
@media (max-width: 600px) { .hours-row { grid-template-columns: 90px minmax(0, 1fr); } .cal-legend { margin-left: 0; } }

/* =====================================================================
   Iconen: één lijnstijl, altijd in de tekstkleur
   ===================================================================== */
.ico { display: inline-flex; flex: none; line-height: 0; }
.btn, .chip-btn, .seg button, .power-btn, .agenda-note, .step-go, .live-pill, .cal-item b, .tv-toolbar strong { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.agenda-note { justify-content: flex-start; }
.seg button { gap: 5px; }
.icon-btn { display: inline-grid; place-items: center; font-size: 0; }
.photo { color: var(--muted); }
.brand-dot { background: #171a21 !important; position: relative; }
.brand-dot::after { content: ""; position: absolute; inset: 27% 22% 33% 22%; border: 1.6px solid #fff; border-radius: 2px; }
.side-brand .brand-dot::after { border-width: 2px; }
.live-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live-pill.off::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.step-mark .ico { color: #fff; }
.cal-list-item .ico { color: inherit; opacity: .7; }
.side-close, .menu-btn { display: none; }
@media (max-width: 900px) { .side-close, .menu-btn { display: inline-grid; } }

/* Afspelen */
.seg.seg2 { grid-template-columns: repeat(2, 1fr); max-width: 560px; }
.seg.seg2 button, .seg.seg4x button { flex-direction: column; gap: 2px; padding: 10px 8px; }
.seg.seg2 button span, .seg.seg4x button span { font-size: 11px; font-weight: 500; }
.seg.seg2 button b, .seg.seg4x button b { font-size: 13px; }
.seg.seg4x { grid-template-columns: repeat(4, 1fr); }
.playback-auto { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; max-width: 720px; }
@media (max-width: 700px) { .seg.seg4x { grid-template-columns: repeat(2, 1fr); } }

/* Online versie */
.link-code { word-break: break-all; }
.danger-zone { border-color: #fecdca; }
.progress { height: 6px; background: #f2f4f7; border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); border-radius: 3px; }

[hidden] { display: none !important; }
a.btn { text-decoration: none; }

/* =====================================================================
   Eenvoudige modus: tv's en content
   ===================================================================== */
.tv-name { flex: 1; min-width: 0; font-weight: 700; border-color: transparent; background: transparent; padding: 5px 6px; margin-left: -6px; }
.tv-name:hover { border-color: var(--line); background: #fff; }
.content-row { font: inherit; 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(--bg); cursor: pointer; color: var(--text); min-height: 52px; }
.content-row:hover { border-color: var(--accent); background: var(--accent-weak); }
.content-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.content-text .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-change { color: var(--accent); font-weight: 700; font-size: 13px; }
.sm-select { font-size: 13px; padding: 5px 8px; }
.tv-actions { align-items: center; }
.tv-actions .icon-btn { margin-left: auto; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.pick { position: relative; flex-direction: column; gap: 4px; border: 2px solid var(--line); border-radius: 10px; padding: 6px; cursor: pointer; color: var(--text); font-size: 12px; }
.pick.on { border-color: var(--accent); background: var(--accent-weak); }
.pick input { position: absolute; top: 10px; left: 10px; z-index: 1; }
.pick-thumb { aspect-ratio: 16 / 9; background: #0c0e13; border-radius: 6px; overflow: hidden; }
.pick-thumb img, .pick-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-tvs { display: flex; flex-direction: column; gap: 5px; }
.on-tvs-list { display: flex; flex-wrap: wrap; gap: 5px; }
.dialog { width: min(520px, 100%); }

/* Lijst van alle tv's met hun content, naast de editor */
.tv-list { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; max-height: 46vh; overflow-y: auto; }
.tv-list-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #98a2b3; }
.tv-list-row { border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.tv-list-row.active { border-color: var(--accent); background: var(--accent-weak); }
.tv-list-head { font: inherit; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 2px 4px; border: 0; background: transparent; cursor: pointer; text-align: left; color: var(--text); border-radius: 6px; }
.tv-list-head:hover { background: rgba(16, 24, 40, .05); }
.tv-list-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-list-head .muted { margin-left: auto; white-space: nowrap; }
.tv-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 5px; }
.strip-item { position: relative; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #0c0e13; cursor: pointer; }
.strip-item img, .strip-item video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.strip-item:hover { border-color: #98a2b3; }
.strip-item.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-weak); }
.strip-video { position: absolute; right: 3px; bottom: 3px; background: rgba(0, 0, 0, .7); color: #fff; border-radius: 4px; padding: 2px; line-height: 0; }
#sideNow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }

/* =====================================================================
   Betere bediening (eenvoudige modus)
   ===================================================================== */
/* Toestand van een tv */
.state-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; background: #f2f4f7; color: var(--muted); }
.state-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.state-pill.online { background: #dcfae6; color: #067647; }
.state-pill.offline { background: #fef0c7; color: #93370d; }
.state-pill.new { background: #eeecff; color: #3b2fc9; }
.tv-card-head { flex-wrap: nowrap; gap: 8px; }
.tv-card .tv-name { font-size: 16px; }
.pair-callout { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: #eeecff; color: #3b2fc9; font-size: 13px; font-weight: 600; }
.pair-callout .btn { flex: none; }
.card-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.strip-item.static { cursor: default; border-color: transparent; }
.strip-more { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700; }
.tv-actions { justify-content: space-between; }
.tv-card.state-off .tv-strip, .tv-card.state-off .content-row { opacity: .6; }

/* Menu "Meer" */
.menu-wrap { position: relative; }
.menu { display: none; position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 12; min-width: 250px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(16, 24, 40, .18); flex-direction: column; }
.menu-wrap.open .menu { display: flex; }
.menu button { font: inherit; font-weight: 600; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover { background: #f2f4f7; }
.menu button.danger { color: var(--danger); }
.menu button.danger:hover { background: #fee4e2; }

/* Hulp inklapbaar */
.help-details summary { font-weight: 700; cursor: pointer; }
.help-details[open] summary { margin-bottom: 10px; }
.help-details h2 { display: none; }

/* Content */
.dropzone.big { padding: 54px 20px; gap: 8px; color: var(--muted); }
.dropzone.big strong { color: var(--text); font-size: 17px; }
.content-hint { margin: 0 0 4px; }
.upload-list { display: flex; flex-direction: column; gap: 6px; }
.upload-list:not(:empty) { margin: 10px 0; }
.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 200px) 80px; gap: 10px; align-items: center; padding: 8px 12px; background: var(--bg); border-radius: 10px; font-size: 13px; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.slide-card { transition: box-shadow .15s, border-color .15s, opacity .15s; }
.slide-card.dragging { opacity: .4; }
.slide-card.drop-target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.slide-card.is-expired .thumb { opacity: .5; }
.drag-handle { cursor: grab; }
.drag-handle:active { cursor: grabbing; }
.thumb .tag { top: 6px; left: 6px; text-transform: none; font-size: 11px; }
.thumb .tag.pos { min-width: 20px; text-align: center; }
.thumb .tag.video { left: auto; right: 6px; }
.thumb .tag.date { top: auto; bottom: 6px; background: rgba(0, 0, 0, .75); }
.thumb .tag.date.expired { background: var(--danger); }
.thumb .tag.date.planned { background: #3b2fc9; }
.slide-name { font-weight: 600; }
.slide-options { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--bg); border-radius: 10px; }
.warn-text { color: #b54708; font-weight: 600; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn:disabled:hover { background: transparent; color: var(--muted); }
body.file-over::after { content: "Laat los om te uploaden"; position: fixed; inset: 12px; z-index: 80; display: grid; place-items: center; border: 3px dashed var(--accent); border-radius: 18px; background: rgba(238, 236, 255, .92); color: var(--accent); font-size: 22px; font-weight: 800; pointer-events: none; }
@media (max-width: 700px) { .upload-row { grid-template-columns: minmax(0, 1fr) 60px; } .upload-row .progress { grid-column: 1 / -1; order: 3; } .menu { min-width: 220px; } }
