:root {
  --paper: #121619;
  --surface: #1b2126;
  --surface-2: #151a1e;
  --surface-3: #212930;
  --ink: #edf0f2;
  --muted: #a7b1ba;
  --faint: #7f8b94;
  --line: #333d45;
  --line-soft: rgba(51, 61, 69, 0.66);
  --accent: #4ad6c4;
  --accent-strong: #34d3c0;
  --accent-soft: rgba(74, 214, 196, 0.12);
  --accent-ink: #9fe8dd;
  --green: #5ed6a1;
  --blue: #7db4ff;
  --amber: #f0b45f;
  --violet: #b39df7;
  --rose: #f08a95;
  --action: #e5ebef;
  --action-text: #192027;
  --action-hover: #ffffff;
  --nav-active: #22332f;
  --soft: #242c32;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow: 0 3px 14px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.42);
  --font: "Inter", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sidebar-w: 256px;
  --topbar-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --paper: #f5f7f5;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --surface-3: #eef2f0;
  --ink: #17211f;
  --muted: #5e6b68;
  --faint: #87938f;
  --line: #dfe6e3;
  --line-soft: rgba(36, 60, 54, 0.1);
  --accent: #0f9b8e;
  --accent-strong: #0b8a7e;
  --accent-soft: rgba(15, 155, 142, 0.1);
  --accent-ink: #0b6f66;
  --green: #0e9f6e;
  --blue: #3b82f6;
  --amber: #b7791f;
  --violet: #7c5cf0;
  --rose: #d9485f;
  --action: #17211f;
  --action-text: #ffffff;
  --action-hover: #2a3a36;
  --nav-active: #e7f3f0;
  --soft: #eef2f0;
  --shadow: 0 3px 14px rgba(20, 40, 34, 0.04);
  --shadow-lg: 0 24px 60px rgba(20, 40, 34, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
img, svg { display: block; }
[hidden] { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid transparent; background-clip: padding-box; border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { min-height: 100vh; }
.shell {
  min-height: 100vh;
  margin-left: var(--sidebar-w);
  transition: margin-left 0.24s var(--ease);
  display: flex;
  flex-direction: column;
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 16px 12px 10px;
  background: var(--surface);
  border-right: 1px solid var(--line-soft);
  transition: width 0.24s var(--ease), transform 0.24s var(--ease);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 10px 18px;
  min-height: 52px;
}
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-suffix {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  vertical-align: 1px;
}
.nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 8px;
}
.nav-group { margin-bottom: 14px; }
.nav-group:last-child { margin-bottom: 0; }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 40px;
  margin-bottom: 1px;
  padding: 0 12px 0 15px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-link .icon { width: 18px; height: 18px; opacity: 0.82; }
.nav-link:hover { background: var(--soft); color: var(--ink); }
.nav-link.active {
  background: var(--nav-active);
  color: var(--accent-ink);
}
.nav-link.active .icon { opacity: 1; }
.sidebar-foot {
  flex: none;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.sidebar-foot .nav-link { color: var(--muted); }
.sidebar-foot .theme-label { overflow: hidden; }
.theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }
.sidebar-note {
  padding: 8px 16px 2px;
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.app.collapsed .sidebar { width: 76px; padding-left: 10px; padding-right: 10px; }
.app.collapsed .shell { margin-left: 76px; }
.app.collapsed .brand { padding: 2px 0 18px; justify-content: center; }
.app.collapsed .brand-text { display: none; }
.app.collapsed .nav-link { justify-content: center; gap: 0; padding: 0; }
.app.collapsed .nav-link span { display: none; }
.app.collapsed .sidebar-note { display: none; }
.app.collapsed #collapseBtn .icon { transform: rotate(180deg); }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(4, 8, 9, 0.55);
  backdrop-filter: blur(2px);
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}
.topbar .menu-btn { display: none; }
.topbar-titles { min-width: 0; }
.topbar-titles h1 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-titles p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.ping {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.promo {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 12px 0 8px;
  margin-right: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  font-size: 12px;
  color: var(--muted);
  transition: border-color 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}
.promo:hover { border-color: var(--accent); color: var(--ink); }
.promo b { color: var(--ink); font-weight: 600; }
.promo-avatars { display: flex; padding-left: 5px; }
.promo-avatars i {
  width: 19px;
  height: 19px;
  margin-left: -5px;
  border-radius: 50%;
  border: 1.5px solid var(--surface);
  background: linear-gradient(135deg, #4ad6c4, #3178c6);
}
.promo-avatars i:nth-child(2) { background: linear-gradient(135deg, #f0b45f, #d0663f); }
.promo-avatars i:nth-child(3) { background: linear-gradient(135deg, #b39df7, #5b6bd6); }
.promo-cta { color: var(--accent); font-weight: 600; }
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease;
}
.top-link:hover { color: var(--ink); background: var(--soft); }
.top-link .icon { width: 16px; height: 16px; }
.top-link .chev { width: 13px; height: 13px; opacity: 0.7; }
.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: border-color 0.16s ease;
}
.balance-chip:hover { border-color: var(--accent); }
.balance-chip .icon { width: 16px; height: 16px; color: var(--accent); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 7px 0 4px;
  margin-left: 2px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 0.16s ease;
}
.user-chip:hover { background: var(--soft); }
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #63e2d2, #3d84d8);
  color: #0b1715;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-meta b { font-size: 12px; font-weight: 600; }
.user-meta small { font-size: 10px; color: var(--faint); margin-top: 2px; }
.user-chip .chev { width: 13px; height: 13px; color: var(--faint); }

/* Main */
.main {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px 48px;
  flex: 1;
}
.view { min-height: 320px; }
.view.enter > * { animation: fadeUp 0.4s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.spin { animation: spin 0.8s linear infinite; }

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 0 26px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hero h2 {
  font-size: 38px;
  font-weight: 400;
  line-height: 1.36;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero-sub { font-size: 14px; color: var(--muted); margin-top: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--action); color: var(--action-text); }
.btn-primary:hover { background: var(--action-hover); }
.btn-secondary {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--soft); border-color: var(--line); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--soft); }
.btn-accent {
  background: var(--accent);
  color: #08201c;
}
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 86%, white); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--rose) 45%, transparent); color: var(--rose); }
.btn-danger:hover { background: color-mix(in srgb, var(--rose) 10%, transparent); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.stat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  min-height: 94px;
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 9px;
  background: color-mix(in srgb, var(--tile) 13%, transparent);
  color: var(--tile);
}
.stat-icon .icon { width: 19px; height: 19px; }
.stat-body { min-width: 0; }
.stat-label { font-size: 13px; color: var(--muted); line-height: 1.4; margin-bottom: 1px; }
.stat-value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.45;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-value .split { color: var(--faint); font-weight: 500; font-size: 0.82em; }
.stat-sub {
  font-size: 12px;
  color: var(--faint);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.panel { padding: 20px; margin-bottom: 20px; }
.panel-head, .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-head { margin-bottom: 14px; }
.panel-head { margin-bottom: 16px; }
.table-card { overflow: hidden; }
.table-card .card-head { padding: 18px 20px 14px; margin-bottom: 0; border-bottom: 1px solid var(--line-soft); }
.table-card .data-table-wrap { border-radius: 0 0 var(--radius) var(--radius); }
.card-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.card-note { font-size: 12px; color: var(--faint); }
.card-sub { font-size: 12px; color: var(--muted); }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.platform {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  min-width: 0;
}
.platform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.platform-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.platform-cost { font-size: 12px; font-weight: 600; color: var(--tile, var(--accent)); font-variant-numeric: tabular-nums; }
.platform-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.platform-row span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  margin: 24px 0 16px;
}
.toolbar-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-label { font-size: 12px; color: var(--muted); white-space: nowrap; }

.select-wrap { position: relative; display: inline-flex; }
.select-wrap select {
  appearance: none;
  height: 36px;
  min-width: 104px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}
.select-wrap select:hover { border-color: var(--line); }
.select-wrap select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select-wrap .icon {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.chart-card { padding: 20px; min-width: 0; }
.charts-grid > .chart-card { display: flex; flex-direction: column; }
.chart-card .card-title { font-size: 14px; white-space: nowrap; }
.chart-card .legend { min-width: 0; }
.model-split { display: flex; align-items: center; gap: 20px; }
.mix-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.mix-foot div { display: flex; align-items: baseline; gap: 8px; }
.mix-foot span { font-size: 11px; color: var(--faint); }
.mix-foot b { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.donut-wrap { position: relative; width: 178px; height: 178px; flex: none; }
.donut-wrap svg { width: 100%; height: 100%; }
.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.donut-center b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.donut-center span { font-size: 11px; color: var(--faint); margin-top: 2px; }
.model-table { flex: 1; min-width: 0; }
.model-table th:nth-child(n + 2), .model-table td:nth-child(n + 2) { text-align: right; }
.model-table .model-name { color: var(--ink); font-weight: 500; }
.model-table th { font-size: 11px; }

.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th {
  padding: 8px;
  font-weight: 500;
  text-align: left;
  color: var(--faint);
  white-space: nowrap;
  border-bottom: 1px solid var(--line-soft);
}
.table td {
  padding: 9px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--line-soft) 55%, transparent);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.14s ease; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.table .num { text-align: right; }
.cost-actual { color: var(--green); font-weight: 600; }
.cost-standard { color: var(--faint); }

.chart-shell { position: relative; margin-top: 8px; }
.chart-shell svg { width: 100%; height: auto; overflow: visible; }
.chart-shell .chart-loading { opacity: 0.35; transition: opacity 0.2s ease; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.legend button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  transition: opacity 0.16s ease, color 0.16s ease;
}
.legend button:hover { color: var(--ink); }
.legend button.off { opacity: 0.35; text-decoration: line-through; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent); }
.chart-tip {
  position: fixed;
  z-index: 90;
  display: none;
  min-width: 148px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  font-size: 11px;
}
.chart-tip .tip-date { color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.chart-tip .tip-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; line-height: 1.8; color: var(--muted); }
.chart-tip .tip-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tip .tip-row i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--c); }

