/* =====================================================================
   网盘推广工作台 · 界面样式
   设计取向：浅色、安静、好读。暖灰底 + 单一蓝色强调色，细边框 + 柔和阴影，
   数字一律等宽对齐。只改样式不改结构：所有类名与页面结构保持不变。
   ===================================================================== */

@font-face {
  font-family: "Geist"; src: url("/static/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono"; src: url("/static/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  /* 中性色：同一个暖灰家族 */
  --bg: #f6f5f2;
  --bg-deep: #efede8;
  --panel: #ffffff;
  --sunken: #f9f8f6;
  --text: #1d1c1a;
  --text-2: #4a4843;
  --muted: #858279;
  --faint: #b9b5ab;
  --line: #e8e5de;
  --line-soft: #f0eee9;

  /* 唯一的强调色 */
  --brand: #2c5bd8;
  --brand-hover: #2550c2;
  --brand-soft: #ecf1fd;
  --brand-ring: rgba(44, 91, 216, .18);

  /* 状态色（饱和度压低） */
  --ok: #1f8a55;
  --ok-soft: #e8f5ee;
  --warn: #d0453f;
  --warn-soft: #fcefee;
  --amber: #b97700;
  --amber-ink: #85570a;
  --amber-soft: #fdf5e4;

  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(48, 40, 24, .05);
  --shadow: 0 1px 2px rgba(48, 40, 24, .04), 0 2px 10px -2px rgba(48, 40, 24, .06);
  --shadow-lg: 0 2px 6px rgba(48, 40, 24, .05), 0 18px 48px -12px rgba(48, 40, 24, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --font: "Geist", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --z-sticky: 5; --z-toast: 30; --z-modal: 20;
}

* { box-sizing: border-box; }
[v-cloak] { display: none; }
html, body { margin: 0; min-height: 100%; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font: 14px/1.6 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
#app { display: flex; min-height: 100dvh; }
a { color: var(--brand); cursor: pointer; text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-hover); }
code { font-family: var(--mono); background: var(--bg-deep); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
h1 { font-size: 24px; line-height: 1.25; font-weight: 650; margin: 0 0 6px; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 15.5px; line-height: 1.4; font-weight: 600; margin: 0 0 3px; letter-spacing: -.005em; }
p { margin: 0; text-wrap: pretty; }
b { font-weight: 600; }
::selection { background: var(--brand-ring); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- 侧栏 ---------- */
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--bg); color: var(--text-2);
  display: flex; flex-direction: column; padding: 22px 14px 16px; position: sticky; top: 0; height: 100dvh;
  border-right: 1px solid var(--line);
}
.brand { display: flex; gap: 11px; align-items: center; padding: 2px 8px 26px; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; font-size: 15px; color: #fff; background: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 6px -1px rgba(29, 28, 26, .35);
}
.brand-name { color: var(--text); font-weight: 650; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--muted); }
.env-label { margin-left: 6px; padding: 0 6px; border-radius: 5px; background: var(--amber-soft); color: var(--amber-ink); font-weight: 600; }
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--text-2);
  font-weight: 500; transition: background .18s var(--ease), color .18s, box-shadow .18s;
}
nav a:hover { background: var(--bg-deep); color: var(--text); }
nav a.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
nav a.active .nav-ico { color: var(--brand); }
.nav-ico { width: 18px; height: 18px; display: inline-flex; color: var(--muted); transition: color .18s; }
nav a:hover .nav-ico { color: var(--text-2); }
.nav-ico svg { width: 18px; height: 18px; }
.badge {
  margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; border-radius: 6px;
  padding: 0 6px; line-height: 18px; font-variant-numeric: tabular-nums;
}
.me { display: flex; gap: 10px; align-items: center; padding: 14px 8px 4px; border-top: 1px solid var(--line); color: var(--text); }
.avatar {
  width: 30px; height: 30px; border-radius: 9px; background: var(--bg-deep); color: var(--text-2);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; flex-shrink: 0; box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- 主区域 ---------- */
main { flex: 1; min-width: 0; padding: 34px 44px 72px; max-width: 1240px; }
main > section { animation: rise .35s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; gap: 20px; }
.page-head p { max-width: 76ch; }
.speed-pill, .quota-pill {
  display: flex; align-items: center; gap: 8px; background: var(--panel); border-radius: 999px; padding: 6px 13px;
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--muted); font-size: 13px;
}
.speed-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.speed-pill.on { color: var(--text); }
.speed-pill.on .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 5px rgba(31, 138, 85, .08); } }

