/* ============================================================
   财视 FinLens · 个人财务可视化报告
   深色玻璃拟态主题 / 渐变强调色 / 动效
   ============================================================ */

:root {
  color-scheme: dark;
  --bg: #060a11;
  --bg-soft: #0a1120;
  --card: rgba(255, 255, 255, 0.045);
  --card-hi: rgba(255, 255, 255, 0.078);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-hi: rgba(255, 255, 255, 0.2);
  --text: #e9eff8;
  --muted: #9aa9bd;
  --dim: #66788f;
  --income: #34d399;
  --expense: #fb7185;
  --balance: #fbbf24;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --gold: #f5b544;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --font: "Inter", "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --aurora-bg:
    radial-gradient(1200px 600px at 15% -10%, rgba(20, 184, 166, 0.16), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(124, 58, 237, 0.16), transparent 62%),
    radial-gradient(800px 600px at 50% 110%, rgba(14, 116, 144, 0.12), transparent 60%),
    linear-gradient(180deg, #060a11 0%, #070d16 45%, #060a11 100%);
  --grain-dot: rgba(255, 255, 255, 0.05);
  --topbar-bg: linear-gradient(180deg, rgba(6, 10, 17, 0.86), rgba(6, 10, 17, 0.55));
  --panel-grad: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  --panel-grad-2: linear-gradient(165deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.014));
  --soft-fill: rgba(255, 255, 255, 0.03);
  --soft-fill-2: rgba(255, 255, 255, 0.04);
  --cell-empty: rgba(255, 255, 255, 0.04);
  --dash: rgba(255, 255, 255, 0.16);
  --input-bg: rgba(0, 0, 0, 0.28);
  --placeholder: #435167;
  --toast-bg: rgba(12, 20, 33, 0.94);
  --modal-bg: linear-gradient(165deg, rgba(16, 26, 42, 0.99), rgba(7, 12, 21, 0.99));
  --print-bg: #070c14;
  --good-text: #6ee7b7;
  --warn-text: #fbbf24;
  --bad-text: #fda4af;
  --accent-text: #7dd3c8;
  --link: #22d3ee;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5fa;
  --bg-soft: #ffffff;
  --card: rgba(255, 255, 255, 0.72);
  --card-hi: rgba(255, 255, 255, 0.95);
  --stroke: rgba(15, 23, 42, 0.1);
  --stroke-hi: rgba(15, 23, 42, 0.22);
  --text: #0f172a;
  --muted: #475569;
  --dim: #64748b;
  --shadow: 0 24px 60px -34px rgba(15, 23, 42, 0.28);

  --aurora-bg:
    radial-gradient(1200px 600px at 15% -10%, rgba(45, 212, 191, 0.2), transparent 62%),
    radial-gradient(900px 500px at 85% 0%, rgba(139, 92, 246, 0.16), transparent 64%),
    radial-gradient(800px 600px at 50% 110%, rgba(56, 189, 248, 0.16), transparent 62%),
    linear-gradient(180deg, #f8fafc 0%, #eef4fb 48%, #f7fafc 100%);
  --grain-dot: rgba(15, 23, 42, 0.055);
  --topbar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.6));
  --panel-grad: linear-gradient(160deg, #ffffff, #f8fbff);
  --panel-grad-2: linear-gradient(165deg, #ffffff, #f5f9fe);
  --soft-fill: rgba(15, 23, 42, 0.035);
  --soft-fill-2: rgba(15, 23, 42, 0.055);
  --cell-empty: rgba(15, 23, 42, 0.07);
  --dash: rgba(15, 23, 42, 0.2);
  --input-bg: #ffffff;
  --placeholder: #94a3b8;
  --toast-bg: rgba(255, 255, 255, 0.97);
  --modal-bg: linear-gradient(165deg, #ffffff, #f7fafc);
  --print-bg: #ffffff;
  --good-text: #047857;
  --warn-text: #b45309;
  --bad-text: #be123c;
  --accent-text: #0f766e;
  --link: #0e7490;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
[hidden] { display: none !important; }
input { font-family: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: rgba(34, 211, 238, 0.28); }

/* ---------- 背景光晕 ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--aurora-bg);
}
.blob {
  position: absolute;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  animation: drift 22s ease-in-out infinite alternate;
}
.b1 { background: #0d9488; top: -18vw; left: -8vw; }
.b2 { background: #6d28d9; top: -10vw; right: -12vw; animation-delay: -6s; opacity: 0.26; }
.b3 { background: #0e7490; bottom: -24vw; left: 35vw; animation-delay: -12s; opacity: 0.22; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(3vw, 4vw, 0) scale(1.12); }
  100% { transform: translate3d(-3vw, -2vw, 0) scale(0.95); }
}
.grain {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: radial-gradient(var(--grain-dot) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 4vw, 56px);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--stroke);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.22), rgba(96, 165, 250, 0.1));
  border: 1px solid rgba(94, 234, 212, 0.25);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; align-items: baseline; gap: 7px; }
.brand-text strong { font-size: 18px; letter-spacing: 0.06em; }
.brand-text em {
  font-style: normal; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dim);
}
.topnav { display: flex; align-items: center; gap: 14px; }
.privacy-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--stroke); background: var(--soft-fill);
}
.privacy-pill i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 10px #34d399;
}
.nav-btn {
  font-size: 13px; color: var(--muted);
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--stroke);
  transition: 0.2s;
}
.nav-btn:hover { color: var(--text); border-color: var(--stroke-hi); background: var(--card); }

/* ---------- 布局 ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: clamp(28px, 4vw, 52px) clamp(18px, 4vw, 40px) 80px; }
.screen { display: none; animation: fadeUp 0.5s ease both; }
.screen.is-active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent-text); font-weight: 600;
}
.grad-text {
  background: linear-gradient(100deg, #5eead4 0%, #38bdf8 45%, #c4b5fd 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- 首屏 ---------- */
.hero { max-width: 760px; margin-bottom: 44px; }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.12; letter-spacing: -0.02em; font-weight: 700;
  margin: 16px 0 18px;
}
.hero .lede { color: var(--muted); font-size: clamp(14px, 1.6vw, 17px); max-width: 620px; }

.restore-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; margin-bottom: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(45, 212, 191, 0.3);
  background: linear-gradient(100deg, rgba(20, 184, 166, 0.12), rgba(56, 189, 248, 0.05));
}
.rb-text { display: flex; flex-direction: column; gap: 2px; }
.rb-text strong { font-size: 14px; }
.rb-text span { font-size: 12px; color: var(--muted); }

.section-label {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px;
}
.section-label h2 { font-size: 20px; letter-spacing: 0.02em; font-weight: 600; }
.section-label span { font-size: 12.5px; color: var(--dim); }
.section-label b { color: var(--link); font-weight: 600; }

/* ---------- 报表卡片 ---------- */
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.report-card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  text-align: left;
  padding: 22px 20px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--panel-grad);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.report-card::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(94, 234, 212, 0.65), rgba(56, 189, 248, 0.35), rgba(196, 181, 253, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0; transition: opacity 0.28s ease;
  pointer-events: none;
}
.report-card:hover { transform: translateY(-4px); background: var(--card-hi); }
.report-card.is-on {
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.12), rgba(56, 189, 248, 0.05) 55%, rgba(167, 139, 250, 0.07));
  border-color: transparent;
  box-shadow: 0 18px 50px -22px rgba(34, 211, 238, 0.55);
}
.report-card.is-on::after { opacity: 1; }
.report-card > strong { font-size: 16px; font-weight: 600; letter-spacing: 0.01em; }
.report-card > small { font-size: 12.5px; color: var(--muted); line-height: 1.55; max-width: 30ch; }
.rc-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--stroke);
  background: var(--soft-fill-2);
}
.rc-icon svg { width: 22px; height: 22px; }
.ic-cyan { color: #5eead4; background: rgba(45, 212, 191, 0.12); border-color: rgba(94, 234, 212, 0.22); }
.ic-teal { color: #34d399; background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.22); }
.ic-blue { color: #60a5fa; background: rgba(96, 165, 250, 0.1); border-color: rgba(96, 165, 250, 0.22); }
.ic-gold { color: #fbbf24; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.22); }
.ic-violet { color: #a78bfa; background: rgba(167, 139, 250, 0.1); border-color: rgba(167, 139, 250, 0.22); }
.ic-rose { color: #fb7185; background: rgba(251, 113, 133, 0.1); border-color: rgba(251, 113, 133, 0.22); }
.ic-white { color: #e2e8f0; background: rgba(255, 255, 255, 0.08); }
.rc-tag {
  margin-top: auto; padding-top: 4px;
  font-size: 11px; color: var(--dim); letter-spacing: 0.06em;
}
.rc-check {
  position: absolute; top: 16px; right: 16px;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--stroke);
  color: transparent;
  transition: 0.25s ease;
  background: var(--soft-fill-2);
}
.rc-check svg { width: 13px; height: 13px; }
.report-card.is-on .rc-check {
  color: #04221c;
  background: linear-gradient(140deg, #5eead4, #38bdf8);
  border-color: transparent;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
}
.rc-full {
  grid-column: span 3;
  flex-direction: row; align-items: center; gap: 18px;
  background: linear-gradient(100deg, rgba(56, 189, 248, 0.1), rgba(167, 139, 250, 0.09), rgba(45, 212, 191, 0.06));
}
.rc-full > span:nth-child(4) { display: flex; flex-direction: column; gap: 3px; }
.rc-full .rc-tag { margin: 0 0 0 auto; padding: 0; }

/* ---------- 按钮 ---------- */
.primary-btn, .ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 14px;
  font-size: 14.5px; font-weight: 600; letter-spacing: 0.02em;
  transition: 0.22s ease;
  white-space: nowrap;
}
.primary-btn {
  color: #04161a;
  background: linear-gradient(110deg, #5eead4, #38bdf8 60%, #a5b4fc);
  box-shadow: 0 14px 36px -14px rgba(56, 189, 248, 0.7);
}
.primary-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 44px -14px rgba(56, 189, 248, 0.85); }
.primary-btn:disabled { opacity: 0.32; cursor: not-allowed; box-shadow: none; }
.primary-btn svg, .ghost-btn svg { width: 18px; height: 18px; }
.primary-btn.small, .ghost-btn.small { padding: 9px 16px; font-size: 12.5px; border-radius: 10px; }
.ghost-btn {
  color: var(--text);
  border: 1px solid var(--stroke-hi);
  background: var(--soft-fill-2);
}
.ghost-btn:hover { background: var(--card-hi); transform: translateY(-1px); }
.mini-btn {
  font-size: 12px; padding: 7px 13px; border-radius: 9px;
  border: 1px solid rgba(94, 234, 212, 0.32);
  color: var(--accent-text); background: rgba(45, 212, 191, 0.08);
  transition: 0.2s;
}
.mini-btn:hover { background: rgba(45, 212, 191, 0.18); }

.select-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 30px;
}
.foot-note { margin-top: 14px; font-size: 12px; color: var(--dim); text-align: right; }

/* ---------- 第二步 ---------- */
.step-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 30px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--muted);
  padding: 9px 15px; border-radius: 11px;
  border: 1px solid var(--stroke);
  transition: 0.2s; flex-shrink: 0; margin-top: 2px;
}
.back-btn:hover { color: var(--text); border-color: var(--stroke-hi); }
.back-btn svg { width: 16px; height: 16px; }
.step-head h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 700; letter-spacing: -0.01em; }
.step-head p { color: var(--muted); font-size: 13.5px; margin-top: 6px; max-width: 62ch; }

.upload-layout {
  display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 22px;
  align-items: start;
}
.need-panel, .upload-panel {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--panel-grad);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 22px;
}
.need-panel { position: sticky; top: 92px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-title h3 { font-size: 15px; font-weight: 600; }
.panel-title .mono { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: 0.08em; }

.need-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.need-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px; border-radius: 13px;
  border: 1px solid var(--stroke);
  background: var(--soft-fill);
  transition: 0.25s;
}
.need-item .ndot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
  background: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.need-item.is-ok { border-color: rgba(52, 211, 153, 0.28); background: rgba(52, 211, 153, 0.06); }
.need-item.is-ok .ndot { background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.7); }
.need-item.is-soft .ndot { background: #64748b; box-shadow: none; }
.need-item.is-soft { opacity: 0.78; }
.need-item > div { flex: 1; min-width: 0; }
.need-item strong { display: block; font-size: 13.5px; font-weight: 600; }
.need-item small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.need-state {
  font-size: 10.5px; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--stroke); color: var(--dim); flex-shrink: 0;
}
.need-item.is-ok .need-state { color: var(--good-text); border-color: rgba(52, 211, 153, 0.35); }
.need-note {
  display: flex; gap: 9px; margin-top: 18px; padding-top: 16px;
  border-top: 1px dashed var(--stroke);
  color: var(--dim); font-size: 11.5px; line-height: 1.6;
}
.need-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--accent-text); }