.trend-legend { margin-top: 4px; }

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
}
.recent-card { padding: 20px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.recent-head h2 { font-size: 18px; font-weight: 600; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.usage-list { display: grid; gap: 8px; }
.usage-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface-2);
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.usage-item:hover { border-color: color-mix(in srgb, var(--line) 80%, var(--accent)); transform: translateY(-1px); }
.usage-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--muted);
}
.usage-icon .icon { width: 17px; height: 17px; }
.usage-body { flex: 1; min-width: 0; }
.usage-model { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-time { font-size: 11px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.usage-right { text-align: right; flex: none; }
.usage-money { font-size: 13px; font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; }
.usage-money span { color: var(--faint); font-weight: 500; }
.usage-tokens { font-size: 11px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.card-foot { margin-top: 12px; }
.view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  transition: background 0.16s ease, color 0.16s ease;
}
.view-all:hover { background: var(--soft); color: var(--ink); }
.view-all .icon { width: 14px; height: 14px; }

.quick-card { padding: 20px; }
.quick-card h2 { font-size: 18px; font-weight: 600; }
.quick-list { display: grid; gap: 10px; margin-top: 14px; }
.quick {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.quick:hover { border-color: color-mix(in srgb, var(--line) 80%, var(--accent)); transform: translateY(-1px); }
.quick-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--tile) 13%, transparent);
  color: var(--tile);
}
.quick-text { flex: 1; min-width: 0; }
.quick-text b { display: block; font-size: 13px; font-weight: 500; }
.quick-text small { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.quick .chev { color: var(--faint); width: 15px; height: 15px; }

/* Shared pages */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 0 24px;
  flex-wrap: wrap;
}
.page-head h2 { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.page-head p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.mini-stat { padding: 16px; }
.mini-stat .label { font-size: 12px; color: var(--muted); }
.mini-stat b { display: block; font-size: 20px; font-weight: 600; margin-top: 4px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.mini-stat small { display: block; font-size: 11px; color: var(--faint); margin-top: 3px; }
.endpoint-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.endpoint-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.endpoint-row code { font-family: var(--mono); font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.endpoint-label { font-size: 11px; color: var(--faint); flex: none; }
.copy-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  transition: color 0.16s ease, background 0.16s ease;
}
.copy-btn:hover { background: var(--soft); color: var(--ink); }
.copy-btn .icon { width: 14px; height: 14px; }
.mono { font-family: var(--mono); }

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.filter-bar .select-wrap select { min-width: 116px; }
.search-wrap { position: relative; flex: 1; min-width: 180px; max-width: 300px; }
.search-wrap .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 15px;
  height: 15px;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}
.input, .search-wrap input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.search-wrap input { padding-left: 34px; }
.input::placeholder, .search-wrap input::placeholder { color: var(--faint); }
.input:focus, .search-wrap input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input.spaced { margin-top: 8px; }

.data-table-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.data-table-wrap::-webkit-scrollbar { height: 8px; }
.data-table-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.data-table-wrap::-webkit-scrollbar-track { background: transparent; }
.data-table { min-width: 820px; width: 100%; }
.data-table th { padding: 10px 16px; background: color-mix(in srgb, var(--surface-2) 60%, transparent); font-size: 11px; text-align: left; }
.data-table td { padding: 12px 16px; font-size: 12px; }
.data-table th:first-child, .data-table td:first-child { padding-left: 20px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 20px; }
.data-table .cell-main { color: var(--ink); font-weight: 500; }
.name-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  vertical-align: 1px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 15%, transparent);
}
.data-table .cell-sub { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.key-cell { display: flex; align-items: center; gap: 8px; }
.key-pill {
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}
.row-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.action-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  transition: color 0.16s ease, background 0.16s ease;
}
.action-btn:hover { background: var(--soft); color: var(--ink); }
.action-btn.danger:hover { color: var(--rose); background: color-mix(in srgb, var(--rose) 10%, transparent); }
.action-btn .icon { width: 15px; height: 15px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.success { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.badge.warn { background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); }
.badge.danger { background: color-mix(in srgb, var(--rose) 12%, transparent); color: var(--rose); }
.badge.muted { background: var(--soft); color: var(--muted); }
.badge.info { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge.plain::before { display: none; }
.progress { width: 100%; height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.progress.warn i { background: var(--amber); }
.usage-meter { width: 120px; }
.usage-meter .meter-text { font-size: 11px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }

.switch {
  position: relative;
  width: 34px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s var(--ease), background 0.18s ease;
}
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(14px); background: #08201c; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--faint);
}
.pager { display: flex; gap: 4px; }
.pager button {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.pager button:hover { background: var(--soft); color: var(--ink); }
.pager button.active { background: var(--nav-active); color: var(--accent-ink); border-color: transparent; }
.pager button[disabled] { opacity: 0.4; cursor: not-allowed; }

.empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}
.empty .icon { width: 26px; height: 26px; color: var(--faint); }
.empty p { font-size: 13px; }
.empty small { font-size: 11px; color: var(--faint); }

/* Wallet */
.wallet-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.balance-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(520px 220px at 100% 0%, var(--accent-soft), transparent 65%),
    var(--surface);
}
.balance-card .label { font-size: 12px; color: var(--muted); }
.balance-value { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.balance-value b { font-size: 40px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.balance-value span { font-size: 12px; color: var(--faint); }
.balance-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.balance-meta { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.balance-meta div { font-size: 12px; color: var(--muted); }
.balance-meta b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.quick-stats-card { padding: 20px; }
.quick-stats-card .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.quick-stats-card .row:last-child { border-bottom: 0; }
.quick-stats-card .row span { color: var(--muted); }
.quick-stats-card .row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.plan {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.plan:hover { border-color: var(--line); }
.plan.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.plan small { display: block; font-size: 11px; color: var(--faint); margin-top: 4px; }
.plan .bonus { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--accent); }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.pay-method input { flex: none; accent-color: var(--accent); }
.pay-method:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pay-method i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; font-style: normal; font-weight: 700; font-size: 12px; color: #fff; }
.pay-method[data-method="alipay"] i { background: #1677ff; }
.pay-method[data-method="wechat"] i { background: #07c160; }
.pay-method.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Redeem */
.redeem-wrap { max-width: 760px; }
.redeem-card { padding: 28px; text-align: center; }
.redeem-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.redeem-icon .icon { width: 26px; height: 26px; }
.redeem-card h2 { font-size: 22px; font-weight: 600; }
.redeem-card > p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.redeem-form { display: flex; gap: 10px; margin: 22px auto 0; max-width: 480px; }
.redeem-form .input { height: 42px; text-align: center; font-family: var(--mono); letter-spacing: 0.05em; }
.redeem-form .btn { height: 42px; flex: none; }
.redeem-hint { font-size: 11px; color: var(--faint); margin-top: 12px; }
.redeem-hint code { color: var(--accent-ink); font-family: var(--mono); }
.redeem-history { padding: 20px; }
.redeem-history .data-table { min-width: 0; }

/* Models */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.chip-btn:hover { color: var(--ink); }
.chip-btn.active { background: var(--nav-active); border-color: transparent; color: var(--accent-ink); }
.provider-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: var(--c); }
.price-cell { color: var(--ink); font-weight: 500; }
.price-cell small { display: block; font-size: 10px; color: var(--faint); font-weight: 400; margin-top: 1px; }

/* Status */
.status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  margin-bottom: 20px;
}
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 14%, transparent);
  flex: none;
}
.status-banner h2 { font-size: 18px; font-weight: 600; }
.status-banner p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.status-meta { margin-left: auto; text-align: right; font-size: 11px; color: var(--faint); }
.provider-list { display: grid; gap: 8px; }
.provider-row {
  display: grid;
  grid-template-columns: 180px 100px 1fr 90px;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.provider-name { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; color: var(--ink); }
.provider-logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--tile) 13%, transparent);
  color: var(--tile);
  font-size: 12px;
  font-weight: 700;
}
.provider-uptime b { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.provider-uptime span { display: block; font-size: 10px; color: var(--faint); margin-top: 1px; }
.uptime-bars { display: flex; align-items: center; gap: 2px; height: 22px; }
.uptime-bars i { width: 4px; height: 22px; border-radius: 2px; background: color-mix(in srgb, var(--green) 70%, transparent); }
.uptime-bars i.warn { background: color-mix(in srgb, var(--amber) 80%, transparent); }
.uptime-bars i.down { background: color-mix(in srgb, var(--rose) 80%, transparent); }
.provider-latency { text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.provider-latency b { display: block; color: var(--ink); font-weight: 500; font-size: 13px; }
.incident { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.incident:last-child { border-bottom: 0; padding-bottom: 0; }
.incident-icon { color: var(--green); padding-top: 1px; }
.incident-icon .icon { width: 16px; height: 16px; }
.incident h4 { font-size: 13px; font-weight: 500; }
.incident p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.incident time { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.form-grid { display: grid; gap: 14px; }
.field > label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.field .hint { font-size: 11px; color: var(--faint); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-row .avatar { width: 52px; height: 52px; font-size: 18px; }
.profile-row b { font-size: 15px; font-weight: 600; display: block; }
.profile-row small { font-size: 12px; color: var(--faint); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row b { display: block; font-size: 13px; font-weight: 500; }
.toggle-row small { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.save-bar { display: flex; justify-content: flex-end; margin-top: 6px; }

/* Docs */
.docs-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.docs-nav { position: sticky; top: 88px; display: grid; gap: 2px; }
.docs-nav a { padding: 8px 12px; border-radius: 7px; font-size: 13px; color: var(--muted); }
.docs-nav a:hover { background: var(--soft); color: var(--ink); }
.docs-nav a.active { background: var(--nav-active); color: var(--accent-ink); }
.docs-body { display: grid; gap: 20px; min-width: 0; }
.doc-block { padding: 22px; min-width: 0; }
.doc-block h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.doc-block p { font-size: 13px; color: var(--muted); line-height: 1.8; }
.doc-block p + p { margin-top: 8px; }
.code-block {
  position: relative;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow-x: auto;
}
.code-block pre { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.75; color: var(--ink); }
.code-block .copy-btn { position: absolute; top: 8px; right: 8px; }
.code-line-muted { color: var(--faint); }
.code-accent { color: var(--accent); }
.code-block pre { padding-right: 34px; }
.error-table { margin-top: 14px; }

/* Modal / toast / popover */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 9, 10, 0.62);
  backdrop-filter: blur(4px);
  animation: fade 0.18s ease;
}
.modal {
  width: min(500px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pop 0.24s var(--ease);
}
.modal.sm { width: min(420px, 100%); }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
}
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.modal-body { padding: 6px 20px 20px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
}
.modal-note {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  line-height: 1.6;
}
.modal-note .icon { width: 15px; height: 15px; margin-top: 1px; }
.modal-danger { color: var(--rose); }
.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-3);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: slideIn 0.24s var(--ease);
  pointer-events: auto;
}
.toast.leaving { animation: fade 0.2s ease reverse both; }
.toast .icon { width: 17px; height: 17px; flex: none; }
.toast.success .icon { color: var(--green); }
.toast.error .icon { color: var(--rose); }
.toast.info .icon { color: var(--blue); }
.popover {
  position: fixed;
  z-index: 95;
  min-width: 240px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: pop 0.16s var(--ease);
}
.popover-title { padding: 8px 10px 6px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
}
.popover-item:hover { background: var(--soft); }
.popover-item .icon { width: 15px; height: 15px; color: var(--muted); }
.popover-item small { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.popover-sep { height: 1px; margin: 5px 0; background: var(--line-soft); }
.notice-item { display: flex; gap: 10px; padding: 10px; border-radius: 7px; }
.notice-item:hover { background: var(--soft); }
.notice-dot { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.notice-item b { display: block; font-size: 12px; font-weight: 500; }
.notice-item p { font-size: 11px; color: var(--faint); margin-top: 2px; line-height: 1.6; }
.notice-item time { font-size: 10px; color: var(--faint); margin-left: auto; white-space: nowrap; }

.disclaimer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--faint);
  text-align: center;
}

/* Responsive */
@media (max-width: 1500px) {
  .promo { display: none; }
}
@media (max-width: 1280px) {
  .top-link.lang-btn { display: none; }
  .hero h2 { font-size: 34px; }
}
@media (max-width: 1150px) {
  .top-link[href="#/models"] { display: none; }
  .user-meta { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-hero { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .docs-nav { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .app.drawer-open .sidebar { transform: none; }
  .app.collapsed .sidebar { width: var(--sidebar-w); padding: 16px 12px 10px; }
  .app.collapsed .brand { justify-content: flex-start; padding: 2px 10px 18px; }
  .app.collapsed .brand-text { display: inline; }
  .app.collapsed .nav-link { justify-content: flex-start; gap: 12px; padding: 0 12px 0 15px; }
  .app.collapsed .nav-link span { display: inline; }
  .app.collapsed .sidebar-note { display: block; }
  .shell { margin-left: 0; }
  .topbar .menu-btn { display: grid; }
  .topbar { padding: 0 16px; }
  .main { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 30px; }
  .hero h2 { font-size: 30px; }
  .page-head { padding-top: 24px; }
  .provider-row { grid-template-columns: 1fr 1fr; }
  .uptime-bars { order: 4; grid-column: 1 / -1; }
  .provider-latency { text-align: left; }
}
@media (max-width: 760px) {
  .topbar-titles p { display: none; }
  .topbar-titles h1 { font-size: 16px; }
  .balance-chip { padding: 0 10px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 16px; padding: 26px 0 20px; }
  .hero h2 { font-size: 27px; }
  .hero-sub { font-size: 13px; }
  .toolbar { align-items: flex-start; }
  .model-split { flex-direction: column; align-items: stretch; }
  .donut-wrap { margin: 0 auto; }
  .legend { justify-content: flex-start; }
  .recent-head h2, .quick-card h2 { font-size: 16px; }
  .page-head { padding: 22px 0 18px; }
  .page-head h2 { font-size: 24px; }
  .mini-stats { gap: 10px; }
  .redeem-form { flex-direction: column; }
  .redeem-form .btn { width: 100%; }
  .provider-row { grid-template-columns: 1fr auto; gap: 12px; }
  .provider-uptime { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .toast-root { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}
@media (max-width: 560px) {
  .status-banner { flex-wrap: wrap; }
  .status-meta { flex-basis: 100%; margin-left: 26px; text-align: left; }
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .platform-grid { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .top-link .chev { display: none; }
  .balance-chip { display: none; }
  .balance-chip .icon { display: none; }
  .stat { min-height: 0; }
  .hero .btn-primary { width: 100%; }
  .usage-money { font-size: 12px; }
  .chart-card, .recent-card, .quick-card, .panel { padding: 16px; }
  .pay-methods { grid-template-columns: 1fr; }
  .toolbar-side { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
