:root {
  --bg: #0f1419;
  --panel: #1a2029;
  --panel2: #232b36;
  --line: #313a47;
  --text: #e6ebf1;
  --muted: #8b97a6;
  --accent: #4f9cf9;
  --ok: #35c46a;
  --warn: #e6a23c;
  --err: #f2585b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.hidden { display: none !important; }

.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; color: var(--accent); }
.tabs { display: flex; gap: 6px; flex: 1; }
.tabs a {
  color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 6px;
}
.tabs a.active, .tabs a:hover { color: var(--text); background: var(--panel2); }
.ds-picker select {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 10px; min-width: 220px;
}

main { padding: 18px clamp(16px, 2vw, 32px); max-width: 1800px; margin: 0 auto; }

h2 { margin: 4px 0 14px; }
h3 { margin: 18px 0 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }

.btn {
  background: var(--accent); color: #001; border: none; border-radius: 6px;
  padding: 8px 14px; font-weight: 600; cursor: pointer;
}
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.btn.ok { background: var(--ok); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input[type=text], textarea, select {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; font-family: inherit;
}
textarea { width: 100%; resize: vertical; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
tr:hover td { background: var(--panel2); }
td.clickable, a.link { color: var(--accent); cursor: pointer; text-decoration: none; }

.pill { padding: 2px 8px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.st-미처리 { background:#2a323d; color: var(--muted); }
.st-오디오추출됨, .st-전사됨, .st-화자분리됨 { background:#243a52; color:#8fc0f7; }
.st-검토중 { background:#4a3a1a; color: var(--warn); }
.st-검토완료 { background:#153a26; color: var(--ok); }
.st-실패 { background:#3d1c1e; color: var(--err); }

.progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 10px; }
.stat { background: var(--panel2); border-radius: 8px; padding: 12px; text-align: center; }
.stat .n { font-size: 22px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 12px; }

.bar { flex:1; height: 8px; background: var(--panel2); border-radius: 6px; overflow: hidden; }
.fill { height: 100%; width: 0; background: var(--accent); transition: width .3s; }

/* 상세 검토 */
.review-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.audio-panel { position: sticky; top: 70px; }
.seg-list { display: flex; flex-direction: column; gap: 6px; }
.seg {
  display: grid; grid-template-columns: 70px 92px 1fr; gap: 8px; align-items: start;
  padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
}
.seg.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.seg .time { color: var(--muted); font-size: 12px; cursor: pointer; }
.seg textarea { min-height: 40px; }
.seg .raw { color: var(--muted); font-size: 12px; margin-top: 4px; }
.seg-actions { display:flex; gap:4px; margin-top:4px; }
.spk-doctor { color:#8fc0f7; } .spk-patient { color:#f7c98f; } .spk-unknown { color: var(--muted); }

.jobbar {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: 12px; align-items: center;
  padding: 8px 18px; background: var(--panel); border-top: 1px solid var(--line);
}
.toast {
  position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px;
}
.toast.err { border-color: var(--err); color: var(--err); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, monospace; }

/* ─── 안내(guide) 페이지 ─────────────────────────────────── */
.guide { max-width: 960px; margin: 0 auto; }
.guide .g-mono { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.guide b { color: var(--text); font-weight: 700; }
.guide .g-muted { color: var(--muted); }

.g-hero { padding: 20px 0 30px; border-bottom: 1px solid var(--line); }
.g-eyebrow { font: 600 12px/1 ui-monospace, monospace; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.g-h1 { font-size: clamp(26px, 4.5vw, 40px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 800; }
.g-lede { font-size: 17px; color: var(--muted); max-width: 62ch; margin: 0; line-height: 1.6; }
.g-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.g-tag { font: 600 12px/1 ui-monospace, monospace; padding: 6px 11px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); }

.g-sec { padding: 38px 0; border-bottom: 1px solid var(--line); }
.g-k { font: 700 12px/1 ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.g-title { font-size: 23px; letter-spacing: -.015em; margin: 0 0 18px; font-weight: 750; }
.g-sec p { margin: 0 0 12px; line-height: 1.65; }

/* pipeline */
.g-pipe { display: flex; flex-wrap: wrap; align-items: stretch; }
.g-stage { flex: 1 1 128px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; }
.g-stage + .g-stage { margin-left: 10px; }
.g-stage .n { font: 700 11px/1 ui-monospace, monospace; color: var(--accent); letter-spacing: .1em; }
.g-stage .t { font-weight: 700; margin-top: 7px; font-size: 15px; }
.g-stage .d { color: var(--muted); font-size: 12px; margin-top: 3px; }
.g-arw { align-self: center; color: var(--muted); padding: 0 3px; }
@media (max-width: 720px) { .g-pipe { flex-direction: column; } .g-stage + .g-stage { margin-left: 0; margin-top: 10px; } .g-pipe .g-arw { transform: rotate(90deg); padding: 5px 0; } }

/* screen block */
.g-screen { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 760px) { .g-screen { grid-template-columns: 1fr; } }
.g-role { font: 600 11px/1 ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.g-core { background: var(--accent); color: #001; border-radius: 4px; padding: 1px 6px; font-size: 10px; margin-left: 4px; }
.g-h3 { font-size: 19px; margin: 0 0 2px; letter-spacing: -.01em; }
.g-feat { list-style: none; padding: 0; margin: 14px 0 0; }
.g-feat li { position: relative; padding-left: 18px; margin-bottom: 9px; font-size: 14px; line-height: 1.55; }
.g-feat li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }

/* mock */
.g-mock { background: #0f1419; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font: 12px/1.5 ui-monospace, monospace; }
.g-mbar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 11px; display: flex; align-items: center; gap: 7px; }
.g-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.g-mttl { color: var(--muted); font-size: 11px; margin-left: 4px; }
.g-mbody { padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.g-mrow { display: flex; align-items: center; gap: 8px; }
.g-mbtn { background: var(--accent); color: #001; border-radius: 5px; padding: 4px 9px; font-weight: 700; font-size: 11px; white-space: nowrap; }
.g-mbtn.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.g-minput { flex: 1; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-mstat { flex: 1; background: var(--panel2); border-radius: 7px; padding: 8px; text-align: center; }
.g-mstat .num { font-size: 17px; font-weight: 800; }
.g-mstat .lab { color: var(--muted); font-size: 10px; }
.g-mtrack { height: 7px; background: var(--panel2); border-radius: 5px; overflow: hidden; }
.g-mfill { height: 100%; background: var(--accent); }
.g-mtr { display: grid; grid-template-columns: 66px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--panel2); }
.g-pill { padding: 2px 8px; border-radius: 20px; font-size: 10px; white-space: nowrap; }
.g-pill.g-proc { background:#243a52; color:#8fc0f7; }
.g-pill.g-review { background:#4a3a1a; color:var(--warn); }
.g-pill.g-done { background:#153a26; color:var(--ok); }
.g-pill.g-new { background:#2a323d; color:var(--muted); }
.g-mbody .lab { color: var(--muted); font-size: 10px; }
.g-mbody .txt { background: var(--panel2); border-radius: 4px; padding: 5px 7px; line-height: 1.55; }
.g-seg { display: grid; grid-template-columns: 46px 58px 1fr; gap: 7px; border: 1px solid var(--line); border-radius: 7px; padding: 7px; }
.g-seg.act { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.g-seg .tm { color: var(--muted); font-size: 10px; }
.g-seg .raw { color: #5c6773; font-size: 10px; margin-top: 3px; }
.g-spk { color: #8fc0f7; font-size: 10px; }
.g-spk.pt { color: #f7c98f; }
.g-wave { display: flex; align-items: center; gap: 2px; height: 34px; }
.g-wave i { flex: 1; background: var(--accent); opacity: .5; border-radius: 1px; }

/* status flow */
.g-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.g-st { padding: 5px 12px; border-radius: 20px; font: 600 12px/1 ui-monospace, monospace; border: 1px solid transparent; }
.g-st.new { background: var(--panel2); color: var(--muted); }
.g-st.proc { background: #243a52; color: #8fc0f7; }
.g-st.review { border-color: var(--warn); color: var(--warn); }
.g-st.done { background: #153a26; color: var(--ok); }
.g-st.fail { background: #3d1c1e; color: var(--err); padding: 2px 9px; }

/* cards + code */
.g-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.g-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; }
.g-card .k { font: 600 11px/1 ui-monospace, monospace; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.g-card h4 { margin: 6px 0 5px; font-size: 15px; }
.g-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.g-code { background: #0d1218; color: #cdd6e0; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font: 13px/1.7 ui-monospace, monospace; margin: 0; }
.g-callout { display: flex; gap: 12px; background: #1c2c40; border: 1px solid #2c4568; border-radius: 12px; padding: 15px 16px; align-items: flex-start; margin-top: 18px; }
.g-callout .g-ic { font-size: 20px; }
.g-callout p { margin: 0; font-size: 13.5px; line-height: 1.55; }
.g-last { border-bottom: none; }

/* ─── 전역 처리현황 바 + 상세 패널 ───────────────────────── */
.statusbar {
  position: sticky; top: 49px; z-index: 9; cursor: pointer;
  background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 9px 18px;
}
.stbar-main { max-width: 1800px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.stbar-head { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.stbar-scope { font-weight: 700; }
.stbar-pct { color: var(--accent); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.stbar-frac { color: var(--muted); font-variant-numeric: tabular-nums; }
.stbar-toggle { margin-left: auto; color: var(--muted); font-size: 12px; }
.hb { font-size: 12px; padding: 2px 8px; border-radius: 20px; }
.hb.ok { color: var(--ok); }
.hb.warn { color: var(--warn); background: #4a3a1a; }
.stbar-track { height: 6px; background: var(--panel2); border-radius: 6px; overflow: hidden; }
.stbar-fill { height: 100%; background: var(--accent); transition: width .4s; }
.stbar-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.stbar-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.stbar-eta { color: var(--muted); font-variant-numeric: tabular-nums; }
.stbar-upd { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.stchip { padding: 2px 8px; border-radius: 20px; font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-new { background: #2a323d; color: var(--muted); }
.c-proc { background: #243a52; color: #8fc0f7; }
.c-review { background: #4a3a1a; color: var(--warn); }
.c-done { background: #153a26; color: var(--ok); }
.c-fail { background: #3d1c1e; color: var(--err); }

.statuspanel { background: var(--panel2); border-bottom: 1px solid var(--line); padding: 16px 18px; }
.sp-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; }
@media (max-width: 800px) { .sp-grid { grid-template-columns: 1fr; } }
.sp-h { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sp-col > .sp-h:not(:first-child) { margin-top: 18px; }

.funnel { display: flex; align-items: flex-end; gap: 4px; }
.fn-stage { flex: 1; }
.fn-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.fn-lab { font-size: 11px; color: var(--muted); }
.fn-n { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0 5px; border-radius: 5px; }
.fn-track { height: 6px; background: var(--panel); border-radius: 5px; overflow: hidden; }
.fn-fill { height: 100%; }
.fn-fill.c-new { background: #4a5566; } .fn-fill.c-proc { background: #4f9cf9; }
.fn-fill.c-review { background: var(--warn); } .fn-fill.c-done { background: var(--ok); }
.fn-arw { color: var(--line); align-self: center; padding-bottom: 6px; }
.fn-n.c-new,.fn-n.c-proc,.fn-n.c-review,.fn-n.c-done { background: transparent; }
.fn-n.c-proc { color: #8fc0f7; } .fn-n.c-review { color: var(--warn); } .fn-n.c-done { color: var(--ok); } .fn-n.c-new { color: var(--muted); }

.pds { margin-bottom: 10px; }
.pds-h { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.acts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.act { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.act.warn { color: var(--warn); }
.act-ic { width: 20px; height: 20px; flex: none; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
.act-go { margin-left: auto; font-size: 12px; white-space: nowrap; }

.rc { display: flex; flex-direction: column; gap: 3px; }
.rc-row { display: grid; grid-template-columns: 62px 74px 1fr auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; font-size: 12px; }
.rc-row:hover { background: var(--panel); }
.rc-t { color: var(--muted); }
.rc-c { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-note { font-size: 11.5px; margin-top: 12px; line-height: 1.5; }

/* 항목 목록 빠른 필터 + 대시보드 버튼 강조 */
.qf-row { align-items: center; }
.btn.emph { box-shadow: 0 0 0 2px var(--accent); }

/* ─── 상세 검토: 플레이어 상단 / 전사 하단 (전폭) ─────────── */
.detail-wrap { display: flex; flex-direction: column; gap: 14px; }
.audio-top {
  position: sticky; top: 106px; z-index: 5;
  margin-bottom: 0; padding: 12px 16px;
}
.audio-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.ac-item { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.ac-item select { padding: 4px 8px; }
#curTime { font-size: 15px; color: var(--text); }
.ac-hint { font-size: 12px; }

.seg-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.seg-list.wide { display: flex; flex-direction: column; gap: 8px; }

.seg2 {
  display: grid; grid-template-columns: minmax(210px, 240px) 96px 1fr; gap: 12px; align-items: start;
  padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
}
.seg2.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
@media (max-width: 720px) { .seg2 { grid-template-columns: 1fr; } }

.seg2-time { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tfield { display: flex; align-items: center; gap: 3px; }
.tset {
  background: var(--panel2); border: 1px solid var(--line); color: var(--accent);
  border-radius: 5px; padding: 3px 6px; cursor: pointer; font-size: 12px; line-height: 1;
}
.tset:hover { border-color: var(--accent); }
.tin {
  width: 66px; padding: 4px 6px; font-family: ui-monospace, monospace; font-size: 12px;
  font-variant-numeric: tabular-nums; text-align: center;
}
.tsep { color: var(--muted); }
.seg2-time .play { white-space: nowrap; }

.seg2-spk select { width: 100%; }
.seg2-text { display: flex; flex-direction: column; gap: 6px; }
.seg2-text .txt { min-height: 42px; font-size: 14px; }
.seg2-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.seg2-foot .raw { color: var(--muted); font-size: 12px; flex: 1; min-width: 0; }
.seg2-foot .seg-actions { display: flex; gap: 4px; }

/* 안내 화면 03 갱신(상세 검토 새 레이아웃 목업) */
.g-feat-2col { columns: 2; column-gap: 26px; }
.g-feat-2col li { break-inside: avoid; }
@media (max-width: 640px) { .g-feat-2col { columns: 1; } }
.g-mock-wide { margin-top: 18px; }
.g-mock-wide .g-mrow { flex-wrap: wrap; }
.g-seg2 { display: grid; grid-template-columns: minmax(190px,230px) 54px 1fr; gap: 9px; align-items: center; border: 1px solid #313a47; border-radius: 7px; padding: 8px; }
.g-seg2.act { border-color: #4f9cf9; box-shadow: 0 0 0 1px #4f9cf9; }
.g-seg2-t { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.g-tchip { background: #232b36; border: 1px solid #313a47; border-radius: 5px; padding: 3px 6px; font-family: ui-monospace, monospace; font-size: 10px; color: #8fc0f7; white-space: nowrap; }
.g-seg2-x .txt { background: #232b36; border-radius: 4px; padding: 5px 7px; line-height: 1.5; }
.g-seg2-x .raw { color: #5c6773; font-size: 10px; margin-top: 3px; }
@media (max-width: 640px) { .g-seg2 { grid-template-columns: 1fr; } }

/* ─── 데이터셋 개요 카드 ─────────────────────────────────── */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 10px; }
.ds-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; }
.ds-card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ds-h { display: flex; justify-content: space-between; align-items: baseline; }
.ds-sub { font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ds-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.ds-actions { display: flex; gap: 6px; }

/* ─── 폴더 브라우저 모달 ─────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; width: min(680px, 92vw); max-height: 80vh; overflow: auto; }
.br-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; }
.br-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; }
.br-row:hover { background: var(--panel2); }
.br-nav { background: none; border: none; color: var(--text); text-align: left; cursor: pointer; font-size: 14px; padding: 4px 0; }
.br-nav:hover { color: var(--accent); }

/* ─── 역할 소스 배지 ─────────────────────────────────────── */
.rbadge { font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-right: 5px; font-family: ui-monospace, monospace; }
.rb-diarization { background: #243a52; color: #8fc0f7; }
.rb-content-rule { background: #2a323d; color: var(--muted); }
.rb-content-llm { background: #153a26; color: var(--ok); }
.rb-manual { background: #4a3a1a; color: var(--warn); }

/* ─── 영상 행동 검토 (Phase 2) ───────────────────────────── */
/* 데스크톱은 항상 한 행 3열: 각 열은 남은 가로폭을 함께 나눈다.
   min-width를 두지 않아 창 폭이 줄어도 2열로 밀려나거나 겹치지 않는다. */
.action-review-grid {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.action-review-grid > .card { min-width: 0; width: 100%; margin-bottom: 0; }
.va-player-panel { padding: 12px 16px; }
.va-scroll-panel { max-height: 700px; overflow: auto; }
.va-summary-panel { width: 100%; margin-bottom: 0; }
/* 휴대기기에서만 한 열로 전환한다. */
@media (max-width: 760px) {
  .action-review-grid { grid-template-columns: 1fr; }
  .va-scroll-panel { max-height: none; }
}

#vaPlayer { display: block; background: #000; border-radius: 8px; }

.va-timeline { position: relative; height: 54px; margin-top: 10px; background: var(--panel2); border-radius: 8px; overflow: hidden; cursor: pointer; }
.va-tl-window { position: absolute; top: 0; bottom: 0; background: rgba(79,156,249,.12); border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.va-tl-band { position: absolute; top: 22px; height: 20px; border-radius: 4px; min-width: 3px; opacity: .9; cursor: pointer; }
.va-tl-band:hover { outline: 2px solid #fff; }
.va-tl-band.v-pending, .va-tl-band.v-orphaned { background: var(--warn); }
.va-tl-band.v-approved, .va-tl-band.v-edited { background: var(--ok); }
.va-tl-band.v-rejected { background: var(--muted); opacity: .4; }
.va-tl-cursor { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; pointer-events: none; }
.va-tl-label { position: absolute; top: 2px; left: 6px; font-size: 10px; color: var(--muted); pointer-events: none; }
.va-tl-band:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.va-loop.active { background: var(--accent); color: #fff; border-color: var(--accent); }
#vaLoopStatus:not(:empty) { color: var(--accent); }

.va-media-error { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #3d1c1e; color: var(--err); font-size: 13px; }
.va-thumb-error { height: 48px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--err); color: var(--err); background: #3d1c1e; font-size: 11px; cursor: pointer; }

.va-strip { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.va-strip img { height: 56px; border-radius: 4px; border: 1px solid var(--line); cursor: pointer; flex: none; }
.va-strip img:hover { border-color: var(--accent); }

.va-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; background: var(--panel); }
.va-card-head { display: flex; align-items: center; gap: 8px; }
.va-badge { font-size: 10px; padding: 1px 6px; border-radius: 4px; font-family: ui-monospace, monospace; background: var(--panel2); color: var(--muted); }
.va-badge-manual { background: #4a3a1a; color: var(--warn); }
.va-verdict { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.va-verdict-pending { background: #2a323d; color: var(--muted); }
.va-verdict-approved { background: #153a26; color: var(--ok); }
.va-verdict-edited { background: #153a26; color: var(--ok); }
.va-verdict-rejected { background: #3d1c1e; color: var(--err); }
.va-verdict-orphaned { background: #4a3a1a; color: var(--warn); }
.va-card.va-card-rejected { opacity: .55; }
.va-card-rejected .va-label, .va-card-rejected .va-desc { text-decoration: line-through; }
.va-card .va-label { width: 100%; margin-bottom: 4px; }
.va-card .va-desc { width: 100%; min-height: 40px; margin-top: 6px; }
.va-card .va-note { width: 100%; min-height: 30px; margin-top: 6px; font-size: 12px; }
.va-evidence { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.va-evidence .va-thumb { height: 48px; border-radius: 4px; border: 1px solid var(--line); cursor: pointer; }
.va-card-actions { margin-top: 8px; }
.va-matched-note { font-size: 11px; color: var(--muted); margin-top: 4px; }

.va-match-row { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.va-match-row:last-child { border-bottom: none; }
.va-match-row .t { font-family: ui-monospace, monospace; color: var(--muted); font-size: 11px; cursor: pointer; }
.va-match-row .txt { margin: 3px 0; cursor: pointer; }
.va-match-row .t:focus-visible, .va-match-row .txt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.va-match-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.va-noaction { display: inline-flex; align-items: center; gap: 5px; color: var(--warn); font-size: 12px; }
.va-noaction .btn { padding: 2px 8px; font-size: 11px; }

.va-media-modal { max-width: 90vw; max-height: 85vh; }
.va-media-modal img, .va-media-modal video { max-width: 100%; max-height: 75vh; display: block; border-radius: 6px; }

/* 전역 상태바의 영상 잡 칩 — 전사 큐(파란/초록 계열)와 구분되는 보라색(3-4) */
.va-job-chip { background: #2e2350; color: #c3b1ff; }


.va-scope-banner { padding:10px 12px; margin-bottom:10px; border-left:4px solid var(--accent,#2563eb); background:#eff6ff; }
.va-rubric-row.is-linked, .va-summary-row.is-linked { outline:3px solid #f59e0b; outline-offset:-3px; background:#fffbeb; }
.va-actions-table td { min-width:100px; }
.va-actions-table td:nth-child(4), .va-actions-table td:nth-child(7) { min-width:220px; }
.va-sticky-player { position:sticky; top:8px; z-index:4; max-height:520px; overflow:auto; }
.action-review-layout .audio-top,
.action-review-layout .va-sticky-player { position: static; top: auto; z-index: auto; max-height: none; overflow: visible; }
@media (max-width:800px) {
  .va-sticky-player { position:static; max-height:none; }
  .va-actions-table th:nth-child(7), .va-actions-table td:nth-child(7),
  .va-actions-table th:nth-child(8), .va-actions-table td:nth-child(8) { display:none; }
}

/* ─── 인증: 로그인 · 계정 활성화 ───────────────────────── */
.authview {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 28px; width: 100%; max-width: 380px;
}
.auth-card h1 { color: var(--accent); font-size: 18px; margin: 0 0 4px; }
.auth-card h2 { font-size: 15px; font-weight: 600; margin: 0 0 18px; color: var(--muted); }
.auth-card label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.auth-card input {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px;
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; font-size: 14px;
}
.auth-card input:focus { outline: none; border-color: var(--accent); }
.auth-err {
  background: rgba(242, 88, 91, .12); border: 1px solid var(--err); color: var(--err);
  border-radius: 6px; padding: 9px 11px; margin: 0 0 14px; font-size: 13px;
}
.btn.wide { width: 100%; justify-content: center; text-align: center; margin-top: 4px; }
.btn.primary { background: var(--accent); color: #fff; }
.small.muted, .muted.small { font-size: 12px; }
.auth-card .muted { margin-top: 14px; line-height: 1.5; }

/* ─── 상단바 사용자 영역 ───────────────────────────────── */
.userbox { display: flex; align-items: center; gap: 8px; }
.userbox .who { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.role-chip {
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 1px 8px; font-size: 11px;
}
.role-chip.admin { border-color: var(--accent); color: var(--accent); }

/* ─── 관리자 콘솔 ──────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
.tbl tr:last-child td { border-bottom: none; }
.tbl-scroll { overflow-x: auto; }
.tbl .nowrap { white-space: nowrap; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chk { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }

/* 초대 정보 — 한 번만 보이므로 눈에 띄게 둔다 */
.invite {
  margin-top: 14px; padding: 14px; border-radius: 8px;
  background: rgba(230, 162, 60, .10); border: 1px solid var(--warn);
}
.invite-row {
  display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap;
}
.invite-row span { color: var(--muted); font-size: 12px; min-width: 76px; }
.invite-row code {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 5px;
  padding: 3px 8px; font-size: 13px; word-break: break-all;
}
.invite #ivAll { margin-top: 12px; }

#logFilters input {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 9px; font-size: 13px;
}
#logFilters input[type="text"] { width: 140px; }

/* 안내 탭 카드의 제목 — 권한 설명 카드에서 사용 */
.g-card .t { font-weight: 700; margin-bottom: 6px; color: var(--text); }
