/* LIGHT AND SPACES Review
   Neutrales Dunkelgrau rund ums Bild (verfälscht die Farbwahrnehmung nicht),
   Creme und Navy aus der Website als Markenfarben. */
:root {
  --bg: #121314;
  --bg-2: #1a1b1d;
  --bg-3: #232427;
  --bg-4: #2d2f33;
  --line: #303236;
  --text: #ececea;
  --muted: #9a9b9f;
  --faint: #6c6e73;
  --cream: #f9f7e6;
  --navy: #0d2436;
  --accent: #f9f7e6;
  --marker: #f0b84a;
  --ok: #5fc98c;
  --warn: #f0b84a;
  --bad: #ef6a5e;
  --radius: 6px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Knöpfe & Felder */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg-3); cursor: pointer; white-space: nowrap; text-decoration: none; font-size: 13.5px; }
.btn:hover { background: var(--bg-4); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--cream); color: var(--navy); border-color: var(--cream); font-weight: 600; }
.btn.primary:hover { background: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-3); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 34px; padding: 0; }
.btn.icon.sm { width: 28px; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.active { background: var(--cream); color: var(--navy); border-color: var(--cream); }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--muted); }
label.field { display: block; margin: 0 0 12px; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--cream); }

/* ---------- Kopfzeile */
.topbar { height: 54px; display: flex; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.brand { font-weight: 600; letter-spacing: .14em; font-size: 12.5px; text-transform: uppercase; white-space: nowrap; text-decoration: none; }
.brand small { font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--muted); font-size: 13px; margin-left: 6px; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); }
.crumbs b { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spacer { flex: 1; }

/* ---------- Status */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; background: var(--bg-3); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-approved { color: var(--ok); background: rgba(95, 201, 140, .12); }
.st-changes { color: var(--bad); background: rgba(239, 106, 94, .12); }
.st-review { color: var(--muted); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--marker); color: #1a1300; font-size: 11.5px; font-weight: 700; }

/* ---------- Modal & Hinweise */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { width: min(440px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.modal h2 { margin: 0 0 16px; font-size: 17px; font-weight: 600; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--cream); color: var(--navy); padding: 9px 16px; border-radius: 8px; font-weight: 500; box-shadow: 0 6px 24px rgba(0,0,0,.4); transition: opacity .4s, transform .4s; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- Anmelden / gesperrt */
.center-card { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.card { width: min(380px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.card h1 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 4px; font-weight: 600; }
.card p { margin: 0 0 22px; color: var(--muted); }
.card .btn { width: 100%; height: 40px; margin-top: 6px; }
.form-error { color: var(--bad); min-height: 20px; margin: 6px 0 0; font-size: 13px; }

/* =================================================== Backend */
.page { max-width: 1180px; margin: 0 auto; padding: 26px 18px 80px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.storage { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.meter { width: 120px; height: 5px; border-radius: 3px; background: var(--bg-4); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--cream); }
.meter.full i { background: var(--warn); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pcard { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; text-decoration: none; display: block; transition: border-color .15s; }
.pcard:hover { border-color: var(--muted); }
.thumb { aspect-ratio: 16/9; background: #000 center/cover no-repeat; position: relative; display: grid; place-items: center; color: var(--faint); }
.thumb .badge { position: absolute; top: 8px; right: 8px; }
.pcard .meta { padding: 11px 13px 13px; }
.pcard .meta b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .meta span { color: var(--muted); font-size: 12.5px; }
.empty { border: 1px dashed var(--line); border-radius: 10px; padding: 46px 20px; text-align: center; color: var(--muted); }

.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 22px; }
.settings .full { grid-column: 1 / -1; }
.share { display: flex; gap: 8px; }
.share input { font-family: var(--mono); font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 26px 16px; text-align: center; color: var(--muted); transition: background .15s, border-color .15s; cursor: pointer; }
.drop b { color: var(--text); font-weight: 500; }
.drop.over { border-color: var(--cream); background: rgba(249, 247, 230, .05); color: var(--text); }
.drop.small { padding: 10px; font-size: 12.5px; margin-top: 10px; }

.asset { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.asset .thumb { border-radius: 6px; cursor: pointer; }
.asset-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.asset-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.asset-head .muted { font-size: 12.5px; }
.vlist { display: flex; flex-direction: column; gap: 4px; }
.vrow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; background: var(--bg); flex-wrap: wrap; }
.vrow .vnum { font-weight: 600; width: 28px; }
.vrow .name { flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.progress { flex: 1; min-width: 120px; height: 6px; border-radius: 3px; background: var(--bg-4); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--cream); transition: width .2s; }
@media (max-width: 720px) {
  .settings { grid-template-columns: 1fr; }
  .asset { grid-template-columns: 1fr; }
}

/* =================================================== Review */
body.review { overflow: hidden; }
body.review #app { height: 100%; display: flex; flex-direction: column; }
body.review .topbar { flex: none; }
.crumbs b { flex: 0 1 auto; min-width: 40px; }
.rv { display: grid; grid-template-columns: 1fr 380px; flex: 1; min-height: 0; }
.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.viewport { flex: 1; min-height: 0; display: grid; place-items: center; padding: 14px; background: #0b0b0c; position: relative; }
.frame { position: relative; background: #000; }
.frame video { display: block; width: 100%; height: 100%; }
.frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.frame canvas.drawing { cursor: crosshair; }
.frame .bigplay { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; cursor: pointer; }
.frame .bigplay svg { width: 28px; height: 28px; margin-left: 4px; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; }

.controls { border-top: 1px solid var(--line); background: var(--bg); padding: 8px 14px 10px; }
.timeline { position: relative; height: 30px; cursor: pointer; touch-action: none; }
.timeline .track { position: absolute; left: 0; right: 0; top: 19px; height: 4px; border-radius: 2px; background: var(--bg-4); }
.timeline .buffered { position: absolute; left: 0; top: 0; bottom: 0; background: #45474c; border-radius: 2px; }
.timeline .played { position: absolute; left: 0; top: 0; bottom: 0; background: var(--cream); border-radius: 2px; }
.timeline .head { position: absolute; top: 13px; width: 2px; height: 16px; background: var(--cream); transform: translateX(-1px); pointer-events: none; }
.timeline .mk { position: absolute; top: 2px; width: 12px; height: 12px; border-radius: 50%; transform: translateX(-6px); background: var(--marker); border: 2px solid var(--bg); cursor: pointer; z-index: 2; }
.timeline .mk.done { background: var(--ok); }
.timeline .mk.sel { box-shadow: 0 0 0 2px var(--cream); }
.timeline .range { position: absolute; top: 19px; height: 4px; background: var(--marker); opacity: .7; pointer-events: none; }
.timeline .hover-tc { position: absolute; bottom: 30px; transform: translateX(-50%); background: var(--bg-3); padding: 2px 6px; border-radius: 4px; font: 11.5px var(--mono); white-space: nowrap; pointer-events: none; }
.cbar { display: flex; align-items: center; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.tc { font: 15px var(--mono); font-variant-numeric: tabular-nums; padding: 0 10px; letter-spacing: .02em; }
.tc small { color: var(--faint); font-size: 12px; }
.cbar select { width: auto; height: 30px; padding: 0 8px; background: var(--bg-3); }
.vol { width: 80px; accent-color: var(--cream); }

.side { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg-2); }
.side-head { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.side-head h2 { font-size: 14px; margin: 0; font-weight: 600; }
.side-head select { width: auto; height: 28px; padding: 0 6px; font-size: 12.5px; background: var(--bg-3); }
.clist { flex: 1; overflow-y: auto; padding: 6px 0; }
.cm { padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cm:hover { background: rgba(255,255,255,.025); }
.cm.sel { background: rgba(249, 247, 230, .06); }
.cm.done .cm-body { color: var(--muted); }
.cm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.cm-top b { font-weight: 600; font-size: 13px; }
.cm-top .time { color: var(--faint); font-size: 12px; }
.tcchip { font: 11.5px var(--mono); background: var(--marker); color: #1a1300; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.done .tcchip { background: var(--ok); }
.cm-body { white-space: pre-wrap; word-wrap: break-word; }
.cm-thumb { width: 100%; max-width: 220px; border-radius: 4px; margin-top: 8px; display: block; }
.cm-actions { display: flex; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity .15s; }
.cm:hover .cm-actions, .cm.sel .cm-actions { opacity: 1; }
.cm-actions .btn { height: 24px; font-size: 12px; padding: 0 8px; color: var(--muted); }
.cm-actions .btn:hover { color: var(--text); }
.reply { margin: 8px 0 0 12px; padding-left: 10px; border-left: 2px solid var(--line); }
.reply .cm-top b { font-size: 12.5px; }
.adm { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); background: var(--cream); border-radius: 3px; padding: 0 4px; font-weight: 700; }
.check-done { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--faint); display: grid; place-items: center; cursor: pointer; background: none; padding: 0; flex: none; margin-left: auto; }
.check-done svg { width: 12px; height: 12px; opacity: 0; }
.done .check-done { background: var(--ok); border-color: var(--ok); color: #062512; }
.done .check-done svg { opacity: 1; }
.composer { border-top: 1px solid var(--line); padding: 12px 14px; background: var(--bg-2); }
.composer textarea { resize: none; min-height: 64px; max-height: 200px; }
.composer .row { margin-top: 8px; gap: 6px; }
.composer .at { font: 12px var(--mono); color: var(--marker); }
.colors { display: flex; gap: 4px; }
.colors button { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.colors button.on { border-color: var(--cream); }

.assets-grid { padding: 26px 18px; max-width: 1180px; margin: 0 auto; }
.status-btns { display: flex; gap: 6px; }

@media (max-width: 900px) {
  body.review { overflow: auto; }
  body.review #app { height: auto; display: block; }
  .rv { grid-template-columns: 1fr; height: auto; }
  .viewport { padding: 0; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .clist { max-height: none; }
  .topbar { flex-wrap: wrap; height: auto; min-height: 54px; padding: 8px 12px; }
  .vol { display: none; }
  .cm-actions { opacity: 1; }
}
