/* Screen UP: portaal */
:root {
  /* Screen UP-geel. --orange is de vulkleur, --orange-ink de leesbare tekstvariant op licht */
  --orange: #f2c200;
  --orange-2: #ffe23d;
  --orange-soft: #fff6cc;
  --orange-ink: #8a6800;
  --on-orange: #14161a;
  --ink: #14161a;
  --ink-2: #4b5563;
  --ink-3: #8a94a0;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --line: #e4e7eb;
  --side: #14161a;
  --side-2: #1f2229;
  --good: #1f9d55;
  --warn: #c98a05;
  --bad: #c73434;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: Montserrat, "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--orange-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
code { font-family: ui-monospace, Consolas, monospace; background: #eef0f3; padding: .1em .4em; border-radius: 4px; font-size: .92em; }
.muted { color: var(--ink-3); font-size: .9rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

/* Shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--side); color: #d5dbe1; display: flex; flex-direction: column; padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; flex-direction: column; color: #fff; text-decoration: none; padding: 0 .6rem; margin-bottom: 1.2rem; }
.brand:hover { text-decoration: none; }
.brand-word { font-weight: 800; font-size: 1.35rem; letter-spacing: .02em; line-height: 1; }
.brand-logo { display: block; width: 100%; max-width: 156px; height: auto; }
.auth-brand .brand-logo { max-width: 240px; }
.brand-word span { color: var(--orange); }
.brand-sub { font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; color: #9aa5b1; margin-top: .35rem; font-weight: 600; }
.tenant-chip { margin: 0 .6rem 1rem; padding: .45rem .7rem; background: var(--side-2); border-radius: 8px; font-size: .8rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: .15rem; }
.nav-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 8px; color: #c3cad2; font-weight: 600; font-size: .9rem; text-decoration: none; }
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav-item:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--orange); color: var(--on-orange); }
.nav-item.active svg { opacity: 1; }
.nav-item.small { font-size: .82rem; padding: .45rem .7rem; }
.nav-item.as-button { background: none; border: 0; width: 100%; cursor: pointer; font-family: inherit; text-align: left; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: .15rem; padding-top: 1rem; border-top: 1px solid #2a2f37; }
.version { font-size: .7rem; color: #5f6b78; padding: .5rem .7rem 0; }
.main { padding: 2rem 2.4rem 4rem; max-width: 1280px; width: 100%; }
.impersonate-bar { position: sticky; top: 0; z-index: 50; background: var(--orange); color: var(--on-orange); padding: .5rem 1.5rem; display: flex; justify-content: space-between; align-items: center; font-size: .88rem; font-weight: 600; }
.impersonate-bar form { margin: 0; }

/* Page header */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); font-size: .9rem; margin-top: .3rem; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.breadcrumb { font-size: .8rem; color: var(--ink-3); margin-bottom: .4rem; font-weight: 600; }
.breadcrumb a { color: var(--ink-3); }

/* Cards, grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.card + .card { margin-top: 1.2rem; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.2rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.stat .label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.stat .value { font-size: 1.7rem; font-weight: 800; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: .9rem; color: var(--ink-3); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 1.2rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline; }
.row-link { font-weight: 600; color: var(--ink); }
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--ink-3); font-size: .92rem; }
.empty b { display: block; color: var(--ink); margin-bottom: .3rem; font-size: 1rem; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; letter-spacing: .03em; white-space: nowrap; background: #eef0f3; color: var(--ink-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.online { background: #e3f5ea; color: var(--good); }
.pill.offline { background: #fbe6e6; color: var(--bad); }
.pill.never { background: #eef0f3; color: var(--ink-3); }
.pill.warn { background: #fdf3dc; color: var(--warn); }
.pill.type { background: var(--orange-soft); color: var(--orange-ink); }
.pill.type::before, .pill.plain::before { display: none; }
.pill.blocked { background: #fbe6e6; color: var(--bad); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--orange-2) 0%, var(--orange) 100%); color: var(--on-orange); box-shadow: 0 4px 12px -4px rgba(242,194,0,.6); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: #c9cfd6; }
.btn-danger { background: #fff; color: var(--bad); border-color: #f0c9c9; }
.btn-danger:hover { background: #fbe6e6; }
.btn-light { background: rgba(255,255,255,.18); color: #fff; }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-icon { padding: .35rem .5rem; }

/* Forms */
.form { display: flex; flex-direction: column; gap: .9rem; }
.form label, .field { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.form label > span.hint, .hint { font-weight: 500; color: var(--ink-3); font-size: .78rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=time], input[type=datetime-local], input[type=date], select, textarea {
  font: inherit; font-size: .92rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(242,194,0,.35); border-color: var(--orange); }
textarea { min-height: 90px; resize: vertical; }
input[type=color] { width: 44px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .9rem; }
.form-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; }
.form label.check, .check { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .88rem; color: var(--ink); flex-direction: row; }
.check input { width: auto; }
.days { display: flex; gap: .3rem; flex-wrap: wrap; }
.days label { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 34px; border: 1px solid var(--line); border-radius: 8px; font-size: .8rem; font-weight: 700; cursor: pointer; background: #fff; }
.days input { display: none; }
.days input:checked + span { color: var(--orange-ink); }
.days label:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-ink); }
.inline-form { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { flex: 1 1 160px; }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-weight: 700; font-family: ui-monospace, Consolas, monospace; }

/* Flash */
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; font-weight: 500; border: 1px solid; }
.flash-success { background: #e3f5ea; border-color: #bfe6cd; color: #145c32; }
.flash-error { background: #fbe6e6; border-color: #f0c1c1; color: #7a1f1f; }
.flash-warning, .flash-info { background: #fdf3dc; border-color: #f2dfae; color: #6b4a00; }

/* Auth */
.auth-body { background: radial-gradient(120% 90% at 50% 110%, #262110 0%, #0b0d10 60%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-wrap { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 1.2rem; }
.auth-brand { display: flex; flex-direction: column; align-items: center; color: #fff; }
.auth-brand .brand-word { font-size: 1.8rem; }
.auth-card { background: #fff; border-radius: 14px; padding: 1.8rem 1.8rem 1.4rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.auth-title { font-size: 1.3rem; margin-bottom: 1rem; }
.auth-foot { text-align: center; color: #7f8c98; font-size: .78rem; }
/* Uitlegpagina (bv. de Windows-speler) in dezelfde kaart, maar wat ruimer. */
.auth-wrap:has(.uitleg) { max-width: 640px; }
.uitleg { margin: .6rem 0 0; padding-left: 1.2rem; color: var(--muted, #5b6672); }
.uitleg li { margin: .45rem 0; line-height: 1.5; }
.uitleg b { color: inherit; }

/* Media grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.media-card:hover { border-color: #c9cfd6; text-decoration: none; }
.media-thumb { aspect-ratio: 16 / 9; background: #14161a; display: flex; align-items: center; justify-content: center; color: #9aa5b1; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb.text-thumb { padding: .8rem; font-size: .7rem; text-transform: none; letter-spacing: 0; text-align: center; line-height: 1.3; }
.media-body { padding: .7rem .8rem; display: flex; flex-direction: column; gap: .25rem; }
.media-name { font-weight: 600; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-meta { font-size: .74rem; color: var(--ink-3); display: flex; justify-content: space-between; gap: .5rem; }
.quota { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: var(--ink-2); min-width: 220px; }
.bar { height: 6px; background: #e8ebef; border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--orange); border-radius: 3px; }
.bar > i.full { background: var(--bad); }

/* Upload */
.dropzone { border: 2px dashed #cfd5dc; border-radius: var(--radius); padding: 1.6rem; text-align: center; color: var(--ink-2); background: #fff; cursor: pointer; font-size: .9rem; }
.dropzone.over { border-color: var(--orange); background: var(--orange-soft); }
.dropzone b { color: var(--orange-ink); }
.upload-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .8rem; }
.upload-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; font-size: .82rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.upload-row .bar { grid-column: 1 / -1; }
.upload-row.err { border-color: #f0c1c1; color: var(--bad); }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tab { padding: .5rem .8rem; font-weight: 700; font-size: .85rem; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0; font-family: inherit; }
.tab.active { color: var(--orange-ink); border-bottom-color: var(--orange); }
.tab:hover { text-decoration: none; color: var(--ink); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Playlist editor */
.pl-items { display: flex; flex-direction: column; gap: .5rem; min-height: 60px; }
.pl-item { display: grid; grid-template-columns: 22px 64px minmax(0, 1fr) 90px 150px 150px 32px; gap: .7rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.pl-item.dragging { opacity: .4; }
.pl-item .handle { cursor: grab; color: var(--ink-3); text-align: center; font-size: 1.1rem; user-select: none; }
.pl-item .thumb { width: 64px; height: 36px; border-radius: 4px; background: #14161a; object-fit: cover; display: flex; align-items: center; justify-content: center; color: #9aa5b1; font-size: .6rem; font-weight: 700; text-transform: uppercase; overflow: hidden; }
.pl-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pl-item .name { font-weight: 600; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item .name small { display: block; color: var(--ink-3); font-weight: 500; font-size: .74rem; }
.pl-item input { padding: .35rem .5rem; font-size: .82rem; }
.pl-item .remove { background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: 1.1rem; }
.pl-item .remove:hover { color: var(--bad); }
.pl-head { display: grid; grid-template-columns: 22px 64px minmax(0, 1fr) 90px 150px 150px 32px; gap: .7rem; padding: 0 .7rem .3rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.picker { display: none; position: fixed; inset: 0; background: rgba(10,13,16,.6); z-index: 100; align-items: center; justify-content: center; padding: 2rem; }
.picker.open { display: flex; }
.picker-box { background: #fff; border-radius: 14px; width: 100%; max-width: 900px; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; }
.picker-head { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.picker-head input { max-width: 300px; }
.picker-body { overflow: auto; padding: 1.2rem; }
.picker-body .media-card { cursor: pointer; }
.picker-body .media-card.selected { outline: 2px solid var(--orange); }
.picker-foot { padding: .8rem 1.2rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .5rem; }

/* Screen detail */
.kv { display: grid; grid-template-columns: 160px 1fr; gap: .4rem 1rem; font-size: .9rem; }
.kv dt { color: var(--ink-3); font-weight: 600; font-size: .8rem; }
.kv dd { margin: 0; }
.tv-preview { background: #0b0d10; border-radius: 8px; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; color: #9aa5b1; font-size: .85rem; overflow: hidden; }
.tv-preview iframe { width: 100%; height: 100%; border: 0; }
.log { list-style: none; margin: 0; padding: 0; font-size: .84rem; }
.log li { display: grid; grid-template-columns: 110px 1fr; gap: .8rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.log b { font-weight: 600; }

.help { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 0 8px 8px 0; padding: .9rem 1.1rem; font-size: .88rem; color: var(--ink-2); }
.help b { color: var(--ink); }
.big-url { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 1.15rem; color: var(--ink); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .8rem; }
  .brand { margin: 0 .6rem 0 0; }
  .tenant-chip { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-item span { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0; border: 0; flex-direction: row; }
  .version { display: none; }
  .main { padding: 1.2rem; }
  .pl-item, .pl-head { grid-template-columns: 22px 48px minmax(0, 1fr) 70px 32px; }
  .pl-item input[type=datetime-local], .pl-head .h-date { display: none; }
}

/* Widgets */
.widget-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.widget-choice { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: .3rem; color: var(--ink); }
.widget-choice:hover { border-color: var(--orange); background: var(--orange-soft); }
.widget-choice .wi { font-size: 1.6rem; line-height: 1; }
.widget-choice b { font-weight: 700; }
.widget-choice small { color: var(--ink-3); font-size: .78rem; line-height: 1.35; }
.widget-form h3 { margin-bottom: .2rem; }
.widget-thumb .wi { font-size: 1.8rem; margin-right: .4rem; }
.geo-results { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.3); margin-top: 2.4rem; max-width: 360px; overflow: hidden; }
.geo-results button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .5rem .7rem; font: inherit; font-size: .86rem; cursor: pointer; }
.geo-results button:hover { background: var(--orange-soft); }
.geo-results button small { display: block; color: var(--ink-3); }
label:has(> .geo-place) { position: relative; }

/* LG op afstand */
.badge { display: inline-flex; align-items: center; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--bg-2, #f1f2f4); color: var(--ink-3, #666); }
.badge-ok { background: #e3f6e9; color: #1d7a3e; }
.badge-warn { background: #fdecc8; color: #8a5a00; }
.h3 { font-size: .95rem; font-weight: 800; margin: 0 0 .6rem; display: flex; justify-content: space-between; align-items: baseline; }
.lg-grid { display: grid; grid-template-columns: 130px 1fr 40px; gap: .5rem .8rem; align-items: center; margin: .8rem 0; }
.lg-grid input[type=range] { width: 100%; }
.lg-grid output { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--ink-3, #666); }
.tv-preview img { display: block; }
.tv-preview.portrait { aspect-ratio: 9/16; max-height: 560px; margin: 0 auto; }
.preview-toggle { display: flex; gap: .4rem; align-items: center; margin-top: .5rem; flex-wrap: wrap; }
.preview-toggle .btn.active { border-color: var(--orange); color: var(--orange-ink); background: var(--orange-soft); }
.pill.type.small { font-size: .65rem; }
.lg-power[hidden] { display: none !important; }
.media-warn { margin-top: .35rem; font-size: .72rem; font-weight: 700; color: #8a5a00; background: #fdf3dc; border-radius: 6px; padding: .2rem .45rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-list .warn .pct { color: #8a5a00; }
.media-thumb.video-thumb { position: relative; }
.media-thumb.video-thumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .9rem; padding-left: 3px; }

/* Mediacatalogus (Netflix-stijl) */
.catalog { display: flex; flex-direction: column; gap: 1.6rem; margin-bottom: 1.6rem; }
.rail-head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: .6rem; }
.rail-head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.rail-track { display: flex; gap: .9rem; overflow-x: auto; padding: .2rem .2rem 1rem; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rail-track::-webkit-scrollbar { height: 8px; }
.rail-track::-webkit-scrollbar-thumb { background: #d5d9df; border-radius: 4px; }
.tile { flex: 0 0 236px; scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0; text-align: left; cursor: pointer; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; font: inherit; color: inherit; display: flex; flex-direction: column; }
.tile:hover, .tile:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(0,0,0,.35); border-color: var(--orange); outline: none; }
.tile-art { position: relative; display: block; aspect-ratio: 16/9; background: #14161a; overflow: hidden; }
.tile-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.tile:hover .tile-art img { transform: scale(1.04); }
.tile-plus { position: absolute; right: .55rem; bottom: .55rem; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: var(--on-orange); font-weight: 800; font-size: 1.2rem; line-height: 30px; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,.35); opacity: 0; transform: translateY(4px); transition: all .18s; }
.tile:hover .tile-plus { opacity: 1; transform: none; }
.tile-body { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .75rem .75rem; }
.tile-body b { font-size: .92rem; }
.tile-body small { color: var(--ink-3); font-size: .74rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 720px) { .tile { flex-basis: 190px; } }

/* Zijpaneel voor toevoegen */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(11,13,16,.55); backdrop-filter: blur(2px); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--bg, #f4f5f7); box-shadow: -20px 0 60px -20px rgba(0,0,0,.5); display: flex; flex-direction: column; animation: drawerIn .22s ease; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-head h2 { margin: 0; font-size: 1.1rem; }
.drawer-close { border: 0; background: #eef0f3; width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.drawer-body { padding: 1.3rem 1.4rem 2rem; overflow-y: auto; }
.drawer-body .form-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.media-thumb.art-thumb { position: relative; padding: 0; }
.media-thumb.art-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb.art-thumb .art-label, .media-thumb.video-thumb .art-label { position: absolute; left: .5rem; bottom: .5rem; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .45rem; border-radius: 6px; }
[hidden] { display: none !important; }

/* Diashow: fotobeheer */
.slide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin-top: .8rem; }
.slide { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #14161a; aspect-ratio: 16 / 10; cursor: grab; border: 2px solid transparent; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: .25rem .5rem; font-size: .68rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide .slide-del { position: absolute; top: .35rem; right: .35rem; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1rem; cursor: pointer; line-height: 1; }
.slide.dragging { opacity: .4; }
.slide.over { border-color: var(--orange); }

/* Template: vakken vullen */
.zones { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.zone { margin-bottom: 1.2rem; }
.zone h3 { margin: 0 0 .5rem; font-size: .95rem; }
.zone h3 .hint { font-weight: 500; }
.zone-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.zone-empty { flex: 1; border: 1px dashed var(--line); border-radius: 10px; padding: .9rem; color: var(--ink-3); font-size: .85rem; text-align: center; background: #fbfcfd; }

/* Gekozen items in een vak: liggende tegels in speelvolgorde */
.zone-tegel { position: relative; display: flex; flex-direction: column; width: 130px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: grab; }
.zone-tegel.sleept { opacity: .45; }
.zone-tegel.doel { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(242,194,0,.25); }
.zone-tegel .zt-art { position: relative; display: block; aspect-ratio: 16/9; background: #14161a; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.zone-tegel .zt-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zone-tegel .zt-nr { position: absolute; left: .3rem; top: .3rem; min-width: 18px; height: 18px; border-radius: 9px; background: rgba(20,22,26,.8); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; padding: 0 .25rem; }
.zone-tegel .zt-naam { display: block; padding: .35rem .45rem .45rem; min-width: 0; }
.zone-tegel .zt-naam b { display: block; font-size: .78rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-tegel .zt-naam small { display: block; color: var(--ink-3); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-tegel .zt-knoppen { display: flex; gap: 2px; padding: 0 .3rem .35rem; }
.zone-tegel .zt-knoppen button { flex: 1; border: 0; background: #f1f3f6; border-radius: 5px; height: 20px; cursor: pointer; font-size: .85rem; line-height: 1; color: var(--ink-3); }
.zone-tegel .zt-knoppen button:hover:not(:disabled) { background: #e3e7ec; }
.zone-tegel .zt-knoppen button:disabled { opacity: .35; cursor: default; }
.zone-tegel .zt-weg { position: absolute; right: .3rem; top: .3rem; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(20,22,26,.75); color: #fff; cursor: pointer; font-size: .85rem; line-height: 20px; padding: 0; opacity: 0; transition: opacity .15s; }
.zone-tegel:hover .zt-weg { opacity: 1; }
.zone-tegel .zt-weg:hover { background: var(--danger, #c8391f); }

/* Bibliotheek onder het vak: klikbare miniaturen */
.zone-kiezer { margin-top: .7rem; border: 1px solid var(--line); border-radius: 10px; padding: .55rem; background: #fbfcfd; }
.zone-kiezer-kop { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .5rem; }
.zone-kiezer-kop b { font-size: .8rem; color: var(--ink-2); }
.zone-kiezer-kop input { width: 150px; padding: .3rem .5rem; font-size: .8rem; }
.zone-opties { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .45rem; max-height: 230px; overflow-y: auto; }
.zone-optie { display: flex; flex-direction: column; gap: .25rem; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; overflow: hidden; text-align: left; font: inherit; color: inherit; }
.zone-optie:hover { border-color: var(--orange); }
.zone-optie.gekozen { border-color: #2e9e5b; }
.zone-optie .zo-art { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16/9; background: #14161a; color: #fff; font-weight: 700; }
.zone-optie .zo-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zone-optie .zo-plus { position: absolute; right: .25rem; bottom: .25rem; min-width: 20px; height: 20px; padding: 0 .3rem; border-radius: 10px; background: var(--orange); color: var(--on-orange); font-size: .72rem; font-weight: 800; line-height: 20px; text-align: center; }
.zone-optie.gekozen .zo-plus { background: #2e9e5b; }
.zone-optie .zo-naam { display: block; padding: 0 .4rem .4rem; min-width: 0; }
.zone-optie .zo-naam b { display: block; font-size: .74rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-optie .zo-naam small { display: block; color: var(--ink-3); font-size: .66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Huisstijl-voorbeeld */
.brand-preview { background: var(--b-bg); color: var(--b-text); border-radius: 10px; padding: .7rem; display: flex; flex-direction: column; gap: .5rem; aspect-ratio: 16 / 7; max-width: 520px; }
.brand-preview .bp-head { display: flex; align-items: center; justify-content: space-between; height: 34px; }
.brand-preview .bp-head img { max-height: 34px; max-width: 45%; object-fit: contain; }
.brand-preview .bp-nologo { font-size: .75rem; opacity: .5; }
.brand-preview .bp-clock { font-weight: 800; font-size: 1.1rem; }
.brand-preview .bp-body { flex: 1; display: grid; grid-template-columns: 1fr .42fr; gap: .5rem; min-height: 0; }
.brand-preview .bp-main, .brand-preview .bp-side { background: var(--b-panel); border-radius: 6px; }
.brand-preview .bp-main { background: linear-gradient(135deg, var(--b-primary), var(--b-panel) 70%); }
.brand-preview .bp-ticker { display: flex; align-items: center; background: var(--b-panel); border-radius: 6px; overflow: hidden; height: 26px; }
.brand-preview .bp-ticker b { background: var(--b-primary); color: #fff; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; padding: 0 .6rem; height: 100%; display: flex; align-items: center; }
.brand-preview .bp-ticker span { font-size: .72rem; padding-left: .6rem; opacity: .9; }

/* Ruimtekop in het schermenoverzicht */
tr.row-group td { background: var(--row-group-bg, rgba(127, 127, 127, .08)); font-size: .82rem; letter-spacing: .02em; padding-top: .55rem; padding-bottom: .55rem; }
tr.row-group + tr td { border-top: none; }
.ruimte-kiezer { margin: 0; }
.ruimte-kiezer select { padding: .25rem .4rem; font-size: .82rem; min-width: 9rem; }

/* "Mijn templates": wat de klant al gemaakt heeft, boven de catalogus */
.rail-mine { margin-bottom: 1.6rem; }
.rail-mine .tile-art { position: relative; }
.tile-badge { position: absolute; left: .5rem; bottom: .5rem; background: rgba(20,22,26,.85); color: #fff;
  font-size: .72rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; }
.tile-art-empty { display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #eef0f3 0 10px, #e7eaee 10px 20px); }
.tile-art-empty .tile-plus { position: static; font-size: 2rem; color: #8b97a4; }

/* Eigen templates: echte voorvertoning op de tegel + kruisje om te verwijderen */
.tile-wrap { position: relative; display: flex; flex: 0 0 236px; }
.tile-wrap .tile { flex: 1 1 auto; width: 100%; }
.tile-preview { position: absolute; inset: 0; display: block; background: #14161a; overflow: hidden; }
.tile-preview img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.tile-preview iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 720px; border: 0; transform: scale(.1844); transform-origin: top left;
  opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.tile-preview.klaar iframe { opacity: 1; }
.tile-preview.klaar img { opacity: 0; transition: opacity .4s ease; }
.tile-del { position: absolute; top: .45rem; right: .45rem; z-index: 3; width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: rgba(20,22,26,.75); color: #fff; cursor: pointer; opacity: 0; transform: scale(.85);
  transition: opacity .15s ease, transform .15s ease, background .15s ease; }
.tile-del svg { width: 15px; height: 15px; }
.tile-wrap:hover .tile-del, .tile-del:focus-visible { opacity: 1; transform: none; }
.tile-del:hover { background: var(--danger, #c8391f); }
@media (max-width: 720px) {
  .tile-wrap { flex-basis: 190px; }
  .tile-preview iframe { transform: scale(.1484); }
  .tile-del { opacity: 1; transform: none; }
}

/* Verjaardagen */
.viering-lijst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.viering-lijst li { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border-radius: 10px; }
.viering-lijst li.is-vandaag { background: linear-gradient(90deg, rgba(242,194,0,.12), transparent); }
.viering-tekst { display: flex; flex-direction: column; line-height: 1.25; }
.viering-tekst small { color: var(--ink-3); font-size: .78rem; }
.viering-foto { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--orange-2, #ffe23d), var(--orange, #f2c200)); color: var(--on-orange, #14161a); font-weight: 800; }
.viering-foto img { width: 100%; height: 100%; object-fit: cover; }
.viering-foto.sm { width: 32px; height: 32px; font-size: .85rem; }
.foto-knop { display: inline-block; cursor: pointer; border-radius: 50%; }
.foto-knop:hover .viering-foto { box-shadow: 0 0 0 3px rgba(242,194,0,.35); }
.foto-knop.gekozen .viering-foto { box-shadow: 0 0 0 3px #2e9e5b; }
.check.sm { font-size: .72rem; color: var(--ink-3); }
.import-preview table { font-size: .82rem; }


/* Canva-ontwerpen kiezen */
.canva-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; max-height: 46vh; overflow-y: auto; padding: .2rem; }
.canva-kaart { display: flex; flex-direction: column; gap: .3rem; padding: .4rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.canva-kaart:hover { border-color: var(--orange); }
.canva-kaart.gekozen { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(242,194,0,.25); }
.canva-kaart b { font-size: .82rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.canva-open { font-size: .72rem; color: var(--ink-3); text-decoration: underline; }
.canva-thumb { display: block; aspect-ratio: 16/9; background: #eef1f4; border-radius: 6px; overflow: hidden; }
.canva-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.canva-balk { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
