/* ── Variables ─────────────────────────────────────────────────────── */
:root {
  --bg:         #080808;
  --surface:    #111111;
  --surface-2:  #181818;
  --surface-3:  #1e1e1e;
  --border:     #242424;
  --text:       #f0ece6;
  --text-dim:   #606060;
  --text-muted: #333333;
  --accent:     #c8ff00;
  --approved:   #00c896;
  --changes:    #ff6b35;
  --warning:    #ffaa00;
  --danger:     #ff4444;
  --font:       'Space Grotesk', -apple-system, 'Helvetica Neue', sans-serif;
  --mono:       'Space Mono', 'Courier New', monospace;
  --radius:     6px;
  --sidebar-w:  340px;
  --topbar-h:   52px;
  --controls-h: 96px;
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
input, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; }

/* ══════════════════════════════════════════════════════════════════════
   INDEX PAGE
══════════════════════════════════════════════════════════════════════ */

body.page-index {
  overflow: hidden;
  height: 100vh;
}

.index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
  z-index: 10;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.index-logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.index-logo .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.index-logo .label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.index-main {
  padding: 40px 32px 80px;
  max-width: 1400px;
}

.index-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
}

.video-card {
  background: var(--surface);
  position: relative;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.video-card:hover { background: var(--surface-2); }

.video-card-thumb {
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  overflow: hidden;
  position: relative;
}

.video-card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.video-card:hover .video-card-thumb-img { opacity: 1; }

.video-card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text);
}

.video-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.video-card:hover .video-card-play { opacity: 1; }

.video-card-play svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.video-card-info {
  padding: 14px 16px;
}

.video-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.video-card-meta {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  gap: 12px;
}

/* ── Version groups ────────────────────────────────────────────────── */
.video-group {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  position: relative;
}
.video-group:hover { background: var(--surface-2); }
.video-group .video-card { background: transparent; }
.video-group .video-card:hover { background: transparent; }

.video-group.dragging { opacity: 0.35; pointer-events: none; }

.video-group-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  min-height: 38px;
  gap: 8px;
}

.version-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.version-pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: transparent;
  transition: all 0.15s;
  cursor: pointer;
}
.version-pill:hover { color: var(--text); border-color: var(--text-muted); }
.version-pill.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }

.version-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(200,255,0,0.15);
  color: var(--accent);
  border: 1px solid rgba(200,255,0,0.2);
  pointer-events: none;
}

/* ── Scene/slate/take badges ────────────────────────────────────────── */
.scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 2px;
}

.scene-badge,
.slate-badge,
.take-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.scene-none {
  opacity: 0.35;
  font-style: italic;
}

/* ── Scene grouping wrapper ─────────────────────────────────────────── */
.scene-group {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px;
}

.scene-group-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  padding: 0 2px;
}

.scene-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
}

.btn-ale-import {
  margin-left: auto;
  font-size: 12px;
  padding: 3px 10px;
}

/* ── Section heading (label + gear button row) ───────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.section-heading .index-title {
  margin-bottom: 0;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  padding: 2px 4px;
  border-radius: var(--radius);
  transition: color 0.15s;
  line-height: 1;
}
.btn-icon:hover { color: var(--text-dim); }

.version-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.version-delete-btn svg { width: 13px; height: 13px; pointer-events: none; }
.video-group:hover .version-delete-btn { opacity: 1; }
.version-delete-btn:hover { color: var(--danger); background: rgba(255,68,68,0.08); }

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
}
.status-badge.approved { background: rgba(0,200,150,0.15); color: var(--approved); }
.status-badge.changes  { background: rgba(255,107,53,0.15); color: var(--changes); }
.status-badge.codec-warn { background: rgba(255,170,0,0.12); color: var(--warning); border: 1px solid rgba(255,170,0,0.25); }

/* ── Shared buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary.btn-danger { background: var(--danger); }
.btn-primary.btn-danger:hover { filter: brightness(1.15); opacity: 1; }

.confirm-message { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin: 0; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--text-dim);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover { color: var(--text); border-color: var(--text-muted); }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dim);
  font-size: 12px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

/* ── Project grid ───────────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
}

.project-card {
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.15s;
  position: relative;
  overflow: hidden;
}
.project-card:hover { background: var(--surface-2); }

.project-card-banner {
  height: 6px;
  width: 100%;
}

.project-card-body {
  padding: 20px 20px 16px;
}

.project-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.project-card-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.project-card-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-3);
  padding: 3px 8px;
  border-radius: 3px;
}

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 420px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  font-size: 20px;
  color: var(--text-dim);
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.form-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-top: 5px;
  line-height: 1.5;
}

.form-input {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  transition: border-color 0.15s;
  width: 100%;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { outline: none; border-color: var(--text-dim); }

.form-textarea { resize: vertical; min-height: 80px; }

.scene-mode-tabs {
  display: flex;
  background: var(--surface-3);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
  margin-top: 6px;
}
.scene-mode-tab {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text-muted);
  text-align: center;
}
.scene-mode-tab.active {
  background: var(--surface-2);
  color: var(--text);
}

.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.toggle input:checked + .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px; top: 2px;
  width: 14px; height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
  background: var(--bg);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── Upload zone ────────────────────────────────────────────────────── */
