/* C 端工作台。设计口径与 app.css(运维台)同一套 token, 但只有一件事: 上传 → 等 → 拿成果。
   过程(思考/命令/裁图)一律不出现在这里。 */
:root {
  --navy: #153b50; --brand: #153b50; --teal: #1d6b5c; --on-teal: #fff; --mint: #e9f2f0;
  --ink: #0f172a; --dim: #556072; --dim2: #8a94a3; --line: #e2e8f0; --line2: #edf2f7;
  --bg: #f1f5f9; --card: #fff; --field: #fff; --hov: #f8fafc;
  --warn: #b45309; --warnbg: #fffbeb; --bad: #b91c1c; --badbg: #fee2e2;
  --ok: #15803d; --okbg: #dcfce7; --run: #1e40af; --runbg: #dbeafe;
  --estrow: #fffafa; --infrow: #fffdf7; --warnline: #f0d5a8;
  --shadow: rgba(15,23,42,.06); --shadow2: rgba(15,23,42,.14); --backdrop: rgba(15,23,42,.55);
  --xlsbg: #e3f4ea; --xlsfg: #1b7a3e; --dxfbg: #e6eef9; --dxffg: #2456a6;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --teal: #4FBFA3; --on-teal: #06231C; --mint: rgba(79,191,163,.15); --brand: #8FD6C4;
    --ink: #E7EBF1; --dim: #9AA4B0; --dim2: #7C8794;
    --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.05);
    --bg: #0D1015; --card: #161A21; --field: #11151B; --hov: rgba(255,255,255,.04);
    --warn: #F0B429; --warnbg: rgba(240,180,41,.12); --bad: #FF6F5E; --badbg: rgba(255,111,94,.13);
    --ok: #5FD08C; --okbg: rgba(95,208,140,.14); --run: #7FB3F0; --runbg: rgba(127,179,240,.14);
    --estrow: rgba(255,111,94,.06); --infrow: rgba(240,180,41,.06); --warnline: rgba(240,180,41,.32);
    --shadow: rgba(0,0,0,.5); --shadow2: rgba(0,0,0,.6); --backdrop: rgba(0,0,0,.7);
    --xlsbg: rgba(95,208,140,.16); --xlsfg: #5FD08C; --dxfbg: rgba(127,179,240,.16); --dxffg: #7FB3F0;
  }
}
:root[data-theme="dark"] {
  --teal: #4FBFA3; --on-teal: #06231C; --mint: rgba(79,191,163,.15); --brand: #8FD6C4;
  --ink: #E7EBF1; --dim: #9AA4B0; --dim2: #7C8794;
  --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.05);
  --bg: #0D1015; --card: #161A21; --field: #11151B; --hov: rgba(255,255,255,.04);
  --warn: #F0B429; --warnbg: rgba(240,180,41,.12); --bad: #FF6F5E; --badbg: rgba(255,111,94,.13);
  --ok: #5FD08C; --okbg: rgba(95,208,140,.14); --run: #7FB3F0; --runbg: rgba(127,179,240,.14);
  --estrow: rgba(255,111,94,.06); --infrow: rgba(240,180,41,.06); --warnline: rgba(240,180,41,.32);
  --shadow: rgba(0,0,0,.5); --shadow2: rgba(0,0,0,.6); --backdrop: rgba(0,0,0,.7);
  --xlsbg: rgba(95,208,140,.16); --xlsfg: #5FD08C; --dxfbg: rgba(127,179,240,.16); --dxffg: #7FB3F0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 14px;
       -webkit-font-smoothing: antialiased; line-height: 1.5; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--field); color: var(--ink); outline: none; font-weight: 600; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
button { cursor: pointer; border-radius: 8px; font-weight: 800; border: 1px solid transparent; color: var(--ink); background: none;
         transition: background .15s, transform .08s, opacity .15s; }
