/* 乔康加个人资料库 v2 —— 视觉主题
   浅色（白色）默认 · 青蓝→靛蓝点缀 · 白卡片/淡灰细边框/柔和阴影
   深色主题保留，右上角可切换；Inter 为自托管字体（public/fonts）。 */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --bg-deep: #eef1f5;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-3: #f2f5f9;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --panel-strong: #ffffff;
  --field: #ffffff;
  --field-focus: #ffffff;
  --donut-hole: #ffffff;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e6eaf0;
  --line-strong: #d0d7e2;
  --accent: #0891b2;
  --accent-2: #0e7490;
  --accent-soft: rgba(8, 145, 178, .09);
  --accent-ink: #ffffff;
  --gold: #b45309;
  --gold-2: #b45309;
  --gold-soft: rgba(245, 158, 11, .10);
  --danger: #d92d20;
  --danger-soft: rgba(217, 45, 32, .08);
  --ok: #067647;
  --ok-soft: rgba(6, 118, 71, .09);
  --cyan: #06b6d4;
  --indigo: #3b82f6;
  --purple: #6366f1;
  --pink: #0ea5e9;
  --grad: linear-gradient(135deg, #06b6d4 0%, #3b82f6 52%, #4f46e5 100%);
  --grad-text: linear-gradient(100deg, #0891b2 0%, #2563eb 58%, #4f46e5 100%);
  --grad-soft: linear-gradient(135deg, rgba(6, 182, 212, .10), rgba(59, 130, 246, .08) 52%, rgba(79, 70, 229, .08));
  --edge: linear-gradient(145deg, #d7dee8, #e8edf3 45%, #d7dee8);
  --edge-soft: linear-gradient(145deg, #e3e8ef, #eef1f5 46%, #e3e8ef);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .14);
  --glow: 0 10px 28px rgba(8, 145, 178, .14);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --grid-line: transparent;
  --orb-opacity: 0;
  --scene-bg: #f7f8fa;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
  --mono: "Inter", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --code: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-deep: #070b16;
  --surface: rgba(22, 29, 55, .62);
  --surface-2: rgba(26, 34, 63, .50);
  --surface-3: rgba(129, 140, 248, .12);
  --panel: rgba(18, 25, 48, .64);
  --panel-2: rgba(25, 33, 62, .82);
  --panel-strong: rgba(14, 20, 40, .93);
  --field: rgba(8, 13, 28, .48);
  --field-focus: rgba(10, 16, 34, .78);
  --donut-hole: #10182f;
  --ink: #eef2ff;
  --ink-2: #c7d2fe;
  --muted: #94a3c4;
  --muted-2: #6f7ea6;
  --line: rgba(148, 163, 184, .15);
  --line-strong: rgba(148, 163, 184, .28);
  --accent: #818cf8;
  --accent-2: #a5b4fc;
  --accent-soft: rgba(99, 102, 241, .20);
  --accent-ink: #ffffff;
  --gold: #c084fc;
  --gold-2: #d8b4fe;
  --gold-soft: rgba(168, 85, 247, .15);
  --danger: #fb7185;
  --danger-soft: rgba(244, 63, 94, .15);
  --ok: #34d399;
  --ok-soft: rgba(16, 185, 129, .14);
  --cyan: #22d3ee;
  --indigo: #818cf8;
  --purple: #c084fc;
  --pink: #f472b6;
  --grad-text: linear-gradient(100deg, #67e8f9 0%, #a5b4fc 52%, #e9d5ff 100%);
  --edge: linear-gradient(145deg, rgba(34, 211, 238, .58), rgba(99, 102, 241, .20) 46%, rgba(168, 85, 247, .52));
  --edge-soft: linear-gradient(145deg, rgba(34, 211, 238, .30), rgba(99, 102, 241, .10) 46%, rgba(168, 85, 247, .30));
  --shadow: 0 20px 54px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 255, 255, .01);
  --shadow-lg: 0 44px 110px rgba(0, 0, 0, .62);
  --glow: 0 20px 56px rgba(99, 102, 241, .32);
  --grid-line: rgba(129, 140, 248, .08);
  --orb-opacity: .75;
  --scene-bg:
    radial-gradient(1100px 760px at 50% -20%, rgba(99, 102, 241, .10), transparent 65%),
    radial-gradient(900px 700px at 100% 105%, rgba(168, 85, 247, .08), transparent 62%),
    #0b1020;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.3; }
p { margin: 0; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.noscript { padding: 30px; text-align: center; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 背景光斑与网格 ---------------- */
.bg-scene {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: var(--scene-bg);
}
.bg-grid {
  position: absolute; inset: -8%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 18%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 18%, #000 20%, transparent 78%);
}
.orb {
  position: absolute; border-radius: 50%; opacity: var(--orb-opacity);
  filter: blur(72px); will-change: transform;
  animation: orbDrift 24s ease-in-out infinite alternate;
}
/* 浅色主题去掉偏粉/偏紫的光斑与网格，只留干净的白色底 */
html:not([data-theme="dark"]) .orb { display: none; }
.orb-a {
  width: 560px; height: 560px; left: -140px; top: -180px;
  background: radial-gradient(circle at 40% 40%, rgba(34, 211, 238, .75), rgba(34, 211, 238, 0) 68%);
}
.orb-b {
  width: 640px; height: 640px; right: -180px; top: -120px;
  background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, .62), rgba(168, 85, 247, 0) 68%);
  animation-delay: -8s;
}
.orb-c {
  width: 620px; height: 620px; left: 38%; bottom: -320px;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, .55), rgba(99, 102, 241, 0) 68%);
  animation-delay: -14s;
}
@keyframes orbDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(46px, 34px, 0) scale(1.08); }
}

#boot, #loginView, .app { position: relative; z-index: 1; }

/* ---------------- 启动 ---------------- */
.boot-screen {
  min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px;
  color: var(--muted);
}
.boot-mark, .brand-mark {
  display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 17px;
  background: var(--grad); color: #fff; font-family: var(--sans); font-size: 27px; font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: 0 12px 30px rgba(99, 102, 241, .38), inset 0 1px 0 rgba(255, 255, 255, .42);
}
.boot-mark { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.93); opacity: .78; } }

