/* 乾佰渡车站 · 控制台视觉。深色为默认，线路信号青作主色，发车牌琥珀只用于数字。 */
:root,:root[data-theme="dark"],:root:not([data-theme="light"]) {
  color-scheme:dark;
  --bg:#06090f; --panel:#0c121b; --panel-2:#111925; --line:#1d2937; --line-2:#2c3c50;
  --text:#e7eef6; --muted:#93a3b7; --faint:#71829a;
  --accent:#22e3c7; --accent-ink:#03140f; --accent-soft:#0b2a2a; --accent-soft-ink:#7ff5e3;
  --board:#ffb84d; --ok:#3ddc97; --warn:#ffb84d; --bad:#ff6b78; --input:#080d14; --code:#0a1019;
  --glow:0 0 0 1px rgba(34,227,199,.35),0 0 24px rgba(34,227,199,.18);
  --grid:rgba(120,170,200,.055);
}
:root[data-theme="light"] {
  color-scheme:light;
  --bg:#eef2f6; --panel:#fff; --panel-2:#f5f8fa; --line:#d9e1ea; --line-2:#c2cedb;
  --text:#0e1a28; --muted:#506073; --faint:#76859a;
  --accent:#007f72; --accent-ink:#fff; --accent-soft:#dff5f1; --accent-soft-ink:#005a51;
  --board:#a86400; --ok:#0f7d55; --warn:#9a6200; --bad:#c8313f; --input:#fff; --code:#f2f5f8;
  --glow:0 0 0 1px rgba(0,127,114,.3),0 6px 18px rgba(0,127,114,.14);
  --grid:rgba(30,70,100,.05);
}
:root { --mono:"Cascadia Mono","SF Mono",Consolas,"Liberation Mono",monospace; --side:236px; }

* { scrollbar-width:thin; scrollbar-color:var(--line-2) transparent; }
body { min-height:100vh; background-color:var(--bg); background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px); background-size:44px 44px; background-attachment:fixed; color:var(--text); font-family:"Microsoft YaHei UI","PingFang SC","Noto Sans SC",sans-serif; font-size:14px; line-height:1.65; }
a { color:var(--accent-soft-ink); text-underline-offset:3px; }
code,pre,textarea.mono { font-family:var(--mono); }
code { background:var(--code); border:1px solid var(--line); border-radius:4px; color:var(--accent-soft-ink); }
pre { position:relative; background:var(--code); border:1px solid var(--line); border-radius:6px; line-height:1.6; }
.help { color:var(--muted); font-size:13px; line-height:1.75; }

