:root {
  --bg: #0f1115;
  --panel: #161a23;
  --text: #e6e9ef;
  --muted: #8b93a7;
  --accent: #4f8cff;
  --rendered: #6b7280;
  --abgenommen: #f59e0b;
  --fertig: #10b981;
  --rejected: #ef4444;
  --missing: #2a2f3a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #20242f;
  background: var(--panel);
}
header h1 { margin: 0 0 .15em; font-size: 1.25rem; font-weight: 600; }
header .muted { color: var(--muted); font-size: .85rem; margin: 0; }
.back { color: var(--accent); text-decoration: none; font-size: .9rem; }
.back:hover { text-decoration: underline; }

main { padding: 1rem 1.25rem; max-width: 1100px; margin: 0 auto; }
.empty { color: var(--muted); }

/* Grid */
table.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.grid th, table.grid td {
  padding: .35rem .4rem;
  text-align: center;
  border-bottom: 1px solid #20242f;
}
table.grid thead th {
  font-weight: 500;
  color: var(--muted);
  font-size: .8rem;
  white-space: nowrap;
}
table.grid .orient-row th { font-size: .65rem; padding-top: 0; }
table.grid td.ei {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.cell { padding: .25rem !important; }
.status {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: .35rem .25rem; border-radius: 4px;
  text-decoration: none; color: var(--text);
  min-width: 64px;
  font-size: .7rem;
  background: var(--rendered);
}
.status .badge { font-weight: 500; }
.status .cmt { font-size: .65rem; opacity: .8; }
.status:hover { filter: brightness(1.15); }

.status-rendered { background: var(--rendered); }
.status-abgenommen-thomas { background: var(--abgenommen); color: #1a1a1a; }
.status-video-fertig { background: var(--fertig); color: #1a1a1a; }
.status-rejected { background: var(--rejected); }
.status-missing { background: var(--missing); color: var(--muted); }

/* QA Audio column */
table.grid th.qa-col { white-space: nowrap; }
.qa-cell { padding: .25rem .35rem !important; }
.qa-link {
  display: inline-block;
  padding: .25rem .5rem;
  margin: 0 .15rem;
  border-radius: 4px;
  background: #2d3a5a;
  color: var(--text);
  text-decoration: none;
  font-size: .7rem;
  font-weight: 500;
  white-space: nowrap;
}
.qa-link:hover { filter: brightness(1.2); background: #3a4a6e; }

/* Video page */
.video-page main { max-width: 900px; }
video {
  width: 100%;
  max-height: 70vh;
  background: #000;
  border-radius: 6px;
}

/* +5s / -5s skip buttons under the player */
.skip-bar {
  margin: .6rem 0 0;
  display: flex;
  gap: .5rem;
}
.skip-btn {
  background: transparent; border: 1px solid #2a3040; color: var(--text);
  padding: .5rem 1.1rem; border-radius: 4px; cursor: pointer;
  font-size: .95rem; font-variant-numeric: tabular-nums;
}
.skip-btn:hover { background: var(--panel); }
.skip-btn:active { background: #2c3346; }

.status-bar {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.status-btn {
  padding: .45rem .8rem;
  border: 1px solid #2a3040;
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font-size: .85rem;
  cursor: pointer;
}
.status-btn.active {
  border-color: var(--accent);
  outline: 2px solid rgba(79, 140, 255, 0.3);
}
.status-btn.status-rendered.active { background: var(--rendered); }
.status-btn.status-abgenommen-thomas.active { background: var(--abgenommen); color: #1a1a1a; }
.status-btn.status-video-fertig.active { background: var(--fertig); color: #1a1a1a; }
.status-btn.status-rejected.active { background: var(--rejected); }

/* Comments */
.comments h2 { font-size: 1rem; margin: 1.5rem 0 .75rem; }
#comment-form { background: var(--panel); padding: .75rem; border-radius: 6px; margin-bottom: 1rem; }
#comment-form .row { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
#comment-form label { color: var(--muted); display: inline-flex; align-items: center; gap: .25rem; }
#comment-form input[type="text"] {
  background: #0f1117; border: 1px solid #2a3040; color: var(--text);
  padding: .35rem .5rem; border-radius: 4px; width: 6rem;
}
#comment-form textarea {
  width: 100%;
  background: #0f1117; border: 1px solid #2a3040; color: var(--text);
  padding: .5rem; border-radius: 4px; font-family: inherit; font-size: 1rem;
  resize: vertical;
}
#comment-form button[type="submit"] {
  margin-top: .5rem;
  background: var(--accent); color: #fff; border: none;
  padding: .55rem 1rem; border-radius: 4px; cursor: pointer; font-size: .9rem;
}
#comment-form button.ghost {
  background: transparent; border: 1px solid #2a3040; color: var(--muted);
  padding: .35rem .65rem; border-radius: 4px; cursor: pointer; font-size: .8rem;
}

.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li {
  padding: .55rem .25rem;
  border-bottom: 1px solid #20242f;
  display: flex; gap: .65rem; align-items: baseline; flex-wrap: wrap;
}
.comment-list li.empty { border-bottom: none; color: var(--muted); }
.ts {
  color: var(--accent); font-variant-numeric: tabular-nums;
  font-size: .85rem; text-decoration: none;
}
.ts:hover { text-decoration: underline; }
.body { flex: 1; min-width: 0; }
time.muted { font-size: .7rem; color: var(--muted); }

/* Mobile */
@media (max-width: 600px) {
  table.grid { font-size: .8rem; }
  .status { min-width: 48px; }
  header h1 { font-size: 1.1rem; }
  main { padding: .75rem; }
}