button:active { transform: translateY(1px); }
button:focus-visible, .drop:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.primary { background: var(--teal); color: var(--on-teal); padding: 12px 16px; width: 100%; }
.primary:hover { filter: brightness(1.06); }
.primary:disabled { opacity: .45; cursor: default; }
.ghost { background: var(--card); border-color: var(--line); color: var(--ink); padding: 8px 12px; }
.ghost:hover { background: var(--hov); }
.small { padding: 7px 11px; font-size: 12.5px; width: auto; }
.linkbtn { border: none; color: var(--teal); padding: 0; font-weight: 800; }
.dim { color: var(--dim); font-weight: 600; font-size: 12.5px; }
.tiny { font-size: 11.5px; font-weight: 500; line-height: 1.55; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.n { font-variant-numeric: tabular-nums; }
.err { color: var(--bad); font-size: 12.5px; font-weight: 700; min-height: 18px; }
h1 { font-size: 22px; font-weight: 900; letter-spacing: -.02em; margin: 2px 0 4px; text-wrap: balance; }
h3 { font-size: 13px; font-weight: 900; margin: 0 0 12px; letter-spacing: .01em; display: flex; justify-content: space-between; align-items: center; }
a { color: var(--teal); }
.eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

/* ── 登录(与运维台同一套) ── */
.login { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.authL { background: var(--navy); color: #fff; padding: 52px 48px; position: relative; display: flex; flex-direction: column;
         justify-content: center; gap: 22px; overflow: hidden; }
.authL::before { content: ""; position: absolute; right: 0; bottom: 0; width: 80%; height: 86%;
  background: url("/assets/auth-side.webp") no-repeat right bottom / contain; }
.authL::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--navy) 30%, rgba(21,59,80,.72) 52%, rgba(21,59,80,0) 78%); }
.authL > * { position: relative; z-index: 1; }
.brandBig { display: flex; align-items: center; gap: 12px; }
.brandBig .logo { width: 40px; height: 40px; color: var(--mint); flex: none; }
.brandBig .bn { font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.brandBig .bt { font-size: 11px; color: #9FBACB; font-weight: 700; letter-spacing: .1em; margin-top: 2px; }
.authL h2 { font-size: 27px; font-weight: 900; letter-spacing: -.02em; line-height: 1.4; margin: 0; max-width: 16ch; }
.authL p { color: #A8BECC; font-weight: 600; line-height: 1.75; margin: 0; max-width: 44ch; font-size: 13px; }
.pts { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.pts li { font-size: 12.5px; color: #C6D8E3; font-weight: 600; display: flex; gap: 9px; line-height: 1.6; }
.pts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; flex: none; background: #5FCFB4; margin-top: 8px; }
.authR { display: grid; place-items: center; padding: 30px; background: var(--card); }
.loginbox { width: min(340px, 100%); display: flex; flex-direction: column; gap: 10px; }
.loginbox h3 { font-size: 19px; font-weight: 900; margin: 0 0 2px; display: block; }
.loginhead { display: flex; justify-content: space-between; align-items: center; }
.langsw { display: flex; gap: 3px; background: var(--bg); padding: 3px; border-radius: 7px; align-self: flex-start; }
.langsw button { background: none; border: none; padding: 5px 11px; font-size: 12px; font-weight: 700; color: var(--dim); border-radius: 5px; }
.langsw button.on { background: var(--card); color: var(--ink); font-weight: 800; box-shadow: 0 1px 2px var(--shadow); }
.themebtn { display: inline-flex; align-items: center; gap: 6px; }
.themebtn.mini { padding: 5px 9px; font-size: 12px; background: var(--bg); border-color: transparent; }
.bonus { background: var(--mint); color: var(--brand); padding: 8px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 800; }
.switch { display: flex; gap: 6px; font-size: 12.5px; color: var(--dim); font-weight: 600; }
.orline { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 11.5px; font-weight: 700; margin: 4px 0 2px; }
.orline::before, .orline::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth { display: flex; flex-direction: column; gap: 7px; }
.oa { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px; background: var(--card);
      border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 12.5px; }
.oa:hover { background: var(--bg); }
.oa[data-off] { opacity: .5; cursor: default; }
.oa[data-off]::after { content: attr(data-off); font-size: 10.5px; color: var(--dim); font-weight: 700; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .authL { display: none; } }

/* ── 骨架 ── */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line);
          padding: 0 22px; height: 58px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 15px; font-weight: 900; letter-spacing: -.01em; }
.brand i { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--dim); }
.views { display: flex; gap: 2px; margin-left: 8px; }
.vbtn { padding: 8px 13px; font-size: 13px; font-weight: 800; color: var(--dim); border-radius: 8px; }
.vbtn:hover { background: var(--hov); color: var(--ink); }
.vbtn.on { background: var(--mint); color: var(--brand); }
.right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.iconbtn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; color: var(--dim); border-radius: 9px; }
.iconbtn:hover { background: var(--hov); color: var(--ink); }
.dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--card); }
.usermenu { position: relative; }
.userbtn { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 10px; }
.userbtn:hover { background: var(--hov); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.uinfo { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.uinfo b { font-size: 13px; }
.balpill { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ok); font-weight: 800; }
.balpill.low { color: var(--bad); }
.userpop { position: absolute; right: 0; top: calc(100% + 6px); width: 250px; background: var(--card); border: 1px solid var(--line);
           border-radius: 12px; box-shadow: 0 14px 40px var(--shadow2); padding: 6px; z-index: 30; display: flex; flex-direction: column; }
.upid { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.upid b { font-size: 13px; }
.upid span { font-size: 11px; color: var(--dim); }
.upi { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 9px 10px; border-radius: 7px; font-size: 13px;
       font-weight: 700; text-align: left; color: var(--ink); text-decoration: none; }
.upi:hover:not(.row) { background: var(--hov); }
.upi.row { cursor: default; }
.upi.danger { color: var(--bad); }
.upsep { height: 1px; background: var(--line); margin: 4px 6px; }

.body { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; padding: 20px 22px 60px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 78px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 1px 2px var(--shadow); }
.stage { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.state { display: flex; flex-direction: column; gap: 16px; animation: fadein .22s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px var(--shadow); overflow: hidden; }
.card.pad, .pad { padding: 16px 18px; }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cardhead .ch { font-weight: 900; font-size: 13.5px; }
.view { padding: 20px 22px 60px; max-width: 1080px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* ── 新建 ── */
.drop { border: 1.5px dashed var(--line); border-radius: 12px; padding: 22px 14px; text-align: center; cursor: pointer; display: flex; flex-direction: column;
        align-items: center; gap: 8px; color: var(--dim); transition: border-color .15s, background .15s, color .15s; }
.drop b { display: block; color: var(--ink); font-size: 13.5px; }
.drop .dim { display: block; margin-top: 2px; font-weight: 500; }
.drop:hover, .drop.on { border-color: var(--teal); background: var(--mint); color: var(--teal); }
.filelist { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.filelist:empty { display: none; }
.chip { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: var(--bg); border-radius: 8px; font-size: 12.5px; font-weight: 700; }
.chip .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .fs { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.chip button { color: var(--dim); padding: 2px 6px; font-size: 14px; line-height: 1; }
.chip button:hover { color: var(--bad); }
.fld { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.fld > span { font-size: 12px; font-weight: 800; color: var(--dim); }
.seg { display: flex; background: var(--bg); padding: 3px; border-radius: 9px; gap: 3px; }
.seg button { flex: 1; padding: 8px; font-size: 12.5px; font-weight: 700; color: var(--dim); border-radius: 7px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }
.adv { margin-top: 12px; }
.adv summary { cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--dim); list-style: none; display: flex; align-items: center; gap: 6px; }
.adv summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 15px; }
.adv[open] summary::before { transform: rotate(90deg); }
.adv summary::-webkit-details-marker { display: none; }
.ratiorow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ratiorow input { width: 76px; text-align: right; }
.ratiorow i { font-style: normal; font-weight: 800; }
.new .primary { margin-top: 14px; }
.new .tiny { margin-top: 10px; }

/* ── 任务列表 ── */
.allsw { font-size: 11.5px; font-weight: 700; color: var(--dim); display: flex; align-items: center; gap: 4px; }
.allsw input { width: auto; }
.joblist { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.job { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: background .12s, border-color .12s; }
.job:hover { background: var(--hov); }
.job.sel { border-color: var(--teal); background: var(--mint); }
.job .p { font-weight: 900; display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.job .p span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .s { font-size: 11.5px; color: var(--dim); font-weight: 700; margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 10.5px; padding: 2px 8px; border-radius: 20px; font-weight: 900; white-space: nowrap; flex: none; }
.pill.running { background: var(--runbg); color: var(--run); }
.pill.queued { background: var(--bg); color: var(--dim); }
.pill.done { background: var(--okbg); color: var(--ok); }
.pill.problem { background: var(--badbg); color: var(--bad); }
.pill.paused { background: var(--warnbg); color: var(--warn); }
.pill.running::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px;
                        vertical-align: 1px; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.jobbar { height: 3px; background: var(--line2); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.jobbar i { display: block; height: 100%; width: 30%; background: var(--run); border-radius: 2px; animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* ── 空状态 ── */
.welcome { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 40px 36px; display: grid;
           grid-template-columns: 1fr; gap: 14px; justify-items: start; }
.welcome .art { width: 180px; max-width: 40%; opacity: .9; }
.welcome h1 { font-size: 24px; }
.welcome p { margin: 0; max-width: 56ch; }
.how { counter-reset: s; list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.how li { counter-increment: s; background: var(--bg); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--dim); }
.how li b { color: var(--ink); font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.how li b::before { content: counter(s); width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: var(--on-teal); display: grid; place-items: center; font-size: 11px; }

/* ── 进行中 ── */
.runcard { padding: 22px 24px; }
.rhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rhead .pill { font-size: 12px; padding: 5px 12px; }
.stepper { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.stepper li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; padding: 0 6px; }
.stepper li::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.on::before { background: var(--teal); }
.stepper i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; z-index: 1; position: relative; transition: all .2s; }
.stepper li.done i { background: var(--teal); border-color: var(--teal); }
.stepper li.done i::after { content: ""; width: 6px; height: 11px; border: solid var(--on-teal); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.stepper li.on i { border-color: var(--teal); box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 18%, transparent); }
.stepper li.on i::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.6); opacity: .5; } }
.stepper b { font-size: 12.5px; font-weight: 800; color: var(--dim2); }
.stepper li.done b, .stepper li.on b { color: var(--ink); }
.stepper span { font-size: 11.5px; color: var(--dim); font-weight: 600; min-height: 16px; }
.runfoot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.runmeta { font-size: 12.5px; color: var(--dim); font-weight: 700; }

/* ── 出了问题 ── */
.problemcard { padding: 22px 24px; border-color: var(--warnline); }
.phead { display: flex; gap: 16px; align-items: flex-start; }
.picon { width: 46px; height: 46px; border-radius: 12px; background: var(--warnbg); color: var(--warn); display: grid; place-items: center; font-size: 22px; flex: none; }
.picon.bad { background: var(--badbg); color: var(--bad); }
.phead p { margin: 0; max-width: 60ch; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.pbox { background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.pbox .k { font-size: 11px; font-weight: 900; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.acctline { display: flex; align-items: center; gap: 8px; }
.acctline b { font-size: 15px; }
.pfoot { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.contact { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; }
.contact .row { display: flex; align-items: center; gap: 8px; }
.contact .row span:first-child { color: var(--dim); font-size: 12px; font-weight: 800; width: 3.5em; }
.contact .row b { font-family: var(--mono); }
.contact .empty { color: var(--dim); font-weight: 600; font-size: 12.5px; }

/* ── 成果 ── */
.hero { padding: 20px 22px; }
.hhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.hhead h1 { font-size: 22px; }
.hhead p { margin: 0; }
.hbtns { display: flex; gap: 8px; flex: none; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.metrics.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metric .k { font-size: 11px; font-weight: 900; color: var(--dim); letter-spacing: .04em; }
.metric .v { font-size: 24px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 4px; }
.metric .v.small { font-size: 16px; }
.metric .v.warn { color: var(--warn); }
.metric .v i { font-style: normal; font-size: 15px; }
.metric .sub { font-size: 11.5px; font-weight: 600; }
.metric input.ratio { width: 4em; font: inherit; font-weight: 900; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; background: var(--field); }
.files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.files:empty { display: none; }
/* 成果下载卡: 两张大卡, 图标 + 名称 + 格式 + 大小, 整卡可点 */
.dlgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.dlgrid:empty { display: none; }
.dlcard { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px;
          background: var(--card); color: var(--ink); text-decoration: none; min-width: 0;
          transition: border-color .15s, background .15s, transform .12s, box-shadow .15s; }
.dlcard:hover { border-color: var(--teal); background: var(--hov); transform: translateY(-1px); box-shadow: 0 6px 18px var(--shadow); }
.dlcard:hover .arr { background: var(--teal); color: var(--on-teal); }
.dlcard .ico { width: 48px; height: 48px; border-radius: 12px; flex: none; display: grid; place-items: center; }
.dlcard .ico.xlsx { background: var(--xlsbg); color: var(--xlsfg); }
.dlcard .ico.dxf { background: var(--dxfbg); color: var(--dxffg); }
.dlcard .ico svg { width: 26px; height: 26px; }
.dlcard .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dlcard .txt b { font-size: 15px; font-weight: 900; letter-spacing: -.01em; }
.dlcard .txt span { font-size: 12px; color: var(--dim); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlcard .arr { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--mint); color: var(--teal);
               transition: background .15s, color .15s; }
.dlcard.off { opacity: .5; pointer-events: none; }
.dlcard { cursor: pointer; }
.dlcard .arr { text-decoration: none; }
.dlcard .pvtag { display: inline-block; font-size: 10.5px; font-weight: 800; color: var(--teal); background: var(--mint); padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
/* 购买申请表单 */
.buyform { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 4px; }
.buyform label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); font-weight: 700; flex: 1; min-width: 0; }
.buyform .buyrow { display: flex; gap: 10px; }
.buyform .seg { display: flex; gap: 4px; background: var(--bg); padding: 3px; border-radius: 8px; }
.buyform .seg button { flex: 1; padding: 8px; font-size: 12.5px; color: var(--dim); border-radius: 6px; }
.buyform .seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }
.buyfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.buydone { margin: 0 18px; padding: 14px 16px; background: var(--okbg); color: var(--ok); border-radius: 10px; }
.buydone b { display: block; margin-bottom: 4px; }
.buydone p { margin: 0; font-size: 12.5px; font-weight: 600; }
.reqs { border-top: 1px solid var(--line2); }
.reqs .ch { margin-bottom: 8px; }
.req { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line2); font-size: 12.5px; }
.req:last-child { border-bottom: none; }
.req .rq { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.req .rq b { font-weight: 800; }
.req .rq span { color: var(--dim); font-size: 11.5px; font-weight: 600; }
.req .rs { display: flex; align-items: center; gap: 8px; flex: none; }
/* 成果预览弹窗 */
.dlg.wide { width: min(1160px, 96vw); max-height: 92vh; }
.pvhead { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.pvhead b { font-size: 15px; }
.pvbtns { display: flex; gap: 8px; align-items: center; }
.pvbtns a.primary { display: inline-flex; align-items: center; text-decoration: none; }
.pvbody { padding: 0 18px 18px; }
.pvtabs { display: flex; gap: 6px; padding: 12px 0 10px; flex-wrap: wrap; }
.pvtabs button { padding: 6px 12px; font-size: 12.5px; border: 1px solid var(--line); background: var(--card); }
.pvtabs button.on { background: var(--mint); color: var(--teal); border-color: transparent; }
.pvtbl { max-height: 74vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; }
.pvtabs:not([hidden]) + .pvtbl { margin-top: 0; }
.pvtbl table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.pvtbl th { position: sticky; top: 0; z-index: 1; background: var(--hov); text-align: left; padding: 9px 11px; font-size: 11px; color: var(--dim);
            font-weight: 900; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pvtbl td { padding: 7px 11px; border-bottom: 1px solid var(--line2); white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.pvtbl td.n { text-align: right; font-variant-numeric: tabular-nums; }
.pvtbl tr:nth-child(even) td { background: var(--hov); }
.pv3d { position: relative; height: 74vh; min-height: 360px; margin-top: 12px; background: var(--field); border: 1px solid var(--line);
        border-radius: 10px; overflow: hidden; color: var(--teal); touch-action: none; cursor: grab; }
.pv3d:active { cursor: grabbing; }
.pv3d canvas { display: block; }
.pvhint { position: absolute; left: 12px; bottom: 10px; font-size: 11.5px; color: var(--dim); font-weight: 600; pointer-events: none; }
.pvreset { position: absolute; right: 12px; top: 10px; }
@media (max-width: 960px) { .pv3d { height: 62vh; } .pvtbl { max-height: 62vh; } }
.dlcard.off .arr { background: var(--line2); color: var(--dim2); }
.fchip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; font-weight: 800; color: var(--ink); text-decoration: none; }
.fchip:hover { background: var(--hov); border-color: var(--teal); }
.fchip .fs { color: var(--dim); font-family: var(--mono); font-size: 11px; font-weight: 600; }
.rvbody { padding: 12px 18px 16px; font-size: 13px; line-height: 1.65; overflow-x: auto; }
.rvbody table, .md table { border-collapse: collapse; width: 100%; font-size: 12.5px; margin: 8px 0; }
.rvbody th, .rvbody td, .md th, .md td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.rvbody th, .md th { background: var(--hov); font-size: 11.5px; color: var(--dim); }
.rvtable, .md .rvtable { overflow-x: auto; }
.bomwrap { max-height: 560px; overflow: auto; }
.bomwrap table { border-collapse: collapse; width: 100%; font-size: 12.5px; min-width: 900px; }
.bomwrap th { position: sticky; top: 0; background: var(--hov); text-align: left; padding: 9px 11px; font-size: 10.5px; text-transform: uppercase;
              color: var(--dim); font-weight: 900; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.bomwrap td { padding: 7px 11px; border-bottom: 1px solid var(--line2); font-variant-numeric: tabular-nums; }
.bomwrap tr.b-est td { background: var(--estrow); }
.bomwrap tr.b-inf td { background: var(--infrow); }
.bomwrap tr.conn td { font-weight: 800; }
.basis { font-size: 10.5px; padding: 1px 6px; border-radius: 3px; white-space: nowrap; font-weight: 800; }
.basis.b-ok { background: var(--okbg); color: var(--ok); }
.basis.b-inf { background: var(--warnbg); color: var(--warn); }
.basis.b-est { background: var(--badbg); color: var(--bad); }
.fold summary { cursor: pointer; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold .ch { font-weight: 900; font-size: 13.5px; }
.md { padding: 6px 18px 18px; font-size: 13px; line-height: 1.7; overflow-x: auto; }
.md h1, .md h2, .md h3, .md h4 { font-size: 14px; margin: 14px 0 6px; }
.md ul, .md ol { padding-left: 20px; }
.md code { font-family: var(--mono); font-size: 12px; background: var(--hov); padding: 1px 5px; border-radius: 4px; }

/* ── 账单 / 账号 ── */
.plancards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.plancard { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.plancard.on { border-color: var(--teal); border-width: 2px; padding: 15px; }
.plancard .pn { font-weight: 900; font-size: 13.5px; display: flex; justify-content: space-between; }
.plancard .pn .pill { font-size: 10px; }
.plancard .pp { font-size: 26px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plancard .pp u { font-size: 11.5px; color: var(--dim); text-decoration: none; margin-left: 3px; font-weight: 700; }
.plancard ul { margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--dim); font-weight: 600; display: flex; flex-direction: column; gap: 3px; }
.plancard button { margin-top: auto; width: 100%; }
.tblwrap { overflow-x: auto; }
.tblwrap table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.tblwrap th, .tblwrap td { padding: 9px 14px; border-bottom: 1px solid var(--line2); text-align: left; white-space: nowrap; }
.tblwrap th { font-size: 11px; color: var(--dim); text-transform: uppercase; font-weight: 900; }
.tblwrap td.r, .tblwrap th.r { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--dim); font-weight: 600; text-align: center; padding: 26px; }
.acctgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.kv span { color: var(--dim); font-weight: 700; }
.acts { display: flex; align-items: center; gap: 12px; margin-top: 14px; }

/* ── 弹窗 / 通知 / toast ── */
dialog:not([open]) { display: none; }
.dlg { border: none; border-radius: 14px; padding: 0; width: min(760px, 94vw); max-height: 88vh; overflow: auto; background: var(--card); color: var(--ink);
       box-shadow: 0 24px 60px var(--shadow2); }
.dlg.small { width: min(420px, 94vw); }
.dlg::backdrop { background: var(--backdrop); }
.dlghead { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.buy .buysteps { counter-reset: b; list-style: none; margin: 0; padding: 16px 18px 4px; display: flex; flex-direction: column; gap: 10px; }
.buy .buysteps li { counter-increment: b; display: grid; grid-template-columns: 24px 1fr; gap: 2px 10px; font-size: 12.5px; color: var(--dim); }
.buy .buysteps li::before { content: counter(b); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: var(--on-teal);
                            display: grid; place-items: center; font-weight: 900; font-size: 11px; }
.buy .buysteps b { color: var(--ink); font-size: 13.5px; }
.buy .contact { padding: 12px 18px; margin: 8px 18px 0; background: var(--bg); border-radius: 10px; }
.buy > .dim { padding: 14px 18px 4px; }
.buy .acctline { padding: 0 18px 18px; }
.belllist { display: flex; flex-direction: column; }
.nf { display: flex; flex-direction: column; gap: 3px; padding: 12px 18px; border-bottom: 1px solid var(--line); text-align: left; width: 100%;
      background: none; border-left: 3px solid transparent; border-radius: 0; }
.nf:last-child { border-bottom: none; }
.nf[data-unread] { border-left-color: var(--teal); background: var(--mint); }
.nf .t { font-weight: 800; font-size: 13.5px; }
.nf .b { font-size: 12.5px; color: var(--dim); line-height: 1.55; font-weight: 500; }
.nf .w { font-size: 11px; color: var(--dim2); font-weight: 600; }
.nf[data-job]:hover { background: var(--hov); cursor: pointer; }
.nf.bad .t { color: var(--bad); }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 90; background: #1B2028; color: #F2F4F7; padding: 12px 20px;
         border-radius: 10px; font-size: 13.5px; box-shadow: 0 10px 34px rgba(0,0,0,.5); max-width: min(460px, 90vw); text-align: center; font-weight: 700; }
.toast.bad { background: var(--bad); }

@media (max-width: 960px) {
  .body { grid-template-columns: 1fr; }
  .side { position: static; }
  .joblist { max-height: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .stepper { grid-template-columns: repeat(5, 1fr); }
  .stepper b { font-size: 11px; }
  .pgrid, .acctgrid { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .views { display: none; }
  .topbar { padding: 0 14px; }
  /* 窄屏上表格不挤成一团: 给个最小宽度, 在卡片里横向滚动 */
  .rvbody table, .md table { min-width: 640px; }
  .rvbody, .md { -webkit-overflow-scrolling: touch; }
  .bomwrap { max-height: 70vh; }
  .stage { scroll-margin-top: 72px; }
  .dlgrid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