.upload-panel { display: flex; flex-direction: column; gap: 14px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 34px 22px; border-radius: 18px;
  border: 1.5px dashed var(--dash);
  background: var(--soft-fill);
  cursor: pointer; text-align: center;
  transition: 0.25s ease;
}
.dropzone:hover { border-color: rgba(94, 234, 212, 0.45); background: rgba(45, 212, 191, 0.055); }
.dropzone.is-drag {
  border-color: #5eead4; background: rgba(45, 212, 191, 0.12);
  box-shadow: inset 0 0 40px rgba(45, 212, 191, 0.12);
  transform: scale(1.01);
}
.dz-icon {
  width: 58px; height: 58px; display: grid; place-items: center;
  border-radius: 16px; margin-bottom: 6px;
  color: var(--accent-text);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.2);
}
.dz-icon svg { width: 32px; height: 32px; }
.dz-icon.small { width: 44px; height: 44px; border-radius: 12px; color: #93c5fd; background: rgba(96, 165, 250, 0.09); border-color: rgba(96, 165, 250, 0.2); }
[data-theme="light"] .dz-icon.small { color: #1d4ed8; }
.dz-icon.small svg { width: 24px; height: 24px; }
.dropzone strong { font-size: 15px; font-weight: 600; }
.dz-sub { font-size: 12px; color: var(--muted); max-width: 46ch; }
.dz-hint { font-size: 11px; color: var(--dim); margin-top: 6px; letter-spacing: 0.04em; }
.dz-small { padding: 22px 16px; border-radius: 15px; }
.dz-small strong { font-size: 13.5px; }
.dz-small .dz-sub { font-size: 11px; }
.raw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.or-line {
  display: flex; align-items: center; gap: 14px;
  color: var(--dim); font-size: 11.5px; letter-spacing: 0.08em;
  margin: 4px 0;
}
.or-line::before, .or-line::after {
  content: ""; flex: 1; height: 1px; background: var(--stroke);
}

.dz-done {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 17px; border-radius: 15px;
  border: 1px solid rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.07);
}
.dz-done-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ok-badge {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  color: #052e22; background: linear-gradient(140deg, #34d399, #22d3ee);
  flex-shrink: 0;
}
.ok-badge svg { width: 16px; height: 16px; }
.dz-done strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-done small { display: block; font-size: 11.5px; color: var(--muted); }
.uploaded-files { display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 11px;
  border: 1px solid var(--stroke); background: var(--soft-fill);
  font-size: 12.5px;
}
.file-row .f-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .f-meta { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.file-row .f-x { color: var(--dim); font-size: 16px; line-height: 1; padding: 0 3px; }
.file-row .f-x:hover { color: #fb7185; }

.asset-details {
  margin-top: 4px; border-radius: 15px;
  border: 1px solid var(--stroke); background: var(--soft-fill);
  overflow: hidden;
}
.asset-details summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 17px; cursor: pointer; font-size: 13px; color: var(--muted);
  list-style: none;
}
.asset-details summary::-webkit-details-marker { display: none; }
.asset-details summary svg { width: 15px; height: 15px; transition: transform 0.25s; }
.asset-details[open] summary { color: var(--text); border-bottom: 1px solid var(--stroke); }
.asset-details[open] summary svg { transform: rotate(180deg); }
.asset-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding: 18px 17px;
}
.asset-form label { display: flex; flex-direction: column; gap: 6px; }
.asset-form label span { font-size: 11.5px; color: var(--dim); letter-spacing: 0.03em; }
.asset-form input {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--stroke); background: var(--input-bg);
  color: var(--text); font-size: 13px; font-family: var(--mono);
  outline: none; transition: 0.2s;
}
.asset-form input:focus { border-color: rgba(94, 234, 212, 0.55); box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1); }
.asset-form input::placeholder { color: var(--placeholder); }
.form-tip { grid-column: span 2; font-size: 11.5px; color: var(--dim); }

