/* Dark, like the shorts' neon frame: one purple accent, amber for "waiting". */
:root {
  --bg: #121016; --bar: #17141c; --panel: #1c1922; --line: #2e2838; --line-soft: #26212e;
  --text: #f2eef8; --muted: #a9a1b8; --faint: #7f778d;
  --accent: #a879ff; --accent-strong: #7c4dff; --link: #c9a8ff;
  --warn: #f5b83d; --ok: #4ade80; --bad: #f0a3a3; --bad-line: #5a2d2d;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 Rubik, system-ui, sans-serif; }
a { color: var(--link); }
a:hover { color: #e3d2ff; }
h1, h2 { margin: 0; font-weight: 600; }
h1 { font-size: 26px; }
h2 { font-size: 22px; }
button { font: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 500; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.warn-text { color: var(--warn); }
.error-text { color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 14px 24px;
       background: var(--bar); border-bottom: 1px solid #2a2533; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
         font-weight: 700; font-size: 18px; }
.brand svg { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a, .nav .soon { padding: 10px 14px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.nav a[aria-current] { background: #2a2236; color: var(--text); font-weight: 500; }
.nav .soon { color: var(--faint); }
.nav small { font-size: 12px; border: 1px solid #3a3345; border-radius: 99px; padding: 1px 8px; margin-left: 4px; color: var(--muted); }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who form { margin: 0; }
.avatar { width: 32px; height: 32px; border-radius: 99px; background: #3b2d57; display: inline-flex;
          align-items: center; justify-content: center; font-weight: 600; }
.link { background: none; border: none; color: var(--link); cursor: pointer; padding: 10px 4px; }

/* layout */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; display: flex; flex-direction: column; gap: 28px; }
section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.empty { margin: 0; color: var(--muted); padding: 14px 16px; border: 1px dashed var(--line); border-radius: 14px; }
.two-col { display: flex; flex-wrap: wrap; gap: 28px; }
.two-col > section { flex: 1 1 400px; min-width: 0; }

.status-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
        border: 1px solid #3a3345; border-radius: 99px; padding: 4px 12px; }
.pill.warn { color: var(--warn); border-color: #5c4718; }
.pill .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--ok); }

/* run in progress */
.run { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.run-text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; min-width: 0; }
.run-bar { display: flex; flex-direction: column; gap: 8px; flex: 1 1 260px; }
.eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.run-title { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); transition: width .4s; }

/* waiting cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; gap: 14px; }
.thumb { position: relative; flex: 0 0 auto; width: 108px; height: 192px; border-radius: 10px; overflow: hidden;
         background: #0b0a0e; border: 2px solid var(--accent); }
.thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.len { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: 11px;
       padding: 2px 6px; border-radius: 4px; }
.card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 auto; }
.card-title { font-weight: 600; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
       border-radius: 10px; border: 1px solid #3a3345; background: transparent; color: var(--text);
       text-decoration: none; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; font-weight: 500; }
.btn.primary:hover { background: #6a3bf0; }
.btn.big { min-height: 48px; padding: 0 20px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: wait; }
.btn:focus-visible, a:focus-visible, input:focus-visible, .time:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* tables and lists */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--line); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
tr:last-child td { border-bottom: none; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: #2a2236; color: #d9d2e6; }
.list { padding: 2px 16px; }
.list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: none; }
.links { display: inline-flex; gap: 10px; }
.full { flex-basis: 100%; }
.failed { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border-color: var(--bad-line); }

/* review page */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #d9d2e6; text-decoration: none; }
.review-grid { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.player { flex: 0 1 380px; min-width: 280px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.player video, .no-video { width: 100%; max-width: 360px; aspect-ratio: 9 / 16; border-radius: 16px; background: #0b0a0e;
                           border: 3px solid var(--accent); }
.no-video { display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 20px; text-align: center; }
.details { flex: 999 1 480px; min-width: 0; gap: 18px; }
.details p { margin: 6px 0 0; }
.banner { margin: 0 !important; padding: 12px 16px; border-radius: 12px; background: #221d2b; border: 1px solid var(--line); }
.banner[data-kind="done"] { background: #1b2a20; border-color: #2f5a3b; color: #bdf0cc; }
.banner[data-kind="failed"] { background: #2a1b1b; border-color: var(--bad-line); color: #f6c6c6; }
.captions { padding: 0; }
.captions-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.captions-head h2 { font-size: 17px; }
.push { margin-left: auto; }
.pad { padding: 10px 16px 0; margin: 0 !important; }
.rows { list-style: none; margin: 0; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.rows li.active { background: #2a2236; }
.rows label { display: flex; }
.time { min-width: 64px; min-height: 44px; border-radius: 8px; border: 1px solid #3a3345; background: transparent;
        color: var(--link); font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
.rows input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid #3a3345;
              background: #15121a; color: var(--text); font: inherit; font-size: 16px; }
.rows input[readonly] { color: var(--muted); }

/* trim */
.trim { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; }
.trim-head { display: flex; align-items: center; gap: 10px; }
.trim-head h2 { font-size: 17px; }
.trim-editor { display: flex; flex-direction: column; gap: 10px; }
.trim-editor p { margin: 0; }
.trim-bar { position: relative; height: 8px; border-radius: 99px; background: var(--line); }
.trim-bar > div { position: absolute; top: 0; height: 100%; border-radius: 99px; background: var(--accent); }
.trim-row { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.trim-row input { width: 100%; min-height: 32px; accent-color: var(--accent); }
.trim-row output { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 6px; }
.rows li.cut { opacity: .45; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100% - 32px);
         margin: 0; padding: 12px 18px; border-radius: 12px; background: #2a2236; border: 1px solid var(--line); z-index: 10; }

/* sign in */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
              padding: 36px 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.login-card svg { color: var(--accent); }
.login-card h1 { font-size: 24px; }
.login-card p { margin: 0; }
.google { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; border-radius: 10px;
          background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; font-size: 16px; text-decoration: none; }
.google:hover { background: #f1f3f4; color: #1f1f1f; }
.alert { color: #f6c6c6; background: #2a1b1b; border: 1px solid var(--bad-line); border-radius: 10px; padding: 10px 12px; }

@media (max-width: 600px) {
  .top { padding: 12px 16px; }
  .email { display: none; }
  .page { padding: 18px 16px 56px; }
  .card { padding: 12px; }
  .thumb { width: 90px; height: 160px; }
  h1 { font-size: 22px; }
}