.upload-zone {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 24px;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(200, 255, 0, 0.04);
}

.upload-icon {
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  margin: 0 auto 12px;
  display: block;
}

.upload-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.upload-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* Upload progress list */
.upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.upload-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.upload-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.upload-item-name {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.upload-item-status {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-dim);
  white-space: nowrap;
}
.upload-item-status.done  { color: var(--approved); }
.upload-item-status.error { color: var(--danger); }

.upload-progress-track {
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.2s;
}
.upload-item.done .upload-progress-fill  { background: var(--approved); width: 100%; }
.upload-item.error .upload-progress-fill { background: var(--danger); }

/* Empty state */
.empty-state {
  padding: 80px 32px;
  text-align: center;
  color: var(--text-dim);
}
.empty-state h2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 13px;
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto 24px;
}
.empty-state code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--surface);
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: inline-block;
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════════════
   REVIEW PAGE LAYOUT
══════════════════════════════════════════════════════════════════════ */

body.page-review {
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-columns: 1fr var(--sidebar-w);
  height: 100vh;
}

/* ── Top bar ───────────────────────────────────────────────────────── */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  z-index: 50;
}

.topbar-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  margin-right: 8px;
  white-space: nowrap;
}
.topbar-back:hover { color: var(--text); background: var(--surface-2); }
.topbar-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.topbar-filename {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-version {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 3px;
  margin-left: 10px;
  font-family: var(--mono);
  white-space: nowrap;
}

.topbar-version-pills {
  display: flex;
  gap: 3px;
  margin-left: 10px;
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

/* Approval button */
.btn-approve {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface-2);
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-approve:hover { color: var(--text); border-color: var(--text-muted); }
.btn-approve.approved { background: rgba(0,200,150,0.12); color: var(--approved); border-color: rgba(0,200,150,0.3); }
.btn-approve.changes  { background: rgba(255,107,53,0.12); color: var(--changes); border-color: rgba(255,107,53,0.3); }

.btn-share {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface-2);
  transition: all 0.2s;
  white-space: nowrap;
  cursor: pointer;
}
.btn-share:hover { color: var(--text); border-color: var(--text-muted); }

/* ── Player column ─────────────────────────────────────────────────── */
.player-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
  min-width: 0;
}

/* Video error overlay */
.video-error-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.video-error-inner { max-width: 380px; }

.video-error-icon {
  font-size: 32px;
  color: var(--warning);
  margin-bottom: 12px;
  line-height: 1;
}

.video-error-headline {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.video-error-detail {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 12px;
}

.video-error-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* Video wrapper */
.video-wrap {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 0;
}

.video-wrap video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Pause-to-comment indicator */
.click-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: var(--radius);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.click-indicator.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Drawing canvas overlay */
.draw-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  cursor: crosshair;
}
.draw-canvas.active {
  pointer-events: all;
  opacity: 1;
}

/* ── Controls ──────────────────────────────────────────────────────── */
.controls {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 16px 12px;
  flex-shrink: 0;
}

/* Timeline */
.timeline-wrap {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
}

.timeline-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.tl-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  pointer-events: all;
  z-index: 3;
  transition: transform 0.15s;
  border: 1.5px solid rgba(0,0,0,0.4);
}
.tl-marker:hover { transform: translate(-50%, -50%) scale(1.5); }
.tl-marker.resolved { background: var(--text-muted); }

