/* =========================================================
   Scriba - stijl
   ========================================================= */
:root {
  --bg: #0c0d10;
  --bg-2: #101115;
  --panel: #15161b;
  --panel-2: #1b1d23;
  --raise: #22242c;
  --line: #24262e;
  --line-2: #30333d;
  --text: #eeece6;
  --muted: #a19f99;
  --faint: #6c6b68;
  --accent: #f2b04e;
  --accent-2: #ffcf85;
  --accent-ink: #14110b;
  --accent-soft: rgba(242, 176, 78, .12);
  --accent-line: rgba(242, 176, 78, .45);
  --blue: #7fb0ff;
  --green: #5fd49a;
  --red: #ff7a72;
  --warn: #f5c76b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 50px -12px rgba(0,0,0,.6);
  --shadow-pop: 0 30px 80px rgba(0,0,0,.6);
  --accent-text: #f2b04e;       /* accent als tekstkleur */
  --line-3: #444857;            /* rand bij hover */
  --hover: rgba(255,255,255,.02);
  --topbar-bg: rgba(12,13,16,.75);
  --bar-bg: rgba(16,17,21,.8);
  --glow-1: rgba(242,176,78,.09);
  --glow-2: rgba(127,176,255,.05);
  --cue-text: #d5e2fb;
  --cue-active-text: #ffe7c2;
  --purple: #d6a8ff;
  --on-green: #06281a;
  --on-red: #2a0806;
  --wave-filter: none;
  --wave-opacity: .16;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f4f0;
  --bg-2: #fbfaf8;
  --panel: #ffffff;
  --panel-2: #f0eee9;
  --raise: #e9e6df;
  --line: #e3e0d9;
  --line-2: #d0ccc3;
  --text: #1b1a17;
  --muted: #57554f;
  --faint: #7d7a72;
  --accent: #eba63f;
  --accent-2: #f7c877;
  --accent-ink: #14110b;
  --accent-soft: rgba(235, 166, 63, .17);
  --accent-line: rgba(176, 110, 8, .6);
  --blue: #2460c4;
  --green: #157f43;
  --red: #c4362b;
  --warn: #8a5800;
  --shadow: 0 1px 2px rgba(30,25,15,.05), 0 14px 34px -14px rgba(30,25,15,.22);
  --shadow-pop: 0 24px 70px rgba(30,25,15,.28);
  --accent-text: #955600;
  --line-3: #aeaaa0;
  --hover: rgba(0,0,0,.025);
  --topbar-bg: rgba(250,249,246,.85);
  --bar-bg: rgba(255,255,255,.9);
  --glow-1: rgba(235,166,63,.16);
  --glow-2: rgba(36,96,196,.05);
  --cue-text: #1d3d77;
  --cue-active-text: #5f3900;
  --purple: #7437bd;
  --on-green: #ffffff;
  --on-red: #ffffff;
  --wave-filter: invert(1);
  --wave-opacity: .3;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 85% -15%, var(--glow-1), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, var(--glow-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
.hidden { display: none !important; }
a { color: inherit; }
input, select, textarea, button { font: inherit; color: inherit; }
::selection { background: rgba(242,176,78,.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  height: 58px; padding: 0 24px; flex: none;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo { color: var(--accent); display: grid; filter: drop-shadow(0 4px 14px rgba(242,176,78,.25)); }
.wordmark { font: italic 600 23px/1 var(--serif); letter-spacing: .01em; }
.tagline { font-size: 12px; color: var(--faint); padding-left: 11px; border-left: 1px solid var(--line-2); margin-left: 2px; }
.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pill { font-size: 12px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); display: inline-flex; gap: 7px; align-items: center; background: var(--bg-2); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill.on .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }

.view { flex: 1; min-height: 0; }

/* ---------- knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2);
  cursor: pointer; font-weight: 550; font-size: 13.5px; white-space: nowrap; text-decoration: none; transition: .15s;
}
.btn:hover { border-color: var(--line-3); background: var(--raise); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 20px -6px rgba(242,176,78,.55); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { background: var(--red); color: var(--on-red); border-color: var(--red); }
.btn.small { height: 32px; padding: 0 11px; font-size: 13px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; transition: .15s; color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-3); }
.icon-btn.play { width: 46px; height: 46px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 20px -6px rgba(242,176,78,.6); }
.icon-btn.small { width: 26px; height: 26px; border-radius: 8px; font-size: 15px; line-height: 1; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent-text); cursor: pointer; text-decoration: none; font-weight: 550; }
.linklike:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- formulieren ---------- */
label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
label .hint { font-weight: 400; color: var(--faint); }
input[type=text], input[type=password], input:not([type]), select, textarea {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; outline: none; transition: .15s; font-size: 13.5px;
}
input:hover, select:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
select { cursor: pointer; }

/* ---------- overzicht ---------- */
#homeView { width: min(1320px, 100%); margin: 0 auto; padding: 30px 24px 80px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 34px; align-items: start; }
.hero p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 620px; }

.upload-card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.dropzone {
  margin: 12px; border: 1.5px dashed var(--line-2); border-radius: 15px; padding: 44px 20px 40px;
  text-align: center; cursor: pointer; transition: .2s; position: relative; overflow: hidden;
}
.dropzone::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.012) 22px 23px);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent-line); background: var(--accent-soft); }
.dropzone.drag { transform: scale(.995); }
.dropzone h2 { margin: 14px 0 4px; font: 500 22px/1.2 var(--serif); }
.dropzone p { margin: 0; color: var(--muted); }
.dz-icon { width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line); }
.dz-progress { max-width: 360px; margin: 20px auto 0; }
.dz-progress small { color: var(--muted); display: block; margin-top: 8px; }
.upload-options { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 14px; padding: 6px 22px 22px; }