.setup-hint {
  background: var(--amber-soft); color: var(--amber-ink); border-radius: var(--radius); padding: 11px 16px; margin-bottom: 18px;
  box-shadow: inset 0 0 0 1px rgba(185, 119, 0, .14);
}
.setup-hint.offline { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(208, 69, 63, .16); }
.setup-hint a { margin-left: 6px; font-weight: 600; }

.card {
  background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--shadow), 0 0 0 1px var(--line);
  padding: 20px 22px 22px; margin-bottom: 18px;
}

/* 统计：一条整体的数据带，而不是五个零散的盒子 */
.scope-label { font-size: 12.5px; font-weight: 550; color: var(--muted); margin: 0 0 8px 2px; }
.stats {
  display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 18px; background: var(--panel);
  border-radius: var(--radius-lg); box-shadow: var(--shadow), 0 0 0 1px var(--line); overflow: hidden;
}
.stat { padding: 16px 20px 15px; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: var(--line); }
.stat-num { font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.stat.warn .stat-num { color: var(--warn); }

/* ---------- 输入框 ---------- */
.composer { padding: 16px; }
.composer textarea {
  width: 100%; border: 0; border-radius: var(--radius); padding: 14px 16px; resize: vertical; min-height: 112px;
  font: inherit; line-height: 1.7; background: var(--sunken); outline: none; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-soft); transition: box-shadow .2s var(--ease), background .2s;
}
.composer textarea::placeholder { color: var(--faint); }
.composer textarea:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-ring); }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 14px; padding: 0 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 2px 9px; font-size: 12.5px;
  font-variant-numeric: tabular-nums; animation: pop .22s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.chip.dup { background: var(--bg-deep); color: var(--muted); text-decoration: line-through; }