/* Scrubber */
.scrubber {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.scrubber-fill {
  height: 100%;
  background: var(--text);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

.scrubber-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.15s;
  pointer-events: none;
}
.timeline-wrap:hover .scrubber-thumb { transform: translate(-50%, -50%) scale(1); }

/* Control row */
.control-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  color: var(--text-dim);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.ctrl-btn:hover { color: var(--text); background: var(--surface-2); }
.ctrl-btn.active { color: var(--text); }
.ctrl-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Time display */
.time-display {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
  user-select: none;
}
.time-display:hover { color: var(--text); }
.time-display .separator { opacity: 0.3; margin: 0 4px; }

/* Speed selector */
.speed-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.speed-btn:hover { color: var(--text); background: var(--surface-2); }
.speed-btn.active { color: var(--accent); border-color: rgba(200,255,0,0.2); background: rgba(200,255,0,0.05); }

/* Volume */
.volume-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 64px;
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s;
}
.volume-slider:hover::-webkit-slider-thumb { background: var(--text); }

/* Tech panel toggle */
.tech-toggle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 5px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-left: 4px;
  transition: all 0.15s;
}
.tech-toggle:hover { color: var(--text); border-color: var(--text-muted); }
.tech-toggle.active { color: var(--accent); border-color: rgba(200,255,0,0.3); background: rgba(200,255,0,0.05); }

/* ── Comment input bar ─────────────────────────────────────────────── */
.comment-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 10px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.comment-at {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.comment-at.visible { opacity: 1; }

.name-input {
  font-size: 12px;
  color: var(--text-dim);
  padding: 7px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  width: 100px;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.name-input::placeholder { color: var(--text-muted); }
.name-input:focus { border-color: var(--text-muted); color: var(--text); }

.comment-input {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  padding: 7px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  resize: none;
  transition: border-color 0.15s;
}
.comment-input::placeholder { color: var(--text-muted); }
.comment-input:focus { border-color: var(--text-dim); }

.comment-submit {
  font-size: 12px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  padding: 7px 14px;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.comment-submit:hover { opacity: 0.85; }
.comment-submit:disabled { opacity: 0.35; cursor: not-allowed; }

/* Draw button in comment bar */
.comment-draw-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.comment-draw-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.comment-draw-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(200,255,0,0.08); }
.comment-draw-btn.has-annotation { color: var(--accent); }

/* ── Draw toolbar ──────────────────────────────────────────────────── */
.draw-toolbar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10,10,10,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 6px 8px;
  z-index: 20;
  backdrop-filter: blur(8px);
  pointer-events: all;
}
.draw-toolbar[hidden] { display: none; }
.draw-color-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  background-color: var(--c, #fff);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.15s, transform 0.1s;
}
.draw-color-btn:hover { transform: scale(1.15); }
.draw-color-btn.active { border-color: rgba(255,255,255,0.9); }
.draw-sep {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.15);
  margin: 0 2px;
  flex-shrink: 0;
}
.draw-size-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.draw-size-btn::after {
  content: '';
  display: block;
  background: #fff;
  border-radius: 50%;
}
.draw-size-btn[data-size="3"]::after  { width: 3px; height: 3px;  }
.draw-size-btn[data-size="6"]::after  { width: 5px; height: 5px;  }
.draw-size-btn[data-size="12"]::after { width: 9px; height: 9px;  }
.draw-size-btn:hover  { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.25); }
.draw-size-btn.active { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4);  }
.draw-action-btn {
  font-size: 11px;
  font-family: var(--sans);
  color: var(--text-dim);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 3px 9px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.draw-action-btn:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.draw-done-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}
