/* 数字人工作台 · 样式(深色为主,可切浅色) */
:root {
  --bg: #070a12; --bg2: #0d1220; --panel: #111828; --panel2: #161f33;
  --line: #24314c; --line2: #1a2337;
  --fg: #e8edf7; --fg2: #a3b0c9; --fg3: #6b7994;
  --brand: #6366f1; --brand2: #22d3ee; --brand-soft: rgba(99,102,241,.14);
  --ok: #34d399; --warn: #fbbf24; --err: #f87171; --run: #60a5fa;
  --radius: 14px; --shadow: 0 18px 48px rgba(0,0,0,.45);
}
html[data-theme="light"] {
  --bg: #f4f6fb; --bg2: #eef1f8; --panel: #ffffff; --panel2: #f7f9fd;
  --line: #dde3ee; --line2: #e8ecf4;
  --fg: #131a29; --fg2: #4f5a70; --fg3: #8894aa;
  --brand-soft: rgba(99,102,241,.1);
  --shadow: 0 14px 34px rgba(20,30,60,.1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* .pill / .jobs-pop 有 display,得压过去 */
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: .01em; }
input, textarea, select, button { font: inherit; color: inherit; }
::selection { background: rgba(99,102,241,.35); }

/* ---------------------------------------------------------------- 布局 --- */
.app { display: grid; grid-template-columns: 234px 1fr; min-height: 100vh; }
.side {
  background: var(--bg2); border-right: 1px solid var(--line2);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-size: 18px;
}
.brand-name { font-weight: 700; font-size: 15px; }
.brand-sub { color: var(--fg3); font-size: 11.5px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-i {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  color: var(--fg2); font-size: 13.5px;
}
.nav-i .ic { width: 18px; text-align: center; opacity: .8; }
.nav-i:hover { background: var(--panel); color: var(--fg); }
.nav-i.on { background: var(--brand-soft); color: var(--fg); box-shadow: inset 0 0 0 1px rgba(99,102,241,.3); }
.nav-n {
  margin-left: auto; font-style: normal; font-size: 11px; color: var(--fg3);
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 20px; padding: 0 7px;
}
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.prov {
  font-size: 11.5px; color: var(--fg2); background: var(--panel); border: 1px solid var(--line2);
  border-radius: 10px; padding: 8px 10px; line-height: 1.5;
}
.side-note { font-size: 10.5px; color: var(--fg3); }
.side-note .nm { font-size: 12.5px; color: var(--fg); font-weight: 600; margin-bottom: 3px; }
.side-note .acts { display: flex; gap: 8px; font-size: 10.5px; }
.side-note .acts a { color: var(--fg3); cursor: pointer; }
.side-note .acts a:hover { color: var(--brand); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 16px 26px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line2);
}
.top-title h1 { font-size: 17px; }
.top-title p { margin: 2px 0 0; color: var(--fg3); font-size: 12.5px; }
.top-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
main#view { padding: 22px 26px 60px; }

/* ------------------------------------------------------------- 通用件 --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--fg); cursor: pointer; font-size: 13.5px;
  transition: .15s border-color, .15s background, .15s transform;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--brand), #4f46e5); border-color: transparent; color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--err) 12%, transparent); border-color: var(--err); }
.btn.block { width: 100%; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line); }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { border-color: var(--brand); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--run) 45%, transparent);
  background: color-mix(in srgb, var(--run) 14%, transparent); color: var(--fg);
  font-size: 12.5px; cursor: pointer;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--run); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.card { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); }
.card.pad { padding: 18px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line2); }
.card-h h3 { font-size: 14px; }
.card-h .sub { color: var(--fg3); font-size: 12px; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 16px 18px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 20px;
  font-size: 11.5px; border: 1px solid transparent; white-space: nowrap;
}
.badge.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge.run { color: var(--run); background: color-mix(in srgb, var(--run) 13%, transparent); border-color: color-mix(in srgb, var(--run) 30%, transparent); }
.badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge.err { color: var(--err); background: color-mix(in srgb, var(--err) 13%, transparent); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.badge.mute { color: var(--fg3); background: var(--panel2); border-color: var(--line2); }

.bar { height: 5px; border-radius: 20px; background: var(--panel2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--brand), var(--brand2)); transition: width .5s; }
.muted { color: var(--fg3); }
.dim { color: var(--fg2); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.spacer { flex: 1; }
.empty { text-align: center; color: var(--fg3); padding: 34px 18px; font-size: 13px; }

label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; color: var(--fg2); margin-bottom: 6px; }
input[type=text], input[type=password], textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); outline: none;
}
input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 150px; line-height: 1.8; }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button {
  border: none; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  color: var(--fg2); font-size: 13px;
}
.seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .tr { width: 38px; height: 21px; border-radius: 20px; background: var(--panel2); border: 1px solid var(--line); position: relative; transition: .18s; }
.switch .tr::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--fg3); transition: .18s; }
.switch input:checked + .tr { background: var(--brand-soft); border-color: var(--brand); }
.switch input:checked + .tr::after { left: 19px; background: var(--brand); }

html[data-theme="light"] .step-card .no { color: #4338ca; }
html[data-theme="light"] .preview-box { background-color: #e6eaf3; }

/* ------------------------------------------------------------ 工作台 --- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { color: var(--fg3); font-size: 12px; }
.stat .v { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.stat .v small { font-size: 12px; font-weight: 400; color: var(--fg3); margin-left: 5px; letter-spacing: 0; }
.grid2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .grid2 { grid-template-columns: 1fr; } }

.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .steps3 { grid-template-columns: 1fr; } }
.step-card { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); padding: 18px; }
.step-card .no { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--brand-soft); color: #a5b4fc; }
.step-card h4 { margin: 10px 0 6px; font-size: 14.5px; }
.step-card p { margin: 0 0 14px; color: var(--fg2); font-size: 12.5px; }

.tasks { display: flex; flex-direction: column; }
.task { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 18px; border-bottom: 1px solid var(--line2); }
.task:last-child { border-bottom: none; }
.task .t { font-size: 13.5px; }
.task .s { color: var(--fg3); font-size: 12px; }
.task .bar { grid-column: 1 / -1; }
.task .pc { font-variant-numeric: tabular-nums; color: var(--fg2); font-size: 12.5px; }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.vcard { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; cursor: pointer; }
.vcard:hover { border-color: var(--brand); }
.vcard .th { aspect-ratio: 16/9; background: var(--panel2) center/cover no-repeat; display: grid; place-items: center; color: var(--fg3); font-size: 12px; }
.vcard .m { padding: 10px 12px; }
.vcard .m .t { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard .m .s { color: var(--fg3); font-size: 11.5px; margin-top: 3px; }

/* ------------------------------------------------------------ 新建视频 --- */
.cstat {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 10px 16px; background: var(--panel); border: 1px solid var(--line2);
  border-radius: 11px; font-size: 12.5px; color: var(--fg2);
}
.cstat b { color: var(--fg); font-size: 14px; }
.cstat b.run-t { color: var(--run); }
.cstat .muted { margin-left: 4px; }
.cstat .lnk { color: var(--fg3); }
.cstat .lnk:hover { color: var(--brand); }
.cstat.intro { gap: 14px; border-color: color-mix(in srgb, var(--brand) 34%, transparent); background: var(--brand-soft); }
.cstat.intro span:not(.spacer) { color: var(--fg2); }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 18px; align-items: start; }
@media (max-width: 1180px) { .composer { grid-template-columns: 1fr; } }
.stepbox { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); margin-bottom: 14px; }
.stepbox > header { display: flex; align-items: center; gap: 11px; padding: 14px 18px; border-bottom: 1px solid var(--line2); }
.stepbox > header .no {
  width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; background: var(--panel2); color: var(--fg3); border: 1px solid var(--line);
}
.stepbox.done > header .no { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 34%, transparent); }
.stepbox > header h3 { font-size: 14px; }
.stepbox > header .hint { color: var(--fg3); font-size: 12px; }
.stepbox > header .right { margin-left: auto; }
.stepbox > .body { padding: 16px 18px; }

