:root {
  --bg: #060a12;
  --bg-2: #08101d;
  --panel: rgba(13, 21, 38, .76);
  --panel-solid: #0c1526;
  --panel-2: #111c31;
  --border: rgba(148, 163, 184, .13);
  --border-strong: rgba(148, 163, 184, .24);
  --text: #e9eefb;
  --muted: #93a3c1;
  --dim: #67758f;
  --accent: #5eead4;
  --accent-2: #818cf8;
  --accent-3: #c084fc;
  --danger: #fb7185;
  --success: #34d399;
  --warning: #fbbf24;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 760px at 8% -12%, rgba(45, 212, 191, .10), transparent 56%),
    radial-gradient(1000px 720px at 102% -4%, rgba(99, 102, 241, .13), transparent 54%),
    radial-gradient(900px 600px at 50% 110%, rgba(168, 85, 247, .07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 0%, black, transparent 78%);
  z-index: 0;
}
::selection { background: rgba(94, 234, 212, .28); color: #fff; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
code, pre { font-family: var(--mono); }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, .22) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .22); border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

/* 基础控件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent; background: transparent;
  font-weight: 600; font-size: 14px; letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, opacity .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
  color: #04121a;
  background: linear-gradient(135deg, #5eead4 0%, #67e8f9 46%, #818cf8 100%);
  box-shadow: 0 12px 30px rgba(45, 212, 191, .20), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 38px rgba(45, 212, 191, .28); }
.btn-ghost {
  color: var(--text); background: rgba(255, 255, 255, .045);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .08); border-color: var(--border-strong); }
.btn-danger {
  color: #ffe4e6; background: rgba(251, 113, 133, .16);
  border-color: rgba(251, 113, 133, .32);
}
.btn-danger:hover:not(:disabled) { background: rgba(251, 113, 133, .26); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 13px; border-radius: 10px; font-size: 13px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: background .18s, color .18s, border-color .18s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--border); }
.icon-btn:focus-visible, .btn:focus-visible, .nav-item:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(94, 234, 212, .55); outline-offset: 2px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: #c5d1e8; letter-spacing: .01em; }
.field small { font-size: 12px; color: var(--dim); line-height: 1.5; }
.field input, .field textarea, .field select {
  width: 100%; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(4, 9, 18, .58); color: var(--text);
  padding: 0 14px; height: 46px; transition: border-color .18s, box-shadow .18s, background .18s;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: #596782; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: rgba(94, 234, 212, .55);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, .10); background: rgba(4, 9, 18, .8);
}
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap select {
  appearance: none; width: 100%; height: 40px; padding: 0 34px 0 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: rgba(4, 9, 18, .5); color: var(--text); font-size: 13px;
}
.select-wrap .icon { position: absolute; right: 10px; width: 15px; height: 15px; color: var(--dim); pointer-events: none; }
.select-wrap.full select { height: 46px; border-radius: 12px; font-size: 14px; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--border); background: rgba(4, 9, 18, .58); padding: 0 44px 0 42px; color: var(--text); }
.input-wrap input:focus { outline: none; border-color: rgba(94, 234, 212, .55); box-shadow: 0 0 0 3px rgba(94, 234, 212, .10); }
.input-wrap input::placeholder { color: #596782; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 17px; height: 17px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--dim); display: grid; place-items: center; }
.pw-toggle:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.optional { color: var(--dim); font-weight: 400; font-size: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-suffix { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; background: rgba(4, 9, 18, .58); overflow: hidden; }
.input-suffix input { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.input-suffix span { padding-right: 14px; color: var(--dim); font-size: 12px; white-space: nowrap; }

/* 通用卡片 */
.card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .008)), var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.eyebrow {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: .20em;
  color: var(--dim); text-transform: uppercase;
}
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.text-link .icon { width: 14px; height: 14px; }
.text-link:hover { color: #a7f3e8; }

/* ============ 登录 ============ */
.auth { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(430px, .94fr); }
.auth-art {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 52px 64px 40px;
  background:
    linear-gradient(150deg, rgba(10, 22, 38, .92), rgba(6, 11, 21, .96) 58%, rgba(9, 15, 30, .98));
  border-right: 1px solid rgba(148, 163, 184, .07);
}
.auth-art::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 40% 35%, black 5%, transparent 70%);
}
.auth-art::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 500px at 70% 80%, rgba(99, 102, 241, .12), transparent 65%);
  pointer-events: none;
}
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; }
.a1 { width: 560px; height: 560px; top: -220px; left: -160px; background: #0d9488; animation: drift 20s ease-in-out infinite alternate; }
.a2 { width: 480px; height: 480px; right: -180px; top: 16%; background: #4f46e5; animation: drift 26s ease-in-out infinite alternate-reverse; }
.a3 { width: 420px; height: 420px; left: 30%; bottom: -220px; background: #7c3aed; opacity: .35; animation: drift 22s ease-in-out infinite alternate; }
.auth-stars {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 18% 26%, rgba(255, 255, 255, .65), transparent),
    radial-gradient(1px 1px at 72% 18%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1.2px 1.2px at 46% 62%, rgba(255, 255, 255, .4), transparent),
    radial-gradient(1px 1px at 84% 72%, rgba(255, 255, 255, .45), transparent),
    radial-gradient(1.6px 1.6px at 28% 84%, rgba(255, 255, 255, .32), transparent),
    radial-gradient(1px 1px at 60% 34%, rgba(255, 255, 255, .38), transparent);
}
.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }
.brand-glyph {
  display: grid; place-items: center; width: 52px; height: 52px; flex: none;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(94, 234, 212, .92), rgba(129, 140, 248, .88));
  color: #06131a; font-size: 23px; font-weight: 800; letter-spacing: -.04em;
  box-shadow: 0 12px 32px rgba(45, 212, 191, .25), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.brand-glyph-sm { width: 42px; height: 42px; border-radius: 13px; font-size: 19px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 17px; letter-spacing: .06em; }
.brand-text span { font-size: 9.5px; letter-spacing: .24em; color: var(--dim); }
.auth-copy { position: relative; z-index: 2; margin-top: clamp(60px, 13vh, 140px); max-width: 610px; }
.auth-copy h1 { margin: 18px 0 18px; font-size: clamp(38px, 4.4vw, 60px); line-height: 1.12; letter-spacing: -.035em; font-weight: 700; }
.auth-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #5eead4 5%, #a5b4fc 52%, #e879f9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-copy p { color: var(--muted); font-size: 15.5px; max-width: 430px; }
.auth-metrics { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.auth-metric {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 14px;
  background: rgba(255, 255, 255, .028); backdrop-filter: blur(12px);
}
.auth-metric .icon { color: var(--accent); }
.auth-metric div { display: flex; flex-direction: column; line-height: 1.35; }
.auth-metric strong { font-size: 12.5px; }
.auth-metric span { font-size: 11px; color: var(--dim); }
.auth-foot { position: relative; z-index: 2; margin-top: auto; padding-top: 40px; font-size: 11.5px; color: #53617a; letter-spacing: .04em; }
.auth-form-side {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 44px; background: rgba(5, 9, 17, .42);
}
.auth-form-side::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 420px at 60% 30%, rgba(99, 102, 241, .10), transparent 65%);
}
.login-card { position: relative; z-index: 2; width: min(400px, 100%); }
.login-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; margin-bottom: 22px; border-radius: 99px;
  border: 1px solid rgba(94, 234, 212, .20); background: rgba(94, 234, 212, .08);
  color: #9df3e7; font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
}
.login-badge .icon { width: 14px; height: 14px; }
.login-card h2 { font-size: 32px; letter-spacing: -.03em; font-weight: 700; }
.login-sub { color: var(--muted); font-size: 13.5px; margin: 6px 0 30px; }
.login-card .field { margin-bottom: 18px; }
.login-error {
  margin: 2px 0 16px; padding: 11px 13px; border-radius: 10px;
  border: 1px solid rgba(251, 113, 133, .30); background: rgba(251, 113, 133, .10);
  color: #fecdd3; font-size: 12.5px; animation: shake .32s ease;
}
.login-tip { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 20px; font-size: 11.5px; color: var(--dim); }
.login-tip .icon { width: 13px; height: 13px; }