.draw-done-primary:hover { background: #d6ff33; border-color: #d6ff33; }

/* ── Annotation thumbnail in comment card ──────────────────────────── */
.comment-annotation-wrap {
  margin-top: 6px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #000;
  cursor: pointer;
}
.comment-annotation-thumb {
  width: 100%;
  display: block;
  opacity: 0.9;
  transition: opacity 0.15s;
}
.comment-annotation-wrap:hover .comment-annotation-thumb { opacity: 1; }

/* ── Sidebar ───────────────────────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 0;
  background: var(--surface-3);
  border-radius: var(--radius);
  padding: 2px;
}

.filter-tab {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--text-dim);
  transition: all 0.15s;
}
.filter-tab.active { background: var(--surface-2); color: var(--text); }
.filter-tab:hover:not(.active) { color: var(--text); }

/* Export buttons */
.export-btns {
  display: flex;
  gap: 3px;
}
.export-btn {
  font-size: 10px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.export-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Comment list */
.comment-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.comment-list::-webkit-scrollbar { width: 4px; }
.comment-list::-webkit-scrollbar-track { background: transparent; }
.comment-list::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 2px; }

.comment-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.comment-item:hover { background: var(--surface-2); }
.comment-item.active { background: var(--surface-2); border-left: 2px solid var(--accent); }
.comment-item.resolved { opacity: 0.45; }

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-timecode {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  flex-shrink: 0;
  background: rgba(200,255,0,0.07);
  padding: 2px 6px;
  border-radius: 3px;
}
.comment-item.resolved .comment-timecode { color: var(--text-muted); background: transparent; }

.comment-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-time-ago {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.comment-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 8px;
}
.comment-item.resolved .comment-text { color: var(--text-dim); }

.comment-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.resolve-btn {
  font-size: 11px;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.resolve-btn:hover { color: var(--approved); border-color: rgba(0,200,150,0.3); }
.comment-item.resolved .resolve-btn { color: var(--text-muted); }
.comment-item.resolved .resolve-btn:hover { color: var(--text-dim); border-color: var(--border); }

.comment-resolved-badge {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Empty comments state */
.comments-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-dim);
}
.comments-empty p {
  font-size: 12px;
  line-height: 1.6;
  max-width: 200px;
  margin: 0 auto;
}
.comments-empty .hint {
  font-size: 11px;
  margin-top: 12px;
  color: var(--text-muted);
}

/* ── Technical panel ───────────────────────────────────────────────── */
.tech-panel {
  position: absolute;
  inset: 0;
  background: var(--surface);
  z-index: 20;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tech-panel.open { transform: translateX(0); }

.tech-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.tech-panel-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tech-close {
  color: var(--text-dim);
  font-size: 18px;
  padding: 4px 8px;
  border-radius: var(--radius);
  line-height: 1;
  transition: color 0.15s;
}
.tech-close:hover { color: var(--text); }

.tech-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.tech-scroll::-webkit-scrollbar { width: 4px; }
.tech-scroll::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 2px; }

.tech-section {
  margin-bottom: 20px;
}

.tech-section-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.tech-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  gap: 12px;
}

.tech-label {
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.tech-value {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}

.tech-value.na { color: var(--text-muted); font-family: var(--font); font-style: italic; }
.tech-value.highlight { color: var(--accent); }
.tech-value.warn { color: var(--warning); }
.na { color: var(--text-muted); font-style: italic; }

/* Delivery check */
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius);
  margin-bottom: 4px;
  font-size: 12px;
}
.check-item .icon { flex-shrink: 0; font-size: 14px; margin-top: -1px; }
.check-item.ok     { background: rgba(0,200,150,0.08); color: var(--approved); }
.check-item.warn   { background: rgba(255,170,0,0.08); color: var(--warning); }
.check-item.info   { background: rgba(255,255,255,0.04); color: var(--text-dim); }

.tech-ffprobe-note {
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(200,255,0,0.05);
  border: 1px solid rgba(200,255,0,0.15);
  border-radius: var(--radius);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}
.tech-ffprobe-note strong { color: var(--accent); }

/* ── Keyboard shortcuts hint ────────────────────────────────────────── */
.kbd-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  gap: 16px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(8px);
}
.kbd-hint.show { opacity: 1; }
.kbd-hint kbd {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text);
}

/* ── Misc ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body.page-review {
    grid-template-columns: 1fr;
    grid-template-rows: var(--topbar-h) 1fr auto;
    overflow: auto;
    height: auto;
  }
  .sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 50vh;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   COMPARE MODE
══════════════════════════════════════════════════════════════════════ */

/* Compare button in topbar */
.btn-compare {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-compare:hover  { color: var(--text); border-color: var(--text-muted); }
.btn-compare.active { color: var(--accent); border-color: rgba(200,255,0,0.3); background: rgba(200,255,0,0.05); }

/* Compare mode/exit bar */
.compare-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding-right: 10px;
  margin-right: 6px;
  border-right: 1px solid var(--border);
}