/* ---------- 顶栏 / 品牌 ---------- */
header { z-index:20; background:color-mix(in srgb,var(--panel) 92%,transparent); border-bottom:1px solid var(--line); backdrop-filter:blur(10px); }
.bar { max-width:none; min-height:64px; gap:18px; }
.brand { display:flex; align-items:center; gap:11px; font-size:16px; font-weight:700; letter-spacing:.04em; color:var(--text); }
.brand::before { content:"渡"; flex:none; display:grid; place-items:center; width:34px; height:34px; background:var(--accent); color:var(--accent-ink); font-size:17px; font-weight:800; clip-path:polygon(0 0,calc(100% - 9px) 0,100% 9px,100% 100%,9px 100%,0 calc(100% - 9px)); }
.brand small { display:none; }
.theme-switch { margin-left:auto; }
nav { gap:4px; align-items:center; }
nav button { display:flex; align-items:center; gap:10px; min-height:38px; padding:8px 12px; border:1px solid transparent; border-radius:6px; background:none; color:var(--muted); font-weight:500; }
nav button,.theme-switch { transition:none; }
nav button::before { content:""; flex:none; width:16px; height:16px; background:currentColor; -webkit-mask:var(--i) center/contain no-repeat; mask:var(--i) center/contain no-repeat; pointer-events:none; }
nav button:not(:disabled):hover { background:var(--panel-2); border-color:transparent; color:var(--text); }
nav button.on,nav button.on:not(:disabled):hover { background:var(--accent-soft); border-color:color-mix(in srgb,var(--accent) 35%,transparent); border-bottom-color:color-mix(in srgb,var(--accent) 35%,transparent); color:var(--accent-soft-ink); font-weight:600; }
nav button[data-tab="submit"] { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E"); }
nav button[data-tab="jobs"] { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M10 9l5 3-5 3z'/%3E%3C/svg%3E"); }
nav button[data-tab="account"],nav button[data-tab="users"] { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1-4 4-6 8-6s7 2 8 6'/%3E%3C/svg%3E"); }
nav button[data-tab="agent"],nav button[data-tab="agents"] { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='2.5'/%3E%3Ccircle cx='5' cy='19' r='2.5'/%3E%3Ccircle cx='19' cy='19' r='2.5'/%3E%3Cpath d='M12 8v4M12 12l-6 5M12 12l6 5'/%3E%3C/svg%3E"); }
nav button[data-tab="docs"] { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7l-5 5 5 5M16 7l5 5-5 5'/%3E%3C/svg%3E"); }
nav button[data-tab="home"] { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h12M11 6l6 6-6 6M21 4v16'/%3E%3C/svg%3E"); }
nav button[data-tab="cards"] { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='12' rx='2'/%3E%3Cpath d='M3 10h18M7 15h4'/%3E%3C/svg%3E"); }
nav button[data-tab="settings"] { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h2M10 17h10'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='8' cy='17' r='2'/%3E%3C/svg%3E"); }

.who,.right { gap:12px; color:var(--muted); }
.who span { font-size:13px; }
.who b { color:var(--text); }
#whoCredits { color:var(--board); font-family:var(--mono); font-size:15px; }

/* 工作页：宽屏用左侧导航 */
@media (min-width:1024px) {
  body:not(.is-auth):not(.console-auth):not(.docs-page) header { position:fixed; inset:0 auto 0 0; width:var(--side); padding:0; border-bottom:0; border-right:1px solid var(--line); overflow-y:auto; }
  body:not(.is-auth):not(.console-auth):not(.docs-page) .bar { flex-direction:column; flex-wrap:nowrap; align-items:stretch; height:100%; gap:0; padding:18px 14px; }
  body:not(.is-auth):not(.console-auth):not(.docs-page) .brand { padding:2px 4px 18px; margin-bottom:14px; border-bottom:1px solid var(--line); }
  body:not(.is-auth):not(.console-auth):not(.docs-page) nav { flex-direction:column; flex-wrap:nowrap; align-items:stretch; }
  body:not(.is-auth):not(.console-auth):not(.docs-page) nav button { width:100%; }
  body:not(.is-auth):not(.console-auth):not(.docs-page) .theme-switch { order:3; margin:auto 0 0; width:100%; }
  body:not(.is-auth):not(.console-auth):not(.docs-page) .who,
  body:not(.is-auth):not(.console-auth):not(.docs-page) .right { order:4; margin:10px 0 0; padding-top:12px; border-top:1px solid var(--line); flex-wrap:wrap; justify-content:space-between; white-space:normal; }
  body:not(.is-auth):not(.console-auth):not(.docs-page) main { max-width:none; margin:0 0 0 var(--side); padding:26px 30px 72px; }
}
main { max-width:1400px; gap:16px; }
main > * { min-width:0; }

/* ---------- 面板 ---------- */
section { position:relative; min-width:0; padding:22px 24px; background:var(--panel); border:1px solid var(--line); border-radius:8px; }
section::before,section::after { content:""; position:absolute; width:9px; height:9px; border:solid var(--accent); opacity:.7; pointer-events:none; }
section::before { top:-1px; left:-1px; border-width:1px 0 0 1px; border-top-left-radius:8px; }
section::after { right:-1px; bottom:-1px; border-width:0 1px 1px 0; border-bottom-right-radius:8px; }
section h2 { display:flex; align-items:center; gap:10px; margin-bottom:6px; font-size:16px; font-weight:700; letter-spacing:.02em; }
.step-no { display:inline-grid; place-items:center; min-width:30px; height:22px; padding:0 6px; border:1px solid color-mix(in srgb,var(--accent) 45%,transparent); border-radius:4px; background:var(--accent-soft); color:var(--accent-soft-ink); font:600 12px/1 var(--mono); }
#tab-submit > section:nth-of-type(1) { order:1; }
#tab-submit > section:nth-of-type(3) { order:2; }
#tab-submit > section:nth-of-type(4) { order:3; }
#tab-submit > .departure-board { order:4; }

/* ---------- 控件 ---------- */
button,input,select,textarea { border-radius:6px; }
button { min-height:36px; padding:7px 14px; background:var(--panel-2); border:1px solid var(--line-2); color:var(--text); font-weight:500; transition:border-color .15s,color .15s,background .15s,box-shadow .15s; }
button:not(:disabled):hover { border-color:var(--accent); color:var(--accent-soft-ink); }
button.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:700; }
button.primary:not(:disabled):hover { color:var(--accent-ink); box-shadow:var(--glow); }
button.small { min-height:28px; padding:3px 9px; }
button.link { min-height:0; background:none; border:0; color:var(--accent-soft-ink); }
button.link:not(:disabled):hover { color:var(--accent); }
.big { min-height:50px; font-size:16px; letter-spacing:.06em; }
button.primary.big:not(:disabled) { animation:readyPulse 2.4s ease-in-out infinite; }
@keyframes readyPulse { 50% { box-shadow:var(--glow); } }
input,select,textarea { min-height:38px; padding:8px 11px; background:var(--input); border:1px solid var(--line-2); color:var(--text); }
textarea { line-height:1.7; }
input::placeholder,textarea::placeholder { color:var(--faint); }
input:focus,select:focus,textarea:focus { border-color:var(--accent); outline:0; box-shadow:var(--glow); }
button:focus-visible,a:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
input[type="checkbox"] { min-height:0; accent-color:var(--accent); }
.row label { color:var(--muted); }
.notice { background:var(--accent-soft); color:var(--accent-soft-ink); border:1px solid color-mix(in srgb,var(--accent) 30%,transparent); border-radius:6px; padding:9px 14px; }
#toast { padding:10px 16px; border:1px solid var(--accent); border-radius:6px; background:var(--panel-2); color:var(--text); box-shadow:var(--glow); }
#toast.show { opacity:1; }

/* ---------- 选车 ---------- */
.cars { gap:12px; }
.car { position:relative; padding:18px 20px 18px 24px; min-height:0; background:var(--panel-2); border:1px solid var(--line-2); border-radius:6px; }
.car::before { content:""; position:absolute; left:0; top:12px; bottom:12px; width:3px; border-radius:0 3px 3px 0; background:var(--line-2); }
.car.on { background:var(--accent-soft); border-color:color-mix(in srgb,var(--accent) 55%,transparent); box-shadow:var(--glow); }
.car.on::before { background:var(--accent); }
.car .t { font-size:16px; font-weight:700; }
.car .d { margin-top:6px; line-height:1.75; color:var(--muted); }
section.car { padding:22px 24px; background:var(--panel); border-color:var(--line); }
section.car::before { position:absolute; top:-1px; left:-1px; bottom:auto; width:9px; height:9px; background:none; border-radius:8px 0 0 0; }
section.car h3 { font-size:18px; letter-spacing:.03em; }

/* ---------- 参考图 ---------- */
.dropzone { display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:22px; border:1px dashed var(--line-2); border-radius:6px; background:var(--code); cursor:pointer; transition:border-color .15s,background .15s; }
.dropzone:hover,.dropzone.over { border-color:var(--accent); background:var(--accent-soft); }
.dropzone:focus-within { border-color:var(--accent); box-shadow:var(--glow); }
.dropzone #files { position:absolute; width:1px; height:1px; min-height:0; padding:0; border:0; opacity:0; }
.dz-icon { flex:none; display:grid; place-items:center; width:40px; height:40px; border:1px solid var(--line-2); border-radius:6px; color:var(--accent); font:400 24px/1 var(--mono); }
.dz-text b { display:block; font-weight:600; }
.dz-text span { color:var(--muted); font-size:13px; }
#imgCount { margin-left:auto!important; color:var(--board); font-family:var(--mono); }
.grid-imgs { grid-template-columns:repeat(auto-fill,minmax(124px,1fr)); }
.img { background:var(--panel-2); border-color:var(--line-2); border-radius:6px; }

/* ---------- 分镜 ---------- */
.seg { margin-top:12px; padding:14px; background:var(--panel-2); border-color:var(--line-2); border-radius:6px; }
.seg:focus-within { border-color:color-mix(in srgb,var(--accent) 55%,transparent); }
.seg .head b { font-family:var(--mono); color:var(--accent-soft-ink); font-weight:600; white-space:nowrap; }
.chip { border-radius:4px; }
.chip.missing { background:var(--code); color:var(--muted); }
.ac { background:var(--panel-2); border-color:var(--line-2); box-shadow:0 12px 32px rgba(0,0,0,.45); }
#costHint { color:var(--board); font-family:var(--mono); }

/* ---------- 数字 ---------- */
.stats { gap:10px; }
.stat { padding:12px 14px; background:var(--code); border:1px solid var(--line); border-radius:6px; }
.stat b { margin-top:2px; color:var(--text); font:600 26px/1.2 var(--mono); }
.stat span { color:var(--muted); }
.stat.hot { background:color-mix(in srgb,var(--board) 9%,var(--code)); border-color:color-mix(in srgb,var(--board) 55%,transparent); }
.stat.hot b { color:var(--board); }
.generation-progress { background:var(--code); border-color:var(--line); border-radius:6px; }
.generation-progress-value b { font-family:var(--mono); }
.generation-progress-track { height:6px; background:var(--line); }
.generation-progress-track i { box-shadow:0 0 10px var(--ok); }
.kv { gap:7px 18px; }
.kv b { font-family:var(--mono); font-weight:500; }
.tag { padding:2px 9px; border-radius:4px; font-family:var(--mono); }
.tag.ok { color:var(--ok); border-color:color-mix(in srgb,var(--ok) 50%,transparent); background:color-mix(in srgb,var(--ok) 10%,transparent); }
.tag.bad { color:var(--bad); border-color:color-mix(in srgb,var(--bad) 50%,transparent); background:color-mix(in srgb,var(--bad) 10%,transparent); }

/* ---------- 表格 ---------- */
.tbl { border:1px solid var(--line); border-radius:6px; }
table { font-size:13.5px; }
th,td { padding:11px 14px; border-bottom-color:var(--line); vertical-align:middle; }
th { position:sticky; top:0; background:var(--code); color:var(--faint); font-size:12px; font-weight:600; letter-spacing:.04em; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover td { background:color-mix(in srgb,var(--accent) 4%,transparent); }
td.num,th.num { font-family:var(--mono); }
td[class^="s-"]::before { content:""; display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; background:currentColor; vertical-align:1px; }
td.s-running::before,td.s-launching::before { animation:blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity:.25; } }
.s-pending,.s-launching,.s-submitted,.s-running { color:var(--warn); }
.s-done,.s-launched { color:var(--ok); }
.s-failed,.s-unknown,.err { color:var(--bad); }
td[class^="s-"] { white-space:nowrap; }
td[class^="s-"] .err { white-space:normal; min-width:180px; }
button { white-space:nowrap; }
.stats { grid-template-columns:repeat(auto-fit,minmax(118px,1fr)); }
table:has(#jobRows) { min-width:860px; }
table:has(#jRows) { min-width:980px; }
table:has(#uRows) { min-width:1240px; }
table:has(#jRows) th:first-child,#jRows td:first-child { display:none; }
table:has(#uRows) th:last-child,#uRows td:last-child,table:has(#jRows) th:last-child,#jRows td:last-child { position:sticky; right:0; background:var(--panel); box-shadow:-8px 0 12px -10px rgba(0,0,0,.6); }
table:has(#uRows) th:last-child,table:has(#jRows) th:last-child { background:var(--code); z-index:1; }
video { border-radius:4px; }

/* ---------- 发车动态 ---------- */
.departure-board { padding:0; overflow:hidden; }
.board-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:20px 24px 14px; }
.board-heading h2 { margin:0 0 3px; font-size:16px; }
.board-heading .help { margin:0; }
.board-table { border:0; border-top:1px solid var(--line); border-radius:0; }
.board-table table { min-width:1040px; }
.board-table td { height:68px; padding:12px 16px; font-family:var(--mono); white-space:nowrap; }
.board-table td:nth-child(2) { font-family:inherit; }
.board-table strong { color:var(--board); font-size:14px; font-weight:600; }
.board-table td .help { font-size:12px; }
.board-progress-cell { min-width:160px; }
.board-amount { font-size:14px; line-height:1.35; font-weight:600; }
.board-amount span { color:var(--muted); font-weight:400; }
.board-progress { height:5px; margin-top:7px; border-radius:999px; background:var(--line); overflow:hidden; }
.board-progress i { display:block; height:100%; border-radius:inherit; background:var(--accent); box-shadow:0 0 8px var(--accent); }
.board-badge { display:inline-flex; align-items:center; padding:3px 10px; border-radius:4px; font:600 12px/1.5 inherit; border:1px solid transparent; }
.board-badge.blue { background:var(--accent-soft); color:var(--accent-soft-ink); border-color:color-mix(in srgb,var(--accent) 30%,transparent); }
.board-badge.green { background:color-mix(in srgb,var(--ok) 12%,transparent); color:var(--ok); }
.board-badge.amber { background:color-mix(in srgb,var(--warn) 12%,transparent); color:var(--warn); }
.board-badge.muted { background:var(--code); color:var(--muted); }
.board-table td.board-empty { height:64px; color:var(--muted); font-family:inherit; text-align:center; white-space:normal; }
.board-date { color:var(--muted); }
.board-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 24px; border-top:1px solid var(--line); }
.board-footer .help { margin:0; }
.board-scroll-hint { display:none; color:var(--accent-soft-ink); font-size:12px; margin-bottom:4px; }

/* ---------- 代理 ---------- */
.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.section-note { margin:0 0 4px; color:var(--accent-soft-ink); font:600 12px/1.5 var(--mono); letter-spacing:.08em; }
.agent-intro { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.agent-intro h2,.agent-admin-intro h2 { font-size:22px; }
.agent-balance { flex:none; min-width:190px; display:grid; grid-template-columns:1fr auto; align-items:baseline; gap:2px 14px; padding:14px 18px; background:var(--code); border:1px solid color-mix(in srgb,var(--board) 45%,transparent); border-radius:6px; color:var(--muted); }
.agent-balance strong { grid-row:span 2; color:var(--board); font:600 30px/1 var(--mono); }
.agent-balance small { color:var(--faint); }
.agent-link-row input { flex:1 1 340px; font-family:var(--mono); font-size:13px; }
.agent-page .tbl { max-width:100%; }
.agent-page .tbl table { min-width:680px; }
#agentRows td.row { flex-wrap:nowrap; min-width:225px; border-bottom:0; }
.agent-table-hint { display:none; color:var(--muted); margin:12px 0 -10px; font-size:12px; }
.agent-recharge label,.agent-admin-create label { font-weight:600; }
.agent-recharge select { min-width:190px; }
.agent-recharge input { width:150px; }
.pending-note { margin:12px 0 0; padding:10px 12px; color:var(--warn); background:var(--code); border-left:3px solid var(--warn); }

/* ---------- 弹窗 ---------- */
.fx-modal { position:fixed; inset:0; z-index:50; display:grid; place-items:center; padding:16px; background:rgba(2,5,10,.72); backdrop-filter:blur(4px); }
.fx-modal > div { width:min(680px,100%); padding:22px 24px; background:var(--panel); border:1px solid var(--line-2); border-radius:8px; box-shadow:0 24px 70px rgba(0,0,0,.5); }
.fx-modal h3 { margin:0 0 4px; font-size:16px; }
.fx-modal textarea { width:100%; min-height:280px; margin:6px 0 12px; }
.fx-modal .fx-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.fx-modal .fx-count { margin-right:auto; color:var(--board); font-family:var(--mono); font-size:13px; }
.copy-pre { position:absolute; top:7px; right:7px; min-height:26px; padding:2px 9px; font:12px/1.4 inherit; }

/* ---------- 登录页 ---------- */
#fxCanvas { position:fixed; inset:0; z-index:-1; width:100%; height:100%; pointer-events:none; }
body.is-auth,body.console-auth {
  color-scheme:dark;
  --bg:#06090f; --panel:#0c121b; --panel-2:#111925; --line:#1d2937; --line-2:#2c3c50;
  --text:#e7eef6; --muted:#93a3b7; --faint:#71829a;
  --accent:#22e3c7; --accent-ink:#03140f; --accent-soft:#0b2a2a; --accent-soft-ink:#7ff5e3;
  --board:#ffb84d; --ok:#3ddc97; --warn:#ffb84d; --bad:#ff6b78; --input:#080d14; --code:#0a1019;
  --glow:0 0 0 1px rgba(34,227,199,.35),0 0 24px rgba(34,227,199,.18);
  position:relative; background:var(--bg); background-image:none; color:var(--text);
}
body.is-auth::before { display:none; }
body.is-auth header,body.console-auth header { position:relative; background:transparent; border-color:transparent; backdrop-filter:none; padding:0 30px; }
body.is-auth .brand,body.console-auth .brand { color:var(--text); }
body.is-auth .brand::before,body.console-auth .brand::before { background:var(--accent); color:var(--accent-ink); box-shadow:none; }
body.is-auth .theme-switch,body.console-auth .theme-switch { display:none; }
body.is-auth main { max-width:1280px; min-height:calc(100vh - 90px); grid-template-columns:minmax(0,1fr) minmax(360px,420px); align-content:center; align-items:center; gap:28px 80px; padding:24px 30px 56px; }
body.is-auth #notice { grid-column:1/-1; justify-self:start; margin:0; padding:5px 12px 5px 28px; position:relative; background:rgba(11,42,42,.7); border:1px solid rgba(34,227,199,.3); color:var(--accent-soft-ink); font-size:13px; }
body.is-auth #notice::before { content:""; position:absolute; left:12px; top:50%; width:7px; height:7px; margin-top:-3.5px; border-radius:50%; background:var(--accent); box-shadow:0 0 8px var(--accent); }
.auth-visual { min-width:0; padding:0; }
.auth-kicker { display:inline-flex; align-items:center; gap:9px; color:var(--accent-soft-ink); font-size:13px; font-weight:600; letter-spacing:.14em; }
.auth-kicker i { width:18px; height:2px; border-radius:0; background:var(--accent); box-shadow:0 0 8px var(--accent); }
.auth-visual h1 { margin:18px 0 12px; color:var(--text); font-size:clamp(38px,4.6vw,64px); line-height:1.16; letter-spacing:.01em; font-weight:800; }
.auth-visual h1 span { color:var(--accent); text-shadow:0 0 34px rgba(34,227,199,.35); }
.auth-visual > p { max-width:460px; margin:0; color:var(--muted); font-size:16px; line-height:1.85; }
.auth-route { display:none; }
.auth-steps { margin-top:26px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; color:var(--text); font-size:13px; counter-reset:step; }
.auth-steps span { display:inline-flex; align-items:center; gap:8px; counter-increment:step; }
.auth-steps i { display:none; }
.auth-steps span::before { content:"0" counter(step); color:var(--accent); font:600 12px/1 var(--mono); }
.auth-steps b { position:relative; width:42px; height:1px; background:var(--line-2); overflow:hidden; }
.auth-steps b::after { content:""; position:absolute; inset:0 auto 0 -40%; width:40%; background:var(--accent); animation:stepRun 2.2s linear infinite; }
@keyframes stepRun { to { left:100%; } }

.ops-board { max-width:540px; margin-top:26px; background:rgba(10,16,25,.82); border:1px solid var(--line-2); border-radius:6px; font-family:var(--mono); overflow:hidden; }
.ops-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 14px; border-bottom:1px solid var(--line-2); color:var(--muted); font-size:12px; letter-spacing:.06em; }
.ops-head b { display:inline-flex; align-items:center; gap:7px; color:var(--accent-soft-ink); font-weight:600; }
.ops-head b::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--ok); box-shadow:0 0 8px var(--ok); animation:blink 1.6s steps(2) infinite; }
.ops-head b.off::before { background:var(--bad); box-shadow:0 0 8px var(--bad); animation:none; }
.ops-cells { display:grid; grid-template-columns:repeat(3,1fr); }
.ops-cells div { padding:12px 14px; border-right:1px solid var(--line); min-width:0; }
.ops-cells div:last-child { border-right:0; }
.ops-cells span { display:block; color:var(--muted); font-family:"Microsoft YaHei UI","PingFang SC",sans-serif; font-size:12px; }
.ops-cells b { display:block; margin-top:2px; color:var(--board); font-size:22px; font-weight:600; line-height:1.3; white-space:nowrap; }
.ops-cells b small { color:var(--muted); font-size:12px; font-weight:400; }
.ops-meter { height:3px; background:var(--line); }
.ops-meter i { display:block; height:100%; background:var(--board); box-shadow:0 0 8px var(--board); }

body.is-auth .auth,body.console-auth .auth { width:100%; margin:0; padding:30px 32px 26px; gap:12px; background:rgba(12,18,27,.92); color:var(--text); border:1px solid var(--line-2); border-radius:10px; box-shadow:0 30px 80px rgba(0,0,0,.5),0 0 0 1px rgba(34,227,199,.05); backdrop-filter:blur(10px); }
body.is-auth .auth { max-width:420px; justify-self:end; }
body.console-auth main { min-height:calc(100vh - 140px); align-content:center; justify-items:center; padding:20px 16px 70px; }
body.console-auth .auth { max-width:400px; }
.auth-intro { margin-bottom:4px; }
body.is-auth .auth-mark,.auth-mark { display:none; }
body.is-auth .auth-intro h2 { margin:0 0 2px; color:var(--text); font-size:22px; line-height:1.4; }
body.is-auth .auth-intro p,body.is-auth .auth .help,body.console-auth .auth-intro p,body.console-auth .auth .help { margin-top:0; color:var(--muted); }
body.console-auth .auth-intro p { color:var(--accent-soft-ink); font:600 12px/1.5 var(--mono); letter-spacing:.08em; margin:0; }
body.console-auth .auth h2 { font-size:22px; margin:0; }
body.is-auth .tabs2 { gap:4px; padding:3px; background:var(--input); border:1px solid var(--line-2); border-radius:7px; }
body.is-auth .tabs2 button { flex:1; min-height:36px; background:transparent; border:0; border-radius:5px; color:var(--muted); box-shadow:none; }
body.is-auth .tabs2 button.on { background:var(--accent-soft); color:var(--accent-soft-ink); box-shadow:inset 0 0 0 1px rgba(34,227,199,.35); }
body.is-auth .auth input,body.console-auth .auth input { min-height:46px; padding:10px 13px; background:var(--input); color:var(--text); border:1px solid var(--line-2); border-radius:6px; }
body.is-auth .auth input::placeholder,body.console-auth .auth input::placeholder { color:var(--faint); }
body.is-auth .auth input:focus,body.console-auth .auth input:focus { border-color:var(--accent); outline:0; box-shadow:var(--glow); }
body.is-auth .auth button.primary,body.console-auth .auth button.primary { min-height:46px; border:0; border-radius:6px; background:var(--accent); color:var(--accent-ink); font-weight:700; letter-spacing:.2em; box-shadow:none; }
body.is-auth .auth button.primary:not(:disabled):hover,body.console-auth .auth button.primary:not(:disabled):hover { box-shadow:var(--glow); }
body.is-auth .auth a { color:var(--accent-soft-ink); text-decoration:none; font-size:13px; }
body.is-auth .auth a:hover { text-decoration:underline; }
.invite-notice,body.is-auth .invite-notice { margin:0; padding:9px 12px; border-radius:6px; background:var(--accent-soft); border:1px solid rgba(34,227,199,.3); color:var(--accent-soft-ink); font-size:13px; }
.captcha-row { display:flex; gap:8px; align-items:stretch; }
.captcha-row input { flex:1; min-width:0; }
.captcha-row button { flex:0 0 132px; padding:0; overflow:hidden; background:#f4f6f8; border-color:var(--line-2); }
.captcha-row img { display:block; width:100%; height:44px; object-fit:contain; }
.pass-wrap { position:relative; }
.pass-wrap input { width:100%; padding-right:58px!important; }
.pass-eye { position:absolute; top:50%; right:6px; transform:translateY(-50%); min-height:30px; padding:2px 8px; background:none; border:0; color:var(--muted); font-size:12px; }
.pass-eye:not(:disabled):hover { color:var(--accent-soft-ink); }

/* ---------- 接口文档独立页 ---------- */
body.docs-page { margin:0; background-color:var(--bg); color:var(--text); }
.docs-page main { display:block; max-width:980px; margin:0 auto; padding:44px 20px 70px; }
.docs-page h1 { margin:0 0 8px; color:var(--text); font-size:30px; }
.docs-page h2 { display:block; font-size:18px; margin:0 0 8px; }
.docs-page .lead { color:var(--muted); max-width:70ch; }
.docs-page section { margin-top:16px; color:var(--muted); }
.docs-page pre { background:var(--code); color:var(--text); }
.docs-page a { color:var(--accent-soft-ink); }
.docs-page td,.docs-page th { border-bottom-color:var(--line); }
.docs-page strong { color:var(--text); }
.docs-page .note { background:var(--accent-soft); color:var(--accent-soft-ink); border-radius:6px; }

/* ---------- 小屏 ---------- */
@media (max-width:1023px) { .bar { padding:8px 0; min-height:0; } }
@media (max-width:860px) {
  body.is-auth main { grid-template-columns:1fr; min-height:0; gap:20px; padding:12px 16px 36px; }
  body.is-auth #notice { grid-column:auto; }
  body.is-auth .auth { justify-self:stretch; max-width:none; padding:24px 20px; order:1; }
  .auth-visual { order:0; }
  .auth-visual h1 { font-size:34px; margin:12px 0 8px; }
  .auth-visual > p { font-size:14px; }
  .auth-steps,.ops-board { margin-top:16px; }
  .ops-board { order:2; }
  .agent-intro { flex-direction:column; align-items:stretch; }
}
@media (max-width:640px) {
  body.is-auth header,body.console-auth header { padding:0 16px; }
  header { position:static; padding:0 12px; }
  .bar { gap:8px; }
  .auth-steps,.ops-board { display:none; }
  nav { order:2; width:100%; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  nav button { flex:0 0 auto; padding:7px 10px; }
  .who,.right { order:3; width:100%; margin:0; justify-content:space-between; padding:0 0 6px; }
  main { padding:14px 12px 48px; }
  section { padding:18px 16px; }
  .departure-board { padding:0; }
  .board-heading { padding:16px 16px 12px; }
  .board-footer { padding:12px 16px; }
  .board-scroll-hint,.agent-table-hint { display:block; }
  .agent-balance { width:100%; }
  .agent-recharge label,.agent-admin-create label { width:100%; justify-content:space-between; }
  .agent-recharge select,.agent-recharge input,.agent-admin-create input { flex:1; min-width:0; }
  .ops-cells b { font-size:18px; }
  .ops-cells div { padding:10px; }
  .stats { grid-template-columns:repeat(2,1fr); }
  .seg .head { flex-wrap:wrap; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation:none!important; transition-duration:.01ms!important; } }

/* A moving film frame on the station route; purely decorative. */
.auth-visual { position:relative; isolation:isolate; }
.station-film-orbit {
  position:absolute; z-index:-1; top:-34px; right:-6px; width:min(62%,330px); aspect-ratio:4/3;
  pointer-events:none; opacity:.72; filter:drop-shadow(0 0 18px rgba(33,193,221,.18));
}
.station-film-orbit svg { display:block; width:100%; height:100%; overflow:visible; }
.station-orbit-base { fill:none; stroke:rgba(88,173,231,.18); stroke-width:1; }
.station-orbit-inner { stroke:rgba(37,220,199,.16); stroke-dasharray:2 8; }
.station-orbit-dash { fill:none; stroke:rgba(89,187,242,.5); stroke-width:1.5; stroke-dasharray:23 14 2 20; transform-origin:200px 150px; animation:station-orbit 24s linear infinite; }
.station-orbit-rotation { transform-origin:200px 150px; animation:station-orbit 18s linear infinite; }
.station-node { fill:#22e3c7; filter:drop-shadow(0 0 6px #22e3c7); }
.station-node-alt { fill:#75b9ff; filter:drop-shadow(0 0 6px #75b9ff); }
.station-crosshair { fill:none; stroke:rgba(115,197,242,.45); stroke-width:1.2; }
.station-screen { fill:rgba(9,21,34,.66); stroke:rgba(105,187,226,.54); stroke-width:1.2; }
.station-screen-grid { fill:none; stroke:rgba(75,153,196,.14); stroke-width:1; }
.station-corner { fill:none; stroke:#5ddfcf; stroke-width:2; opacity:.8; }
.station-mountain { fill:rgba(36,207,190,.10); stroke:rgba(59,204,191,.36); stroke-width:1.4; }
.station-star { fill:rgba(255,184,77,.65); }
.station-film-signal { fill:none; stroke:rgba(85,178,219,.3); stroke-width:1.5; }
.station-film-flow { stroke:#6cf3df; stroke-width:2.6; stroke-dasharray:8 92; animation:station-route-flow 6s linear infinite; filter:drop-shadow(0 0 5px #35e5d1); }
.station-scan { stroke:rgba(91,233,218,.7); stroke-width:1.2; animation:station-scan 5s ease-in-out infinite alternate; }
@keyframes station-orbit { to { transform:rotate(360deg); } }
@keyframes station-route-flow { to { stroke-dashoffset:-100; } }
@keyframes station-scan { from { transform:translateY(0); opacity:.1; } 18%,82% { opacity:.7; } to { transform:translateY(140px); opacity:.1; } }

/* Motion follows existing card and progress values, without changing them. */
#carCards .car { overflow:hidden; }
#carCards .car > :not(.station-car-signal) { position:relative; z-index:1; }
.station-car-signal { position:absolute; top:0; right:0; width:42%; height:3px; overflow:hidden; pointer-events:none; background:linear-gradient(90deg,transparent,rgba(77,204,222,.18)); }
.station-car-signal::after { content:""; position:absolute; inset:0; width:42%; background:linear-gradient(90deg,transparent,#74f4df,transparent); transform:translateX(-120%); animation:station-card-signal 4.8s linear infinite; }
@keyframes station-card-signal { to { transform:translateX(350%); } }
.generation-progress-track i,.board-progress i { position:relative; overflow:hidden; }
.generation-progress-track i::after,.board-progress i::after { content:""; position:absolute; inset:0 auto 0 0; width:42%; background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent); transform:translateX(-150%); animation:station-progress-light 4.5s ease-in-out infinite; }
@keyframes station-progress-light { 0%,20% { transform:translateX(-150%); } 75%,100% { transform:translateX(350%); } }
html.station-motion-paused .station-film-orbit *,html.station-motion-paused .station-car-signal::after,html.station-motion-paused .generation-progress-track i::after,html.station-motion-paused .board-progress i::after { animation-play-state:paused!important; }
@media (max-width:860px) { .station-film-orbit { width:min(38%,220px); top:-8px; right:8px; opacity:.48; } }
@media (max-width:640px) { .station-film-orbit { width:145px; top:-8px; right:3px; opacity:.38; } .station-car-signal { width:55%; } }
@media (prefers-reduced-motion:reduce) { .station-film-orbit *, .station-car-signal::after, .generation-progress-track i::after, .board-progress i::after { animation:none!important; } }

/* Public queue occupancy, using the same station totals shown to the owner. */
.station-user-progress { display:block; margin-top:14px; padding-top:11px; border-top:1px solid var(--line-2); text-align:left; pointer-events:none; }
.station-user-progress-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; color:var(--muted); font-size:12px; }
.station-user-progress-head b { color:var(--accent-soft-ink); font:600 15px/1.3 var(--mono); white-space:nowrap; }
.station-user-progress-head small { color:var(--muted); font-size:12px; font-weight:400; }
.station-user-progress-track { display:block; height:6px; margin-top:8px; overflow:hidden; border-radius:999px; background:var(--line-2); }
.station-user-progress-track i { position:relative; display:block; height:100%; overflow:hidden; border-radius:inherit; background:var(--accent); box-shadow:0 0 9px var(--accent); }
.station-user-progress-track i::after { content:""; position:absolute; inset:0 auto 0 0; width:42%; background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent); transform:translateX(-150%); animation:station-progress-light 4.5s ease-in-out infinite; }
html.station-motion-paused .station-user-progress-track i::after { animation-play-state:paused!important; }
@media (prefers-reduced-motion:reduce) { .station-user-progress-track i::after { animation:none!important; } }
@media (max-width:640px) {
  body.is-auth #authVisual .ops-board:not(.hidden) { display:block; margin-top:12px; }
  body.is-auth .ops-cells div { padding:8px 10px; }
  body.is-auth .ops-cells b { font-size:17px; }
}

/* Owner-only task details. */
.schedule-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.schedule-heading h2 { margin:0 0 6px; }
.schedule-heading p { margin:0; }
.schedule-status { color:var(--accent-soft-ink); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.schedule-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:16px; }
.schedule-controls label { color:var(--muted); font-size:13px; }
.schedule-controls input { width:auto; min-width:210px; }
.schedule-help { margin:12px 0 0; }
.agent-dispatch .agent-recharge label { flex:1 1 350px; }
.agent-dispatch .agent-recharge input { width:min(100%,430px); }
#agentRows td.row { min-width:330px; }
@media (max-width:640px) { .schedule-heading { display:block; } .schedule-status { display:block; margin-top:10px; } .schedule-controls label { flex-basis:100%; } .schedule-controls input { flex:1; min-width:0; } }

.task-detail-dialog { width:min(900px,calc(100% - 32px)); max-height:min(90vh,900px); padding:0; overflow:auto; border:1px solid var(--line); border-radius:10px; background:var(--panel); color:var(--text); box-shadow:0 24px 90px rgba(0,0,0,.4); }
.task-detail-dialog::backdrop { background:rgba(2,9,15,.76); backdrop-filter:blur(4px); }
.task-detail-header { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px 22px; border-bottom:1px solid var(--line); background:var(--panel); }
.task-detail-header h2 { margin:0 0 3px; font-size:18px; overflow-wrap:anywhere; }
.task-detail-header .help { margin:0; }
.task-detail-status { padding:0 22px; color:var(--warn); }
.task-detail-status:not(:empty) { padding-top:14px; }
.task-detail-section { margin:16px 22px 20px; padding:16px; }
.task-detail-section::before,.task-detail-section::after { content:none; }
.task-detail-section-title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.task-detail-section-title h3 { margin:0; font-size:15px; }
.task-detail-section-title .help { margin:0; }
.task-detail-images { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px; }
.task-detail-images > .help { grid-column:1/-1; margin:0; }
.task-detail-image { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:6px; background:var(--code); }
.task-detail-image-label { padding:8px 10px; border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; }
.task-detail-image > .help { padding:10px; margin:0; }
.task-detail-image a { display:block; height:160px; padding:6px; }
.task-detail-image img { display:block; width:100%; height:100%; object-fit:contain; }
.task-detail-image a:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.task-detail-prompt { margin:0; padding:14px; max-height:45vh; overflow:auto; border:1px solid var(--line); border-radius:6px; background:var(--code); color:var(--text); font:inherit; white-space:pre-wrap; overflow-wrap:anywhere; }
.task-view-button { color:var(--accent-soft-ink); }
@media (max-width:640px) {
  .task-detail-dialog { width:calc(100% - 20px); max-height:92vh; }
  .task-detail-header { padding:16px; }
  .task-detail-status { padding-left:16px; padding-right:16px; }
  .task-detail-section { margin:12px 16px 16px; padding:12px; }
  .task-detail-images { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .task-detail-image a { height:130px; }
}