/* ============ 应用框架 ============ */
.app { position: relative; z-index: 1; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: 252px; display: flex; flex-direction: column;
  padding: 26px 18px 18px;
  background: rgba(6, 10, 19, .84);
  border-right: 1px solid rgba(148, 163, 184, .09);
  backdrop-filter: blur(24px);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.sidebar-brand strong { font-size: 15px; letter-spacing: .05em; }
.sidebar-brand span { font-size: 8.5px; letter-spacing: .18em; }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 34px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  height: 44px; padding: 0 12px; border-radius: 12px;
  color: var(--muted); font-size: 13.5px; font-weight: 500;
  transition: background .18s, color .18s;
}
.nav-item .icon { width: 17px; height: 17px; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .045); color: var(--text); }
.nav-item.active {
  color: #d9fff8;
  background: linear-gradient(90deg, rgba(94, 234, 212, .13), rgba(129, 140, 248, .08));
  border: 1px solid rgba(94, 234, 212, .14);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -19px; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 4px 4px 0; background: linear-gradient(180deg, #5eead4, #818cf8);
  box-shadow: 0 0 14px rgba(94, 234, 212, .6);
}
.nav-label { margin: 30px 12px 10px; font-size: 9px; font-weight: 700; letter-spacing: .22em; color: #4e5b73; }
.secure-card {
  display: flex; gap: 10px; padding: 13px;
  border: 1px solid rgba(94, 234, 212, .12); border-radius: 14px;
  background: linear-gradient(150deg, rgba(94, 234, 212, .07), rgba(129, 140, 248, .04));
}
.secure-card-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: rgba(94, 234, 212, .12); color: var(--accent); }
.secure-card-icon .icon { width: 15px; height: 15px; }
.secure-card strong { display: block; font-size: 11.5px; }
.secure-card p { margin-top: 3px; font-size: 10.5px; line-height: 1.55; color: var(--dim); }
.sidebar-spacer { flex: 1; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px; border-top: 1px solid rgba(148, 163, 184, .08);
}
.avatar {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 12px; font-size: 15px; font-weight: 700; color: #06131a;
  background: linear-gradient(145deg, #5eead4, #818cf8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.sidebar-user-info { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; flex: 1; }
.sidebar-user-info strong { font-size: 12.5px; }
.sidebar-user-info span { font-size: 10px; color: var(--dim); }
.sidebar-overlay { display: none; }

.main { margin-left: 252px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  height: 76px; padding: 0 34px;
  background: rgba(6, 10, 19, .70);
  border-bottom: 1px solid rgba(148, 163, 184, .07);
  backdrop-filter: blur(22px);
}
.menu-btn { display: none; }
.topbar-title { display: flex; flex-direction: column; line-height: 1.3; }
.topbar-title span { font-size: 9px; letter-spacing: .2em; color: var(--dim); font-weight: 700; }
.topbar-title h2 { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 1px solid rgba(52, 211, 153, .18); border-radius: 99px;
  background: rgba(52, 211, 153, .07); color: #86efac; font-size: 11px; font-weight: 600;
}
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .14); animation: pulse 2.4s ease infinite; }
.topbar-divider { width: 1px; height: 26px; background: var(--border); }
.topbar-user { display: flex; align-items: center; gap: 9px; }
.topbar-user div:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.topbar-user strong { font-size: 12px; }
.topbar-user span { font-size: 9.5px; color: var(--dim); }
.content { width: 100%; max-width: 1420px; margin: 0 auto; padding: 30px 34px 48px; }
.page { animation: fadeUp .45s ease both; }

/* ============ 概览 ============ */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: 238px; padding: 36px 40px;
  border: 1px solid rgba(148, 163, 184, .12); border-radius: 26px;
  background:
    radial-gradient(700px 340px at 82% 20%, rgba(94, 234, 212, .13), transparent 60%),
    radial-gradient(560px 360px at 100% 100%, rgba(168, 85, 247, .12), transparent 60%),
    linear-gradient(120deg, rgba(13, 23, 41, .86), rgba(9, 16, 30, .82));
  box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 75% 40%, black 2%, transparent 68%);
}
.hero-glow { position: absolute; width: 420px; height: 420px; right: 4%; top: -160px; background: radial-gradient(circle, rgba(94, 234, 212, .16), transparent 65%); filter: blur(20px); }
.hero-content { position: relative; z-index: 2; max-width: 580px; }
.hero-content h1 { margin: 10px 0 8px; font-size: clamp(28px, 3vw, 38px); line-height: 1.2; letter-spacing: -.03em; font-weight: 700; }
.hero-content p { color: var(--muted); font-size: 14px; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero-date { position: absolute; right: 36px; top: 34px; z-index: 2; text-align: right; display: flex; flex-direction: column; }
.hero-date strong { font-size: 15px; letter-spacing: .02em; }
.hero-date span { font-size: 10px; color: var(--dim); letter-spacing: .1em; }
.hero-orbit { position: absolute; right: 90px; bottom: -30px; width: 300px; height: 300px; z-index: 1; opacity: .9; }
.orbit-ring { position: absolute; inset: 0; border: 1px solid rgba(94, 234, 212, .17); border-radius: 50%; }
.ring-1 { inset: 8%; }
.ring-2 { inset: 24%; border-color: rgba(129, 140, 248, .20); }
.ring-3 { inset: 39%; border-color: rgba(192, 132, 252, .22); }
.orbit-core {
  position: absolute; inset: 45%; display: grid; place-items: center;
  border-radius: 50%; background: linear-gradient(145deg, #5eead4, #818cf8);
  color: #05131c; box-shadow: 0 0 60px rgba(94, 234, 212, .48);
  animation: spin 26s linear infinite;
}
.orbit-core .icon { width: 22px; height: 22px; stroke-width: 2; }
.orbit-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(94, 234, 212, .9); }
.dot-1 { top: 11%; left: 26%; }
.dot-2 { right: 12%; top: 46%; background: #a5b4fc; box-shadow: 0 0 12px rgba(165, 180, 252, .9); }
.dot-3 { left: 20%; bottom: 13%; background: #e879f9; box-shadow: 0 0 12px rgba(232, 121, 249, .9); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.metric { display: flex; align-items: flex-start; gap: 14px; padding: 20px; transition: transform .2s, border-color .2s; }
.metric:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.metric-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 13px; color: var(--tone); background: var(--tone-soft);
  border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent);
}
.metric-icon .icon { width: 19px; height: 19px; }
.metric-body { display: flex; flex-direction: column; min-width: 0; }
.metric-body span { font-size: 12px; color: var(--muted); }
.metric-body strong { margin: 2px 0 1px; font-size: 30px; line-height: 1.15; letter-spacing: -.03em; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric-body small { font-size: 10.5px; color: var(--dim); }

.dashboard-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; margin-top: 18px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-head h3 { margin-top: 2px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.chart-card, .recent-card { padding: 22px 24px; }
.chart-total { text-align: right; display: flex; flex-direction: column; }
.chart-total span { font-size: 10.5px; color: var(--dim); }
.chart-total strong { font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chart {
  position: relative; height: 214px; margin-top: 18px;
  display: flex; align-items: flex-end; gap: 10px;
  padding: 14px 4px 26px;
  background-image: repeating-linear-gradient(to top, rgba(148, 163, 184, .07) 0, rgba(148, 163, 184, .07) 1px, transparent 1px, transparent 25%);
  border-bottom: 1px solid rgba(148, 163, 184, .08);
}
.chart-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar {
  position: relative; width: min(44px, 62%); min-height: 3px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, rgba(94, 234, 212, .92), rgba(99, 102, 241, .62));
  box-shadow: 0 0 22px rgba(94, 234, 212, .12);
  transition: height .7s cubic-bezier(.22, 1, .36, 1), filter .18s;
  height: 0;
}
.chart-bar.zero { background: rgba(148, 163, 184, .18); box-shadow: none; }
.chart-col:hover .chart-bar { filter: brightness(1.2); }
.chart-bar::before {
  content: attr(data-value);
  position: absolute; left: 50%; top: -25px; transform: translateX(-50%) translateY(4px);
  padding: 3px 7px; border-radius: 6px; background: #16223a; border: 1px solid var(--border);
  font-size: 10.5px; color: var(--text); opacity: 0; pointer-events: none; white-space: nowrap;
  transition: opacity .16s, transform .16s; font-variant-numeric: tabular-nums;
}
.chart-col:hover .chart-bar::before { opacity: 1; transform: translateX(-50%) translateY(0); }
.chart-label { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.chart-legend { display: flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; background: linear-gradient(135deg, #5eead4, #818cf8); }
.chart-legend span { margin-left: auto; color: var(--dim); }

.recent-list { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.recent-item { display: flex; align-items: center; gap: 11px; padding: 11px 4px; border-radius: 11px; transition: background .18s; }
.recent-item:hover { background: rgba(255, 255, 255, .035); }
.recent-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #06131a; background: linear-gradient(145deg, #5eead4, #818cf8); flex: none; }
.recent-main { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.recent-main strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-main span { font-size: 10.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.recent-side time { font-size: 10px; color: var(--dim); }
.recent-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 210px; color: var(--dim); font-size: 12px; text-align: center; padding: 20px; }
.recent-empty .icon { width: 26px; height: 26px; color: #4d5b74; margin-bottom: 4px; }

.security-strip { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 18px; padding: 16px 22px; }
.security-item { display: flex; align-items: center; gap: 10px; }
.security-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--accent); background: rgba(94, 234, 212, .08); }
.security-icon .icon { width: 15px; height: 15px; }
.security-item div:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.security-item strong { font-size: 11.5px; }
.security-item span { font-size: 10px; color: var(--dim); }
.security-note { display: flex; align-items: center; gap: 7px; margin-left: auto; font-size: 11px; color: var(--dim); }
.security-note .icon { width: 14px; height: 14px; color: var(--accent-3); }

/* ============ 账号管理 ============ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-head h1 { margin: 5px 0 3px; font-size: 28px; letter-spacing: -.03em; font-weight: 700; }
.page-head p { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px; }
.search-box { position: relative; flex: 1; max-width: 340px; }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--dim); }
.search-box input {
  width: 100%; height: 40px; padding: 0 12px 0 37px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(4, 9, 18, .5); color: var(--text); font-size: 13px;
}
.search-box input::placeholder { color: #596782; }
.search-box input:focus { outline: none; border-color: rgba(94, 234, 212, .45); box-shadow: 0 0 0 3px rgba(94, 234, 212, .08); }
.segmented { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: rgba(4, 9, 18, .42); }
.segmented button { height: 32px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; transition: background .18s, color .18s; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--panel-2); color: #d9fff8; box-shadow: 0 1px 6px rgba(0, 0, 0, .3); }
.toolbar .select-wrap { margin-left: auto; width: 136px; }
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.account-table { width: 100%; min-width: 930px; border-collapse: collapse; }
.account-table th {
  padding: 14px 14px 11px; text-align: left; font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #61708a;
  border-bottom: 1px solid rgba(148, 163, 184, .09); white-space: nowrap;
}
.account-table th:first-child, .account-table td:first-child { padding-left: 20px; }
.account-table th:last-child, .account-table td:last-child { padding-right: 20px; }
.account-table th.right, .account-table td.right { text-align: right; }
.account-table td { padding: 13px 14px; border-bottom: 1px solid rgba(148, 163, 184, .055); vertical-align: middle; font-size: 12.5px; }
.account-table tbody tr { transition: background .16s; }
.account-table tbody tr:hover { background: rgba(255, 255, 255, .026); }
.account-table tbody tr:last-child td { border-bottom: 0; }
.acct-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.acct-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #06131a; background: linear-gradient(145deg, #5eead4, #818cf8); flex: none; }
.acct-name { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.acct-name strong { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.acct-name span { font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.role-admin { color: #e9d5ff; background: rgba(192, 132, 252, .12); border-color: rgba(192, 132, 252, .20); }
.role-developer { color: #c7d2fe; background: rgba(129, 140, 248, .12); border-color: rgba(129, 140, 248, .20); }
.role-user { color: #99f6e4; background: rgba(94, 234, 212, .10); border-color: rgba(94, 234, 212, .18); }
.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; }
.status-badge i { width: 6px; height: 6px; border-radius: 50%; }
.status-active { color: #86efac; }
.status-active i { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .12); }
.status-disabled { color: #94a3b8; }
.status-disabled i { background: #64748b; }
.rate-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-cell span { color: var(--dim); font-size: 10px; margin-left: 2px; }
.calls-cell { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.date-cell { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.key-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 160px;
  padding: 5px 9px; border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .12); background: rgba(4, 9, 18, .46);
  font-family: var(--mono); font-size: 10.5px; color: #9fb0cc; white-space: nowrap;
}
.key-chip .icon { width: 12px; height: 12px; color: var(--dim); }
.row-actions { display: inline-flex; align-items: center; gap: 2px; }
.action-btn {
  display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; color: var(--dim); transition: background .16s, color .16s;
}
.action-btn .icon { width: 15px; height: 15px; }
.action-btn:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.action-btn.danger:hover { background: rgba(251, 113, 133, .12); color: #fda4af; }
.action-btn.good:hover { background: rgba(52, 211, 153, .12); color: #6ee7b7; }
.table-loading { padding: 8px 20px 18px; }
.skeleton-row {
  height: 44px; margin-top: 9px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(148, 163, 184, .05), rgba(148, 163, 184, .12), rgba(148, 163, 184, .05));
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 58px 24px; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; margin-bottom: 14px; color: var(--accent); background: rgba(94, 234, 212, .08); border: 1px solid rgba(94, 234, 212, .16); }
.empty-icon .icon { width: 25px; height: 25px; }
.empty-state h3 { font-size: 15px; }
.empty-state p { color: var(--dim); font-size: 12.5px; margin: 4px 0 16px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-top: 1px solid rgba(148, 163, 184, .08); font-size: 11px; color: var(--dim); }
.foot-note { display: inline-flex; align-items: center; gap: 5px; }
.foot-note .icon { width: 12px; height: 12px; }

/* ============ 文档 ============ */
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.doc-card { padding: 24px 26px; }
.doc-card h4 { margin: 22px 0 10px; font-size: 12.5px; letter-spacing: .04em; color: #c8d5eb; }
.doc-card h4:first-child { margin-top: 0; }
.doc-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.method { padding: 4px 8px; border-radius: 6px; background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .22); color: #86efac; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.endpoint { font-family: var(--mono); font-size: 13.5px; color: #d7e2f5; }
.doc-desc { margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.header-list { display: flex; flex-direction: column; gap: 8px; }
.header-list div { display: flex; align-items: baseline; gap: 12px; padding: 8px 10px; border-radius: 8px; background: rgba(4, 9, 18, .36); border: 1px solid rgba(148, 163, 184, .07); }
.header-list code { font-size: 11.5px; color: #9df3e7; white-space: nowrap; min-width: 104px; }
.header-list span { color: var(--dim); font-size: 11.5px; }
.doc-list { margin: 0; padding-left: 17px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.doc-list code, .doc-desc code { font-size: 11px; color: #a5b4fc; background: rgba(129, 140, 248, .09); padding: 1px 5px; border-radius: 4px; }
.code-block {
  margin: 0; padding: 14px 16px; overflow-x: auto;
  border-radius: 12px; border: 1px solid rgba(148, 163, 184, .09);
  background: rgba(3, 7, 14, .72); color: #b8c7e0; font-size: 11.5px; line-height: 1.75;
}
.code-block.go { color: #a7f3d0; }
.status-list { display: flex; flex-direction: column; gap: 8px; }
.status-list div { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.code-pill { display: inline-grid; place-items: center; min-width: 42px; padding: 3px 7px; border-radius: 6px; font-family: var(--mono); font-size: 10.5px; border: 1px solid transparent; }
.code-pill.ok { color: #86efac; background: rgba(52, 211, 153, .10); border-color: rgba(52, 211, 153, .18); }
.code-pill.warn { color: #fde68a; background: rgba(251, 191, 36, .09); border-color: rgba(251, 191, 36, .18); }
.code-pill.danger { color: #fda4af; background: rgba(251, 113, 133, .10); border-color: rgba(251, 113, 133, .18); }
.code-pill.info { color: #c7d2fe; background: rgba(129, 140, 248, .10); border-color: rgba(129, 140, 248, .18); }

/* ============ 弹窗 ============ */
.modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 5, 11, .68); backdrop-filter: blur(8px); animation: fadeIn .18s ease; }
.modal {
  position: relative; z-index: 1; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 26px; border-radius: 22px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)), #0c1526;
  border: 1px solid rgba(148, 163, 184, .16);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .62);
  animation: modalIn .22s cubic-bezier(.22, 1, .36, 1);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.modal-head h3 { margin-top: 3px; font-size: 20px; letter-spacing: -.02em; }
.modal-key { width: min(540px, 100%); padding: 30px; }
.key-hero { text-align: center; display: flex; flex-direction: column; align-items: center; }
.key-hero-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 17px; margin-bottom: 14px; color: #06131a; background: linear-gradient(145deg, #5eead4, #818cf8); box-shadow: 0 12px 34px rgba(94, 234, 212, .24); }
.key-hero-icon .icon { width: 24px; height: 24px; }
.key-hero h3 { margin: 4px 0 4px; font-size: 21px; letter-spacing: -.02em; }
.key-hero p { color: var(--muted); font-size: 12.5px; }
.key-box {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 14px; padding: 12px 12px 12px 16px;
  border: 1px dashed rgba(94, 234, 212, .32); border-radius: 13px;
  background: linear-gradient(120deg, rgba(94, 234, 212, .07), rgba(129, 140, 248, .06));
}
.key-box code { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.6; color: #d9fff8; word-break: break-all; user-select: all; }
.key-warning { display: flex; gap: 8px; padding: 11px 13px; border-radius: 11px; background: rgba(251, 191, 36, .07); border: 1px solid rgba(251, 191, 36, .16); color: #fde68a; font-size: 11px; line-height: 1.6; }
.key-warning .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-confirm { width: min(430px, 100%); text-align: center; padding: 32px 28px 24px; }
.confirm-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px; color: #fda4af; background: rgba(251, 113, 133, .10); border: 1px solid rgba(251, 113, 133, .20); }
.confirm-icon .icon { width: 23px; height: 23px; }
.modal-confirm h3 { font-size: 19px; letter-spacing: -.02em; }
.modal-confirm p { margin: 7px 0 4px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.modal-confirm .modal-foot { justify-content: center; }
.form-error { margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: rgba(251, 113, 133, .10); border: 1px solid rgba(251, 113, 133, .24); color: #fecdd3; font-size: 12px; }
#accountForm .field { margin-bottom: 17px; }
#accountForm .form-row .field { margin-bottom: 17px; }
#accountModal .modal-foot { margin-top: 4px; }

/* ============ Toast ============ */
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px; min-width: 230px; max-width: 380px;
  padding: 12px 15px; border-radius: 12px;
  background: rgba(13, 22, 38, .96); border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5); font-size: 12.5px; color: var(--text);
  animation: toastIn .26s cubic-bezier(.22, 1, .36, 1);
  pointer-events: auto;
}
.toast .icon { width: 16px; height: 16px; flex: none; }
.toast-success .icon { color: var(--success); }
.toast-error .icon { color: var(--danger); }
.toast-info .icon { color: var(--accent); }
.toast.out { animation: toastOut .2s ease forwards; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: #060a12; color: #fff; z-index: 999; }

/* ============ 动画 ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(40px, 30px, 0) scale(1.12); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.reveal { animation: fadeUp .5s ease both; }
.metrics .reveal:nth-child(2) { animation-delay: .04s; }
.metrics .reveal:nth-child(3) { animation-delay: .08s; }
.metrics .reveal:nth-child(4) { animation-delay: .12s; }

/* ============ 响应式 ============ */
@media (max-width: 1220px) {
  .auth-art { padding: 44px 44px 34px; }
  .auth-copy h1 { font-size: 46px; }
  .hero-orbit { right: 20px; opacity: .55; }
  .dashboard-grid { grid-template-columns: 1.35fr 1fr; }
}
@media (max-width: 1080px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .hero-date { display: none; }
  .col-date { display: none; }
  .account-table { min-width: 820px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form-side { min-height: 100vh; padding: 30px; background: radial-gradient(800px 600px at 50% 0%, rgba(99, 102, 241, .12), transparent 60%), var(--bg); }
  .sidebar { transform: translateX(-100%); transition: transform .24s cubic-bezier(.22, 1, .36, 1); }
  .sidebar.open { transform: none; }
  .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(2, 5, 11, .6); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 20px; height: 68px; }
  .content { padding: 22px 20px 40px; }
  .topbar-user div:last-child, .topbar-divider { display: none; }
}
@media (max-width: 720px) {
  .hero { padding: 26px 22px; min-height: 210px; }
  .hero-orbit { width: 230px; height: 230px; right: -60px; bottom: -70px; opacity: .3; }
  .hero-content { max-width: 100%; }
  .hero-content h1 { font-size: 27px; }
  .metric { padding: 16px; }
  .metric-body strong { font-size: 26px; }
  .toolbar { flex-wrap: wrap; }
  .search-box { max-width: none; flex-basis: 100%; }
  .toolbar .select-wrap { margin-left: 0; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .page-head h1 { font-size: 24px; }
  .security-strip { gap: 16px; }
  .security-note { margin-left: 0; flex-basis: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .modal { padding: 22px; }
  .modal-key { padding: 24px; }
  .key-box { flex-direction: column; align-items: stretch; }
  .key-box .btn { width: 100%; }
  .toast-root { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}
@media (max-width: 480px) {
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { flex-direction: column; gap: 10px; }
  .metric-icon { width: 36px; height: 36px; }
  .metric-body strong { font-size: 23px; }
  .metric-body small { display: none; }
  .auth-form-side { padding: 20px; }
  .login-card h2 { font-size: 27px; }
  .segmented { flex: 1; }
  .segmented button { flex: 1; padding: 0 6px; }
  .table-foot { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