.compare-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--text-dim);
  transition: all 0.15s;
}
.compare-mode-btn:hover:not(:disabled)  { color: var(--text); border-color: var(--border); }
.compare-mode-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.compare-mode-btn.active {
  color: var(--accent);
  border-color: rgba(200,255,0,0.25);
  background: rgba(200,255,0,0.06);
}
.compare-mode-btn svg { width: 14px; height: 14px; }

/* ── Compare video element ─────────────────────────────────────────── */
.video-compare {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  pointer-events: none;
  z-index: 2;
}

/* ── Wipe mode ─────────────────────────────────────────────────────── */
.video-wrap.mode-wipe #video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.video-wrap.mode-wipe .video-compare {
  display: block;
}

.video-wrap.mode-wipe .draw-canvas,
.video-wrap.mode-wipe .click-indicator {
  display: none;
}

/* Wipe handle */
.wipe-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255,255,255,0.85);
  cursor: ew-resize;
  z-index: 20;
  transform: translateX(-50%);
  pointer-events: all;
}

.wipe-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: ew-resize;
  color: #1a1a1a;
}

/* ── Side-by-side mode ─────────────────────────────────────────────── */
.video-wrap.mode-sidebyside {
  flex-direction: row;
  gap: 2px;
}

.video-wrap.mode-sidebyside #video {
  flex: 1 1 0;
  width: 0 !important;
  height: 100%;
  position: relative !important;
  inset: auto !important;
}

.video-wrap.mode-sidebyside .video-compare {
  display: block;
  position: relative;
  inset: auto;
  flex: 1 1 0;
  width: 0;
  height: 100%;
  object-fit: contain;
  z-index: auto;
}

.video-wrap.mode-sidebyside .draw-canvas,
.video-wrap.mode-sidebyside .click-indicator,
.video-wrap.mode-sidebyside .wipe-handle {
  display: none;
}

.video-wrap.mode-sidebyside .compare-label-left  { left:  calc(25% - 24px); }
.video-wrap.mode-sidebyside .compare-label-right { right: calc(25% - 24px); }

/* ── Compare labels ────────────────────────────────────────────────── */
.compare-label {
  position: absolute;
  top: 12px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 25;
}

.compare-label-left  { left:  12px; }
.compare-label-right { right: 12px; }

/* ── Aspect ratio overlay bars ──────────────────────────────────────── */
.aspect-bar {
  position: absolute;
  background: #000;          /* fully opaque by default */
  pointer-events: none;
}

/* ── Aspect ratio control ────────────────────────────────────────────── */
.aspect-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Trigger button — matches .tech-toggle exactly */
.aspect-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 5px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.15s;
  white-space: nowrap;
}
.aspect-btn:hover     { color: var(--text); border-color: var(--text-muted); }
.aspect-btn.active    { color: var(--accent); border-color: rgba(200,255,0,0.3); background: rgba(200,255,0,0.05); }

/* Floating panel — appears above the button */
.aspect-panel {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  min-width: 100px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.aspect-opt {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 5px 8px;
  border-radius: 4px;
  transition: all 0.1s;
  white-space: nowrap;
}
.aspect-opt:hover  { color: var(--text); background: var(--surface-3); }
.aspect-opt.active { color: var(--accent); }

.aspect-panel-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.aspect-custom {
  display: block;
  width: calc(100% - 16px);
  margin: 4px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-family: var(--mono);
  padding: 4px 6px;
  border-radius: 4px;
  text-align: center;
}
.aspect-custom:focus { outline: none; border-color: var(--accent); }

.aspect-opacity-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
}
.aspect-opacity-label {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text-muted);
  flex: 1;
}
.aspect-opacity-btn {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text-dim);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.1s;
}
.aspect-opacity-btn:hover  { color: var(--text); background: var(--surface-3); }
.aspect-opacity-btn.active { color: var(--accent); border-color: rgba(200,255,0,0.25); background: rgba(200,255,0,0.06); }

/* ══════════════════════════════════════════════════════════════════════
   APP LAYOUT — LEFT SIDEBAR (index + project pages)
══════════════════════════════════════════════════════════════════════ */

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Left nav sidebar */
.nav-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease;
  position: relative;
}

.nav-sidebar.collapsed {
  width: 0;
}

.nav-sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 0 8px;
}
.nav-sidebar-content::-webkit-scrollbar { width: 3px; }
.nav-sidebar-content::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 2px; }

