/* app.css — Ant Design v5's published design tokens, applied by hand.
   No React and no build step: the panel is five screens, and a bundler would cost more than it returns.
   Values below are antd's own (primary #1677ff, 6px radius, 32px controls, its elevation ramp) so the panel
   sits beside a real antd app without looking like an imitation. */
:root {
  --blue: #1677ff; --blue-hover: #4096ff; --blue-active: #0958d9; --blue-bg: #e6f4ff; --blue-border: #91caff;
  --green: #52c41a; --green-bg: #f6ffed; --green-border: #b7eb8f;
  --gold: #faad14;  --gold-bg: #fffbe6;  --gold-border: #ffe58f;
  --red: #ff4d4f;   --red-bg: #fff2f0;   --red-border: #ffccc7;
  --ink: rgba(0, 0, 0, .88); --ink-2: rgba(0, 0, 0, .65); --ink-3: rgba(0, 0, 0, .45); --ink-4: rgba(0, 0, 0, .25);
  --border: #d9d9d9; --split: rgba(5, 5, 5, .06); --layout: #f5f5f5; --fill-alt: #fafafa;
  --r: 6px; --r-lg: 8px; --r-sm: 4px;
  --shadow: 0 1px 2px 0 rgba(0,0,0,.03), 0 1px 6px -1px rgba(0,0,0,.02), 0 2px 4px 0 rgba(0,0,0,.02);
  --shadow-up: 0 6px 16px 0 rgba(0,0,0,.08), 0 3px 6px -4px rgba(0,0,0,.12), 0 9px 28px 8px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 14px; line-height: 1.5714; color: var(--ink); background: var(--layout);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); }

/* ---- controls ---- */
.inp, .btn { height: 32px; border-radius: var(--r); font-size: 14px; font-family: inherit; transition: all .2s; }
.inp {
  width: 100%; padding: 4px 11px; border: 1px solid var(--border); background: #fff; color: var(--ink);
}
.inp:hover { border-color: var(--blue-hover); }
.inp:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(5, 145, 255, .1); }
.inp.lg { height: 40px; padding: 7px 11px; }
.inp[disabled] { background: rgba(0,0,0,.04); color: var(--ink-4); cursor: not-allowed; }

.btn {
  padding: 0 15px; border: 1px solid var(--border); background: #fff; color: var(--ink);
  cursor: pointer; white-space: nowrap; box-shadow: 0 2px 0 rgba(0,0,0,.02);
}
.btn:hover { color: var(--blue-hover); border-color: var(--blue-hover); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 2px 0 rgba(5,145,255,.1); }
.btn.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.btn.primary:active { background: var(--blue-active); }
.btn.danger { color: var(--red); border-color: var(--red-border); }
.btn.danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.text { border-color: transparent; box-shadow: none; background: transparent; }
.btn.text:hover { background: rgba(0,0,0,.04); color: var(--ink); }
.btn.lg { height: 40px; padding: 0 19px; font-size: 16px; }
.btn.sm { height: 24px; padding: 0 7px; font-size: 12px; }
.btn[disabled] { cursor: not-allowed; color: var(--ink-4); border-color: var(--border); background: rgba(0,0,0,.04); box-shadow: none; }
.btn[disabled]:hover { color: var(--ink-4); border-color: var(--border); background: rgba(0,0,0,.04); }