.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.section-head h3 { margin: 0; font: 500 21px var(--serif); }
.count { font-size: 12px; color: var(--faint); background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; }
.count:empty { display: none; }
.job-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.job {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; position: relative;
}
.job:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.thumb { position: relative; aspect-ratio: 16/9; background: #08090b; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.job:hover .thumb img { transform: scale(1.03); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); pointer-events: none; }
.thumb-ph { height: 100%; display: grid; place-items: center; font-size: 26px; color: #8a8a8a; background: repeating-linear-gradient(135deg, #111216 0 12px, #14151a 12px 24px); }
.chip { position: absolute; right: 9px; bottom: 9px; z-index: 1; font: 600 11.5px var(--mono); background: rgba(0,0,0,.7); color: #fff; padding: 2px 7px; border-radius: 6px; }
.thumb-busy { position: absolute; inset: 0; z-index: 1; background: rgba(8,9,11,.72); backdrop-filter: blur(2px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 12.5px; color: #d6d4cf; }
.job-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 6px; }
.job h4 { margin: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .meta { color: var(--faint); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.job .del { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(0,0,0,.55); color: #ddd; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: .15s; backdrop-filter: blur(4px); }
.job:hover .del { opacity: 1; }
.job .del:hover { background: var(--red); color: var(--on-red); }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.status.done::before { background: var(--green); }
.status.error { color: var(--red); } .status.error::before { background: var(--red); }
.empty { color: var(--faint); padding: 40px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); grid-column: 1 / -1; }

.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .4s; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar.big { height: 8px; margin: 22px 0; }
.bar.thin { height: 3px; border-radius: 0; }

/* ---------- editor ---------- */
#editorView { display: flex; flex-direction: column; min-height: 0; height: calc(100vh - 58px); }
.editor-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bar-bg); flex: none; }
.project-name { background: transparent; border: 1px solid transparent !important; font: 500 20px var(--serif) !important; padding: 4px 8px !important; border-radius: 8px; min-width: 120px; width: 340px; box-shadow: none !important; }
.project-name:hover { background: var(--panel-2) !important; }
.project-name:focus { background: var(--bg-2) !important; border-color: var(--accent-line) !important; }
.save-state { font-size: 12px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.save-state.dirty { color: var(--warn); } .save-state.dirty::before { background: var(--warn); }
.spacer { flex: 1; }

.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(400px, 1fr); }
.left { display: flex; flex-direction: column; gap: 14px; padding: 18px; min-height: 0; overflow: auto; }
.right { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg-2); border-left: 1px solid var(--line); }

.player {
  position: relative; background: #000; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16/9; max-height: calc(100vh - 380px); min-height: 200px; margin: 0 auto; width: 100%;
  display: grid; place-items: center; box-shadow: var(--shadow); outline: 1px solid var(--line); cursor: pointer;
}
.player video { width: 100%; height: 100%; object-fit: contain; display: block; }
.caption { position: absolute; left: 6%; right: 6%; bottom: 7%; text-align: center; pointer-events: none; line-height: 1.5; }
.caption span {
  white-space: pre-line; font-weight: 600; font-size: clamp(13px, 1.9vw, 23px);
  color: #fff; background: rgba(0,0,0,.62); padding: .12em .45em; border-radius: 4px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.caption span:empty { display: none; }
.audio-only { position: absolute; color: #a5a39d; font-size: 13px; }

.transport { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.timecode { font: 600 16px var(--mono); color: var(--text); margin-left: 6px; letter-spacing: .02em; }
label.mini { flex-direction: row; align-items: center; gap: 7px; font-weight: 500; font-size: 12.5px; }
label.mini select { padding: 5px 8px; }
label.check input { accent-color: var(--accent); width: 15px; height: 15px; }

.timeline-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex: none; }
.timeline-tools { display: flex; align-items: center; gap: 6px; padding: 7px 10px 7px 14px; font-size: 11.5px; color: var(--faint); border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.timeline { overflow-x: auto; overflow-y: hidden; cursor: crosshair; }
.tl-inner { position: relative; height: 104px; min-width: 100%; }
.tl-ruler { position: absolute; inset: 0 0 auto 0; height: 22px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.tl-ruler span { position: absolute; top: 4px; font: 10px var(--mono); color: var(--faint); transform: translateX(4px); }
.tl-ruler span::before { content: ""; position: absolute; left: -4px; top: 9px; height: 9px; border-left: 1px solid var(--line-2); }
.tl-wave { position: absolute; left: 0; top: 28px; height: 70px; background-size: 100% 100%; background-repeat: no-repeat; opacity: var(--wave-opacity); filter: var(--wave-filter); pointer-events: none; }
.tl-cues { position: absolute; left: 0; right: 0; top: 36px; height: 54px; }
.tl-cue {
  position: absolute; top: 0; height: 54px; border-radius: 7px; padding: 6px 7px; overflow: hidden; cursor: pointer;
  background: rgba(127,176,255,.13); border: 1px solid rgba(127,176,255,.35); font-size: 11px; line-height: 1.35; color: var(--cue-text);
  white-space: normal; transition: background .15s;
}
.tl-cue:hover { background: rgba(127,176,255,.22); }
.tl-cue.active { background: rgba(242,176,78,.2); border-color: var(--accent); color: var(--cue-active-text); }
.tl-cue.selected { box-shadow: 0 0 0 2px var(--blue); }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; box-shadow: 0 0 10px rgba(242,176,78,.7); z-index: 2; }
.tl-playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top: 8px solid var(--accent); }
.shortcuts { font-size: 11.5px; color: var(--faint); line-height: 2; }
kbd { font: 10.5px var(--mono); padding: 1px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--panel); }

.list-tools { display: flex; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center; flex: none; }
.list-tools input { min-width: 0; flex: 1; padding: 7px 10px; }
.search { position: relative; flex: 1; display: flex; min-width: 0; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 31px; }
.list-meta { display: flex; gap: 14px; align-items: center; padding: 9px 16px; font-size: 12px; color: var(--faint); border-bottom: 1px solid var(--line); flex-wrap: wrap; flex: none; }
.list-meta .warn { color: var(--warn); }
.list-meta .linklike { font-size: 12px; }
.cue-list { flex: 1; overflow-y: auto; padding: 6px 0 100px; scroll-behavior: smooth; }

.cue {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px 10px; padding: 12px 16px 12px 8px;
  border-bottom: 1px solid var(--line); position: relative; transition: background .15s;
}
.cue::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transition: background .15s; }
.cue:hover { background: var(--hover); }
.cue.selected { background: rgba(127,176,255,.05); }
.cue.selected::before { background: var(--blue); }
.cue.active { background: var(--accent-soft); }
.cue.active::before { background: var(--accent); }
.cue.match::before { background: var(--blue); }
.cue-num { font: 600 11.5px var(--mono); color: var(--faint); padding-top: 5px; text-align: right; cursor: pointer; grid-row: span 2; }
.cue-num:hover, .cue.active .cue-num { color: var(--accent-text); }
.cue-head { display: flex; align-items: center; gap: 4px; min-width: 0; }
.time-in {
  width: 88px; padding: 2px 5px !important; font: 12px var(--mono) !important;
  background: transparent !important; border-color: transparent !important; color: var(--muted); border-radius: 6px !important; box-shadow: none !important;
}
.time-in:hover { background: var(--panel-2) !important; }
.time-in:focus { color: var(--text); background: var(--bg) !important; border-color: var(--accent-line) !important; }
.arrow { color: var(--faint); font-size: 11px; }
.badges { display: flex; gap: 4px; margin-left: auto; }
.badge { font: 10.5px var(--mono); padding: 1px 6px; border-radius: 5px; background: var(--panel-2); color: var(--faint); white-space: nowrap; }
.badge.warn { background: rgba(245,199,107,.12); color: var(--warn); }
.cue-actions { display: flex; gap: 1px; opacity: 0; transition: opacity .15s; }
.cue:hover .cue-actions, .cue:focus-within .cue-actions, .cue.selected .cue-actions { opacity: 1; }
.cue-actions button { border: 0; background: transparent; color: var(--faint); font-size: 13px; width: 26px; height: 24px; padding: 0; border-radius: 6px; cursor: pointer; }
.cue-actions button:hover { background: var(--raise); color: var(--text); }
.cue-actions button.del:hover { color: var(--red); }
.cue textarea {
  grid-column: 2; width: 100%; resize: none; overflow: hidden; min-height: 36px; font-size: 15px; line-height: 1.5;
  background: transparent; border-color: transparent; padding: 6px 8px; margin-left: -1px;
}
.cue textarea:hover { background: var(--panel); }
.cue textarea:focus { background: var(--bg); }

/* ---------- verwerken ---------- */
.processing { flex: 1; display: grid; place-items: center; padding: 30px; }
.processing-card { width: min(520px, 100%); background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 20px; padding: 38px; text-align: center; box-shadow: var(--shadow); }
.processing-card h2 { margin: 18px 0 6px; font: 500 26px var(--serif); }
.processing-card p { color: var(--muted); margin: 0; }
.spinner { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 1s linear infinite; }
.spinner.sm { width: 26px; height: 26px; border-width: 2.5px; margin: 0; }
.processing.error .spinner { animation: none; border-color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { text-align: left; margin: 0 auto; padding: 0; list-style: none; display: inline-flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--faint); }
.steps li::before { content: "○"; display: inline-block; width: 24px; }
.steps li.now { color: var(--text); } .steps li.now::before { content: "◐"; color: var(--accent-text); }
.steps li.ok { color: var(--muted); } .steps li.ok::before { content: "✓"; color: var(--green); }

/* ---------- dialogen ---------- */
.modal { border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); color: var(--text); padding: 0; width: min(560px, 94vw); box-shadow: var(--shadow-pop); }
.modal[open] { animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.modal.small { width: min(430px, 94vw); }
.modal::backdrop { background: rgba(5,6,8,.7); backdrop-filter: blur(3px); }
.modal form { padding: 26px; display: flex; flex-direction: column; gap: 15px; }
.modal h2 { margin: 0; font: 500 24px var(--serif); }
.modal h4 { margin: 10px 0 -6px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.muted { color: var(--muted); margin: 0; }
.note { font-size: 12.5px; color: var(--muted); margin: 0; background: var(--bg-2); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; }
.modal code { font: 12px var(--mono); background: var(--bg-2); padding: 1px 5px; border-radius: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg label { cursor: pointer; }
.seg input { display: none; }
.seg span { display: flex; flex-direction: column; gap: 3px; padding: 13px 15px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--text); font-size: 14px; font-weight: 600; transition: .15s; }
.seg small { color: var(--muted); font-weight: 400; font-size: 12px; }
.seg input:checked + span { border-color: var(--accent-line); background: var(--accent-soft); }
.export-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.export-tile { display: flex; flex-direction: column; gap: 3px; padding: 15px; border: 1px solid var(--line-2); border-radius: 12px; text-decoration: none; cursor: pointer; transition: .15s; background: var(--bg-2); }
.export-tile:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.export-tile b { font: 600 16px var(--mono); } .export-tile small { color: var(--muted); }
.burn-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.burn-opts input[type=range] { accent-color: var(--accent); margin-top: 8px; }
.burn-opts output { color: var(--text); font-family: var(--mono); }
.burn-status { font-size: 13px; color: var(--muted); }
.burn-status .bar { margin-top: 8px; }
.burn-status a { color: var(--accent-text); font-weight: 600; }

/* ---------- meldingen ---------- */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--raise); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-pop); font-size: 13.5px; display: flex; gap: 14px; align-items: center; animation: up .25s ease; white-space: nowrap; }
.toast.error { border-color: rgba(255,122,114,.6); }
.toast button { background: none; border: 0; color: var(--accent-text); font-weight: 600; cursor: pointer; padding: 0; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

/* ---------- smallere schermen ---------- */
@media (max-width: 1100px) {
  .tagline { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr); }
}
@media (max-width: 900px) {
  #editorView { height: auto; }
  .workspace { grid-template-columns: minmax(0, 1fr); flex: none; min-height: auto; }
  .left { overflow: visible; padding: 12px; min-height: auto; }
  .player { max-height: none; }
  .right { border-left: 0; border-top: 1px solid var(--line); min-height: 70vh; }
  .shortcuts { display: none; }
  .upload-options { grid-template-columns: 1fr 1fr; }
  .upload-options .wide { grid-column: 1 / -1; }
  .hero h1 { font-size: 34px; }
  .editor-bar { flex-wrap: wrap; }
  .editor-bar .btn span { display: none; }
  .project-name { width: auto; flex: 1; font-size: 17px !important; }
  .editor-bar .spacer { display: none; }
  .save-state { order: 9; width: 100%; padding-left: 44px; }
  .list-tools { flex-wrap: wrap; }
  .list-tools .search { flex-basis: 100%; }
  .cue-actions { opacity: 1; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 14px; }
  #topbarRight .pill:not(.on) { display: none; }
  #homeView { padding: 28px 14px 60px; }
  .hero h1 { font-size: 29px; }
  .upload-options { grid-template-columns: 1fr; padding: 4px 16px 18px; }
  .burn-opts, .export-grid { grid-template-columns: 1fr; }
  .cue-head { flex-wrap: wrap; }
  .badges { margin-left: 0; }
  .cue-actions { width: 100%; }
}
#burnSection { display: flex; flex-direction: column; gap: 15px; }

/* ---------- instellingen ---------- */
.topbar-pills { display: flex; gap: 8px; align-items: center; }
.topbar-pills .pill.on { cursor: pointer; }
.topbar-pills .pill.off { cursor: pointer; border-style: dashed; }
.topbar-pills .pill.off:hover { color: var(--text); border-color: var(--accent-line); }
#settingsBtn { width: 34px; height: 34px; }
.settings-fields { display: flex; flex-direction: column; gap: 15px; }
.key-row { display: flex; gap: 6px; }
.key-row input { flex: 1; min-width: 0; font-family: var(--mono); }
.test-row { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.test-result { font-size: 12.5px; color: var(--muted); }
.test-result.ok { color: var(--green); }
.test-result.err { color: var(--red); }
#settingsDialog label .hint { font-size: 11.5px; }

/* ---------- positie ---------- */
.caption.top { top: 6%; bottom: auto; }
.badge.pos { background: rgba(127,176,255,.14); color: var(--blue); cursor: pointer; }
.tl-cue.top { top: -4px; height: 46px; border-style: dashed; }
.tl-cue.top::before { content: "↑ "; }
.cue-actions button[data-a="pos"].on { color: var(--blue); }

/* =========================================================
   Pilot: inloggen, mappen, review, markeringen, beheer
   ========================================================= */
textarea { font-family: inherit; }
input[type=number] { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; outline: none; font-size: 13.5px; width: 100%; }
.danger-text { color: var(--red) !important; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.check-row { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; font-size: 13px; color: var(--text); cursor: pointer; min-height: 38px; }
.check-row input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.modal textarea { width: 100%; resize: vertical; }
.modal-actions .spacer { flex: 1; }
code.secret { display: block; font: 600 14px var(--mono); letter-spacing: .06em; background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 11px 12px; text-align: center; user-select: all; color: var(--accent-text); word-break: break-all; }
code.secret.big { font-size: 17px; margin-top: 14px; }
.btn.accent { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }
.btn.accent:hover { background: rgba(242,176,78,.2); }
.btn.ok { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn.ok:hover { filter: brightness(1.07); background: var(--green); }

/* ---------- topbar ---------- */
.review-btn { position: relative; gap: 6px; }
.review-btn.attn { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.count-badge { background: var(--accent); color: var(--accent-ink); font: 700 11px var(--sans); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-grid; place-items: center; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; background: var(--raise); border: 1px solid var(--line-2); border-radius: 12px; padding: 5px; box-shadow: var(--shadow-pop); z-index: 20; display: flex; flex-direction: column; }
.menu button { background: none; border: 0; text-align: left; padding: 9px 11px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.menu button:hover { background: var(--panel-2); }
.topbar-pills .pill.off, .topbar-pills .pill.on { cursor: default; }

/* ---------- inloggen ---------- */
#authView { display: grid; place-items: start center; align-content: start; gap: 18px; padding: 9vh 18px 60px; }
.made-by { font-size: 12px; color: var(--faint); text-decoration: none; letter-spacing: .01em; transition: color .15s; }
.made-by b { font-weight: 600; color: var(--muted); }
.made-by:hover, .made-by:hover b { color: var(--accent-text); }
.side-foot { margin-top: 18px; padding: 0 10px; }
.auth-card { width: min(430px, 100%); background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 20px; padding: 34px; box-shadow: var(--shadow); }
.auth-card h1 { font: 500 28px/1.15 var(--serif); margin: 0 0 4px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .btn.primary { height: 42px; font-size: 14.5px; margin-top: 4px; }
.auth-form .linklike { align-self: center; font-size: 13px; color: var(--muted); font-weight: 500; }
.auth-form input { font-size: 15px; padding: 11px 12px; }
.auth-error { color: var(--red); font-size: 13.5px; margin: 0; min-height: 1px; }
.auth-error:empty { display: none; }
.code-input { font: 600 24px var(--mono) !important; letter-spacing: .3em; text-align: center; }
.enroll-steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; display: flex; flex-direction: column; gap: 5px; }
.qr { background: #fff; border-radius: 12px; padding: 8px; align-self: center; line-height: 0; }
.qr svg { width: 190px; height: 190px; display: block; }

/* ---------- mappen ---------- */
.side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.folders { display: flex; flex-direction: column; gap: 2px; }
.folders h5 { margin: 16px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 600; }
.folders button { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--muted); }
.folders button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folders button i { font: 11.5px var(--mono); font-style: normal; color: var(--faint); }
.folders button:hover { background: var(--panel); color: var(--text); }
.folders button.on { background: var(--panel-2); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.folders button.attn i { background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 0 6px; border-radius: 99px; }
.folders button.dim { color: var(--faint); }
.home-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.home-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.home-head h1 { font: 500 34px/1.1 var(--serif); letter-spacing: -.01em; margin: 0; }
#folderSub { margin-top: -14px; max-width: 760px; }
#folderSub:empty { display: none; }
.dropzone { padding: 30px 20px 28px; }
.dz-icon { width: 52px; height: 52px; border-radius: 15px; }
.upload-options { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); }
.upload-options label { min-width: 0; }
.upload-options input, .upload-options select { width: 100%; min-width: 0; box-sizing: border-box; }
.upload-note { margin: -8px 22px 18px; font-size: 12px; color: var(--faint); }
.rv-tag { position: absolute; left: 9px; top: 9px; z-index: 1; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.7); color: #fff; backdrop-filter: blur(4px); }
.rv-tag.review { background: var(--accent); color: var(--accent-ink); }
.rv-tag.approved { background: var(--green); color: var(--on-green); }
.rv-tag.changes { background: var(--red); color: var(--on-red); }
.job-tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 5px; opacity: 0; transition: .15s; }
.job:hover .job-tools, .job-tools:focus-within { opacity: 1; }
.job .job-tools button { width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(0,0,0,.6); color: #ddd; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(4px); position: static; opacity: 1; }
.job .job-tools button:hover { background: #2c2e36; color: #fff; }
.job .job-tools button.del:hover { background: var(--red); color: var(--on-red); }
.job .meta .cl { color: var(--muted); font-weight: 600; }
.job .meta .fl, .list-meta .fl { color: var(--warn); }

/* ---------- review in de editor ---------- */
.rv-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.rv-pill.review { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.rv-pill.approved { color: var(--green); border-color: rgba(95,212,154,.45); background: rgba(95,212,154,.1); }
.rv-pill.changes { color: var(--red); border-color: rgba(255,122,114,.5); background: rgba(255,122,114,.1); }
.rv-actions { display: inline-flex; gap: 6px; }
.rv-actions:empty { display: none; }
.banners { flex: none; }
.banner { padding: 9px 18px; font-size: 13px; border-bottom: 1px solid var(--line); color: var(--text); }
.banner.info { background: var(--accent-soft); }
.banner.ok { background: rgba(95,212,154,.09); }
.banner.warn { background: rgba(255,122,114,.1); }
.audio-only { text-align: center; line-height: 1.6; padding: 0 20px; }

/* ---------- markeringen ---------- */
.flags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; padding-left: 7px; }
.flags:empty { display: none; }
.flag { display: inline-flex; align-items: stretch; border-radius: 7px; overflow: hidden; font-size: 12.5px; border: 1px solid; }
.flag button { background: none; border: 0; cursor: pointer; padding: 2px 7px; color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.flag button i { font: 700 9.5px var(--mono); font-style: normal; opacity: .85; }
.flag button.x { padding: 2px 6px; border-left: 1px solid; border-color: inherit; opacity: .7; }
.flag button:hover { background: rgba(255,255,255,.08); opacity: 1; }
.flag.asr { color: var(--warn); border-color: rgba(245,199,107,.4); background: rgba(245,199,107,.08); }
.flag.ai { color: var(--blue); border-color: rgba(127,176,255,.4); background: rgba(127,176,255,.08); }
.flag.aiq { color: var(--purple); border-color: rgba(214,168,255,.4); background: rgba(214,168,255,.08); }
.flag.orig { color: var(--faint); border-color: var(--line-2); }
.flag.orig button:hover { color: var(--text); }
.list-meta .dim { color: var(--faint); font-weight: 500; }
.tl-cue.flagged::after { content: ""; position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

/* ---------- beheer ---------- */
#adminView { overflow: auto; }
.admin { width: min(1240px, 100%); margin: 0 auto; padding: 30px 24px 80px; display: flex; flex-direction: column; gap: 20px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.admin-head h1 { font: 500 34px/1.1 var(--serif); margin: 0; }
.tabs { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; }
.tabs button { background: none; border: 0; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 550; color: var(--muted); }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--raise); color: var(--text); }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.pane-head p { max-width: 760px; }
.pane-head input { width: 320px; max-width: 100%; }
.pane-foot { margin-top: 18px; display: flex; justify-content: flex-end; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.off td { color: var(--faint); }
.table select { padding: 5px 8px; font-size: 13px; }
.table .mono { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions .linklike { font-size: 12.5px; margin-left: 12px; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.tag.green { background: rgba(95,212,154,.12); color: var(--green); }
.tag.red { background: rgba(255,122,114,.12); color: var(--red); }
#auditMore { align-self: center; margin-top: 14px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.set-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.set-card h4 { margin: 0; font: 500 19px var(--serif); }
.set-card h4:not(:first-child) { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.set-card input[type=range] { accent-color: var(--accent); }
.set-card output { color: var(--text); font-family: var(--mono); }
.set-card .hint { font-size: 11.5px; }

@media (max-width: 1100px) { .settings-grid { grid-template-columns: 1fr 1fr; } .upload-options { grid-template-columns: 1fr 1fr; } .upload-options .wide { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  #homeView { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .side { position: static; }
  .folders { flex-direction: row; flex-wrap: wrap; }
  .folders h5 { display: none; }
  .folders button { border: 1px solid var(--line); }
  .folders button.on { box-shadow: none; border-color: var(--accent-line); }
  .settings-grid { grid-template-columns: 1fr; }
  .review-btn span { display: none; }
  .rv-pill { order: 8; }
  .rv-actions { order: 9; }
}
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } .upload-options { grid-template-columns: 1fr; } .auth-card { padding: 24px; } }

/* ---------- indeling ---------- */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.preset-grid label { cursor: pointer; }
.preset-grid input { position: absolute; opacity: 0; }
.preset-grid span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--text); font-size: 13.5px; font-weight: 600; transition: .15s; }
.preset-grid small { color: var(--muted); font-weight: 400; font-size: 11.5px; line-height: 1.35; }
.preset-grid input:checked + span { border-color: var(--accent-line); background: var(--accent-soft); }
.preset-grid input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.two .span2 { grid-column: 1 / -1; }
select:disabled, input:disabled { opacity: .5; cursor: default; }
.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.two > label { min-width: 0; }
.modal select, .modal input:not([type=checkbox]):not([type=radio]):not([type=range]) { width: 100%; min-width: 0; }

/* =========================================================
   Lichte modus, focus en afwerking
   ========================================================= */
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-end .topbar-right { margin-left: 0; }
#themeBtn { width: 34px; height: 34px; }
#themeBtn svg { display: none; }
:root[data-theme-pref="light"] #themeBtn .i-sun,
:root[data-theme-pref="dark"] #themeBtn .i-moon,
:root[data-theme-pref="system"] #themeBtn .i-auto { display: block; }
:root[data-theme="light"] .logo { filter: drop-shadow(0 3px 8px rgba(176,110,8,.3)); }
:root[data-theme="light"] .btn.primary, :root[data-theme="light"] .icon-btn.play { box-shadow: 0 6px 16px -8px rgba(176,110,8,.7); }
:root[data-theme="light"] .pill.on .dot { box-shadow: none; }
:root[data-theme="light"] .modal::backdrop { background: rgba(40,36,28,.45); }
:root[data-theme="light"] .tl-cue { background: rgba(36,96,196,.1); border-color: rgba(36,96,196,.35); }
:root[data-theme="light"] .tl-cue.active { background: rgba(235,166,63,.3); }
:root[data-theme="light"] .right { background: var(--panel); }
:root[data-theme="light"] .cue textarea:focus { background: var(--bg-2); }
:root[data-theme="light"] .time-in:focus { background: var(--bg-2) !important; }
:root[data-theme="light"] .btn.ok:hover { background: var(--green); }

/* zichtbare focus voor toetsenbordgebruik */
:is(button, a, select, [tabindex]):focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.cue textarea:focus { border-color: var(--accent-line); }

/* exportdialoog: status */
.export-state { font-size: 13px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); }
.export-state.ok { border-color: rgba(21,127,67,.4); color: var(--green); }
.export-state.warn { border-color: var(--accent-line); color: var(--text); background: var(--accent-soft); }
.export-state:empty { display: none; }

/* eerste gebruik */
.welcome { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.welcome p { margin: 0; color: var(--muted); max-width: 640px; }
.welcome b { color: var(--text); }

/* iets rustiger overzicht */
.job-list { grid-template-columns: repeat(auto-fill, minmax(240px, 300px)); }
.cue-actions button { font-size: 14px; }

/* menu "Meer" boven de ondertitellijst */
.more { position: relative; }
.more summary { list-style: none; cursor: pointer; color: var(--accent-text); font-weight: 550; font-size: 12px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: " ▾"; font-size: 10px; }
.more .menu { min-width: 250px; }
.more .menu button { font-size: 13px; color: var(--text); }

.ai-brief { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.ai-brief summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.ai-brief p { margin: 8px 0 2px; color: var(--text); line-height: 1.5; white-space: pre-wrap; }

.usage-now { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.usage-fig { font-size: 15px; color: var(--muted); } .usage-fig b { font: 500 26px/1.2 var(--serif); color: var(--text); margin-right: 6px; }
.usage-bar { height: 8px; border-radius: 99px; background: var(--panel-2); margin: 12px 0 6px; overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.usage-bar.near i { background: var(--warn); } .usage-bar.over i { background: var(--red, #d9534f); }
.usage-now p { margin: 0; font-size: 13px; }
.usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-bottom: 14px; }
.usage-grid h3 { font: 500 16px var(--serif); margin: 0 0 8px; } .usage-grid h3 + .table-wrap + h3 { margin-top: 18px; }
@media (max-width: 800px) { .usage-grid { grid-template-columns: 1fr; } }

.client-head { gap: 6px; }
.client-head h5 { margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.client-head h5 i { font: 11px var(--mono); font-style: normal; color: var(--faint); letter-spacing: 0; }
.client-head input { margin: 0 2px 4px; padding: 7px 10px; font-size: 13px; border-radius: 9px; }
.client-list { max-height: 46vh; overflow-y: auto; scrollbar-width: thin; margin-top: -14px; }
.client-list .none { font-size: 13px; padding: 6px 10px; margin: 0; }
@media (max-width: 900px) { .client-list { max-height: 30vh; } }

.status-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.status-filter button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 99px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.status-filter button i { font: 11px var(--mono); font-style: normal; color: var(--faint); }
.status-filter button:hover { color: var(--text); border-color: var(--line-3); }
.status-filter button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.status-filter button.on i { color: inherit; opacity: .7; }

.sessions { display: grid; gap: 8px; margin: 6px 0 4px; }
.sessions .sess { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.45; }
.sessions .sess .muted { font-size: 12px; }
.sessions #accOthers { justify-self: start; margin-top: 2px; }

.usage-head { justify-content: flex-end; }
.usage-head label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.usage-head select { width: auto; }
.usage-admin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 22px; padding: 16px 18px; border: 1px dashed var(--line-3); border-radius: 14px; margin-bottom: 18px; }
.usage-admin h3 { font: 500 15px var(--serif); margin: 0 0 8px; }
.usage-admin .small, #usageFilms .small { font-size: 12px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input[type=number] { width: 90px; }
.inline-form input:not([type]) { flex: 1; min-width: 160px; }
.usage-extras { display: grid; gap: 6px; margin-top: 10px; font-size: 13px; }
.usage-extras .extra { display: flex; justify-content: space-between; gap: 10px; }
#usageFilms tr.excluded td { color: var(--faint); }
#usageFilms tr.excluded td:nth-child(5) { text-decoration: line-through; }
@media (max-width: 800px) { .usage-admin { grid-template-columns: 1fr; } }
[data-pane="usage"] > h3 { font: 500 16px var(--serif); margin: 4px 0 8px; }
[data-pane="usage"] > .table-wrap { margin-bottom: 12px; }
.usage-head label { flex-direction: row; margin: 0; }

.ai-costs { margin: 8px 0 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.ai-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ai-head h3 { font: 500 18px var(--serif); margin: 0; display: flex; align-items: center; gap: 8px; }
.ai-head .muted { font: 12px var(--mono); }

/* =========================================================
   Help
   ========================================================= */
#helpView { overflow-y: auto; }
.help { width: min(1080px, 100%); margin: 0 auto; padding: 30px 24px 90px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.help-toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.help-toc nav { display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); }
.help-toc nav a { padding: 6px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 13.5px; }
.help-toc nav a:hover { color: var(--text); }
.help-toc nav a.on { color: var(--text); border-left-color: var(--accent); }
.help-body { display: flex; flex-direction: column; gap: 14px; font-size: 14.5px; line-height: 1.6; max-width: 72ch; }
.help-head h1 { font: 500 34px/1.1 var(--serif); margin: 0 0 8px; }
.help-body section { padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.help-body h2 { font: 500 22px/1.2 var(--serif); margin: 0; }
.help-body p { margin: 0; }
.help-body ul, .help-body ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.help-body a { color: var(--accent-text); }
.help-steps { counter-reset: hs; list-style: none; padding-left: 0 !important; }
.help-steps li { counter-increment: hs; padding-left: 30px; position: relative; }
.help-steps li::before { content: counter(hs); font: 600 12px var(--mono); color: var(--accent-text); position: absolute; left: 0; top: 3px; }
.help-flags { display: grid; gap: 8px; }
.help-flags > div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; }
.help-flags .flag { justify-self: start; pointer-events: none; }
.help-keys td { padding: 8px 10px; }
.help-keys td:first-child { white-space: nowrap; width: 1%; }
.help-faq { margin: 0; display: flex; flex-direction: column; }
.help-faq dt { font-weight: 600; margin-top: 10px; }
.help-faq dt:first-child { margin-top: 0; }
.help-faq dd { margin: 2px 0 0; color: var(--muted); }
.help-foot { padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; }
.help-link { color: var(--muted); }
.help-link:hover { color: var(--text); }
@media (max-width: 800px) {
  .help { grid-template-columns: 1fr; gap: 18px; padding: 20px 16px 70px; }
  .help-toc { position: static; }
  .help-toc nav { flex-direction: row; flex-wrap: wrap; border-left: 0; gap: 6px; }
  .help-toc nav a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; margin: 0; }
  .help-toc nav a.on { border-color: var(--accent-line); }
}

/* Gebruikerstabel: acties mogen over twee regels, zodat Verwijderen altijd zichtbaar is */
#userTable .row-actions { white-space: normal; }
#userTable .row-actions .linklike { display: inline-block; margin: 2px 0 2px 12px; }