.upload-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--stroke);
}
.foot-status { font-size: 12.5px; color: var(--dim); }
.foot-status.is-warn { color: var(--warn-text); }
.foot-status.is-ok { color: var(--good-text); }

/* ---------- 报告页 ---------- */
.report-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; margin-bottom: 26px;
}
.report-head h2 { font-size: clamp(24px, 3.4vw, 38px); font-weight: 700; letter-spacing: -0.015em; margin: 10px 0 8px; }
.rh-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }
.rh-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
[data-theme="light"] .grad-text { background: linear-gradient(100deg, #0f766e 0%, #0369a1 48%, #6d28d9 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .ic-cyan { color: #0f766e; }
[data-theme="light"] .ic-teal { color: #047857; }
[data-theme="light"] .ic-blue { color: #1d4ed8; }
[data-theme="light"] .ic-gold { color: #a16207; }
[data-theme="light"] .ic-violet { color: #6d28d9; }
[data-theme="light"] .ic-rose { color: #be123c; }
[data-theme="light"] .ic-white { color: #334155; }
[data-theme="light"] .blob { opacity: 0.18; }
[data-theme="light"] .b1 { background: #5eead4; }
[data-theme="light"] .b2 { background: #c4b5fd; }
[data-theme="light"] .b3 { background: #7dd3fc; }
[data-theme="light"] .brand-text em { color: #7c8aa0; }
[data-theme="light"] .restore-banner { border-color: rgba(13, 148, 136, 0.32); }
[data-theme="light"] .toast { box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.35); }
[data-theme="light"] .need-item.is-ok .need-state { color: #047857; border-color: rgba(4, 120, 87, 0.3); }
[data-theme="light"] .ratio-item .r-tag { color: #047857; }
[data-theme="light"] .ratio-item .r-tag.warn { color: #b45309; }
[data-theme="light"] .ratio-item .r-tag.bad { color: #be123c; }
[data-theme="light"] .kpi-value.neg { color: #be123c; }
[data-theme="light"] .hm-cell.lv1 { background: rgba(13, 148, 136, 0.22); }
[data-theme="light"] .hm-cell.lv2 { background: rgba(13, 148, 136, 0.42); }
[data-theme="light"] .hm-cell.lv3 { background: rgba(13, 148, 136, 0.66); }
[data-theme="light"] .hm-cell.lv4 { background: linear-gradient(135deg, #0d9488, #0284c7); box-shadow: 0 0 12px rgba(2, 132, 199, 0.35); }
.rh-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.range-chips { display: flex; gap: 6px; padding: 4px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--soft-fill); }
.range-chip {
  padding: 6px 12px; border-radius: 9px; font-size: 12px; color: var(--muted);
  transition: 0.2s; white-space: nowrap;
}
.range-chip:hover { color: var(--text); }
.range-chip.is-on {
  color: #031a1f; font-weight: 600;
  background: linear-gradient(120deg, #5eead4, #38bdf8);
}

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.kpi-card {
  position: relative; overflow: hidden;
  padding: 20px 20px 16px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--panel-grad);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: 0.25s;
}
.kpi-card:hover { transform: translateY(-3px); border-color: var(--stroke-hi); }
.kpi-card::before {
  content: ""; position: absolute; right: -40px; top: -50px;
  width: 130px; height: 130px; border-radius: 50%;
  background: var(--k-color, #22d3ee); opacity: 0.12; filter: blur(22px);
}
.kpi-label { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; }
.kpi-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--k-color, #22d3ee); box-shadow: 0 0 10px var(--k-color, #22d3ee); }
.kpi-value {
  font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -0.02em;
  margin: 8px 0 2px; font-variant-numeric: tabular-nums;
  font-family: var(--mono); line-height: 1.15;
}
.kpi-value.neg { color: var(--bad-text); }
.kpi-sub { font-size: 11.5px; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.kpi-spark { margin-top: 8px; opacity: 0.85; }
.kpi-spark svg { width: 100%; height: 26px; display: block; }

/* ---------- 洞察条 ---------- */
.insight-strip {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 24px;
}
.insight {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 15px; border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--soft-fill);
  font-size: 12.5px; color: var(--muted);
}
.insight b { color: var(--text); font-weight: 600; }
.insight .ii {
  width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11px; flex-shrink: 0;
  background: rgba(94, 234, 212, 0.12); color: var(--accent-text);
}
.insight.warn .ii { background: rgba(251, 191, 36, 0.12); color: var(--warn-text); }
.insight.bad .ii { background: rgba(251, 113, 133, 0.12); color: var(--bad-text); }

/* ---------- 图表区 ---------- */
.report-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.group-title {
  grid-column: span 2;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin: 18px 4px 0;
}
.group-title h3 { font-size: 18px; font-weight: 600; letter-spacing: 0.01em; }
.group-title span { font-size: 11.5px; color: var(--dim); }
.chart-card {
  padding: 20px 20px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--panel-grad-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  min-width: 0;
}
.chart-card.span-2 { grid-column: span 2; }
.cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.cc-title { font-size: 16px; font-weight: 600; letter-spacing: 0.01em; }
.cc-sub { font-size: 11.5px; color: var(--dim); margin-top: 3px; line-height: 1.5; }
.cc-extra { font-size: 11px; color: var(--dim); text-align: right; white-space: nowrap; }
.chart-box { position: relative; height: 290px; margin-top: 10px; }
.chart-box.tall { height: 350px; }
.chart-box.short { height: 220px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }

/* 环图中心文字 */
.donut-wrap { position: relative; }
.donut-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
}
.donut-center strong { display: block; font-family: var(--mono); font-size: 20px; letter-spacing: -0.02em; }
.donut-center span { display: block; font-size: 10.5px; color: var(--dim); letter-spacing: 0.1em; margin-top: 2px; }

/* 分类趋势图例 */
.mini-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.mini-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.mini-legend i { width: 8px; height: 8px; border-radius: 3px; }

/* 消费日历热力图 */
.heatmap-wrap { margin-top: 14px; }
.heatmap { display: flex; flex-direction: column; gap: 5px; }
.hm-row { display: grid; grid-template-columns: 52px repeat(31, 1fr); gap: 4px; align-items: center; }
.hm-label { font-size: 10.5px; color: var(--dim); text-align: right; padding-right: 4px; font-family: var(--mono); }
.hm-cell {
  aspect-ratio: 1 / 1; border-radius: 5px;
  background: var(--cell-empty);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  position: relative;
}
.hm-cell.lv1 { background: rgba(45, 212, 191, 0.16); }
.hm-cell.lv2 { background: rgba(45, 212, 191, 0.34); }
.hm-cell.lv3 { background: rgba(45, 212, 191, 0.6); }
.hm-cell.lv4 { background: linear-gradient(135deg, #2dd4bf, #38bdf8); box-shadow: 0 0 12px rgba(56, 189, 248, 0.45); }
.hm-cell:hover { transform: scale(1.45); z-index: 3; box-shadow: 0 0 16px rgba(94, 234, 212, 0.65); }
.hm-scale { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 12px; font-size: 10px; color: var(--dim); }
.hm-scale i { width: 12px; height: 12px; border-radius: 4px; }
.hm-day { font-size: 9.5px; color: var(--dim); text-align: center; font-family: var(--mono); }
.hm-head { margin-bottom: 2px; }

/* 比率卡片 */
.ratio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.ratio-item {
  padding: 13px 15px; border-radius: 13px;
  border: 1px solid var(--stroke); background: var(--soft-fill);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ratio-item .r-name { font-size: 12px; color: var(--muted); }
.ratio-item .r-val { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.ratio-item .r-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.3); color: var(--good-text);
}
.ratio-item .r-tag.warn { border-color: rgba(251, 191, 36, 0.32); color: var(--warn-text); }
.ratio-item .r-tag.bad { border-color: rgba(251, 113, 133, 0.32); color: var(--bad-text); }

/* 诊断文字 */
.diagnosis { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.diag-item { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.diag-item b { color: var(--text); font-weight: 600; }
.diag-item .dg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); margin-top: 7px; flex-shrink: 0; }

/* 数据缺失占位 */
.missing-card {
  grid-column: span 2;
  padding: 34px; border-radius: var(--radius);
  border: 1px dashed var(--dash);
  text-align: center; color: var(--muted);
  background: var(--soft-fill);
}
.missing-card strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 15px; }
.missing-card span { font-size: 12.5px; }

/* ---------- 报告尾 ---------- */
.report-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 36px; padding-top: 22px;
  border-top: 1px solid var(--stroke);
  color: var(--dim); font-size: 11.5px;
}
.rf-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 12px;
  background: var(--toast-bg);
  border: 1px solid var(--stroke-hi);
  backdrop-filter: blur(14px);
  font-size: 13px; color: var(--text);
  opacity: 0; pointer-events: none; transition: 0.3s ease;
  z-index: 200; max-width: 90vw;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(251, 113, 133, 0.5); }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-full { grid-column: span 2; }
  .upload-layout { grid-template-columns: 1fr; }
  .need-panel { position: static; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .report-sections { grid-template-columns: 1fr; }
  .chart-card.span-2, .missing-card, .group-title { grid-column: span 1; }
  .report-head { flex-direction: column; align-items: flex-start; }
  .rh-right { width: 100%; }
  .range-chips { overflow-x: auto; max-width: 100%; }
  .hero h1 { font-size: 36px; }
}
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .privacy-pill { display: none; }
  .report-grid { grid-template-columns: 1fr; }
  .rc-full { grid-column: span 1; flex-direction: column; align-items: flex-start; }
  .rc-full .rc-tag { margin: 4px 0 0; }
  .kpi-grid { grid-template-columns: 1fr; }
  .raw-grid { grid-template-columns: 1fr; }
  .asset-form { grid-template-columns: 1fr; }
  .form-tip { grid-column: span 1; }
  .select-foot, .upload-foot, .report-foot { flex-direction: column; align-items: stretch; }
  .rf-actions { flex-direction: column; width: 100%; }
  .select-foot .ghost-btn, .select-foot .primary-btn,
  .upload-foot .primary-btn, .report-foot .ghost-btn { width: 100%; }
  .heatmap { overflow-x: auto; }
  .hm-row { min-width: 620px; }
  .ratio-grid { grid-template-columns: 1fr; }
  .rh-right { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .rh-right .range-chips { grid-column: 1 / -1; order: 1; flex-wrap: wrap; }
  #btnDownload, #btnDownloadImg, #btnPrint { width: 100%; justify-content: center; }
  #btnDownloadImg { order: 2; }
  #btnDownload { order: 3; }
  #btnPrint { order: 4; grid-column: 1 / -1; }
  .chart-box { height: 240px; }
  .chart-box.tall { height: 280px; }
  .topnav { gap: 6px; }
  .nav-btn, .theme-btn { padding: 7px 9px; }
  .brand-text em { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- 主题切换 ---------- */
.theme-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted);
  padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--soft-fill);
  transition: 0.2s;
}
.theme-btn:hover { color: var(--text); border-color: var(--stroke-hi); background: var(--card); }
.theme-btn svg { width: 15px; height: 15px; }
.theme-btn .ic-moon { display: none; }
[data-theme="light"] .theme-btn .ic-sun { display: none; }
[data-theme="light"] .theme-btn .ic-moon { display: inline-block; }

/* ---------- 使用前声明 ---------- */
body.is-locked { overflow: hidden; }
.consent-gate {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(3, 7, 14, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="light"] .consent-gate { background: rgba(15, 23, 42, 0.38); }
.consent-card {
  width: min(780px, 100%);
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  border-radius: 24px;
  border: 1px solid var(--stroke-hi);
  background: var(--modal-bg);
  box-shadow: 0 40px 90px -36px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: consentIn 0.35s ease both;
}
@keyframes consentIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.consent-head {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--stroke);
}
.consent-mark {
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 13px;
  color: var(--accent-text);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.24);
}
.consent-mark svg { width: 23px; height: 23px; }
.consent-head h2 {
  font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
  margin: 5px 0 6px;
}
.consent-sub { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.consent-body {
  padding: 20px 28px 6px;
  overflow-y: auto;
  font-size: 12.8px; line-height: 1.78;
  color: var(--muted);
}
.consent-body section { margin-bottom: 16px; }
.consent-body h3 {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.consent-body p { margin-bottom: 6px; }
.consent-body b { color: var(--text); font-weight: 600; }
.consent-version {
  font-size: 11px; color: var(--dim);
  padding: 4px 0 10px;
}
.consent-foot {
  padding: 16px 28px 20px;
  border-top: 1px solid var(--stroke);
  background: var(--soft-fill);
}
.consent-check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: var(--text); line-height: 1.65;
  cursor: pointer;
}
.consent-check input {
  width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0;
  accent-color: #0d9488; cursor: pointer;
}
.consent-check.is-warn { color: var(--bad-text); }
.consent-check.is-warn input { outline: 2px solid var(--bad-text); outline-offset: 2px; border-radius: 3px; }
.consent-actions {
  display: flex; justify-content: flex-end; flex-wrap: wrap;
  gap: 10px; margin-top: 14px;
}
.consent-decline {
  margin-top: 9px; text-align: right;
  font-size: 11px; color: var(--dim);
}
@media (max-width: 640px) {
  .consent-gate { padding: 10px; }
  .consent-card { max-height: calc(100vh - 20px); border-radius: 18px; }
  .consent-head { padding: 18px 18px 14px; gap: 12px; }
  .consent-head h2 { font-size: 16.5px; }
  .consent-body { padding: 16px 18px 4px; font-size: 12.3px; }
  .consent-foot { padding: 14px 18px 16px; }
  .consent-actions { flex-direction: column-reverse; }
  .consent-actions .primary-btn, .consent-actions .ghost-btn { width: 100%; }
  .theme-btn span { display: none; }
}

/* ---------- 打印 ---------- */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .topbar, .rh-right, .report-foot, .select-foot, .foot-note, .toast { display: none !important; }
  .aurora { display: none; }
  body { background: var(--print-bg) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wrap { max-width: none; padding: 0; }
  .report-head { margin-bottom: 16px; }
  .chart-card, .kpi-card { break-inside: avoid; box-shadow: none; }
  .report-sections { gap: 10px; }
}