.chip.nopwd { background: var(--amber-soft); color: var(--amber-ink); }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  border: 0; background: var(--panel); color: var(--text); border-radius: 9px; padding: 8px 16px;
  font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; line-height: 1.45;
  box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--line);
  transition: background .16s, color .16s, box-shadow .16s, transform .12s var(--ease);
}
.btn:hover { background: var(--sunken); box-shadow: var(--shadow-xs), inset 0 0 0 1px #d9d5cc; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring), inset 0 0 0 1px var(--brand); }
.btn.primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 1px 2px rgba(30, 60, 150, .25), inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.btn.primary:hover { background: var(--brand-hover); }
.btn.primary:focus-visible { box-shadow: 0 0 0 3px var(--brand-ring); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.small { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { background: var(--bg-deep); color: var(--text); }
.btn.danger:hover { color: var(--warn); background: var(--warn-soft); }
.row { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; margin-top: 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; }
.form-grid label > span, .field > span { font-weight: 550; font-size: 13px; color: var(--text-2); }
.form-grid input, .form-grid select, .form-grid textarea, .field input {
  border: 0; border-radius: 9px; padding: 9px 12px; font: inherit; outline: none; color: var(--text);
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-xs);
  transition: box-shadow .18s var(--ease);
}
.form-grid input:hover, .form-grid select:hover, .form-grid textarea:hover, .field input:hover { box-shadow: inset 0 0 0 1px #d9d5cc, var(--shadow-xs); }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .field input:focus {
  box-shadow: inset 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-ring);
}
.form-grid input::placeholder, .field input::placeholder { color: var(--faint); }
.form-grid em { font-style: normal; }
select { cursor: pointer; }

/* ---------- 任务列表 ---------- */
.tabs { display: flex; align-items: center; gap: 2px; margin: 26px 0 14px; flex-wrap: wrap; }
.tabs a {
  padding: 6px 13px; color: var(--muted); border-radius: 8px; font-weight: 500;
  transition: background .16s, color .16s;
}
.tabs a:hover { color: var(--text); background: var(--bg-deep); }
.tabs a.active { color: var(--text); background: var(--panel); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.tabs a .muted { font-variant-numeric: tabular-nums; margin-left: 2px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.empty {
  text-align: center; color: var(--muted); padding: 64px 20px; background: var(--panel); border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--line); background-image: radial-gradient(circle at 50% 0, var(--sunken), transparent 70%);
}
.empty-ico {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center;
  font-size: 22px; color: var(--muted); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
}

.task {
  display: grid; grid-template-columns: minmax(0, 1fr) 236px auto; gap: 24px; align-items: center;
  background: var(--panel); border-radius: var(--radius); padding: 15px 18px 15px 20px; position: relative;
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); transition: box-shadow .2s var(--ease);
}
.task:hover { box-shadow: var(--shadow), 0 0 0 1px #ddd9d0; }
.task::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.task.failed::before { background: var(--warn); }
.task.transferring::before, .task.relaying::before, .task.downloading::before, .task.uploading::before, .task.sharing::before { background: var(--brand); }
.task-main { min-width: 0; }
.task-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.task-title .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.005em; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.task-meta .link { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.task-meta .link:hover { color: var(--brand); }
.tag {
  flex-shrink: 0; font-size: 11.5px; font-weight: 550; border-radius: 5px; padding: 1px 7px; line-height: 18px; white-space: nowrap;
  background: var(--bg-deep); color: var(--text-2);
}
.tag.s-transferring, .tag.s-relaying, .tag.s-downloading, .tag.s-uploading, .tag.s-sharing { background: var(--brand-soft); color: var(--brand); }
.tag.s-wait_upload { background: var(--amber-soft); color: var(--amber-ink); }
.tag.s-done { background: var(--ok-soft); color: var(--ok); }
.tag.s-failed { background: var(--warn-soft); color: var(--warn); }

.progress { margin-top: 12px; }
.bar { height: 6px; background: var(--bg-deep); border-radius: 99px; overflow: hidden; }
.bar.thin { height: 4px; margin-top: 7px; }
.fill {
  height: 100%; border-radius: 99px; transition: width .6s var(--ease);
  background: linear-gradient(90deg, var(--brand), #5b82ea);
  background-size: 200% 100%; animation: flow 2.4s linear infinite;
}
@keyframes flow { to { background-position: -200% 0; } }
.progress-text { display: flex; gap: 14px; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress-text .file { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.error { color: var(--warn); margin-top: 8px; }
.ok-text { color: var(--ok); }

.steps { display: flex; justify-content: space-between; position: relative; }
.steps::before { content: ""; position: absolute; left: 22px; right: 22px; top: 6px; height: 2px; border-radius: 2px; background: var(--line); }
.step { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; width: 44px; }
.step-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2px solid #d8d4ca; transition: all .3s var(--ease); }
.step-label { font-size: 12px; color: var(--muted); }
.step.done .step-dot { background: var(--ok); border-color: var(--ok); }
.step.run .step-dot { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); animation: pulse 1.6s infinite; }
.step.run .step-label, .step.wait .step-label { color: var(--text); font-weight: 550; }
.step.wait .step-dot { border-color: var(--brand); }
.step.fail .step-dot { background: var(--warn); border-color: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(44, 91, 216, .07); } }
.actions { display: flex; gap: 4px; align-items: center; }

/* ---------- 账号 ---------- */
.account-head { display: flex; gap: 14px; align-items: flex-start; }
.account-head > div:nth-child(2) { flex: 1; }
.account-head p { max-width: 70ch; margin-top: 2px; }
.acc-ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 6px -2px rgba(29, 28, 26, .3);
}
.acc-ico.baidu { background: #2f6ae0; }
.acc-ico.xunlei { background: #1a8cf0; }
.acc-ico.quark { background: #6a5cf5; }
.acc-ico.ai { background: var(--text); font-size: 13px; }
.status {
  font-size: 12px; font-weight: 550; border-radius: 6px; padding: 2px 9px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.off { background: var(--bg-deep); color: var(--muted); }
.status.warn { background: var(--amber-soft); color: var(--amber-ink); }
.seg { display: inline-flex; background: var(--bg-deep); border-radius: 10px; padding: 3px; margin-top: 16px; gap: 2px; }
.seg a { padding: 5px 14px; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 500; transition: color .15s, background .15s; }
.seg a:hover { color: var(--text); }
.seg a.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.promo { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 13px 16px; background: var(--sunken); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line-soft); }
.promo > div:first-child { flex: 1; min-width: 0; }
.promo-path { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.promo-path.unset { color: var(--amber-ink); font-weight: 500; }
.picker { margin-top: 12px; border-radius: var(--radius); padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; margin-bottom: 8px; }
.crumbs span { color: var(--faint); }
.picker-list { max-height: 260px; overflow: auto; border-radius: 9px; background: var(--sunken); }
.picker-item { display: block; padding: 8px 12px; color: var(--text); border-bottom: 1px solid var(--line-soft); transition: background .12s; }
.picker-item:hover { background: var(--brand-soft); color: var(--text); }
.pad { padding: 14px; }
input.mini { border: 0; border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12.5px; width: 180px; outline: none; box-shadow: inset 0 0 0 1px var(--line); }
input.mini:focus { box-shadow: inset 0 0 0 1px var(--brand), 0 0 0 3px var(--brand-ring); }
.share {
  display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 10px; padding: 7px 11px; max-width: 100%;
  background: var(--ok-soft); border-radius: 9px; font-variant-numeric: tabular-nums;
}
.share a { font-family: var(--mono); font-size: 12px; }
.share-tag { color: var(--ok); font-weight: 600; }
.phase { color: var(--brand); font-weight: 600; }
.account.disabled { opacity: .7; }
.acc-info { display: flex; gap: 32px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.acc-info > div { display: flex; gap: 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.acc-info .quota { flex-wrap: wrap; min-width: 220px; }
.acc-info .quota .bar { flex-basis: 100%; }
.qr-box { display: flex; gap: 18px; align-items: center; margin-top: 16px; padding: 14px; background: var(--sunken); border-radius: var(--radius); animation: rise .3s var(--ease) both; }
.qr-box img { width: 150px; height: 150px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.howto { margin-top: 14px; background: var(--sunken); border-radius: 10px; padding: 9px 14px; box-shadow: inset 0 0 0 1px var(--line-soft); }
.howto summary { cursor: pointer; color: var(--brand); font-weight: 500; list-style: none; display: flex; align-items: center; gap: 7px; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before {
  content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform .2s var(--ease); margin: 0 2px 0 1px;
}
.howto[open] summary::before { transform: rotate(45deg) translate(-1px, -1px); }
.howto[open] summary { margin-bottom: 4px; }
.howto ol { margin: 8px 0; padding-left: 20px; color: var(--text-2); }
.howto li { margin: 3px 0; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast);
  background: rgba(29, 28, 26, .92); color: #fff; padding: 10px 18px; border-radius: 11px; font-weight: 500;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); animation: toast-in .28s var(--ease) both; max-width: calc(100vw - 32px);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.err { background: var(--warn); }

.note { color: var(--amber-ink); background: var(--amber-soft); border-radius: 7px; padding: 5px 10px; margin-top: 10px; }
.mode { border-radius: 5px; padding: 0 6px; background: var(--bg-deep); color: var(--text-2); font-size: 12px; }
.mode.cloud { background: var(--ok-soft); color: var(--ok); }
.mode.mixed { background: var(--amber-soft); color: var(--amber-ink); }
.head-pills { display: flex; gap: 8px; align-items: center; }
.quota-pill.empty { background: var(--amber-soft); box-shadow: none; color: var(--amber-ink); }

/* ---------- 登录 ---------- */
.auth-wrap {
  flex: 1; display: grid; place-items: center; padding: 24px 16px; min-height: 100dvh; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 480px at 18% -8%, rgba(44, 91, 216, .10), transparent 62%),
    radial-gradient(700px 420px at 100% 110%, rgba(185, 119, 0, .07), transparent 60%),
    var(--bg);
}
.auth-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
}
.auth-card {
  position: relative; width: 100%; max-width: 390px; background: var(--panel); border-radius: 20px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); padding: 30px 30px 26px;
  display: flex; flex-direction: column; gap: 14px; animation: rise .45s var(--ease) both;
}
.auth-card h2 { font-size: 20px; font-weight: 650; letter-spacing: -.015em; margin: 6px 0 0; }
.auth-brand { padding: 0 0 4px; }
.brand-name.dark { color: var(--text); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field input { padding: 10px 12px; }
.btn.block { width: 100%; padding: 10px; margin-top: 6px; }

/* ---------- 侧栏用户 ---------- */
.me { flex-wrap: wrap; }
.me-info { flex: 1; min-width: 0; font-weight: 550; }
.me-info .muted { font-weight: 400; }
.me-info > div:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-actions { display: flex; gap: 14px; width: 100%; padding-left: 40px; font-size: 12.5px; }
.me-actions a { color: var(--muted); }
.me-actions a:hover { color: var(--text); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(29, 28, 26, .32); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: var(--z-modal); padding: 16px; animation: fade .2s ease both;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--panel); border-radius: 18px; padding: 24px 26px; width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
  animation: rise .28s var(--ease) both;
}

/* ---------- 表格（成员 / 绩效 / 日志） ---------- */
.form-grid.four { grid-template-columns: repeat(4, 1fr); }
.table-card { padding: 4px 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-weight: 550; font-size: 12px; color: var(--muted); padding: 11px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap; letter-spacing: .01em;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-variant-numeric: tabular-nums; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--sunken); }
.table tr:last-child td { border-bottom: none; }
.table tr.disabled td { opacity: .55; }
.table td.actions { display: table-cell; white-space: nowrap; text-align: right; }
.table td.actions .btn { margin-left: 2px; }
.owner-filter, .filters input[type=date] {
  border: 0; border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 13px; background: var(--panel); color: var(--text);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--line); outline: none;
}
.owner-filter { margin: 0 8px 0 0; align-self: center; }
.owner-filter:focus, .filters input[type=date]:focus { box-shadow: inset 0 0 0 1px var(--brand), 0 0 0 3px var(--brand-ring); }

/* ---------- 绩效 ---------- */
.sync-box { display: flex; align-items: center; gap: 10px; }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters .seg { margin-top: 0; }
.filters .owner-filter { margin: 0; }
.chart-card { padding-bottom: 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.chart-head.pad-x { padding: 14px 16px 0; margin-bottom: 4px; }
.chart { position: relative; height: 220px; padding: 0 0 22px 28px; }
.chart svg { width: 100%; height: 200px; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .bar { fill: var(--brand); transition: opacity .15s, fill .15s; }
.chart .bar.dim { opacity: .3; }
.chart rect { cursor: default; }
.y-labels { position: absolute; left: 0; top: 0; width: 24px; height: 200px; }
.y-labels span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.x-labels { position: absolute; left: 28px; right: 0; bottom: 0; height: 18px; }
.x-labels span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip {
  position: absolute; top: 4px; transform: translateX(-50%); margin-left: 14px; background: rgba(29, 28, 26, .94); color: #fff;
  border-radius: 9px; padding: 6px 10px; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow-lg); z-index: 2;
  font-variant-numeric: tabular-nums;
}
.tip .muted { color: #b9b5ab; }
.center { text-align: center; }
.rank {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--bg-deep); color: var(--muted);
  font-size: 11.5px; font-weight: 600; margin-right: 8px; font-variant-numeric: tabular-nums;
}
.table tr:first-child .rank { background: var(--text); color: #fff; }
.num-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.inline-bar { display: inline-block; width: 60px; height: 6px; background: var(--bg-deep); border-radius: 99px; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.inline-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.title-cell { max-width: 360px; }
.title-cell b { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ---------- 系统状态 ---------- */
.health { display: flex; align-items: center; gap: 9px; }
.health i { width: 9px; height: 9px; border-radius: 50%; }
.health i.good { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.health i.bad { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.small-num { font-size: 17px; padding: 3px 0; }
.row-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.log-msg { word-break: break-all; }
.restore-banner { background: var(--amber-soft); color: var(--amber-ink); border-radius: var(--radius); padding: 11px 16px; margin-bottom: 18px; }
.restore-banner a { margin-left: 8px; font-weight: 600; }
a.btn { display: inline-block; }
.public-url .mono { font-family: var(--mono); font-size: 13.5px; word-break: break-all; }

/* ---------- 素材工坊 ---------- */
.mini-seg { margin: 0 0 8px; align-self: flex-start; }
.form-grid textarea { resize: vertical; }
.form-grid .span2 { grid-column: span 2; }
.form-grid.three { grid-template-columns: 1fr 2fr 2fr; }
.proj {
  display: flex; gap: 16px; background: var(--panel); border-radius: var(--radius); padding: 12px; cursor: pointer;
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.proj:hover { box-shadow: var(--shadow), 0 0 0 1px #d9d5cc; transform: translateY(-1px); }
.proj-thumb { width: 72px; height: 96px; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: var(--bg-deep); }
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proj-ph { display: grid; place-items: center; height: 100%; font-size: 12px; color: var(--muted); }
.proj-main { min-width: 0; flex: 1; padding-top: 6px; }
.tag.cs-running, .tag.cs-queued { background: var(--brand-soft); color: var(--brand); }
.tag.cs-done { background: var(--ok-soft); color: var(--ok); }
.tag.cs-failed { background: var(--warn-soft); color: var(--warn); }
.detail-head { margin: 0 0 10px; }
.detail-head h2 { margin: 0; font-size: 19px; letter-spacing: -.015em; }
.grow { flex: 1; min-width: 0; }
.gen-steps { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.gen-step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.gen-step i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #d8d4ca; }
.gen-step.done { color: var(--text); } .gen-step.done i { background: var(--ok); border-color: var(--ok); }
.gen-step.run { color: var(--brand); font-weight: 600; } .gen-step.run i { background: var(--brand); border-color: var(--brand); animation: pulse 1.6s infinite; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.thumbs img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 9px; cursor: zoom-in; background: var(--bg-deep);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-xs); transition: transform .2s var(--ease), box-shadow .2s;
}
.thumbs img:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.small-thumbs { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); margin: 10px 0; }
.side { display: flex; flex-direction: column; gap: 0; }
.tip-card { background: var(--amber-soft); box-shadow: inset 0 0 0 1px rgba(185, 119, 0, .16); }
.tip-card ul { margin: 6px 0 0; padding-left: 18px; }
.copy-card { display: flex; flex-direction: column; gap: 12px; }
.copy-row { display: flex; align-items: baseline; gap: 10px; }
.copy-row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.copy-row b { flex: 1; }
.caption { white-space: pre-wrap; font-size: 13.5px; line-height: 1.7; background: var(--sunken); border-radius: 9px; padding: 11px 13px; }
.tags { color: var(--brand); font-size: 13px; }
.bench-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bench-list .empty { grid-column: 1 / -1; }
.bench-card { cursor: pointer; margin: 0; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.bench-card:hover { box-shadow: var(--shadow), 0 0 0 1px #d9d5cc; transform: translateY(-1px); }
.swatches { display: flex; gap: 6px; align-items: center; }
.swatches i { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.analysis > div, .analysis > p { margin-top: 12px; }
.analysis ul { margin: 4px 0 0; padding-left: 18px; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.an-grid p { margin-top: 2px; }
.samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sample { margin: 0; }
.pre { white-space: pre-wrap; }
.danger-link { color: var(--warn); margin-left: auto; }
.danger-link:hover { color: var(--warn); text-decoration: underline; }
.lightbox { background: rgba(20, 19, 17, .88); }
.lightbox img { max-height: 92vh; max-width: 92vw; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%); font-size: 46px; color: #fff; background: rgba(255,255,255,.08);
  border: 0; width: 56px; height: 80px; border-radius: 12px; cursor: pointer; transition: background .15s;
}
.lb-nav:hover { background: rgba(255,255,255,.16); }
.lb-nav.left { left: 24px; } .lb-nav.right { right: 24px; }
.modal.wide { max-width: 760px; max-height: 90vh; }
.edit-scroll { overflow: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 14px; }
.edit-page { border-top: 1px solid var(--line); padding-top: 12px; }
.edit-page .form-grid { margin-top: 8px; }
.sub-edit { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.sub-edit .form-grid { margin-top: 0; gap: 8px 12px; }

/* ---------- 百度两步登录 ---------- */
.bd-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.bd-step { background: var(--sunken); border-radius: var(--radius); padding: 15px 17px; box-shadow: inset 0 0 0 1px var(--line-soft); }
.bd-step .qr-box { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.bd-step .qr-box img { width: 140px; height: 140px; }
.bd-state { margin-top: 9px; }
.step-num {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--panel); color: var(--muted);
  font-size: 12px; font-weight: 650; box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums;
}
.step-num.done { background: var(--ok); color: #fff; box-shadow: none; }

.ready-warn { background: var(--amber-soft); box-shadow: inset 0 0 0 1px rgba(185, 119, 0, .18); }
.ready-warn-title { font-weight: 600; margin-bottom: 8px; color: var(--amber-ink); }
.ready-warn ul { margin: 0 0 14px; padding: 0; list-style: none; line-height: 1.9; color: var(--text-2); }
.ready-warn li { display: flex; align-items: center; gap: 9px; }
.ready-warn li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.6px dashed var(--amber); flex-shrink: 0; }

/* ---------- 窄屏 ---------- */
@media (max-width: 1100px) {
  main { padding: 28px 28px 64px; }
  .task { grid-template-columns: minmax(0, 1fr) 200px auto; gap: 18px; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4)::before { display: none; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
  .task { grid-template-columns: 1fr; gap: 14px; }
  .steps { max-width: 280px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .form-grid.four { grid-template-columns: 1fr 1fr; }
  .sidebar { width: 68px; padding: 18px 10px; }
  .brand { justify-content: center; padding: 2px 0 22px; }
  .brand > div:last-child { display: none; }
  nav a { font-size: 0; justify-content: center; padding: 10px; }
  .badge { display: none; }
  main { padding: 22px 16px 56px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .me { justify-content: center; }
  .me-info { display: none; }
  .me-actions { padding-left: 0; flex-direction: column; align-items: center; gap: 4px; white-space: nowrap; font-size: 11.5px; }
  .studio-grid, .an-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
  .bd-steps { grid-template-columns: 1fr; }
  .composer-foot { flex-direction: column; align-items: stretch; }
  .composer-foot .btn { width: 100%; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd)::before { display: none; }
  .stat:nth-child(4)::before { display: block; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .stat { padding: 14px 16px 13px; }
  .stat-num { font-size: 20px; white-space: nowrap; }
  .head-pills { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 来源网盘标记（百度 / 夸克） */
.src { flex-shrink: 0; font-size: 11px; font-weight: 600; border-radius: 4px; padding: 0 5px; line-height: 17px;
  margin-right: 5px; background: var(--bg-deep); color: var(--text-2); }
.src.baidu { background: #e9f0fd; color: #2f6ae0; }
.src.quark { background: #efedfe; color: #5b4ee6; }
.chip .src { margin-right: 4px; }

/* 推广文件夹（多个） */
.promo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.promo-list { margin-top: 10px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.promo-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.promo-item:last-child { border-bottom: 0; }
.promo-item .promo-path { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.promo-empty { padding: 14px; color: var(--amber-ink); background: var(--amber-soft); }
.picker-row { display: flex; align-items: center; gap: 8px; padding-right: 10px; border-bottom: 1px solid var(--line-soft); }
.picker-row .picker-item { border-bottom: 0; }
.submit-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.target-folder { display: flex; align-items: center; gap: 8px; }
.target-folder select { max-width: 280px; border: 0; border-radius: 9px; padding: 7px 10px; font: inherit; font-size: 13px; background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-xs); outline: none; }
.target-folder select:focus { box-shadow: inset 0 0 0 1px var(--brand), 0 0 0 3px var(--brand-ring); }
@media (max-width: 900px) { .submit-group { justify-content: stretch; } .target-folder, .target-folder select { width: 100%; max-width: none; } }