.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 10px; }
.pick {
  position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--panel2); cursor: pointer; text-align: left; padding: 0;
}
.pick:hover { border-color: var(--brand); }
.pick.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.pick.off { opacity: .55; cursor: not-allowed; }
.pick .ph { aspect-ratio: 1; background: var(--panel) center/cover no-repeat; }
.pick .nm { padding: 7px 9px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .st { position: absolute; top: 6px; left: 6px; }
.pick .tick { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; display: none; place-items: center; font-size: 11px; }
.pick.on .tick { display: grid; }
.pick.add { display: grid; place-items: center; min-height: 100%; border-style: dashed; color: var(--fg2); font-size: 12.5px; }
.pick.add span { display: block; text-align: center; line-height: 1.7; }

.vlist { display: flex; flex-direction: column; gap: 8px; }
.vopt {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--panel2); cursor: pointer;
}
.vopt:hover { border-color: var(--brand); }
.vopt.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.vopt.off { opacity: .55; cursor: not-allowed; }
.vopt .rd { width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line); flex: none; display: grid; place-items: center; }
.vopt.on .rd { border-color: var(--brand); }
.vopt.on .rd::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.vopt .nm { font-size: 13.5px; }
.vopt .mt { color: var(--fg3); font-size: 11.5px; }
.vopt audio { height: 30px; max-width: 190px; }