/* ---- card ---- */
.card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 16px; }
.card > .head {
  padding: 16px 24px; border-bottom: 1px solid var(--split); font-weight: 600; font-size: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card > .body { padding: 24px; }
.card > .body.tight { padding: 0; }

/* ---- alert ---- */
.alert { display: flex; gap: 8px; padding: 8px 12px; border-radius: var(--r); margin-bottom: 16px; align-items: flex-start; font-size: 14px; }
.alert .t { font-weight: 600; }
.alert.info    { background: var(--blue-bg);  border: 1px solid var(--blue-border); }
.alert.success { background: var(--green-bg); border: 1px solid var(--green-border); }
.alert.warning { background: var(--gold-bg);  border: 1px solid var(--gold-border); }
.alert.error   { background: var(--red-bg);   border: 1px solid var(--red-border); }
.alert .ico { flex: none; line-height: 22px; }
.alert .msg { flex: 1; }
.alert .msg .sub { color: var(--ink-2); font-size: 13px; margin-top: 2px; }

/* ---- tag ---- */
.tag {
  display: inline-block; padding: 0 8px; font-size: 12px; line-height: 20px; border-radius: var(--r-sm);
  border: 1px solid transparent; white-space: nowrap;
}
.tag.blue  { color: var(--blue);  background: var(--blue-bg);  border-color: var(--blue-border); }
.tag.green { color: #389e0d;      background: var(--green-bg); border-color: var(--green-border); }
.tag.gold  { color: #d48806;      background: var(--gold-bg);  border-color: var(--gold-border); }
.tag.red   { color: #cf1322;      background: var(--red-bg);   border-color: var(--red-border); }
.tag.grey  { color: var(--ink-2); background: var(--fill-alt);  border-color: var(--border); }

/* ---- table ---- */
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th {
  text-align: left; padding: 12px 16px; background: var(--fill-alt); color: var(--ink);
  font-weight: 600; border-bottom: 1px solid var(--split); white-space: nowrap;
}
.tbl th:first-child { border-top-left-radius: var(--r-lg); }
.tbl th:last-child  { border-top-right-radius: var(--r-lg); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--split); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--fill-alt); }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* ---- empty ---- */
.empty { padding: 48px 24px; text-align: center; color: var(--ink-3); }
.empty .big { font-size: 40px; opacity: .35; margin-bottom: 8px; }

/* ---- layout ---- */
.hdr {
  height: 64px; background: #fff; box-shadow: var(--shadow); display: flex; align-items: center;
  padding: 0 24px; gap: 16px; position: sticky; top: 0; z-index: 10;
}
.hdr .brand { font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.hdr .brand span { color: var(--ink-3); font-weight: 400; font-size: 14px; margin-left: 6px; }
.hdr .grow { flex: 1; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px; }

/* ---- descriptions ---- */
.desc { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; }
.desc dt { color: var(--ink-2); }
.desc dd { margin: 0; color: var(--ink); }

/* ---- transcript ---- */
.tx { max-height: 60vh; overflow: auto; }
.tx .line { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 6px 0; }
.tx .line + .line { border-top: 1px solid var(--split); }
.tx .at { color: var(--blue); cursor: pointer; font-variant-numeric: tabular-nums; font-size: 13px; }
.tx .who { font-weight: 600; margin-right: 6px; }
.tx .who.none { color: var(--ink-4); font-weight: 400; }
video { width: 100%; border-radius: var(--r); background: #000; display: block; }

/* ---- login ---- */
.mid { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 400px; }
.login .logo { text-align: center; margin-bottom: 24px; }
.login .logo .n { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.login .logo .s { color: var(--ink-3); margin-top: 4px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 8px; color: var(--ink); }
.row { display: flex; gap: 8px; align-items: center; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--blue-border); border-top-color: var(--blue); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---- synced playback ----
   The player stays put while the transcript scrolls under it, and the line being spoken is highlighted as the
   recording plays — the same idea as synced lyrics. Both directions work: clicking a timestamp seeks the
   video, and the video moves the highlight. */
.player { position: sticky; top: 80px; z-index: 5; }
.tx .line { border-left: 3px solid transparent; padding-left: 9px; margin-left: -12px; border-radius: var(--r-sm); transition: background .15s ease; }
.tx .line.on { background: var(--blue-bg); border-left-color: var(--blue); }
.tx .line.on .who { color: var(--blue-active); }
.tx .at { user-select: none; }
.tx .at:hover { text-decoration: underline; }
.follow { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
