/* 六邦工作台 · 样式（商业版，CORE-10）
   设计：影棚灯箱。冷白底、发丝线、墨色主按钮；勃艮第酒红只用在标志和导航选中线。
   图片一律放在「灯箱」渐变底上；每张产出带「酒标」式溯源签（双线 + 编号 + 工具 · 花费 · 谁）。
   间距只用 4 的倍数；字号只用 11.5 / 12 / 13 / 14 / 15 / 16 / 22 / 28。只做浅色。 */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --sunken: #f8f9fa; --hover: #f1f2f4; --press: #e8eaed;
  --line: #e6e8eb; --line-strong: #d6dadf; --line-hover: #c4c9d0;
  --ink: #0f1115; --ink-2: #2a2e35; --text-2: #5a606a; --text-3: #8c929b; --text-4: #b4b9c0;
  --brand: #7a1d31; --brand-2: #b3263e;
  --ok: #13744a; --ok-soft: #e9f4ee; --warn: #965600; --warn-soft: #fbf2e3; --err: #b42318; --err-soft: #fcedeb;
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px;
  --sh-1: 0 1px 2px rgba(15, 17, 21, .05);
  --sh-pop: 0 12px 32px -8px rgba(15, 17, 21, .2), 0 2px 6px rgba(15, 17, 21, .06);
  --sh-dlg: 0 28px 72px -16px rgba(15, 17, 21, .32), 0 2px 8px rgba(15, 17, 21, .06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --side: 232px; --left: 392px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: inherit; margin: 0; }
