:root {
  --bg: #121316; --panel: #1a1c20; --panel2: #22252b; --line: #2e3138; --text: #e6e7ea; --muted: #8b8f98;
  --accent: #ffaa22; --accent2: #ffc35c; --danger: #e5534b; --ok: #4caf7a;
  --r: 7px; --rail: 56px; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif; overflow: hidden; }
button, select, input, textarea { font: inherit; color: inherit; }
button { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 5px 10px; cursor: pointer; white-space: nowrap; }
button:hover { border-color: #4a4e57; background: #2a2d34; }
button.primary { background: var(--accent); color: #1a1205; border-color: var(--accent); font-weight: 600; }
button.primary:hover { background: var(--accent2); }
button.danger { color: #ffb4ae; }
button:disabled { opacity: .5; cursor: default; }
button.on, .seg button.on { background: #3a2d14; border-color: var(--accent); color: var(--accent2); }
select, input, textarea { background: #0f1013; border: 1px solid var(--line); border-radius: var(--r); padding: 5px 7px; outline: none; min-width: 0; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); }
textarea { width: 100%; resize: vertical; }
input[type=color] { padding: 1px; height: 28px; width: 44px; }
input[type=range] { accent-color: var(--accent); padding: 0; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

#topbar { height: 46px; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.proj-name { width: 200px; background: transparent; border-color: transparent; font-weight: 700; font-size: 14px; }
.proj-name:hover { border-color: var(--line); }
.group { display: flex; gap: 4px; }
.seg { display: flex; }
.seg button { border-radius: 0; margin-left: -1px; }
.seg button:first-child { border-radius: var(--r) 0 0 var(--r); margin-left: 0; }
.seg button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.spacer { flex: 1; }

#layout { display: grid; grid-template-columns: 300px 1fr 300px; height: calc(100% - 46px); }
.panel { background: var(--panel); overflow-y: auto; }
#left { border-right: 1px solid var(--line); }
#right { border-left: 1px solid var(--line); }
.panel section { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.panel h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.row { display: flex; gap: 6px; align-items: center; }
.grow { flex: 1; }
.status { min-height: 18px; font-size: 12px; color: var(--muted); }
.status.busy { color: var(--accent2); }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); }
.spinner { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.history { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow: auto; }
.history .h { font-size: 12px; color: var(--muted); padding: 4px 6px; background: #15171a; border-radius: 5px; cursor: pointer; }
.history .h:hover { color: var(--text); }

#center { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 0; }
#sceneBar { display: flex; align-items: center; gap: 5px; padding: 5px 8px; border-bottom: 1px solid var(--line); background: var(--panel); overflow-x: auto; scrollbar-width: thin; }
#sceneBar select { max-width: 200px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 6px; }
#sceneBar button { padding: 3px 8px; }
.sb-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 2px; }
.sb-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 6px; }
.sb-tabs { display: flex; gap: 4px; }
.sb-tab .muted { font-size: 11px; }
#viewport { position: relative; min-height: 0; overflow: hidden; }
#viewport canvas { display: block; width: 100%; height: 100%; }
#viewTools { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; max-width: calc(100% - 20px); }
#viewTools > button, #viewTools select, #viewTools .seg button { background: rgba(26, 28, 32, .88); backdrop-filter: blur(6px); }
#viewHint { position: absolute; left: 10px; bottom: 8px; font-size: 11.5px; color: rgba(255,255,255,.75); text-shadow: 0 1px 2px #000; pointer-events: none; z-index: 2; }

/* Tijdlijn */
#timeline { background: var(--panel); border-top: 1px solid var(--line); height: 230px; display: flex; flex-direction: column; resize: vertical; overflow: hidden; min-height: 120px; }
.tl-head { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tl-btn { padding: 3px 9px; }
.tl-time { margin-left: 10px; font-variant-numeric: tabular-nums; color: var(--accent2); min-width: 210px; }
.tl-hint { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.tl-body { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; }
.tl-ruler-row, .tl-row { display: flex; }
.tl-label { width: 150px; flex: none; padding: 0 8px; display: flex; align-items: center; gap: 6px; border-right: 1px solid var(--line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; font-size: 12.5px; }
.tl-corner { color: var(--muted); cursor: default; font-size: 11px; }
.tl-label .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.tl-ruler { position: relative; flex: 1; height: 22px; border-bottom: 1px solid var(--line); cursor: ew-resize; background: #16181b; }
.tick { position: absolute; top: 0; height: 100%; border-left: 1px solid #333740; font-size: 10.5px; color: var(--muted); padding-left: 3px; padding-top: 3px; }
.tick.major { border-left-color: #4a4f59; }
.tl-row { height: 30px; border-bottom: 1px solid #23262c; }
.tl-row.sel { background: #1f2026; }
.tl-row.sel .tl-label { color: var(--accent2); }
.tl-lane { position: relative; flex: 1; cursor: ew-resize; }
.tl-move { position: absolute; top: 13px; height: 4px; opacity: .35; border-radius: 2px; pointer-events: none; }
.tl-key { position: absolute; top: 9px; width: 12px; height: 12px; margin-left: -6px; background: var(--c); transform: rotate(45deg); border: 1px solid rgba(0,0,0,.6); cursor: grab; z-index: 1; }
.tl-key.sel { background: #fff; box-shadow: 0 0 0 2px var(--c); z-index: 2; }
.tl-action { position: absolute; left: 12px; top: -7px; transform: rotate(-45deg); transform-origin: left; font-size: 10.5px; white-space: nowrap; color: #c9ccd2; pointer-events: none; background: rgba(20,21,24,.8); padding: 0 3px; border-radius: 3px; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; z-index: 5; }

/* Inspector */
#inspector section { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.f { display: grid; grid-template-columns: 92px 1fr; gap: 6px; align-items: center; }
.f > label { color: var(--muted); font-size: 12px; }
.f .vec { display: flex; gap: 4px; }
.f .vec input { width: 100%; }
.f input[type=number] { width: 100%; }
.f select { width: 100%; }
.keylist { display: flex; flex-direction: column; gap: 3px; max-height: 210px; overflow: auto; }
.keylist .k { display: flex; justify-content: space-between; gap: 6px; padding: 4px 7px; background: #15171a; border-radius: 5px; cursor: pointer; font-size: 12px; border: 1px solid transparent; }
.keylist .k.sel { border-color: var(--accent); }
.keylist .k span:last-child { color: var(--muted); }
.lensbtns { display: flex; gap: 3px; flex-wrap: wrap; }
.lensbtns button { padding: 2px 6px; font-size: 11.5px; }
.lensbtns button.on { background: var(--accent, #ff9f1c); color: #111; border-color: transparent; }
.entity-list .e { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 5px; cursor: pointer; }
.entity-list .e:hover { background: #22252b; }
.entity-list .dot { width: 9px; height: 9px; border-radius: 50%; }
.tip { font-size: 12px; color: var(--muted); background: #15171a; border-radius: 6px; padding: 8px; }
.tip b { color: var(--text); }

/* Modal & toast */
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 75; }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; width: min(560px, 92vw); max-height: 86vh; overflow: auto; }
.modal-box h2 { margin: 0 0 12px; font-size: 17px; }
.modal-box kbd { background: #2a2d34; border: 1px solid #3a3e46; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11.5px; }
.modal-box table { width: 100%; border-collapse: collapse; }
.modal-box td { padding: 4px 6px; border-bottom: 1px solid #25282e; vertical-align: top; }
.progress { height: 8px; background: #0f1013; border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .1s; }
.projlist .p { display: flex; justify-content: space-between; padding: 7px 9px; border-radius: 6px; cursor: pointer; }
.projlist .p:hover { background: #22252b; }
#toast { position: fixed; bottom: 250px; left: 50%; transform: translateX(-50%); background: #2a2d34; border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 90; max-width: 80vw; }
#toast.show { opacity: 1; }

@media (max-width: 1100px) { #layout { grid-template-columns: 250px 1fr 260px; } }

/* in- en uitpunt van de shot op de tijdlijn */
.tl-range { position: absolute; top: 0; bottom: 0; background: rgba(255, 170, 34, .14); pointer-events: none; }
.tl-io { position: absolute; top: 0; bottom: 0; width: 12px; margin-left: -6px; cursor: ew-resize; z-index: 3; }
.tl-io::before { content: ''; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; background: var(--accent); }
.tl-io::after { position: absolute; top: 3px; font-size: 9px; font-weight: 700; color: #1a1205; background: var(--accent); border-radius: 2px; padding: 0 2px; line-height: 13px; }
.tl-in::after { content: 'IN'; left: 7px; }
.tl-out::after { content: 'UIT'; right: 7px; }
.tl-shade { position: absolute; top: 22px; bottom: 0; background: rgba(0, 0, 0, .38); pointer-events: none; z-index: 1; }

/* compositie-hulplijnen */
svg.guides { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.g-under { stroke: rgba(0, 0, 0, .35); stroke-width: 3; }
.g-line { stroke: rgba(255, 255, 255, .7); stroke-width: 1; }
.g-faint { stroke: rgba(255, 255, 255, .38); }
.g-gold { stroke: rgba(255, 200, 90, .85); }
.g-dash { stroke-dasharray: 6 4; }
.g-crop { stroke: var(--accent); stroke-width: 1.5; }
.g-mask { fill: rgba(0, 0, 0, .55); }
.g-label { fill: var(--accent2); font-size: 11px; font-weight: 700; paint-order: stroke; stroke: rgba(0, 0, 0, .6); stroke-width: 3px; }
.popover { position: absolute; z-index: 5; background: rgba(26, 28, 32, .96); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.popover.hidden { display: none; }
.popover label { display: flex; gap: 6px; align-items: center; cursor: pointer; white-space: nowrap; }
.popover select { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 3px 5px; }
.popover .muted { font-size: 11px; }

/* ---------- accounts ---------- */
.acc-chip { display: flex; gap: 7px; align-items: center; }
.acc-cred { font-weight: 700; color: var(--accent2); font-variant-numeric: tabular-nums; }
.acc-chip.low .acc-cred { color: var(--danger); }
.acc-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.verify-banner { background: #2c2412; border: 1px solid #5a4416; color: #f3d9a3; border-radius: var(--r); padding: 6px 8px; font-size: 12px; margin: 6px 0; }
.verify-banner a { color: var(--accent2); }
#authScreen { position: fixed; inset: 0; z-index: 80; background: radial-gradient(1200px 600px at 20% 0%, #2a2112 0%, var(--bg) 60%); overflow: auto; }
.auth-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; gap: 48px; padding: 32px 20px; flex-wrap: wrap; }
.auth-pitch { max-width: 460px; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: .04em; margin-bottom: 18px; }
.auth-logo .logo-mark { width: 30px; height: 30px; }
.auth-pitch h1 { font-size: 34px; line-height: 1.1; margin: 0 0 14px; }
.auth-pitch p { color: #c9cbd1; font-size: 14.5px; line-height: 1.55; }
.auth-pitch ul { padding-left: 18px; color: #c9cbd1; font-size: 14px; line-height: 1.7; }
.auth-prices { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.auth-prices > div { flex: 1; min-width: 180px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.auth-prices span { color: var(--muted); font-size: 12px; }
.auth-card { width: min(360px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.auth-card h2 { margin: 0 0 4px; font-size: 19px; }
.auth-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.auth-card input { padding: 9px 10px; font-size: 14px; color: var(--text); }
.auth-card button.primary { padding: 10px; font-size: 14px; margin-top: 4px; }
.auth-links { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; font-size: 12.5px; }
.auth-links a { color: var(--accent2); }
.auth-err { color: #ff9b94; font-size: 12.5px; min-height: 1em; }
.auth-ok { color: #9fe0b5; font-size: 12.5px; }
.small { font-size: 12px; }
.acc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.acc-head h2 { margin: 0; }
.acc-tabs { margin: 10px 0 12px; }
.acc-notice { background: #2c2412; border: 1px solid #5a4416; color: #f3d9a3; border-radius: var(--r); padding: 8px 10px; margin-bottom: 10px; }
.acc-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.acc-card .f { display: grid; grid-template-columns: 90px 1fr; gap: 8px; align-items: center; }
.acc-warn { color: #ff9b94; }
.acc-meter { height: 8px; background: #121316; border-radius: 99px; overflow: hidden; }
.acc-meter > div { height: 100%; background: var(--accent); }
.acc-offer { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; border-color: #5a4416; }
.acc-packs { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-packs button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 14px; }
.acc-packs span { color: var(--accent2); }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.adm-tile { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; }
.adm-tile b { font-size: 18px; }
.adm-tile span { color: var(--muted); font-size: 11.5px; }
.adm-sys .ok { color: #9fe0b5; margin-right: 10px; }
.adm-sys .bad { color: #ff9b94; margin-right: 10px; }
.adm-users { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
.adm-u { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.modal-box { width: min(620px, 94vw); }

/* ---------- instellingen (pagina met zijmenu) ---------- */
#settingsPage { position: fixed; inset: 0 0 0 var(--rail); z-index: 60; background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
.set-head { height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.set-head h1 { margin: 0; font-size: 18px; font-weight: 800; }
.set-back { background: transparent; }
.set-wrap { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 32px; padding: 26px 28px 60px; justify-content: center; align-items: start; }
.set-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.set-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #b7bac2; font-size: 14px; font-weight: 500; text-decoration: none; }
.set-nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.set-nav a.on { background: rgba(255,255,255,.07); color: var(--text); }
.set-nav a svg { flex-shrink: 0; opacity: .8; }
.set-nav a.on svg { color: var(--accent); opacity: 1; }
.set-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.set-title h2 { margin: 0 0 4px; font-size: 24px; font-weight: 700; }
.set-title p { margin: 0; }
.set-body { display: flex; flex-direction: column; gap: 14px; }
.set-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.set-card h3 { margin: 0; font-size: 15px; }
.set-card p { margin: 0; line-height: 1.55; }
.set-card.acc-offer { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; border-color: #5a4416; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.set-grid label, .set-inline { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.set-inline { flex-direction: row; align-items: center; gap: 8px; }
.set-grid input, .set-grid select, .set-card textarea { padding: 8px 9px; font-size: 13.5px; color: var(--text); }
.set-card textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.set-check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.set-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px 14px; }
.set-list { margin: 0; padding-left: 18px; line-height: 1.7; color: #c9cbd1; }
.set-card table { width: 100%; border-collapse: collapse; }
.set-card td { padding: 5px 6px; border-bottom: 1px solid #25282e; vertical-align: top; }
.set-card kbd { background: #2a2d34; border: 1px solid #3a3e46; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11.5px; }
.ok-text { color: #9fe0b5; font-size: 11px; }
.warn-text { color: #f3c26b; font-size: 11px; }
@media (max-width: 860px) {
  .set-wrap { grid-template-columns: minmax(0, 1fr); padding: 14px 14px 40px; gap: 14px; }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .set-nav a { flex-shrink: 0; white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.04); }
}

/* ---------- zijmenu links (icoontjes, klapt open bij hover) ---------- */
#rail { position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail); z-index: 70; background: #0e0f12; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; padding: 8px; overflow: hidden; transition: width .16s ease, box-shadow .16s ease; }
#rail:hover { width: 228px; box-shadow: 12px 0 40px rgba(0,0,0,.45); }
#rail a, .rail-brand { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 2px; border-radius: 10px; color: #a9adb6; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
#rail a:hover { background: rgba(255,255,255,.06); color: var(--text); }
#rail a.on { background: rgba(255,170,34,.12); color: var(--accent2); }
.rail-ic { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; position: relative; }
.rail-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail-tx { opacity: 0; transition: opacity .12s; font-size: 14px; font-weight: 500; display: flex; flex-direction: column; line-height: 1.2; }
#rail:hover .rail-tx { opacity: 1; }
.rail-brand { margin-bottom: 10px; color: var(--text); font-weight: 800; letter-spacing: .04em; }
.rail-brand .rail-ic svg { width: 24px; height: 24px; }
.three { color: var(--accent); }
.rail-sep { height: 1px; background: var(--line); margin: 6px 4px; flex-shrink: 0; }
.rail-grow { flex: 1; }
#railAccount { display: flex; flex-direction: column; }
.acc-av { width: 30px; height: 30px; border-radius: 50%; background: #3a2d14; color: var(--accent2); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.acc-badge { position: absolute; right: -2px; bottom: -1px; min-width: 18px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #1a1205; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid #0e0f12; }
.acc-chip.low .acc-badge { background: var(--danger); color: #fff; }
#rail .acc-name { color: var(--text); font-weight: 600; }
#rail .acc-cred { font-size: 12px; color: var(--accent2); }
#app { margin-left: var(--rail); height: 100%; display: flex; flex-direction: column; min-width: 0; }
#app #layout { height: auto; flex: 1; min-height: 0; }

/* bovenbalk: project › locatie › scène */
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; }
.crumb-sep { color: var(--muted); }
.crumb { background: transparent; border-color: transparent; color: #c9ccd2; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.crumb:hover { background: var(--panel2); }
.crumb-cur { color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
.save-state { font-size: 12px; white-space: nowrap; }
.save-state.ok { color: #7fbf95; }
.save-state.err { color: var(--danger); }
#sceneBar .dot, .sb-tab .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }

/* ---------- projecten- en projectpagina ---------- */
.page { position: fixed; inset: 0 0 0 var(--rail); z-index: 60; background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
.pg-head { height: 60px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pg-head h1 { margin: 0; font-size: 20px; font-weight: 800; }
.pg-title { cursor: text; padding: 2px 6px; border-radius: 6px; }
.pg-title:hover { background: var(--panel2); }
.pg-crumb { color: var(--muted); text-decoration: none; font-size: 15px; }
.pg-crumb:hover { color: var(--text); }
.pg-search { width: 220px; padding: 7px 10px; }
.pg-head button { padding: 7px 14px; }
.pg-body { flex: 1; overflow: auto; padding: 26px 28px 60px; }
.pg-sub { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 34px 0 14px; }
.pg-empty { margin: 14px 0 0; }
.pg-loading { padding: 20px 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.tile { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; text-align: left; padding: 0;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.tile:hover { transform: translateY(-2px); border-color: #4a4e57; box-shadow: 0 12px 30px rgba(0,0,0,.35); background: var(--panel); }
.tile-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #23262d, #17191d); display: grid; place-items: center; position: relative; overflow: hidden; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.tile-ph { opacity: .3; }
.tile-ph img { width: 40px; height: 40px; display: block; }
.tile-badge { position: absolute; top: 9px; left: 9px; background: rgba(255,170,34,.92); color: #1a1205; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.tile-meta { padding: 11px 14px 13px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile-name { font-weight: 650; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 26px; }
.tile-menu { position: absolute; right: 8px; bottom: 34px; width: 30px; height: 30px; padding: 0; border-radius: 9px; background: transparent; border-color: transparent; color: var(--muted); font-size: 16px; line-height: 1; }
.tile-menu:hover { background: var(--panel2); color: var(--text); }
.tile-new { align-items: center; justify-content: center; gap: 8px; min-height: 200px; border: 1.5px dashed #3a3e46; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.tile-new:hover { color: var(--accent2); border-color: var(--accent); background: rgba(255,170,34,.04); }
.tile-plus { font-size: 34px; font-weight: 300; line-height: 1; }
.pg-menu { position: fixed; z-index: 95; background: #1f2126; border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; min-width: 190px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.pg-menu button { background: transparent; border: 0; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.pg-menu button:hover { background: rgba(255,255,255,.07); }
.pg-menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.pg-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px 1fr; }
.loc-list { border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; overflow: auto; background: #15161a; }
.loc-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 10px 8px; }
.loc { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: #b7bac2; text-decoration: none; font-size: 14px; border: 1px solid transparent; }
.loc:hover { background: rgba(255,255,255,.05); color: var(--text); }
.loc.on { background: rgba(255,170,34,.1); color: var(--accent2); }
.loc.drop { border-color: var(--accent); background: rgba(255,170,34,.15); }
.loc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-count { font-size: 12px; color: var(--muted); background: rgba(255,255,255,.06); border-radius: 99px; padding: 0 7px; }
.loc-add { margin-top: 8px; background: transparent; border-style: dashed; color: var(--muted); }
.loc-add:hover { color: var(--accent2); border-color: var(--accent); }
.loc-tip { padding: 8px 10px; margin: 0; }
.loc-main { overflow: auto; padding: 22px 28px 60px; }
.loc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.loc-head h2 { margin: 0 8px 0 0; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.loc-head h2 svg { color: var(--accent); width: 22px; height: 22px; }
.loc-main .tile-new { min-height: 180px; }

/* ---------- tijdlijn: camera's als sporen + montage ---------- */
.tl-edit.on { background: #3a2d14; border-color: var(--accent); color: var(--accent2); }
.tl-name { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.tl-ord { display: none; gap: 1px; }
.tl-label:hover .tl-ord { display: flex; }
.tl-ord button { padding: 0 4px; font-size: 9px; line-height: 14px; height: 16px; }
.tl-cam.inactive .tl-label { color: var(--muted); }
.tl-cam.inactive .tl-lane { cursor: pointer; }
.tl-clip { position: absolute; top: 5px; bottom: 5px; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); overflow: hidden; }
.tl-cam.inactive .tl-clip { opacity: .7; }
.tl-cam.inactive:hover .tl-clip { opacity: 1; }
.tl-hidden { position: absolute; top: 0; bottom: 0; pointer-events: none; background: repeating-linear-gradient(-45deg, rgba(0,0,0,.45) 0 4px, rgba(0,0,0,.15) 4px 8px); }
.tl-clip-h { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; background: color-mix(in srgb, var(--c) 70%, transparent); z-index: 2; }
.tl-clip-h.in { left: 0; border-radius: 5px 0 0 5px; }
.tl-clip-h.out { right: 0; border-radius: 0 5px 5px 0; }
.tl-key.ghost { width: 8px; height: 8px; margin-left: -4px; top: 11px; opacity: .45; cursor: pointer; pointer-events: none; }
.tl-edit-row .tl-label { color: var(--accent2); font-weight: 600; }
.tl-edit-row.on { background: rgba(255,170,34,.05); }
.tl-cut { position: absolute; top: 5px; bottom: 5px; border-radius: 6px; background: color-mix(in srgb, var(--c) 70%, #000); color: #111; font-size: 11px; font-weight: 700; padding: 0 6px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; cursor: pointer; border: 1px solid rgba(0,0,0,.4); }
.tl-cut:hover { filter: brightness(1.15); }
.tl-cut.gap { background: repeating-linear-gradient(-45deg, #000 0 5px, #1b1b1b 5px 10px); color: #888; cursor: default; }

/* export: keuze shot of montage */
.x-choice { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 12px; }
.x-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.x-opt:has(input:checked) { border-color: var(--accent); background: rgba(255,170,34,.06); }
.x-opt > span { display: flex; flex-direction: column; gap: 2px; }
.x-opt .muted { font-size: 12px; }
.x-opt.off { opacity: .6; cursor: default; }
.x-opt input { margin-top: 3px; accent-color: var(--accent); }
.tl-clip-x { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); display: none; padding: 0 4px; height: 15px; line-height: 13px; font-size: 9px; z-index: 3; background: rgba(20,21,24,.9); }
.tl-clip:hover .tl-clip-x { display: block; }
.auth-lang { position: absolute; top: 14px; right: 18px; z-index: 1; font-size: 12.5px; color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 6px; }
.auth-lang:hover { color: var(--text); background: rgba(255,255,255,.06); }