/* Main content column */
.main-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.main-column .index-main {
  flex: 1;
  overflow-y: auto;
}
.main-column .index-main::-webkit-scrollbar { width: 6px; }
.main-column .index-main::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

/* Sidebar toggle button (lives in .index-header) */
.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
  margin-right: 4px;
}
.sidebar-toggle-btn:hover { color: var(--text-dim); background: var(--surface-2); }
.sidebar-toggle-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Sidebar nav content ─────────────────────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar-brand-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-brand-ver {
  font-size: 10px;
  color: var(--text-muted);
}

.sidebar-section-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #505050;
  padding: 0 16px;
  margin-bottom: 4px;
  margin-top: 12px;
}

.sidebar-new-project-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 32px);
  margin: 8px 16px 12px;
  padding: 7px 12px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-new-project-btn:hover { opacity: 0.85; }

.sidebar-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 16px;
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-project-item:hover { background: var(--surface-2); color: var(--text); }
.sidebar-project-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-project-count {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Project sidebar (project page) */
.sidebar-project-info {
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.sidebar-project-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.sidebar-settings-link {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0;
  text-align: left;
}
.sidebar-settings-link:hover { color: var(--text-dim); }

.type-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(200,255,0,0.1);
  color: var(--accent);
  border: 1px solid rgba(200,255,0,0.2);
}

.sidebar-change-type-btn {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: underline;
  transition: color 0.15s;
  margin-top: 4px;
  display: block;
}
.sidebar-change-type-btn:hover { color: var(--text-dim); }

.sidebar-folder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 12px;
  color: #909090;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-folder-item:hover { background: var(--surface-2); color: var(--text); }
.sidebar-folder-item.active { color: var(--accent); background: rgba(200,255,0,0.05); }
.sidebar-folder-item svg { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.6; }
.sidebar-folder-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sidebar-folder-count { font-size: 10px; color: #606060; flex-shrink: 0; }

.sidebar-new-folder-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 11px;
  color: #606060;
  transition: color 0.15s;
  width: 100%;
  text-align: left;
}
.sidebar-new-folder-btn:hover { color: #a0a0a0; }

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* Log section */
.log-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 16px;
  font-size: 11px;
  color: #707070;
  line-height: 1.4;
}
.log-item-action { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-item-time { font-size: 10px; color: #606060; flex-shrink: 0; }
.log-icon { flex-shrink: 0; width: 12px; text-align: center; }

.sidebar-stats {
  display: flex;
  gap: 12px;
  padding: 8px 16px;
  font-size: 10px;
  color: #606060;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════════════
   FOLDERS
══════════════════════════════════════════════════════════════════════ */

.folder-card {
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: background 0.15s;
  position: relative;
}
.folder-card:hover { background: var(--surface-2); }

.folder-card-thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.folder-card-thumb svg {
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  opacity: 0.5;
}

.folder-card-info {
  padding: 14px 16px;
  flex: 1;
}

.folder-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.folder-card-meta {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}

.folder-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  min-height: 36px;
}

.folder-type-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(200,255,0,0.08);
  color: var(--accent);
  border: 1px solid rgba(200,255,0,0.15);
  margin-right: auto;
}

.folder-edit-btn,
.folder-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s, color 0.15s, background 0.15s;
}
.folder-edit-btn svg, .folder-delete-btn svg { width: 13px; height: 13px; pointer-events: none; }
.folder-card:hover .folder-edit-btn,
.folder-card:hover .folder-delete-btn { opacity: 1; }
.folder-edit-btn:hover { color: var(--text); background: var(--surface-2); }
.folder-delete-btn:hover { color: var(--danger); background: rgba(255,68,68,0.08); }
.folder-card.drag-over {
  border-color: rgba(200,255,0,0.5);
  background: rgba(200,255,0,0.06);
  box-shadow: 0 0 0 1px rgba(200,255,0,0.2);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 0 16px;
}
.breadcrumb-link {
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s;
}
.breadcrumb-link:hover { color: var(--text); }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--text); }

/* ══════════════════════════════════════════════════════════════════════
   PLAYLISTS
══════════════════════════════════════════════════════════════════════ */

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
  margin-bottom: 2px;
}

.playlist-card {
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
  position: relative;
}
.playlist-card:hover { background: var(--surface-2); }