.side-panel { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }
.preview-box {
  position: relative; width: 100%; background: #05070d center/cover no-repeat; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--line2); display: grid; place-items: center; color: var(--fg3); font-size: 12px;
}
.preview-box.r169 { aspect-ratio: 16/9; }
.preview-box.r916 { aspect-ratio: 9/16; max-height: 360px; margin: 0 auto; }
.preview-box.r11 { aspect-ratio: 1; max-height: 330px; margin: 0 auto; }
.preview-sub {
  position: absolute; left: 6%; right: 6%; bottom: 7%; text-align: center; font-size: 13px; line-height: 1.5;
  background: rgba(0,0,0,.62); color: #fff; padding: 5px 9px; border-radius: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
.preview-tag {
  position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 7px; border-radius: 6px;
  background: rgba(0,0,0,.55); color: #fff;
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: 12.5px; }
.kv dt { color: var(--fg3); white-space: nowrap; }
.kv dd { margin: 0; text-align: right; }
.est { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.est div { background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; }
.est .k { color: var(--fg3); font-size: 11.5px; }
.est .v { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.need { margin: 0; padding-left: 18px; color: var(--warn); font-size: 12px; line-height: 1.8; }
.draft-note { font-size: 11.5px; color: var(--fg3); text-align: center; }
.cues { max-height: 190px; overflow: auto; display: flex; flex-direction: column; gap: 5px; }
.cue { display: grid; grid-template-columns: 74px 1fr; gap: 9px; font-size: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line2); }
.cue .tt { color: var(--fg3); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- 素材库 --- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line2); margin-bottom: 16px; }
.tabs button { border: none; background: transparent; padding: 9px 14px; cursor: pointer; color: var(--fg3); font-size: 13.5px; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--brand); }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 13px; }
.acard { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.acard .ph { aspect-ratio: 4/3; background: var(--panel2) center/cover no-repeat; position: relative; }
.acard .ph .st { position: absolute; top: 8px; left: 8px; }
.acard .bd { padding: 11px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.acard .nm { font-size: 13.5px; font-weight: 600; }
.acard .nm[contenteditable="true"]:hover { background: var(--panel2); border-radius: 4px; }
.acard .nm[contenteditable="true"]:focus { outline: 1px dashed var(--brand); border-radius: 4px; background: var(--bg); }
.acard .mt { color: var(--fg3); font-size: 11.5px; line-height: 1.7; }
.acard .ft { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.acard .err { color: var(--err); font-size: 11.5px; }
.acard audio { width: 100%; height: 32px; }

/* -------------------------------------------------------------- 作品库 --- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line2); border-radius: var(--radius); background: var(--panel); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
table.tbl th, table.tbl td { padding: 8px 11px; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: middle; }
table.tbl th { color: var(--fg3); font-weight: 500; font-size: 11.5px; letter-spacing: .04em; background: var(--panel2); position: sticky; top: 0; }
table.tbl tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl td.acts { text-align: right; }
table.tbl td.acts .btn { margin-left: 4px; }
.thumb-mini { width: 60px; height: 34px; border-radius: 5px; background: var(--panel2) center/cover no-repeat; display: block; }
.title-cell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.filters { display: flex; gap: 9px; align-items: center; margin-bottom: 13px; flex-wrap: wrap; }
.filters input[type=text] { width: 220px; }
.filters select { width: auto; }
.scriptrow td { white-space: normal; color: var(--fg2); font-size: 12.5px; background: var(--panel2); line-height: 1.8; }

/* ------------------------------------------------------- 弹层 / 提示 --- */
.mask {
  position: fixed; inset: 0; z-index: 90; background: rgba(4,7,14,.66); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 22px; overflow: auto;
}
.modal {
  width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.modal.wide { max-width: 900px; }
.modal.narrow { max-width: 400px; }
.auth-brand { text-align: center; padding: 6px 0 2px; }
.auth-brand .mk { width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-size: 20px; }
.auth-brand h2 { font-size: 16px; }
.auth-brand p { margin: 5px 0 0; color: var(--fg3); font-size: 12px; line-height: 1.6; }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; }
.auth-links a { color: var(--fg3); cursor: pointer; }
.auth-links a:hover { color: var(--brand); }
.recovery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.recovery-grid code { display: block; text-align: center; padding: 9px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; font-size: 13.5px; letter-spacing: .02em; }
.mfa-qr { display: flex; justify-content: center; padding: 14px; background: #fff; border-radius: 10px; margin: 12px 0; }
.mfa-qr img { display: block; width: 180px; height: 180px; }
.modal > header { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line2); }
.modal > header h3 { font-size: 15px; }
.modal > header .x { margin-left: auto; }
.modal > .body { padding: 18px; max-height: min(66vh, 640px); overflow: auto; }
.modal > footer { display: flex; gap: 9px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line2); background: var(--panel2); }
.checklist { margin: 0 0 14px; padding: 12px 14px 12px 30px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 11px; color: var(--fg2); font-size: 12.5px; line-height: 1.9; }
.drop {
  border: 1.5px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer;
  color: var(--fg2); font-size: 13px; background: var(--panel2);
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop img { max-height: 190px; max-width: 100%; border-radius: 9px; }
.rec-big {
  width: 92px; height: 92px; border-radius: 50%; border: none; cursor: pointer; margin: 0 auto; display: grid;
  place-items: center; color: #fff; font-size: 13px; background: linear-gradient(135deg, var(--brand), #4f46e5);
}
.rec-big.on { background: linear-gradient(135deg, #ef4444, #b91c1c); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(239,68,68,.16); } }
.level { height: 8px; border-radius: 20px; background: var(--panel2); overflow: hidden; margin: 12px 0 6px; }
.level > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--warn)); transition: width .08s; }
.rec-time { text-align: center; font-size: 26px; font-variant-numeric: tabular-nums; font-weight: 650; }
.readtext { background: var(--panel2); border: 1px solid var(--line2); border-radius: 11px; padding: 12px 14px; color: var(--fg2); font-size: 12.5px; line-height: 1.9; }

.jobs-pop {
  position: absolute; right: 26px; top: 62px; width: 340px; z-index: 40; background: var(--panel);
  border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden;
}
.jobs-pop .hd { padding: 11px 14px; border-bottom: 1px solid var(--line2); font-size: 12.5px; color: var(--fg3); }

#toast-host { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 9px; align-items: flex-end; }
.toast {
  max-width: 380px; padding: 11px 14px; border-radius: 11px; background: var(--panel); color: var(--fg);
  border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; line-height: 1.6;
  animation: slidein .2s ease-out;
}
.toast.err { border-color: color-mix(in srgb, var(--err) 55%, transparent); }
.toast.ok { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } }

video.player { width: 100%; border-radius: 10px; background: #000; display: block; }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .side .nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot, .brand-sub { display: none; }
  .btn.block { width: auto; }
  main#view { padding: 16px; }
  .top { padding: 13px 16px; }
}