/* ---------------- 登录 ---------------- */
.login-view {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: 1.12fr .88fr; gap: 24px;
  padding: 24px; align-items: stretch;
}
.login-theme {
  position: fixed; top: 30px; right: 34px; z-index: 5;
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--ink-2);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.login-theme:hover { color: var(--accent-2); border-color: var(--line-strong); transform: translateY(-1px); }
.login-art {
  position: relative; overflow: hidden; padding: 60px 56px;
  display: flex; align-items: flex-end; border-radius: 30px;
  min-height: 560px;
  background:
    radial-gradient(720px 520px at 82% 4%, rgba(6, 182, 212, .11), transparent 64%),
    radial-gradient(680px 460px at 8% 92%, rgba(59, 130, 246, .07), transparent 66%),
    linear-gradient(155deg, #ffffff 0%, #f9fbfd 55%, #eef6fb 100%);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(16, 24, 40, .08), inset 0 1px 0 #fff;
  color: var(--ink);
}
.login-art::before {
  content: ""; position: absolute; width: 460px; height: 460px; right: -140px; top: -170px; border-radius: 50%;
  border: 1px solid rgba(6, 182, 212, .20);
  box-shadow:
    0 0 0 38px rgba(59, 130, 246, .045),
    0 0 0 82px rgba(6, 182, 212, .03),
    inset 0 0 90px rgba(6, 182, 212, .06);
}
.login-art::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 260px at 70% 22%, rgba(6, 182, 212, .07), transparent 70%);
  pointer-events: none;
}
.login-grid {
  position: absolute; inset: 0; opacity: .6;
  background-image:
    linear-gradient(rgba(16, 24, 40, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 34% 42%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 34% 42%, black, transparent 72%);
}
.login-quote { position: relative; z-index: 1; max-width: 640px; }
.login-quote .seal {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .34em;
  color: var(--accent); padding: 6px 16px 6px 19px; border-radius: 999px;
  background: rgba(6, 182, 212, .07);
  border: 1px solid rgba(6, 182, 212, .28);
  box-shadow: none;
}
.login-quote p {
  font-family: var(--sans); font-size: clamp(28px, 2.7vw, 42px); font-weight: 700;
  line-height: 1.38; letter-spacing: -.01em; margin: 28px 0 20px;
  background: linear-gradient(96deg, #101828 6%, #0e7490 52%, #3b82f6 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.login-quote small { color: var(--muted); letter-spacing: .16em; font-size: 11.5px; }

/* 深色登录页保持原来的深蓝紫氛围 */
html[data-theme="dark"] .login-art {
  background:
    radial-gradient(720px 520px at 80% 8%, rgba(168, 85, 247, .36), transparent 64%),
    radial-gradient(680px 460px at 8% 92%, rgba(34, 211, 238, .24), transparent 66%),
    linear-gradient(148deg, #0d1533 0%, #131b40 46%, #211546 100%);
  border-color: rgba(148, 163, 184, .18);
  box-shadow: 0 40px 100px rgba(8, 12, 30, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  color: #eef4ff;
}
html[data-theme="dark"] .login-art::before {
  border-color: rgba(34, 211, 238, .22);
  box-shadow:
    0 0 0 38px rgba(99, 102, 241, .07),
    0 0 0 82px rgba(168, 85, 247, .05),
    inset 0 0 90px rgba(99, 102, 241, .22);
}
html[data-theme="dark"] .login-art::after {
  background: radial-gradient(420px 260px at 70% 22%, rgba(99, 102, 241, .22), transparent 70%);
}
html[data-theme="dark"] .login-grid {
  opacity: .55;
  background-image:
    linear-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px);
}
html[data-theme="dark"] .login-quote .seal {
  color: #a5f3fc;
  background: rgba(34, 211, 238, .08);
  border-color: rgba(34, 211, 238, .34);
  box-shadow: 0 0 26px rgba(34, 211, 238, .16);
}
html[data-theme="dark"] .login-quote p {
  background: linear-gradient(96deg, #ffffff 8%, #c7d2fe 48%, #a5f3fc 82%, #e9d5ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
html[data-theme="dark"] .login-quote small { color: rgba(224, 231, 255, .62); }
.login-card {
  align-self: center; justify-self: center; width: min(430px, 100%);
  padding: 40px 38px 30px; border-radius: 26px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
    var(--edge) border-box;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(8, 145, 178, .06);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}
.brand-line { display: flex; align-items: center; gap: 12px; font-weight: 650; letter-spacing: .02em; }
.brand-line .brand-mark { width: 38px; height: 38px; font-size: 19px; border-radius: 12px; }
.brand-line em {
  color: var(--accent); font-style: normal; font-family: var(--mono); font-size: 10px; font-weight: 600;
  border: 1px solid rgba(6, 182, 212, .28); background: var(--accent-soft);
  border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 2px;
}
.login-card h1 {
  font-family: var(--sans); font-size: 34px; font-weight: 750; letter-spacing: -.02em;
  margin: 30px 0 6px;
}
.login-card h1::after {
  content: ""; display: block; width: 52px; height: 3px; border-radius: 999px;
  background: var(--grad); margin-top: 12px;
  box-shadow: 0 0 14px rgba(6, 182, 212, .28);
}
.login-sub { color: var(--muted); font-size: 12.5px; margin: 12px 0 24px; line-height: 1.75; }
.login-foot { color: var(--muted-2); font-size: 11.5px; margin-top: 22px; line-height: 1.75; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field > span { font-size: 12px; color: var(--muted); letter-spacing: .04em; font-weight: 500; }
.field input, .field select, .field textarea, .input, .select {
  width: 100%; background: var(--field); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 14px; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:hover, .field select:hover, .field textarea:hover, .input:hover, .select:hover { border-color: var(--line-strong); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus {
  border-color: rgba(8, 145, 178, .55);
  background: var(--field-focus);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 22px rgba(8, 145, 178, .10);
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.7; }
.form-msg {
  background: var(--danger-soft); color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent);
  border-radius: 12px; padding: 10px 13px; font-size: 12.5px; margin: 2px 0 13px;
}
.form-msg.info { background: var(--accent-soft); color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------------- 按钮与标签 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2);
  border-radius: 999px; padding: 8px 15px; font-size: 12.8px; font-weight: 500; line-height: 1.4;
  white-space: nowrap; min-height: 36px;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn:hover { border-color: var(--line-strong); color: var(--accent-2); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(79, 70, 229, .12); }
.btn:active { transform: translateY(0) scale(.99); }
.btn.primary {
  background: var(--grad); border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 10px 26px rgba(99, 102, 241, .34), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn.primary:hover {
  color: #fff; transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(99, 102, 241, .46), 0 0 24px rgba(34, 211, 238, .26), inset 0 1px 0 rgba(255, 255, 255, .32);
  filter: saturate(115%) brightness(1.04);
}
.btn.gold { background: var(--gold-soft); border-color: rgba(245, 158, 11, .28); color: var(--gold-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); box-shadow: none; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 32%, var(--line)); background: var(--danger-soft); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.btn.small { padding: 4px 11px; font-size: 11.8px; min-height: 28px; border-radius: 999px; }
.btn.block { width: 100%; padding: 13px 16px; margin-top: 8px; font-weight: 650; font-size: 14px; letter-spacing: .06em; border-radius: 999px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid transparent; background: transparent; border-radius: 12px;
  color: var(--muted); font-size: 16px; line-height: 1;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line); }
.icon-btn:active { transform: scale(.95); }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); font-size: 11.3px; line-height: 1.75;
  white-space: nowrap; border: 1px solid transparent;
}
.tag.role { background: var(--accent-soft); color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 20%, transparent); }
.tag.gold { background: var(--gold-soft); color: var(--gold-2); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.line { background: transparent; border-color: var(--line); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; padding: 1px 7px;
  border-radius: 999px; background: var(--surface-3); color: var(--muted); border: 1px solid transparent;
}
.badge.warn { background: var(--gold-soft); color: var(--gold-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.edit { background: var(--accent-soft); color: var(--accent-2); }

/* ---------------- 顶栏 ---------------- */
.app { min-height: 100vh; }
.topbar {
  position: fixed; top: 12px; left: 14px; right: 14px; z-index: 40;
  height: 64px; display: flex; align-items: center; gap: 14px;
  padding: 0 14px; border-radius: 18px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    var(--edge-soft) border-box;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}
.menu-btn { display: none; }
.top-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 202px; }
.top-brand:hover { text-decoration: none; }
.brand-mark.small { width: 36px; height: 36px; font-size: 18px; border-radius: 11px; }
.top-brand-text { font-family: var(--sans); font-size: 15px; font-weight: 650; letter-spacing: .02em; }
.global-search {
  flex: 1; max-width: 640px; display: flex; align-items: center; gap: 9px; position: relative;
  background: var(--field); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 14px; height: 40px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.global-search:hover { border-color: var(--line-strong); }
.global-search:focus-within {
  border-color: rgba(8, 145, 178, .5);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 22px rgba(8, 145, 178, .10);
  background: var(--field-focus);
}
.global-search .search-ico { color: var(--muted-2); font-size: 19px; line-height: 1; }
.global-search input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; font-size: 13.2px; }
.global-search input::placeholder { color: var(--muted-2); }
.global-search kbd {
  font-family: var(--mono); font-size: 10px; color: var(--muted-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; background: var(--surface-3);
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.user-wrap { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px; border: 1px solid transparent;
  background: transparent; padding: 4px 8px 4px 4px; border-radius: 999px;
  transition: background .18s ease, border-color .18s ease;
}
.user-btn:hover { background: var(--surface-3); border-color: var(--line); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-family: var(--sans); font-size: 14px; font-weight: 650;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .34), inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.user-name { font-size: 12.8px; }
.caret { color: var(--muted-2); font-size: 10px; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 204px; padding: 8px;
  border-radius: 18px; border: 1px solid transparent;
  background:
    linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
    var(--edge-soft) border-box;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.user-menu-head { padding: 9px 11px 11px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.user-menu-head b { display: block; font-size: 13.5px; }
.user-menu-head small { color: var(--muted); font-size: 11.3px; }
.user-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 11px; border-radius: 10px; font-size: 13px; color: var(--ink-2);
  transition: background .16s ease, color .16s ease;
}
.user-menu button:hover { background: var(--surface-3); color: var(--ink); }
.user-menu button.danger { color: var(--danger); }

/* ---------------- 侧栏 ---------------- */
.sidebar {
  position: fixed; left: 14px; top: 88px; bottom: 14px; width: 224px; z-index: 30;
  padding: 18px 12px 14px; border-radius: 22px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    var(--edge-soft) border-box;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  overflow-y: auto;
}
.nav-group { margin-bottom: 15px; }
.nav-group-label {
  font-size: 10px; letter-spacing: .2em; color: var(--muted-2);
  padding: 0 12px 6px; font-weight: 600; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid transparent;
  background: transparent; text-align: left; padding: 8px 11px; border-radius: 12px;
  color: var(--ink-2); font-size: 13.2px; line-height: 1.4; position: relative;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-item:hover { background: var(--surface-3); color: var(--ink); transform: translateX(2px); }
.nav-item.active {
  background: var(--grad-soft); color: var(--ink); font-weight: 600;
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 18px rgba(99, 102, 241, .10);
}
.navglyph {
  width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px;
  background: var(--surface-3); color: var(--muted); font-size: 11.5px;
  font-family: var(--sans); font-weight: 600; flex: none;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav-item.active .navglyph {
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .35);
}
.nav-count { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); }
.nav-item.active .nav-count { color: var(--accent-2); }
.side-foot {
  border-top: 1px solid var(--line); padding: 12px 10px 0; margin-top: 6px;
  display: flex; flex-direction: column; gap: 2px; color: var(--muted-2); font-size: 10.5px;
}
.side-foot span:first-child { color: var(--muted); }
.main { margin-left: 252px; padding: 96px 26px 76px; }
.view { max-width: 1240px; margin: 0 auto; }
.bottom-nav { display: none; }
.drawer-scrim {
  position: fixed; inset: 88px 0 0; z-index: 29;
  background: rgba(4, 8, 20, .46); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ---------------- 页面头 ---------------- */
.view-head { margin-bottom: 22px; }
.eyebrow {
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase; font-weight: 700;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.view-title {
  font-family: var(--sans); font-size: clamp(25px, 2.5vw, 34px); font-weight: 750;
  letter-spacing: -.025em; margin: 6px 0 5px; line-height: 1.2;
}
.view-desc { color: var(--muted); font-size: 12.8px; max-width: 800px; }
.view-desc b { color: var(--ink-2); font-family: var(--mono); font-weight: 600; }
.view-head-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.view-head-row .grow { flex: 1; min-width: 240px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 首页 ---------------- */
.hero {
  position: relative; overflow: hidden; padding: 34px 36px; border-radius: 24px; margin-bottom: 18px;
  background:
    radial-gradient(680px 320px at 88% 0%, rgba(6, 182, 212, .09), transparent 62%),
    radial-gradient(520px 300px at 2% 100%, rgba(59, 130, 246, .06), transparent 70%),
    #ffffff;
  color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(16, 24, 40, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 20% 30%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 20% 30%, black, transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; width: 360px; height: 360px; right: -110px; top: -160px; border-radius: 50%;
  border: 1px solid rgba(6, 182, 212, .16);
  box-shadow:
    0 0 0 34px rgba(59, 130, 246, .04),
    0 0 0 72px rgba(6, 182, 212, .028),
    inset 0 0 80px rgba(6, 182, 212, .05);
}
.hero .eyebrow {
  color: var(--accent); -webkit-text-fill-color: var(--accent);
  background: none; position: relative; z-index: 1;
}
.hero h1 {
  font-family: var(--sans); font-size: clamp(30px, 3.1vw, 44px); font-weight: 750;
  letter-spacing: -.03em; margin: 8px 0 5px; position: relative; z-index: 1;
  color: var(--ink);
}
.hero-meta { color: var(--muted); font-size: 13px; position: relative; z-index: 1; }
.hero-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
.hero-tags .tag {
  background: var(--surface-3); color: var(--ink-2);
  border-color: var(--line);
}
.hero-side {
  position: absolute; right: 34px; bottom: 28px; text-align: right;
  color: var(--muted); font-size: 11.5px; z-index: 1; line-height: 1.8;
}
.hero-side b {
  display: block; font-family: var(--sans); font-size: 24px; font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}

/* 深色首页大卡保持原深蓝紫渐变 */
html[data-theme="dark"] .hero {
  background:
    radial-gradient(680px 320px at 86% 4%, rgba(168, 85, 247, .42), transparent 66%),
    radial-gradient(560px 320px at 6% 104%, rgba(34, 211, 238, .28), transparent 70%),
    linear-gradient(125deg, #0c1430 0%, #141b3f 50%, #221448 100%);
  color: #f3f6ff; border-color: rgba(148, 163, 184, .18);
  box-shadow: 0 30px 70px rgba(8, 12, 30, .38), inset 0 1px 0 rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .hero::before {
  opacity: .4;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
}
html[data-theme="dark"] .hero::after {
  border-color: rgba(34, 211, 238, .22);
  box-shadow:
    0 0 0 34px rgba(99, 102, 241, .06),
    0 0 0 72px rgba(168, 85, 247, .05),
    inset 0 0 80px rgba(99, 102, 241, .22);
}
html[data-theme="dark"] .hero .eyebrow {
  color: #a5f3fc; -webkit-text-fill-color: #a5f3fc; background: none;
}
html[data-theme="dark"] .hero h1 {
  background: linear-gradient(96deg, #ffffff 10%, #c7d2fe 56%, #a5f3fc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
html[data-theme="dark"] .hero-meta { color: rgba(224, 231, 255, .72); }
html[data-theme="dark"] .hero-tags .tag {
  background: rgba(255, 255, 255, .08); color: rgba(238, 242, 255, .9);
  border-color: rgba(255, 255, 255, .12);
}
html[data-theme="dark"] .hero-side { color: rgba(224, 231, 255, .66); }
html[data-theme="dark"] .hero-side b {
  background: linear-gradient(96deg, #67e8f9, #a5b4fc 55%, #e9d5ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
  text-align: left; border-radius: 18px; padding: 18px 18px 15px;
  position: relative; overflow: hidden;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    var(--edge-soft) border-box;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.stat-card::before {
  content: ""; position: absolute; width: 160px; height: 160px; right: -70px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .22), transparent 68%);
  opacity: 0; transition: opacity .22s ease; pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-4px);
  background:
    linear-gradient(var(--panel-2), var(--panel-2)) padding-box,
    var(--edge) border-box;
  box-shadow: var(--glow), 0 10px 26px rgba(16, 24, 40, .08);
}
.stat-card:hover::before { opacity: 1; }
.stat-card::after {
  content: ""; position: absolute; left: 18px; top: 0; width: 54px; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6 55%, #4f46e5);
  opacity: .9;
}
.stat-card.gold::after { background: linear-gradient(90deg, #f59e0b, #f97316 60%, #ef4444); }
.stat-card.num { cursor: pointer; }
.stat-label {
  font-size: 11.8px; color: var(--muted); display: flex; align-items: center;
  justify-content: space-between; gap: 6px; position: relative; z-index: 1;
}
.stat-num {
  font-family: var(--sans); font-size: 38px; font-weight: 750; line-height: 1.12;
  margin-top: 7px; letter-spacing: -.035em; position: relative; z-index: 1;
  font-variant-numeric: tabular-nums;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.stat-num small {
  font-family: var(--sans); font-size: 11.5px; font-weight: 500; color: var(--muted);
  -webkit-text-fill-color: var(--muted); margin-left: 5px; letter-spacing: 0;
}
.stat-sub { color: var(--muted-2); font-size: 11.3px; margin-top: 4px; position: relative; z-index: 1; }
.stat-card .arrow {
  color: var(--muted-2); font-size: 12px; opacity: 0; transform: translate(-3px, 3px);
  transition: opacity .2s ease, transform .2s ease;
}
.stat-card:hover .arrow { opacity: 1; transform: translate(0, 0); color: var(--accent-2); }
.home-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.home-grid > .panel { min-width: 0; }
.panel {
  border-radius: 20px; padding: 20px 22px; min-width: 0;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    var(--edge-soft) border-box;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.panel-head h3 { font-family: var(--sans); font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.panel-head .hint { font-size: 11.3px; color: var(--muted-2); }
.chart {
  display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 12px;
  border-bottom: 1px solid var(--line);
}
.bar-col {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; gap: 5px; height: 100%; cursor: pointer;
  border: 0; background: transparent; padding: 0; border-radius: 10px;
}
.bar-col .bar {
  width: min(32px, 76%); background: linear-gradient(to top, #06b6d4 0%, #3b82f6 52%, #4f46e5 100%);
  border-radius: 9px 9px 4px 4px; min-height: 4px; opacity: .9;
  transition: opacity .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: 0 2px 10px rgba(59, 130, 246, .18);
}
.bar-col:hover .bar {
  opacity: 1; filter: saturate(120%);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, .12), 0 8px 24px rgba(59, 130, 246, .32);
}
.bar-col .y { font-family: var(--mono); font-size: 9.5px; color: var(--muted-2); }
.bar-col .n { font-size: 10px; color: var(--muted); font-family: var(--mono); }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut {
  width: 136px; height: 136px; border-radius: 50%; flex: none; position: relative;
  box-shadow: 0 0 0 8px var(--accent-soft), 0 14px 30px rgba(59, 130, 246, .14);
  filter: saturate(112%);
}
.donut::after {
  content: ""; position: absolute; inset: 26px; border-radius: 50%;
  background: var(--donut-hole);
  box-shadow: inset 0 0 0 1px var(--line), 0 0 24px rgba(6, 182, 212, .06);
}
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; line-height: 1.15; }
.donut-center b {
  font-family: var(--sans); font-size: 27px; display: block; font-weight: 750;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.donut-center small { color: var(--muted); font-size: 10px; }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; min-width: 0; }
.legend .tag { background: transparent; font-size: 11.5px; color: var(--muted); }
.legend .tag:hover { background: var(--surface-3); color: var(--ink); }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.mini-bars { display: flex; flex-direction: column; gap: 9px; }
.mini-bar {
  display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 9px;
  font-size: 11.8px; color: var(--muted);
}
.mini-bar .track { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.mini-bar .fill {
  height: 100%; border-radius: 999px; background: var(--grad);
  box-shadow: 0 0 12px rgba(99, 102, 241, .4);
  transition: width .4s ease;
}
.mini-bar b { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--ink-2); font-weight: 500; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.quick-card {
  border: 1px solid transparent; background: var(--surface-2); border-radius: 16px;
  padding: 14px 15px; text-align: left; position: relative; overflow: hidden;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.quick-card::before {
  content: ""; position: absolute; left: 15px; top: 0; width: 34px; height: 2px; border-radius: 999px;
  background: var(--grad); opacity: .7;
}
.quick-card:hover {
  border-color: var(--line-strong); background: var(--panel-2);
  transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79, 70, 229, .14);
}
.quick-card b { display: block; font-size: 13px; margin-bottom: 3px; }
.quick-card small { color: var(--muted); font-size: 11.3px; }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid transparent;
  font-size: 12.5px; transition: background .18s ease, border-color .18s ease;
}
.alert-item:hover { background: var(--surface-3); border-color: var(--line); }
.alert-item .dot {
  width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none;
  background: var(--grad); box-shadow: 0 0 10px rgba(99, 102, 241, .6);
}
.alert-item.warn .dot { background: linear-gradient(135deg, #f59e0b, #f97316); }
.alert-item b { font-weight: 600; }
.alert-item small { display: block; color: var(--muted); font-size: 11.3px; }
.alert-item .go { margin-left: auto; flex: none; }
.gap-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, .28); background: var(--gold-soft);
  color: var(--gold-2); font-size: 13px; margin-bottom: 14px;
}
.gap-banner.bad {
  border-color: color-mix(in srgb, var(--danger) 28%, transparent);
  background: var(--danger-soft); color: var(--danger);
}
.gap-banner .grow { flex: 1; }
.coauthor-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.coauthor-chip {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: 4px 11px; font-size: 11.8px; color: var(--ink-2);
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.coauthor-chip:hover { border-color: var(--line-strong); color: var(--accent-2); background: var(--accent-soft); transform: translateY(-1px); }
.coauthor-chip b { font-family: var(--mono); font-size: 10.3px; color: var(--muted); margin-left: 4px; font-weight: 500; }
.candidate-banner {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border: 1px solid rgba(34, 211, 238, .3); background: var(--accent-soft);
  border-radius: 16px; margin-bottom: 16px; color: var(--accent-2); font-size: 12.8px;
}
.candidate-banner .grow { flex: 1; }

/* ---------------- 浏览页 ---------------- */
.browse-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 16px; }
.browse-bar .search-box {
  flex: 1; min-width: 190px; max-width: 390px; display: flex; align-items: center; gap: 8px;
  background: var(--field); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 13px; height: 40px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.browse-bar .search-box:focus-within {
  border-color: rgba(8, 145, 178, .5); background: var(--field-focus);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 20px rgba(8, 145, 178, .10);
}
.browse-bar .search-box input { flex: 1; border: 0; outline: none; background: transparent; min-width: 0; font-size: 13px; }
.browse-bar .select {
  width: auto; min-width: 136px; padding: 6px 34px 6px 13px; height: 40px;
  font-size: 12.5px; border-radius: 999px; background: var(--field); cursor: pointer;
}
.filter-toggle { display: none; }
.browse-layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); gap: 22px; align-items: start; min-width: 0; }
.browse-layout > *, .list-wrap, .list-wrap > *, #list { min-width: 0; }
.filters {
  position: sticky; top: 96px; max-height: calc(100vh - 112px); overflow-y: auto;
  padding: 16px 16px 10px; border-radius: 20px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    var(--edge-soft) border-box;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  scrollbar-width: thin;
}
.filter-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.filter-head h3 { font-size: 12px; letter-spacing: .12em; color: var(--muted); font-weight: 650; }
.filter-group { border-top: 1px solid var(--line); padding: 11px 0; }
.filter-group:first-of-type { border-top: 0; }
.filter-group h4 {
  font-size: 11.3px; color: var(--muted); margin-bottom: 8px; font-weight: 600;
  letter-spacing: .03em; display: flex; justify-content: space-between;
}
.facets { display: flex; flex-wrap: wrap; gap: 6px; }
.facet {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  border-radius: 999px; padding: 3px 9px; font-size: 11.3px; line-height: 1.7;
  display: inline-flex; gap: 5px; align-items: center;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.facet:hover { border-color: var(--line-strong); color: var(--accent-2); background: var(--accent-soft); }
.facet.on {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .32);
}
.facet .n { font-family: var(--mono); font-size: 9.5px; opacity: .72; }
.range-row { display: flex; align-items: center; gap: 6px; }
.range-row input {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px;
  padding: 5px 8px; background: var(--field); font-size: 12px; outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.range-row input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.range-row span { color: var(--muted-2); font-size: 11px; }
.filter-note { color: var(--muted-2); font-size: 10.5px; margin-top: 5px; line-height: 1.55; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.active-filters .tag { cursor: pointer; }
.result-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.result-summary b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.result-list { display: flex; flex-direction: column; gap: 9px; }
.item-row {
  display: flex; gap: 13px; align-items: flex-start;
  border-radius: 16px; padding: 13px 15px; position: relative; min-width: 0;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    var(--edge-soft) border-box;
  box-shadow: 0 6px 18px rgba(8, 12, 30, .06);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.item-row:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(var(--panel-2), var(--panel-2)) padding-box,
    var(--edge) border-box;
  box-shadow: var(--glow), 0 8px 22px rgba(8, 12, 30, .14);
}
.item-row.selected {
  background:
    linear-gradient(var(--accent-soft), var(--accent-soft)) padding-box,
    linear-gradient(135deg, #06b6d4, #3b82f6 50%, #4f46e5) border-box;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, .10), 0 10px 26px rgba(59, 130, 246, .14);
}
.item-check { margin-top: 4px; accent-color: var(--accent); width: 15px; height: 15px; flex: none; border-radius: 4px; }
.item-main { flex: 1; min-width: 0; cursor: pointer; }
.item-title { font-size: 14.2px; font-weight: 600; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.item-row:hover .item-title {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.item-sub { color: var(--muted); font-size: 11.8px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; align-items: center; }
.item-side {
  flex: none; text-align: right; min-width: 62px; display: flex; flex-direction: column;
  align-items: flex-end; gap: 3px;
}
.item-year { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.item-cites { font-family: var(--mono); font-size: 10.3px; color: var(--gold-2); }
.item-cites b { font-size: 14px; font-weight: 600; }
.item-id {
  font-family: var(--mono); font-size: 9.5px; color: var(--muted-2);
  letter-spacing: .04em; padding: 0 6px; border-radius: 999px; background: var(--surface-3);
}
.empty {
  text-align: center; padding: 56px 20px; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: 20px; background: var(--surface-2);
}
.empty .big {
  font-family: var(--sans); font-size: 34px; color: transparent; margin-bottom: 8px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bulkbar {
  position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 11px 15px; border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  color: var(--ink); box-shadow: var(--shadow-lg), 0 0 30px rgba(8, 145, 178, .06);
  font-size: 12.5px; border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.bulkbar .btn { background: var(--surface-3); color: var(--ink-2); border-color: var(--line); }
.bulkbar .btn:hover { background: var(--accent-soft); color: var(--accent-2); }
html[data-theme="dark"] .bulkbar {
  background: linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(30, 27, 75, .94));
  color: #eef2ff; box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, .18);
  border-color: rgba(148, 163, 184, .18);
}
html[data-theme="dark"] .bulkbar .btn { background: transparent; color: #eef2ff; border-color: rgba(255, 255, 255, .24); }
html[data-theme="dark"] .bulkbar .btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------------- 悬浮详情 ---------------- */
.detail-layer {
  position: fixed; inset: 0; width: 100vw; max-width: 100vw; overflow: hidden; z-index: 60;
  background: rgba(4, 8, 20, .55); backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  display: flex; align-items: center; justify-content: center; padding: 26px;
}
.float-panel {
  --dx: 0px; --dy: 0px;
  width: min(920px, 100%); min-width: 0; max-width: 100vw;
  max-height: min(86vh, 900px); display: flex; flex-direction: column;
  border-radius: 24px; border: 1px solid transparent;
  background:
    linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
    var(--edge) border-box;
  box-shadow: var(--shadow-lg), 0 0 90px rgba(99, 102, 241, .18);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  transform: translate(var(--dx), var(--dy)); overflow: hidden;
}
.float-head {
  display: flex; align-items: flex-start; gap: 10px; padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line); cursor: grab; user-select: none;
  background: transparent; min-width: 0;
}
.float-head.dragging { cursor: grabbing; }
.float-head .title-wrap { flex: 1; min-width: 0; }
.float-head h2 {
  font-family: var(--sans); font-size: 20px; font-weight: 700; line-height: 1.45;
  letter-spacing: -.02em; cursor: text; overflow-wrap: anywhere; margin-top: 4px;
}
.float-head .head-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 5px; }
.float-actions { display: flex; gap: 4px; align-items: center; flex: none; }
.float-body { overflow-y: auto; padding: 20px 24px 24px; scrollbar-width: thin; min-width: 0; }
.float-body h3 {
  font-size: 11.5px; letter-spacing: .14em; color: var(--accent-2); margin: 22px 0 10px;
  display: flex; align-items: center; gap: 10px; font-weight: 650; text-transform: uppercase;
}
.float-body h3:first-child { margin-top: 0; }
.float-body h3::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.kv {
  display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--line); font-size: 12.8px;
}
.kv.wide { grid-column: 1 / -1; }
.kv .k { color: var(--muted); font-size: 11.8px; }
.kv .v { color: var(--ink-2); overflow-wrap: anywhere; }
.kv .v.long { white-space: pre-wrap; line-height: 1.8; }
.kv .v .ref { margin: 2px 4px 2px 0; }
.ref {
  display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--accent-2); border-radius: 999px;
  padding: 1px 8px; font-size: 11.3px; line-height: 1.7;
  transition: background .18s ease, border-color .18s ease;
}
button.ref:hover { border-color: var(--line-strong); background: var(--accent-soft); }
.file-list { display: flex; flex-direction: column; gap: 7px; }
.file-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  font-size: 12.5px; min-width: 0;
}
.file-item .label { color: var(--ink-2); flex: none; }
.file-item .path {
  color: var(--muted-2); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; flex: 1; min-width: 0;
}
.file-item .btn { margin-left: auto; flex: none; }
.file-item.missing { border-style: dashed; opacity: .72; }
.float-foot {
  display: flex; align-items: center; gap: 8px; padding: 12px 20px;
  border-top: 1px solid var(--line); background: var(--surface-2); min-width: 0;
}
.float-foot .hint { color: var(--muted-2); font-size: 10.8px; flex: 1; min-width: 0; }
.icon-close { font-size: 16px; }
.detail-nav { display: flex; gap: 2px; }
.quote {
  background: var(--surface-2); border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, #06b6d4, #4f46e5) 1;
  padding: 11px 14px; border-radius: 0 12px 12px 0; font-size: 12.8px;
  line-height: 1.85; white-space: pre-wrap;
}
.related-list { display: flex; flex-direction: column; gap: 6px; }
.related-item { display: flex; align-items: center; gap: 8px; font-size: 12.3px; }
.related-item .id { font-family: var(--mono); color: var(--gold-2); font-size: 10.5px; }

/* ---------------- 表单 / 弹窗 ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(4, 8, 20, .55); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 22px;
}
.modal {
  width: min(720px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  border-radius: 24px; border: 1px solid transparent;
  background:
    linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
    var(--edge) border-box;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(99, 102, 241, .16);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  overflow: hidden;
}
.modal.wide { width: min(980px, 100%); }
.modal.small { width: min(460px, 100%); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 21px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-family: var(--sans); font-size: 18.5px; font-weight: 700; letter-spacing: -.02em; }
.modal-body { padding: 19px 21px; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 13px 21px; border-top: 1px solid var(--line); background: var(--surface-2);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .field.wide { grid-column: 1 / -1; }
.form-grid .field textarea { min-height: 74px; }
.field .hint { color: var(--muted-2); font-size: 11px; font-weight: 400; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.checkline input { accent-color: var(--accent); width: 15px; height: 15px; border-radius: 4px; }
.perm-table { width: 100%; border-collapse: collapse; font-size: 12.3px; }
.perm-table th, .perm-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.perm-table th { color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: .05em; }
.perm-table select {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  background: var(--field); padding: 4px 7px; outline: none;
}
.flag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin-top: 8px; }
.form-section-title {
  font-size: 11.2px; letter-spacing: .1em; color: var(--muted); margin: 18px 0 8px;
  border-top: 1px solid var(--line); padding-top: 13px; font-weight: 650;
}
.form-section-title:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.confirm-text { font-size: 13px; color: var(--ink-2); line-height: 1.85; }

/* ---------------- 工作台 ---------------- */
.bench-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; align-items: start; }
.bench-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.bench-toolbar .field { margin: 0; min-width: 150px; }
.bench-toolbar .field > span { font-size: 10.3px; }
.bench-toolbar select, .bench-toolbar input { height: 36px; padding: 5px 10px; font-size: 12.3px; border-radius: 12px; }
.preset-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 13px 0 4px; }
.preset {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: 4px 12px; font-size: 11.8px; color: var(--muted);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.preset:hover { border-color: var(--line-strong); color: var(--accent-2); background: var(--accent-soft); }
.bench-section { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.bench-section-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 13px;
  background: var(--surface-3); border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.bench-section-head b { font-family: var(--sans); font-size: 13.5px; font-weight: 650; }
.bench-section-head .count { color: var(--muted); font-family: var(--mono); font-size: 10.3px; }
.bench-section-head .actions { margin-left: auto; display: flex; gap: 5px; }
.bench-cands { max-height: 210px; overflow-y: auto; padding: 6px 9px; }
.bench-cand {
  display: flex; align-items: flex-start; gap: 8px; padding: 5px 6px;
  border-radius: 8px; font-size: 12px; line-height: 1.55;
}
.bench-cand:hover { background: var(--surface-3); }
.bench-cand input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.bench-cand .t {
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.bench-cand .y { margin-left: auto; color: var(--muted-2); font-family: var(--mono); font-size: 10px; flex: none; }
.bench-preview { position: sticky; top: 96px; }
.bench-preview textarea {
  width: 100%; min-height: 480px; resize: vertical; font-family: var(--code);
  font-size: 12px; line-height: 1.8; border: 1px solid var(--line); border-radius: 14px;
  background: var(--field); padding: 14px; outline: none;
}
.bench-preview textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-soft); }
.bench-preview .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.bench-gap {
  margin-top: 10px; padding: 11px 13px; border-radius: 12px;
  background: var(--gold-soft); border: 1px solid rgba(245, 158, 11, .26);
  color: var(--gold-2); font-size: 12px; line-height: 1.7;
}
.bench-gap.bad {
  background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 28%, transparent);
  color: var(--danger);
}
.saved-records { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------------- 收件箱 ---------------- */
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: 20px; background: var(--surface-2);
  padding: 30px 20px; text-align: center; margin-bottom: 16px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.dropzone:hover { border-color: var(--accent-2); background: var(--accent-soft); }
.dropzone.over {
  border-color: var(--accent-2); background: var(--accent-soft);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 40px rgba(99, 102, 241, .18);
}
.dropzone .big {
  font-size: 30px; color: transparent; background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.dropzone b { display: block; margin: 4px 0 2px; }
.dropzone small { color: var(--muted); font-size: 12px; }
.inbox-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2);
}
.inbox-icon {
  width: 40px; height: 46px; border-radius: 10px; background: var(--surface-3);
  border: 1px solid var(--line); display: grid; place-items: center;
  font-family: var(--mono); font-size: 9px; color: var(--muted); flex: none;
}
.inbox-main { flex: 1; min-width: 0; }
.inbox-main b { font-size: 13px; word-break: break-all; }
.inbox-main small { display: block; color: var(--muted-2); font-size: 11px; }
.inbox-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.inbox-assoc { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.inbox-assoc select, .inbox-assoc input {
  height: 30px; padding: 3px 9px; font-size: 11.3px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--field);
}
.inbox-assoc input { width: 96px; }
.upload-progress { height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.upload-progress i {
  display: block; height: 100%; background: var(--grad); width: 0; transition: width .2s ease;
  box-shadow: 0 0 12px rgba(99, 102, 241, .5);
}

/* ---------------- 历史 ---------------- */
.history-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 12px 15px; }
.history-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.history-head b { color: var(--ink); font-size: 13px; }
.history-body { margin-top: 7px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.diff { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.diff .k { color: var(--muted); min-width: 76px; }
.diff .old { color: var(--danger); text-decoration: line-through; opacity: .8; word-break: break-all; }
.diff .new { color: var(--ok); word-break: break-all; }
.history-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------------- 账号 ---------------- */
.account-card {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 16px;
  padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start;
}
.account-card.disabled { opacity: .6; }
.account-card .who { min-width: 160px; }
.account-card .who b { display: block; font-size: 14px; }
.account-card .who small { color: var(--muted); font-size: 11.3px; }
.account-card .perms { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.account-card .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.perm-pill { font-size: 10.3px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.perm-pill.edit { background: var(--accent-soft); color: var(--accent-2); }
.perm-pill.read { background: var(--surface-3); color: var(--ink-2); }

/* ---------------- 搜索 ---------------- */
.search-group { margin-bottom: 18px; }
.search-group h3 { font-family: var(--sans); font-size: 15.5px; font-weight: 650; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.search-group h3 span { font-family: var(--mono); font-size: 10.3px; color: var(--muted); }
.search-hit {
  display: block; width: 100%; text-align: left; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface-2); padding: 10px 13px; margin-bottom: 6px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.search-hit:hover {
  border-color: var(--line-strong); background: var(--accent-soft); transform: translateY(-1px);
}
.search-hit b { font-weight: 600; font-size: 13px; }
.search-hit small { display: block; color: var(--muted); font-size: 11.3px; }
mark {
  background: var(--gold-soft); color: var(--gold-2); padding: 0 2px;
  border-radius: 4px; box-shadow: 0 0 8px rgba(245, 158, 11, .16);
}

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 100;
  background: var(--panel-strong); color: var(--ink); padding: 10px 18px; border-radius: 999px;
  font-size: 12.5px; box-shadow: var(--shadow-lg); max-width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.toast.error { background: linear-gradient(135deg, #e11d48, #be123c); color: #fff; border-color: transparent; }
.loading { padding: 50px; text-align: center; color: var(--muted); }
.spinner {
  width: 24px; height: 24px; border: 2px solid var(--line-strong); border-top-color: var(--accent-2);
  border-right-color: #3b82f6; border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 10px;

}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1320px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1200px) {
  .top-brand { min-width: 170px; }
  .home-grid { grid-template-columns: 1fr; }
  .bench-grid { grid-template-columns: 1fr; }
  .bench-preview { position: static; }
}
@media (max-width: 900px) {
  .login-view { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .login-art { display: none; }
  .login-card { margin: 68px auto 40px; width: min(430px, calc(100% - 32px)); }
  .login-theme { top: 18px; right: 18px; }
  .menu-btn { display: inline-grid; }
  .topbar {
    top: 8px; left: 8px; right: 8px; height: 58px; gap: 10px;
    padding: 0 10px; border-radius: 16px;
  }
  .top-brand { min-width: 0; }
  .top-brand-text { display: none; }
  .brand-mark.small { width: 33px; height: 33px; font-size: 17px; border-radius: 10px; }
  .sidebar {
    left: 8px; top: 78px; bottom: 8px; width: 262px; z-index: 45; border-radius: 20px;
    transform: translateX(calc(-100% - 18px)); transition: transform .22s ease;
    background:
      linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
      var(--edge) border-box;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 84px 14px 96px; }
  .drawer-scrim { inset: 76px 0 0; z-index: 44; }
  .bottom-nav {
    display: flex; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 38;
    height: 64px; border-radius: 22px; padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    border: 1px solid transparent;
    background:
      linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
      var(--edge-soft) border-box;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, .12);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
  }
  .bottom-nav button {
    flex: 1; border: 0; background: transparent; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px; color: var(--muted);
    font-size: 9.5px; border-radius: 16px; transition: color .18s ease, background .18s ease;
  }
  .bottom-nav button span {
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px;
    font-family: var(--sans); font-size: 13px; line-height: 1; font-weight: 600;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  }
  .bottom-nav button.active { color: var(--accent-2); }
  .bottom-nav button.active span {
    background: var(--grad); color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .38);
  }
  .global-search { max-width: none; height: 38px; }
  .global-search kbd { display: none; }
  .user-name { display: none; }
  .browse-layout { grid-template-columns: 1fr; gap: 0; }
  .filters {
    display: none; position: fixed; inset: auto 0 0 0; z-index: 55;
    max-height: 80vh; overflow-y: auto; border-radius: 24px 24px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    background:
      linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
      var(--edge) border-box;
    box-shadow: var(--shadow-lg);
  }
  .filters.open { display: block; }
  .filter-toggle { display: inline-flex; }
  .filter-head { position: sticky; top: -18px; background: var(--panel-strong); padding: 8px 0; z-index: 2; }
  .float-panel {
    width: 100vw; max-width: 100vw; min-width: 0; height: 100vh; height: 100dvh;
    max-height: 100vh; max-height: 100dvh; border-radius: 0;
  }
  .detail-layer {
    padding: 0; align-items: stretch; width: 100vw; max-width: 100vw;
    height: 100vh; height: 100dvh; max-height: 100dvh; overflow: hidden;
  }
  .float-head { padding-top: max(14px, env(safe-area-inset-top)); cursor: default; flex-wrap: wrap; }
  .float-head .title-wrap { flex: 1 0 100%; }
  .float-actions { width: 100%; justify-content: flex-end; margin-top: 2px; }
  .kv-grid { grid-template-columns: 1fr; }
  .float-foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-num { font-size: 30px; }
  .hero { padding: 24px; }
  .hero-side { display: none; }
  .quick-grid { grid-template-columns: 1fr; }
  .account-card { flex-direction: column; }
  .account-card .acts { justify-content: flex-start; }
  .inbox-item { flex-wrap: wrap; }
  .inbox-actions { width: 100%; justify-content: flex-start; }
  .browse-bar .search-box { max-width: none; order: -1; flex-basis: 100%; }
  .bench-preview textarea { min-height: 360px; }
}
@media (max-width: 560px) {
  .topbar { gap: 6px; padding: 0 8px; }
  .top-actions { gap: 1px; }
  .global-search { height: 36px; padding: 0 10px; gap: 6px; }
  .global-search input { font-size: 11.8px; }
  .global-search .search-ico { font-size: 16px; }
  .menu-btn { width: 32px; height: 32px; }
  .main { padding: 78px 10px 94px; }
  .view-title { font-size: 23px; }
  .view-desc { font-size: 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stat-card { padding: 14px 13px 12px; border-radius: 16px; }
  .stat-num { font-size: 27px; }
  .stat-label { font-size: 10.8px; }
  .stat-sub { font-size: 10.3px; }
  .hero { padding: 22px 19px; border-radius: 20px; }
  .hero h1 { font-size: 30px; }
  .panel { padding: 15px; border-radius: 18px; }
  .panel-head h3 { font-size: 15px; }
  .float-body { padding: 14px 15px 20px; }
  .float-head { padding: 14px 15px 12px; }
  .float-head h2 { font-size: 18px; }
  .float-foot { flex-wrap: wrap; padding: 10px 14px; }
  .float-foot .hint { flex: 1 0 100%; }
  .modal { max-height: 94vh; border-radius: 22px; }
  .modal-body { padding: 15px 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .flag-grid { grid-template-columns: 1fr; }
  .gap-banner { flex-wrap: wrap; }
  .bar-col .y { font-size: 8px; }
  .bar-col .n { font-size: 9px; }
  .chart { gap: 3px; }
  .range-row input { width: 100%; }
  .item-row { gap: 9px; padding: 12px 12px; border-radius: 14px; }
  .item-side { min-width: 50px; }
  .item-title { font-size: 13.5px; }
  .item-sub { font-size: 11.3px; }
  .browse-bar { gap: 7px; }
  .browse-bar .select { flex: 1; min-width: 0; }
  .login-card { padding: 30px 22px 24px; border-radius: 22px; }
  .login-card h1 { font-size: 29px; margin-top: 24px; }
  .login-sub { margin-bottom: 20px; }
  .login-theme { width: 38px; height: 38px; }
  .bottom-nav { left: 8px; right: 8px; bottom: 8px; height: 62px; border-radius: 20px; }
  .bulkbar { flex-wrap: wrap; }
  .toast { bottom: 86px; }
}
/* ---------------- 账号安全：改密/找回/恢复码/重置申请 ---------------- */
.login-links { display: flex; justify-content: flex-end; margin-top: -2px; }
.link-btn {
  border: 0; background: transparent; color: var(--accent-2); cursor: pointer;
  font-size: 12.5px; padding: 2px 0; border-radius: 6px;
}
.link-btn:hover { color: var(--accent); text-decoration: underline; }
.menu-badge {
  float: right; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 8px;
  display: inline-grid; place-items: center; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 650; line-height: 1;
}
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 6px;
  display: inline-grid; place-items: center; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 650; line-height: 1;
}
.panel-head h3 .nav-badge { margin-left: 7px; vertical-align: 2px; }
.form-tip { color: var(--muted); font-size: 11.5px; line-height: 1.72; margin: 10px 0 0; }
.seg-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 15px;
  background: var(--surface-3); border-radius: 12px;
}
.seg-tab {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  padding: 8px 9px; border-radius: 9px; font-size: 12.2px; font-weight: 550;
}
.seg-tab.active { background: var(--panel-strong); color: var(--ink); box-shadow: var(--shadow); }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-3);
}
.settings-row b { display: block; font-size: 13px; }
.settings-row small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.recovery-list {
  list-style: none; counter-reset: none; padding: 0; margin: 14px 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.recovery-list li {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--field);
}
.recovery-index { color: var(--muted-2); font-family: var(--mono); font-size: 10.5px; }
.recovery-list code {
  font-family: var(--mono); font-size: 14px; letter-spacing: .06em; color: var(--ink);
  user-select: all;
}
.reset-panel { margin-bottom: 14px; }
.reset-list { display: flex; flex-direction: column; gap: 8px; }
.reset-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-3);
}
.reset-who { min-width: 0; }
.reset-who b { display: block; font-size: 13.5px; }
.reset-who b .mono { color: var(--muted); font-weight: 500; margin-left: 5px; }
.reset-who p { margin: 5px 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.6; word-break: break-word; }
.reset-who small { color: var(--muted-2); font-size: 11px; }
.reset-acts { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.temp-password {
  margin: 12px 0; padding: 15px 16px; border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft); color: var(--ink);
  font-size: 22px; font-weight: 650; letter-spacing: .08em; text-align: center;
  user-select: all; word-break: break-all;
}
.invite-link {
  font-size: 12.5px; letter-spacing: 0; text-align: left;
  line-height: 1.65; white-space: normal;
}

@media (max-width: 640px) {
  .recovery-list { grid-template-columns: 1fr; }
  .reset-item { align-items: flex-start; flex-direction: column; gap: 9px; }
  .reset-acts { justify-content: flex-start; }
  .settings-row { align-items: flex-start; flex-direction: column; }
}

@media print {
  .topbar, .sidebar, .bottom-nav, .float-head, .float-foot, .filters, .browse-bar, .view-head .head-actions { display: none !important; }
  .detail-layer { position: static; background: none; padding: 0; display: block; }
  .float-panel { max-height: none; box-shadow: none; border: 0; transform: none; background: #fff; }
  .float-body { overflow: visible; }
  .main { margin: 0; padding: 0; }
  .bg-scene { display: none; }
  body.printing-recovery #boot, body.printing-recovery #loginView, body.printing-recovery #appView,
  body.printing-recovery #detailLayer, body.printing-recovery #toast, body.printing-recovery .bg-scene { display: none !important; }
  body.printing-recovery #overlay {
    position: static !important; display: block !important; padding: 0 !important;
    background: #fff !important; backdrop-filter: none !important;
  }
  body.printing-recovery .modal {
    width: 100% !important; max-width: none !important; max-height: none !important;
    border: 0 !important; box-shadow: none !important; background: #fff !important; transform: none !important;
  }
  body.printing-recovery .modal-head .icon-btn, body.printing-recovery .modal-foot { display: none !important; }
  body.printing-recovery .modal-body { overflow: visible !important; }
  body.printing-recovery .recovery-list li { break-inside: avoid; }
}

/* 系统“减少动态效果”：关闭动画与过渡 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .orb { animation: none; }
  .boot-mark { animation: none; }
}