.playlist-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: rgba(200,255,0,0.08);
  border: 1px solid rgba(200,255,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.playlist-card-icon svg { width: 18px; height: 18px; }

.playlist-card-info { flex: 1; min-width: 0; }

.playlist-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.playlist-card-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.playlist-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.playlist-delete-btn svg { width: 13px; height: 13px; pointer-events: none; }
.playlist-card:hover .playlist-delete-btn { opacity: 1; }
.playlist-delete-btn:hover { color: var(--danger); background: rgba(255,68,68,0.08); }

/* ══════════════════════════════════════════════════════════════════════
   VIDEO SELECTION (Ctrl+click + box select)
══════════════════════════════════════════════════════════════════════ */

.video-card.selected,
.video-group.selected .video-card {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.selection-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}

.box-select {
  position: fixed;
  border: 1px solid var(--accent);
  background: rgba(200,255,0,0.06);
  pointer-events: none;
  z-index: 100;
}

/* Selection action bar */
.selection-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 12px;
  flex-wrap: wrap;
}

.selection-count {
  font-size: 12px;
  color: var(--text-dim);
  margin-right: 4px;
}

.selection-clear {
  margin-left: auto;
}

/* ══════════════════════════════════════════════════════════════════════
   PLAYLIST STRIP (review player)
══════════════════════════════════════════════════════════════════════ */

.playlist-strip {
  display: flex;
  gap: 4px;
  padding: 6px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
.playlist-strip::-webkit-scrollbar { height: 3px; }
.playlist-strip::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 2px; }

.playlist-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.playlist-item:hover { color: var(--text); border-color: var(--text-muted); }
.playlist-item.active { border-color: var(--accent); color: var(--accent); background: rgba(200,255,0,0.05); }

.playlist-item-num {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  opacity: 0.6;
}

/* ══════════════════════════════════════════════════════════════════════
   PROJECT TYPES (type selector in modal + review visibility)
══════════════════════════════════════════════════════════════════════ */

.type-btn-group {
  display: flex;
  gap: 3px;
  background: var(--surface-3);
  border-radius: var(--radius);
  padding: 3px;
}

.type-btn {
  flex: 1;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: 4px;
  color: var(--text-dim);
  transition: all 0.15s;
  white-space: nowrap;
  text-align: center;
}
.type-btn:hover { color: var(--text); }
.type-btn.active { background: var(--surface-2); color: var(--accent); border: 1px solid rgba(200,255,0,0.2); }

/* Review player — hide elements per project type */

/* Dailies: no compare, no approve/reject */
body[data-project-type="dailies"] #btn-compare,
body[data-project-type="dailies"] .compare-bar,
body[data-project-type="dailies"] #btn-approve { display: none !important; }

/* Deliverables: no frame step, no comments, no tech, no compare, no approve (has own CTA) */
body[data-project-type="deliverables"] #btn-frame-back,
body[data-project-type="deliverables"] #btn-frame-fwd,
body[data-project-type="deliverables"] #filter-tabs,
body[data-project-type="deliverables"] .export-btns,
body[data-project-type="deliverables"] #comment-bar,
body[data-project-type="deliverables"] #tech-toggle,
body[data-project-type="deliverables"] #btn-compare,
body[data-project-type="deliverables"] .compare-bar { display: none !important; }

/* ══════════════════════════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════════════════════════ */

