/* ============================================================ BASE ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}

code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

::selection { background: var(--brand-100); color: var(--brand-800); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

.stack { display: flex; flex-direction: column; }
.row   { display: flex; align-items: center; }
.gap-1{gap:4px;} .gap-2{gap:8px;} .gap-3{gap:12px;} .gap-4{gap:16px;} .gap-6{gap:24px;}
.mt-2{margin-top:8px;} .mt-3{margin-top:12px;} .mt-4{margin-top:16px;} .mt-6{margin-top:24px;} .mt-8{margin-top:32px;}
.ml-auto{margin-left:auto;}
.flex-1{flex:1 1 auto;}
.wrap{flex-wrap:wrap;}
.hidden{display:none !important;}
.text-center{text-align:center;}
.text-right{text-align:right;}
.text-secondary{color:var(--text-secondary);}
.text-tertiary{color:var(--text-tertiary);}
.text-danger{color:var(--danger);}
.text-success{color:var(--success);}
.text-brand{color:var(--brand-600);}
.fw-500{font-weight:500;} .fw-600{font-weight:600;} .fw-700{font-weight:700;}

.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-tertiary);
}

/* 数据大字 */
.data-xl, .data-lg, .data-md {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #1a1f3a 0%, #2d3561 30%, #4f46e5 75%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
  filter: drop-shadow(0 2px 8px rgba(79, 70, 229, 0.18))
          drop-shadow(0 1px 2px rgba(15, 23, 42, 0.08));
}
.data-xl { font-size: 38px; line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; }
.data-lg { font-size: 26px; line-height: 1.1;  font-weight: 700; letter-spacing: -0.025em; }
.data-md { font-size: 20px; line-height: 1.2;  font-weight: 700; letter-spacing: -0.015em; }

.data-unit {
  font-family: var(--font-display);
  font-size: 0.5em;
  font-weight: 500;
  background: none !important;
  -webkit-text-fill-color: var(--text-tertiary) !important;
  color: var(--text-tertiary) !important;
  margin-left: 4px;
  filter: none;
}
.grad-warm { background: linear-gradient(135deg, #fbbf24, #f59e0b 30%, #fb7185 70%, #e11d48); -webkit-background-clip:text; background-clip:text; }
.grad-cool { background: linear-gradient(135deg, #14b8a6, #0ea5e9 45%, #4f46e5); -webkit-background-clip:text; background-clip:text; }
.grad-luxe { background: linear-gradient(180deg, #0f172a, #1e1b4b 40%, #4f46e5); -webkit-background-clip:text; background-clip:text; }

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}
.empty .icon { font-size: 36px; margin-bottom: 12px; opacity:.4; }

.page-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 20px; color: var(--text-tertiary);
}
.loading-ring {
  width: 28px; height: 28px;
  border: 2px solid var(--border-default);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity:0; transform: translateY(4px);} to {opacity:1; transform:none;} }