h1, h2, h3, h4, p, ol, ul, dl, dd { margin: 0; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: rgba(122, 29, 49, .14); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.muted { color: var(--text-3); }
.i { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ========== 外框 ========== */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px 12px; }
.brand { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; margin-bottom: 12px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: .04em; }
.brand small { display: block; font-size: 11.5px; line-height: 16px; color: var(--text-3); }
.nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -12px; padding: 0 12px; }
.nav-g { padding: 16px 10px 4px; font-size: 11.5px; line-height: 16px; color: var(--text-4); letter-spacing: .08em; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r); color: var(--text-2); font-weight: 500; transition: background-color .12s, color .12s; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.on { background: var(--hover); color: var(--ink); font-weight: 600; }
.nav a.on::before { content: ""; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--brand); }
.nav .cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11.5px; line-height: 20px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 8px; border-radius: var(--r); }
.me:hover, .me[aria-expanded="true"] { background: var(--hover); }
.me > span:nth-child(2) { flex: 1; min-width: 0; }
.me b { display: block; font-size: 13px; line-height: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { display: block; font-size: 11.5px; line-height: 16px; color: var(--text-3); }
.me .i { color: var(--text-3); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.avatar.lg { width: 36px; height: 36px; font-size: 14px; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { display: none; }
.scrim { display: none; }
.banner { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 8px 16px; background: var(--ink); color: rgba(255, 255, 255, .86); font-size: 12px; line-height: 18px; text-align: center; }
.banner b { color: #fff; font-weight: 600; }
.banner .i { color: rgba(255, 255, 255, .6); }
.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 40px 72px; animation: pagein .2s ease-out; }
.page.full { max-width: none; padding: 0; flex: 1; min-height: 0; display: flex; animation: none; }
body.route-tool .main { height: 100vh; height: 100dvh; overflow: hidden; }
@keyframes pagein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ========== 页头、区块 ========== */
.ph { margin-bottom: 24px; }
.back { display: inline-flex; align-items: center; gap: 4px; height: 24px; margin-bottom: 8px; color: var(--text-3); font-size: 13px; }
.back:hover { color: var(--ink); }
.ph-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ph-t { min-width: 0; }
.ph h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 22px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; }
.ph p { margin-top: 4px; max-width: 720px; color: var(--text-2); }
.ph-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sec { margin-top: 32px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-height: 32px; }
.sec-h h2 { font-size: 15px; line-height: 24px; font-weight: 600; }
.sec-h a { font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 2px; }
.sec-h a:hover { color: var(--ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card.pad { padding: 20px 24px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: 15px; line-height: 24px; font-weight: 600; }
.card-h p { font-size: 12px; color: var(--text-3); }
.card-b { padding: 20px 24px; }
.card-f { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); }
.card-f .muted { margin-right: auto; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.grid2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.note { display: flex; gap: 8px; padding: 12px 16px; border-radius: var(--r); background: var(--sunken); border: 1px solid var(--line); color: var(--text-2); font-size: 12px; line-height: 20px; }
.note .i { margin-top: 2px; color: var(--text-3); }

/* ========== 按钮 ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background-color .12s, border-color .12s, color .12s, opacity .12s; }
.btn:hover { background: var(--hover); border-color: var(--line-hover); }
.btn:active { background: var(--press); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--err); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .36; pointer-events: none; }
.btn .sub { font-weight: 500; opacity: .66; font-variant-numeric: tabular-nums; }
.btn .sub::before { content: "·"; margin: 0 6px 0 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r); color: var(--text-2); flex: none; transition: background-color .12s, color .12s; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn[disabled] { opacity: .36; pointer-events: none; }
.link { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-hover); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--ink); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== 表单 ========== */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field + .field, .field + .fields, .fields + .field { margin-top: 20px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.fields > .field + .field { margin-top: 0; }
.num-r { text-align: right; font-variant-numeric: tabular-nums; }
.f-l { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 20px; font-weight: 600; }
.f-l em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }
.f-h { font-size: 12px; line-height: 18px; color: var(--text-3); }
.input, .select, .textarea { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); font-size: 14px; line-height: 20px; transition: border-color .12s, box-shadow .12s; }
.input.lg { height: 44px; font-size: 15px; }
.textarea { height: auto; min-height: 88px; padding: 8px 12px; line-height: 22px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-hover); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 17, 21, .08); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible, .stepper input:focus-visible { outline: none; }
.stepper:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 17, 21, .08); }
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c929b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; cursor: pointer; }
.select.sm, .input.sm { height: 32px; font-size: 13px; }
.input.money { max-width: 128px; text-align: right; font-variant-numeric: tabular-nums; }
.search { position: relative; display: block; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 36px; }
.pw { position: relative; }
.pw .input { padding-right: 44px; }
.pw .icon-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.form-err { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--r); background: var(--err-soft); color: var(--err); font-size: 13px; line-height: 20px; }
.form-err .i { margin-top: 3px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { height: 32px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font-size: 13px; white-space: nowrap; transition: border-color .12s, color .12s, box-shadow .12s; }
.choice:hover { border-color: var(--line-hover); color: var(--ink); }
.choice.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); font-weight: 600; }
.stepper { display: inline-flex; align-items: stretch; height: 36px; width: max-content; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.stepper button { width: 36px; display: grid; place-items: center; color: var(--text-2); }
.stepper button:hover { background: var(--hover); color: var(--ink); }
.stepper button[disabled] { opacity: .3; pointer-events: none; }
.stepper input { width: 52px; border: 0; border-inline: 1px solid var(--line); text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; background: transparent; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r); background: var(--hover); }
.seg button, .seg a { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--r-sm); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.seg button:hover, .seg a:hover { color: var(--ink); }
.seg button.on, .seg a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 32px; height: 20px; border-radius: 10px; background: var(--line-strong); position: relative; cursor: pointer; transition: background-color .15s; flex: none; }
.switch input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 17, 21, .2); transition: transform .15s; }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(12px); }
.switch input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ========== 小部件 ========== */
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--hover); color: var(--ink-2); font: 500 11.5px/1 var(--mono); letter-spacing: .03em; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--hover); color: var(--text-2); font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.run { background: var(--ink); color: #fff; }
.pill.run i { animation: blink 1.2s ease-in-out infinite; }
.pill.mute { color: var(--text-3); }
@keyframes blink { 50% { opacity: .25; } }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--text-4)); flex: none; display: inline-block; }
.lb { position: relative; display: grid; place-items: center; overflow: hidden; color: var(--text-4); background: radial-gradient(120% 90% at 50% 12%, #ffffff 0%, #f2f3f5 58%, #e7e9ec 100%); }
.lb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb.contain img { object-fit: contain; }
.wl { display: block; margin-top: 12px; padding-top: 8px; border-top: 3px double var(--line-strong); min-width: 0; }
.wl-t { display: block; font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: .02em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-c { display: block; font: 500 11.5px/18px var(--mono); letter-spacing: .04em; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-m { display: block; font-size: 11.5px; line-height: 18px; color: var(--text-3); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 56px 24px; text-align: center; color: var(--text-3); }
.empty > .i { margin-bottom: 4px; color: var(--text-4); }
.empty b { font-size: 15px; line-height: 24px; font-weight: 600; color: var(--ink); }
.empty p { max-width: 400px; font-size: 13px; line-height: 20px; }
.empty .btn { margin-top: 8px; }
.skel { display: block; border-radius: var(--r); background: linear-gradient(90deg, #eceef0 0%, #f5f6f7 50%, #eceef0 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.err-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: var(--r-lg); background: var(--err-soft); color: var(--err); font-size: 13px; }
.err-box span { display: flex; align-items: center; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 18px; }
.check .i { margin-top: 1px; }
.check.ok { color: var(--ok); }
.check.warn { color: var(--warn); }
.check.err { color: var(--err); }
.check.muted { color: var(--text-3); }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; line-height: 20px; }
.kv dt { color: var(--text-3); }
.kv dd { min-width: 0; word-break: break-word; }
.meter { height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--ink); transition: width .3s; }
.meter.warn i { background: var(--warn); }
.meter.err i { background: var(--err); }

/* ========== 表格、列表 ========== */
.tbl { position: relative; overflow-x: auto; min-width: 0; max-width: 100%; }   /* 表格宽过屏幕时在框里横滑，不把整页撑宽（relative：读屏用的隐藏字也收在框里） */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { height: 40px; padding: 0 16px; text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); background: var(--sunken); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { height: 52px; padding: 8px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table .num, .table td.r { font-variant-numeric: tabular-nums; white-space: nowrap; }   /* 日期、钱不折行 */
.table tfoot td { font-weight: 600; background: var(--sunken); border-top: 1px solid var(--line); }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: #fafbfb; }
.who { display: flex; align-items: center; gap: 10px; }
.who b { font-weight: 600; }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 48px minmax(0, 1.6fr) minmax(0, 1.2fr) 88px 96px 112px; align-items: center; gap: 16px; min-height: 72px; padding: 12px 20px; border-bottom: 1px solid var(--line); transition: background-color .12s; }
.row:last-child { border-bottom: 0; }
a.row:hover { background: #fafbfb; }
.row .lb { width: 48px; height: 48px; border-radius: var(--r); }
.row-t { min-width: 0; }
.row-t b { display: block; font-weight: 600; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-t small { display: block; font-size: 12px; line-height: 18px; color: var(--text-3); }
.row .money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.row .time { text-align: right; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rows-h { min-height: 40px; padding: 0 20px; background: var(--sunken); font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--line); }
.rows-h span:nth-child(5), .rows-h span:nth-child(6) { text-align: right; }
.more { display: flex; justify-content: center; padding: 16px; border-top: 1px solid var(--line); }

/* ========== 零碎 ========== */
.pad { padding: 32px 40px; }
.err-top { margin-bottom: 16px; }
.mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.small { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.row-gap { display: flex; gap: 8px; align-items: center; }
.muted-p { color: var(--text-2); line-height: 22px; }
.path { font: 500 11.5px/18px var(--mono); color: var(--text-2); word-break: break-all; letter-spacing: .01em; }
.foot-note { margin-top: 12px; font-size: 12px; color: var(--text-3); text-align: right; }
.pill.xs { height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11.5px; gap: 4px; }
.btn.red { background: var(--err); border-color: var(--err); color: #fff; }
.btn.red:hover { background: #9a1e14; border-color: #9a1e14; }
.ph + .sec { margin-top: 0; }
.fname { margin-top: 8px; font: 600 13px/20px var(--mono); letter-spacing: .02em; word-break: break-all; }
.who .muted { font-size: 12px; }

/* ========== 首页 ========== */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.kpi { min-width: 0; padding: 20px 24px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi span { display: block; font-size: 12px; line-height: 18px; color: var(--text-2); }
.kpi b { display: block; margin-top: 8px; font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi b em { font-style: normal; font-size: 14px; font-weight: 500; color: var(--text-3); margin-left: 4px; letter-spacing: 0; }
.kpi small { display: block; margin-top: 4px; font-size: 12px; line-height: 18px; color: var(--text-3); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tool { display: flex; flex-direction: column; gap: 12px; min-height: 152px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool:hover { border-color: var(--line-hover); box-shadow: 0 8px 24px -12px rgba(15, 17, 21, .18); transform: translateY(-1px); }
.tool-ic { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--hover); color: var(--ink); }
.tool b { display: block; font-size: 15px; line-height: 22px; font-weight: 600; }
.tool-d { display: block; margin-top: 2px; font-size: 13px; line-height: 20px; color: var(--text-2); }
.tool-f { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.tool-f .i { color: var(--text-4); transition: transform .15s, color .15s; }
.tool:hover .tool-f .i { color: var(--ink); transform: translateX(2px); }
.soon { display: flex; flex-wrap: wrap; gap: 8px; }
.soon span { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px dashed var(--line-strong); color: var(--text-3); font-size: 12px; }
.attn { display: flex; flex-direction: column; }
.attn a { display: flex; align-items: flex-start; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--ink-2); }
.attn a:last-child { border-bottom: 0; }
.attn a:hover { background: #fafbfb; }
.attn .i { margin-top: 2px; color: var(--warn); }
.attn-ok { display: flex; align-items: center; gap: 10px; padding: 16px 20px; font-size: 13px; color: var(--text-2); }
.attn-ok .i { color: var(--ok); }
.quota { padding: 20px 24px; }
.quota + .quota { border-top: 1px solid var(--line); }
.quota-t { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; }
.quota-t b { font-variant-numeric: tabular-nums; font-weight: 600; }
.quota-t span { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ========== 创作台 ========== */
.studio { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--left) minmax(0, 1fr); }
.st-left { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.st-head { padding: 20px 24px 20px; border-bottom: 1px solid var(--line); }
.st-head .back { margin-bottom: 4px; }
.st-title { display: flex; align-items: center; gap: 12px; }
.st-title .tool-ic { width: 36px; height: 36px; }
.st-title h1 { font-size: 18px; line-height: 26px; font-weight: 600; }
.st-title p { font-size: 12px; line-height: 18px; color: var(--text-3); }
.st-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 24px; }
.st-sec + .st-sec { margin-top: 32px; }
.st-sec > h3 { margin-bottom: 12px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-3); letter-spacing: .08em; }
.slot { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.slot + .slot { margin-top: 8px; }
.slot:hover { border-color: var(--line-hover); box-shadow: var(--sh-1); }
.slot .lb { width: 56px; height: 56px; border-radius: var(--r); }
.slot-b { min-width: 0; }
.slot-l { display: block; font-size: 12px; line-height: 16px; color: var(--text-3); }
.slot-n { display: flex; align-items: baseline; gap: 8px; min-width: 0; line-height: 20px; }
.slot-n b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; flex: none; }
.slot-n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.slot .check { margin-top: 2px; }
.slot-x { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 2px; }
.slot:hover .slot-x { color: var(--ink); }
.lockline { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--sunken); border: 1px solid var(--line); font-size: 12px; line-height: 18px; color: var(--text-2); }
.lockline .i { margin-top: 1px; }
.lockline.ok .i { color: var(--ok); }
.lockline.err { background: var(--err-soft); border-color: transparent; color: var(--err); }
.lockline a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.st-foot { padding: 16px 24px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.pb-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pb-top span { font-size: 13px; color: var(--text-2); }
.pb-top b { font-size: 22px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pb-rows { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; line-height: 18px; color: var(--text-3); }
.pb-rows div { display: flex; justify-content: space-between; gap: 12px; }
.pb-rows span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.pb-block { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.pb-block li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r); background: var(--err-soft); color: var(--err); font-size: 12px; line-height: 18px; }
.pb-block .i { margin-top: 1px; }
.st-foot .btn { margin-top: 16px; }
.st-canvas { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.cv-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 32px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
.cv-head h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 24px; font-weight: 600; white-space: nowrap; }
.cv-meta { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; }
.cv-link { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text-2); }
.cv-link:hover { color: var(--ink); }
.run-h h2 { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.cv-body { flex: 1; min-height: 0; overflow-y: auto; padding: 32px; }
.refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 300px)); gap: 24px; justify-content: center; }
.ref { margin: 0; }
.ref .lb { aspect-ratio: 1; border-radius: var(--r-lg); border: 1px solid var(--line); }
.ref figcaption { margin-top: 10px; font-size: 12px; line-height: 18px; color: var(--text-3); text-align: center; }
.ref figcaption b { color: var(--ink); font-weight: 600; }
.hint { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 32px auto 0; max-width: 420px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 20px; }
.hint b { color: var(--ink); font-size: 15px; font-weight: 600; }
.run-msg { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 20px; padding: 12px 16px; border-radius: var(--r); background: var(--err-soft); color: var(--err); font-size: 13px; line-height: 20px; }
.run-msg .i { margin-top: 2px; }
.cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.cand { position: relative; min-width: 0; }
.cand.fresh { animation: develop .4s ease-out both; }
.cand.fresh:nth-child(2) { animation-delay: .06s; } .cand.fresh:nth-child(3) { animation-delay: .12s; } .cand.fresh:nth-child(4) { animation-delay: .18s; }
@keyframes develop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cand-img { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.cand-img img { object-fit: contain; }
button.cand-img:hover { border-color: var(--line-hover); }
.cand.sel .cand-img { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.cand-check { position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; border: 1.5px solid rgba(15, 17, 21, .28); background: rgba(255, 255, 255, .92); color: transparent; transition: background-color .12s, border-color .12s; }
.cand.sel .cand-check { background: var(--ink); border-color: var(--ink); color: #fff; }
.cand.off .cand-check { display: none; }
.cand-badge { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; white-space: nowrap; background: rgba(255, 255, 255, .94); color: var(--ink-2); font-size: 12px; font-weight: 500; box-shadow: var(--sh-1); }
.cand-badge.ok { color: var(--ok); }
.cand-badge.err { color: var(--err); }
.cand-tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.cand:hover .cand-tools, .cand:focus-within .cand-tools { opacity: 1; }
.cand-tools .icon-btn { background: rgba(255, 255, 255, .94); box-shadow: var(--sh-1); color: var(--ink-2); }
.cand-err { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--err); font-size: 12px; line-height: 18px; }
.cand-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); font-size: 12px; }
.cand-wait .skel { position: absolute; inset: 0; border-radius: 0; }
.cand-wait { position: absolute; inset: 0; }
.cand-wait-t { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.rs-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px -32px -32px; padding: 16px 32px; background: rgba(244, 245, 247, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.rs-bar > span { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rs-bar > div { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rs-bar.in-card { position: static; margin: 24px -24px -20px; padding: 16px 24px; background: var(--sunken); border-radius: 0 0 var(--r-lg) var(--r-lg); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ========== 选素材（弹窗） ========== */
.pk-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pk-tools .search { flex: 1; min-width: 200px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.pk { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-lg); text-align: left; min-width: 0; transition: border-color .12s, box-shadow .12s; }
.pk:hover { border-color: var(--line-hover); }
.pk.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pk.no { opacity: .5; }
.pk .lb { aspect-ratio: 1; border-radius: var(--r); }
.pk-b { min-width: 0; padding: 0 2px 2px; }
.pk-b b { display: block; font: 600 12px/18px var(--mono); letter-spacing: .02em; }
.pk-b span { display: block; font-size: 12px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-b small { display: block; font-size: 11.5px; line-height: 16px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-b small.warn { color: var(--warn); }
.pk-b small.err { color: var(--err); }

/* ========== 素材 ========== */
.as-bar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.as-bar .search .input { height: 44px; font-size: 15px; }
.as-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.libs { display: flex; gap: 8px; flex-wrap: wrap; }
.libbtn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; color: var(--text-2); white-space: nowrap; transition: border-color .12s, color .12s, background-color .12s; }
.libbtn:hover { border-color: var(--line-hover); color: var(--ink); }
.libbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.libbtn.on .dot { background: #fff; }
.libbtn em { font-style: normal; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.libbtn.on em { color: rgba(255, 255, 255, .64); }
.libbtn.dim { border-style: dashed; color: var(--text-3); }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 16px; }
.ac { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-align: left; transition: border-color .15s, box-shadow .15s; }
.ac:hover { border-color: var(--line-hover); box-shadow: 0 8px 24px -14px rgba(15, 17, 21, .2); }
.ac.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ac .lb { aspect-ratio: 1; border-bottom: 1px solid var(--line); }
.ac-b { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; min-width: 0; }
.ac-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ac-top b { font: 600 12px/18px var(--mono); letter-spacing: .02em; }
.ac-n { font-weight: 600; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-m { font-size: 12px; line-height: 18px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag { align-self: flex-start; margin-top: 8px; }

/* ========== 抽屉里的素材详情 ========== */
.dr-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.dr-h h2 { margin-top: 6px; font-size: 18px; line-height: 26px; font-weight: 600; }
.dr-h p { font-size: 12px; line-height: 18px; color: var(--text-3); }
.dr-b { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 20px; }
.dr-b > * { flex-shrink: 0; }   /* 内容超出时滚动，不把大图挤扁（CORE-15） */
.dr-f { display: flex; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dr-f .btn.primary { flex: 1; }
.big { aspect-ratio: 4 / 3; border-radius: var(--r-lg); border: 1px solid var(--line); }
.big img { object-fit: contain; }
.fgrp h4 { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; font-size: 12px; line-height: 18px; font-weight: 600; color: var(--text-2); }
.fgrp h4 em { font-style: normal; font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }
.fstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.fth { display: block; aspect-ratio: 1; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.fth:hover { border-color: var(--line-hover); }
.fth.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.fth .lb { width: 100%; height: 100%; }
.file-tile { font: 600 11.5px/1 var(--mono); color: var(--text-3); letter-spacing: .04em; }

/* ========== 作品 ========== */
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.filters .search { flex: 1; min-width: 220px; max-width: 360px; }
.filters .select { width: auto; min-width: 140px; }
.ml-auto { margin-left: auto; }
.day + .day { margin-top: 40px; }
.day-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.day-h b { font-size: 15px; line-height: 24px; font-weight: 600; }
.day-h span { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.day-h small { margin-left: auto; font: 500 11.5px/18px var(--mono); color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.work { display: block; min-width: 0; text-align: left; }
.work .lb { aspect-ratio: 1; border-radius: var(--r-lg); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.work .lb img { object-fit: contain; }
.work:hover .lb { border-color: var(--line-hover); box-shadow: 0 10px 28px -16px rgba(15, 17, 21, .28); }
.work-fn { display: flex; align-items: center; gap: 6px; margin-top: 10px; font: 500 12px/18px var(--mono); letter-spacing: .02em; color: var(--ink); min-width: 0; }
.work-fn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work .wl { margin-top: 6px; }
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; flex: 1; }
.viewer-img { min-height: 360px; border-right: 1px solid var(--line); }
.viewer-img img { object-fit: contain; padding: 24px; }
.viewer-side { display: flex; flex-direction: column; min-height: 0; }
.viewer-side .dr-b { gap: 16px; }
.bf { padding: 16px; border-radius: var(--r-lg); background: var(--sunken); border: 1px solid var(--line); }
.bf h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.bf p { font-size: 12px; line-height: 18px; color: var(--text-3); margin-bottom: 12px; }
.bf .field + .field { margin-top: 12px; }
.bf .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ========== 产品锁 ========== */
.lk { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.lk-list { overflow: hidden; }
.lk-list > .search { margin: 12px; }
.lk-items { border-top: 1px solid var(--line); }
.lk-items { max-height: calc(100vh - 220px); overflow-y: auto; }
.lk-it { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 60px; padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: left; transition: background-color .12s; }
.lk-it:last-child { border-bottom: 0; }
.lk-it:hover { background: #fafbfb; }
.lk-it.on { background: var(--hover); box-shadow: inset 2px 0 0 var(--brand); }
.lk-it > span:first-child { min-width: 0; }
.lk-it b { display: block; font: 600 12px/18px var(--mono); letter-spacing: .02em; }
.lk-it small { display: block; font-size: 12px; line-height: 18px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-refs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.lk-refs .lb { aspect-ratio: 1; border-radius: var(--r); border: 1px solid var(--line); }

/* ========== 账单 ========== */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 176px; padding: 24px 24px 0; }
.bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.bar i { display: block; width: 100%; max-width: 28px; min-height: 2px; border-radius: 4px 4px 1px 1px; background: var(--ink); transition: height .3s; }
.bar i.zero { background: var(--line); }
.bar.today i { background: var(--brand); }
.bar span { font-size: 11.5px; line-height: 16px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar span.hide { visibility: hidden; }
.chart-f { display: flex; justify-content: space-between; padding: 12px 24px 20px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ========== 设置、成员、验收 ========== */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: inline-flex; align-items: center; height: 40px; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); font-weight: 600; }
.tabs a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); border-radius: 1px; }
.set + .set { margin-top: 24px; }
.status-line { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.words-g + .words-g { margin-top: 20px; }
.acc-sum { display: flex; align-items: center; gap: 24px; padding: 20px 24px; }
.acc-sum .meter { flex: 1; }
.acc-sum b { font-size: 22px; font-variant-numeric: tabular-nums; }
.acc-sum span { font-size: 12px; color: var(--text-3); }
.acc { display: flex; flex-direction: column; gap: 16px; }
.acc-it { padding: 20px 24px; }
.acc-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acc-h h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 24px; font-weight: 600; }
.acc-it ol { margin-top: 12px; padding-left: 20px; font-size: 13px; line-height: 22px; color: var(--ink-2); }
.acc-it ol li + li { margin-top: 4px; }
.acc-exp { margin-top: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--sunken); font-size: 13px; line-height: 20px; color: var(--text-2); }
.acc-exp b { color: var(--ink); font-weight: 600; }
.acc-note { margin-top: 12px; font-size: 13px; color: var(--err); }
.acc-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ========== 弹层：对话框、抽屉、菜单、提示 ========== */
#layer { position: fixed; inset: 0; z-index: 50; }
#layer:empty { display: none; }
.scrim-l { position: absolute; inset: 0; background: rgba(15, 17, 21, .36); animation: fade .16s ease-out; }
.layer-menu .scrim-l { background: transparent; }
.dlg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-dlg); animation: dlgin .18s ease-out; }
.dlg.wide { width: min(880px, calc(100vw - 32px)); }
.dlg.xwide { width: min(1080px, calc(100vw - 32px)); height: min(720px, calc(100dvh - 48px)); }
.dlg-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.dlg-h h2 { font-size: 16px; line-height: 24px; font-weight: 600; }
.dlg-h p { margin-top: 2px; font-size: 13px; line-height: 20px; color: var(--text-2); }
.dlg-h .icon-btn { margin: -4px -8px 0 0; }
.dlg-b { padding: 20px 24px; overflow-y: auto; min-height: 0; }
.dlg-f { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); }
.dlg-f .muted { margin-right: auto; font-size: 12px; }
.qt { width: 100%; border-collapse: collapse; font-size: 13px; }
.qt td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.qt td:nth-child(2) { color: var(--text-3); font-size: 12px; padding-left: 12px; }
.qt td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.qt tr.sum td { border-bottom: 0; padding-top: 12px; font-weight: 600; font-size: 15px; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--sh-dlg); animation: slidein .22s cubic-bezier(.2, .8, .2, 1); }
.menu { position: absolute; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-pop); animation: menuin .14s ease-out; }
.menu-h { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-h b { display: block; font-size: 13px; font-weight: 600; }
.menu-h small { display: block; font-size: 12px; color: var(--text-3); }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: var(--r); font-size: 14px; color: var(--ink-2); text-align: left; }
.menu button:hover, .menu a:hover { background: var(--hover); color: var(--ink); }
.menu button.danger { color: var(--err); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-f { padding: 8px 10px 4px; font-size: 11.5px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.cmp { --p: 50%; position: relative; aspect-ratio: 1; max-height: 62vh; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); user-select: none; }
.cmp > div { position: absolute; inset: 0; }
.cmp .lb { width: 100%; height: 100%; }
.cmp .lb img { object-fit: contain; }
.cmp-b { clip-path: inset(0 0 0 var(--p)); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(15, 17, 21, .2); pointer-events: none; }
.cmp-tag { position: absolute; top: 12px; height: 22px; padding: 0 8px; border-radius: 11px; background: rgba(15, 17, 21, .72); color: #fff; font-size: 12px; line-height: 22px; pointer-events: none; }
.cmp-tag.l { left: 12px; } .cmp-tag.r { right: 12px; }
.range { width: 100%; margin-top: 16px; accent-color: var(--ink); }
.zoom-img { display: grid; place-items: center; height: min(70vh, 720px); border-radius: var(--r-lg); border: 1px solid var(--line); }
.zoom-img img { object-fit: contain; }
.big-num { font-size: 22px; line-height: 36px; font-weight: 600; }
.score-box { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; padding: 12px 16px; border-radius: var(--r); background: var(--ok-soft); color: var(--ink-2); font-size: 13px; line-height: 20px; }
.score-box b { color: var(--ok); font-weight: 600; }
.score-box.bad { background: var(--err-soft); }
.score-box.bad b { color: var(--err); }
.status-line { flex-wrap: wrap; }
.toasts { position: fixed; left: 50%; top: 52px; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; min-height: 44px; max-width: 560px; padding: 10px 16px; border-radius: var(--r-lg); background: var(--ink); color: rgba(255, 255, 255, .92); font-size: 13px; line-height: 20px; box-shadow: var(--sh-pop); pointer-events: auto; animation: toastin .22s ease-out; }
.toast .i { color: #7fd1a6; }
.toast.err .i { color: #ff9d92; }
.toast a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; }
@keyframes fade { from { opacity: 0; } }
@keyframes dlgin { from { opacity: 0; transform: translate(-50%, -48%) scale(.985); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes slidein { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes menuin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes toastin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ========== 登录 ========== */
.login { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 48px 16px; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, #ffffff 0%, #f1f2f4 58%, #e8eaed 100%); }
.login-art { position: absolute; right: max(-40px, calc(50% - 640px)); bottom: -24px; width: 360px; color: #d3d7dc; pointer-events: none; }
.login-art svg { width: 100%; height: auto; display: block; }
.login-box { position: relative; width: min(400px, 100%); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.login-brand svg { width: 40px; height: 40px; flex: none; }
.login-brand b { display: block; font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: .04em; }
.login-brand small { display: block; font-size: 13px; line-height: 20px; color: var(--text-2); }
.login-form { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: 0 24px 64px -32px rgba(15, 17, 21, .28); }
.login-form h1 { font-size: 22px; line-height: 32px; font-weight: 600; margin-bottom: 24px; }
.login-form .form-err { margin-top: 16px; }
.login-form .btn { margin-top: 24px; }
.login-note { margin-top: 16px; font-size: 12px; line-height: 18px; color: var(--text-3); text-align: center; }
.login-foot { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font-size: 12px; color: var(--text-4); }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot svg { width: 40px; height: 40px; opacity: .9; animation: blink 1.4s ease-in-out infinite; }

/* ========== 窄屏 ========== */
@media (max-width: 1279px) {
  :root { --side: 216px; --left: 360px; }
  .page { padding: 28px 32px 64px; }
  .cv-head, .cv-body { padding-left: 24px; padding-right: 24px; }
  .rs-bar { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  .row { grid-template-columns: 48px minmax(0, 1.6fr) minmax(0, 1fr) 88px 88px; }
  .row .time { display: none; }
  .rows-h span:nth-child(6) { display: none; }
}
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 45; width: 272px; transform: translateX(-104%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--sh-dlg); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(15, 17, 21, .36); animation: fade .16s; }
  .topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .topbar b { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .avatar { margin-right: 4px; }
  body.route-tool .main { height: auto; overflow: visible; }
  .page.full { display: block; }
  .studio { display: block; }
  .st-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .st-scroll { overflow: visible; }
  .st-foot { position: sticky; bottom: 0; z-index: 20; box-shadow: 0 -12px 24px -16px rgba(15, 17, 21, .22); }
  .cv-body { overflow: visible; }
  .rs-bar { margin-bottom: -32px; }
  .grid2, .grid2.even { grid-template-columns: minmax(0, 1fr); }
  .lk { grid-template-columns: minmax(0, 1fr); }
  .lk-items { max-height: 280px; }
  .viewer { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .viewer-img { min-height: 320px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dlg.xwide { height: calc(100dvh - 32px); }
}
@media (max-width: 639px) {
  .page { padding: 20px 16px 56px; }
  .hide-sm { display: none; }                 /* 手机上收起次要的列、次要的字 */
  .table th, .table td { padding-left: 10px; padding-right: 10px; }
  .ph h1 { font-size: 20px; line-height: 28px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 16px; }
  .kpi + .kpi { border-left: 0; }
  .kpi:nth-child(even) { border-left: 1px solid var(--line); }
  .kpi:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .kpi b { font-size: 22px; line-height: 30px; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tool { min-height: 0; padding: 16px; gap: 10px; }
  .tool-f > span { display: none; }
  .tool-f { justify-content: flex-end; }
  .pb-rows { display: none; }
  .cv-head, .run-h { flex-wrap: wrap; }
  .cv-meta { width: 100%; text-align: left; }
  .libs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .libs::-webkit-scrollbar { display: none; }
  .libbtn { flex: none; }
  .row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; }
  .row > :nth-child(3) { display: none; }
  .row > :nth-child(4) { grid-column: 3; grid-row: 1; }
  .row .money { display: none; }
  .rows-h { display: none !important; }
  .st-head, .st-scroll { padding-left: 16px; padding-right: 16px; }
  .st-foot { padding: 12px 16px 16px; }
  .cv-head, .cv-body { padding-left: 16px; padding-right: 16px; }
  .rs-bar { margin-left: -16px; margin-right: -16px; padding: 12px 16px; flex-direction: column; align-items: stretch; }
  .rs-bar > div .btn { flex: 1; }
  .cands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cand .wl { display: none; }
  .agrid, .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ac-b { padding: 10px; }
  .work .wl { display: none; }
  .filters .search { max-width: none; min-width: 100%; }
  .filters .select { flex: 1; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .card-h, .card-b, .card-f { padding-left: 16px; padding-right: 16px; }
  .acc-it { padding: 16px; }
  .dlg-h, .dlg-b, .dlg-f { padding-left: 16px; padding-right: 16px; }
  .dlg:not(.xwide) { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-height: 92dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; animation: sheetin .22s cubic-bezier(.2, .8, .2, 1); }
  .dlg.xwide { width: 100%; height: 100dvh; max-height: none; border-radius: 0; left: 0; top: 0; transform: none; animation: fade .16s; }
  .pk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lk-refs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart { gap: 3px; padding: 16px 16px 0; }
  .chart-f { padding: 12px 16px 16px; }
  .tabs { gap: 20px; }
  .login-form { padding: 24px 20px; }
  .login-art { display: none; }
  .toasts { top: 12px; }
}
@keyframes sheetin { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (hover: none) { .cand-tools { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