body.page-login {
  overflow: auto;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrap {
  width: 360px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.login-brand {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.login-brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  width: 100%;
}

.login-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.login-error {
  font-size: 12px;
  color: var(--danger);
  background: rgba(255, 68, 68, 0.08);
  border: 1px solid rgba(255, 68, 68, 0.2);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.login-footer {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ── Sidebar footer (logout + docs link) ────────────────────────────── */

.nav-sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.sidebar-docs-link,
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 7px 16px;
  width: 100%;
  border-radius: 0;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
}

.sidebar-docs-link:hover { color: var(--text); background: var(--surface-2); }
.sidebar-logout-btn:hover { color: var(--danger); background: rgba(255, 68, 68, 0.06); }

.sidebar-docs-link svg,
.sidebar-logout-btn svg {
  flex-shrink: 0;
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════════════════════════
   SIDEBAR SHARE LINKS
══════════════════════════════════════════════════════════════════════ */

.share-link-row {
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.share-link-row:last-child { border-bottom: none; }

.share-link-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  margin-bottom: 2px;
}

.share-link-icon { flex-shrink: 0; font-size: 11px; }
.share-link-lock { font-size: 10px; flex-shrink: 0; }

.share-link-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.share-link-stats {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.share-link-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.share-link-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s;
}
.share-link-btn:hover { color: var(--text); border-color: var(--text-dim); }
.share-link-btn-del:hover { color: var(--danger); border-color: var(--danger); }

/* ══════════════════════════════════════════════════════════════════════
   DOCS PAGE
══════════════════════════════════════════════════════════════════════ */

body.page-docs {
  overflow: auto;
  height: auto;
  min-height: 100vh;
}

.docs-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  max-width: 1060px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  gap: 56px;
  align-items: start;
}

@media (max-width: 700px) {
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .docs-nav { display: none; }
}

.docs-nav {
  position: sticky;
  top: 40px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav-brand {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.docs-nav-brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.docs-nav-link {
  font-size: 12px;
  color: var(--text-dim);
  padding: 5px 10px;
  border-radius: var(--radius);
  border-left: 2px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}

.docs-nav-link:hover { color: var(--text); background: var(--surface); }
.docs-nav-link.active { color: var(--accent); border-left-color: var(--accent); background: none; }

.docs-header {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.docs-header-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 20px;
  transition: color 0.15s;
}

.docs-header-back:hover { color: var(--text); }

.docs-header h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.docs-header p {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 560px;
  line-height: 1.6;
}

.docs-section {
  margin-bottom: 60px;
  scroll-margin-top: 40px;
}

.docs-section h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.docs-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.docs-section p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 12px;
  max-width: 660px;
}

.docs-value-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.docs-value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}

.docs-value-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.docs-value-card-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

.docs-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.docs-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.docs-step-num {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  width: 26px;
  line-height: 1.2;
}

.docs-step-body h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.docs-step-body p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 16px 0;
  max-width: 680px;
}

.docs-table th {
  text-align: left;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-size: 10px;
}

.docs-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--surface-2);
  color: var(--text-dim);
  vertical-align: top;
}

.docs-table tr:hover td { background: var(--surface); }

.docs-table td:first-child { color: var(--text); white-space: nowrap; }

kbd {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 2px 6px;
  color: var(--text);
  white-space: nowrap;
}

.docs-diagram {
  margin: 24px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

/* ── Docs player preview (Review Player section) ─────────────────── */
.docs-player-preview {
  margin: 24px 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.preview-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
}
.preview-dot:first-child { background: #ff5f57; }
.preview-dot:nth-child(2) { background: #febc2e; }
.preview-dot:nth-child(3) { background: #28c840; }
.preview-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  height: 380px;
}
.preview-player {
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-play-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.preview-play-icon svg { width: 20px; height: 20px; fill: var(--text); }
.preview-scrubber {
  position: absolute;
  bottom: 52px;
  left: 16px; right: 16px;
}
.preview-scrubber-track {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  position: relative;
}
.preview-scrubber-fill {
  height: 100%;
  width: 38%;
  background: var(--text);
  border-radius: 2px;
}
.preview-scrubber-dot {
  position: absolute;
  top: 50%;
  left: 38%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text);
}
.preview-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.preview-timecodes {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}
.preview-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.preview-ctrl {
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.preview-ctrl svg { width: 11px; height: 11px; fill: none; stroke: var(--text-dim); stroke-width: 2; }
.preview-tech-btn {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
}
.preview-sidebar {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.preview-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.preview-sidebar-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}
.preview-filter-tabs { display: flex; gap: 0; }
.preview-filter-tab {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 3px;
  color: var(--text-dim);
}
.preview-filter-tab.active {
  background: var(--surface-3);
  color: var(--text);
}
.preview-comment {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.preview-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.preview-tc {
  font-family: var(--mono);
  font-size: 9px;
  background: rgba(200,255,0,0.1);
  color: var(--accent);
  padding: 2px 5px;
  border-radius: 3px;
}
.preview-author {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}
.preview-comment-text {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}
.preview-comment.resolved { opacity: 0.4; }
.preview-resolved-badge {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--approved);
  margin-top: 4px;
}

.docs-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 16px 0;
  max-width: 660px;
}

.docs-note p {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.docs-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}
