:root {
  color-scheme: dark;
  --bg: #1c252b;
  --ink: #ffffff;
  --muted: rgba(255,255,255,.68);
  --line: rgba(218,228,215,.18);
  --panel: rgba(255,255,255,.06);
  --navy: #1c252b;
  --lime: #cffc54;
  --green: #cffc54;
  --red: #ff9c75;
  --shadow: 0 24px 80px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 8%, rgba(207,252,84,.16), transparent 28rem),
    radial-gradient(circle at 84% 12%, rgba(214,218,243,.14), transparent 24rem),
    linear-gradient(135deg, #162027 0%, var(--bg) 48%, #11181d 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 52px; }
.back { display: inline-flex; margin-bottom: 28px; color: var(--muted); text-decoration: none; font-weight: 850; }
.back:hover { color: var(--green); }
.hero, .status-row, .actions, .note-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.hero { padding: 34px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.035)); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 14px; font-size: clamp(2.7rem, 7vw, 6.6rem); line-height: .9; letter-spacing: -.05em; }
h2 { margin-bottom: 2px; font-size: 1.55rem; }
h3 { margin-bottom: 0; font-size: 1.15rem; }
.lede { max-width: 700px; margin-bottom: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.22rem); line-height: 1.55; }
.muted { color: var(--muted); }
.file-input { max-width: 360px; color: var(--muted); font-weight: 750; }
.file-input::file-selector-button, .ghost-button { min-height: 44px; border: 1px solid transparent; border-radius: 999px; padding: 0 16px; cursor: pointer; font-weight: 900; white-space: nowrap; }
.file-input::file-selector-button { margin-right: 10px; background: var(--lime); color: var(--navy); }
.ghost-button { background: rgba(255,255,255,.04); border-color: var(--line); color: var(--ink); }
.status-message { min-height: 24px; margin: 12px 0 0; color: var(--muted); font-size: .92rem; font-weight: 750; }
.status-message.error { color: var(--red); }
.empty-state { margin-top: 24px; min-height: 48vh; display: grid; align-items: center; border: 1px dashed rgba(218,228,215,.28); border-radius: 24px; padding: clamp(24px, 7vw, 68px); background: rgba(255,255,255,.055); }
.empty-state h2 { max-width: 690px; font-size: clamp(2rem, 5vw, 4.2rem); line-height: .96; letter-spacing: -.045em; }
.empty-state p { max-width: 620px; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.hidden { display: none; }
.dashboard { display: grid; gap: 18px; padding-top: 22px; }
.status-row { align-items: flex-start; padding: 0 4px; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpi-card { min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,.09), var(--panel)); box-shadow: var(--shadow); }
.kpi-card.primary { background: linear-gradient(135deg, rgba(207,252,84,.18), rgba(255,255,255,.06)); color: var(--ink); border-color: rgba(255,255,255,.12); }
.kpi-card.accent { background: linear-gradient(135deg, rgba(207,252,84,.16), rgba(255,255,255,.06)); }
.kpi-card .label { color: var(--muted); font-size: .82rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.kpi-card.primary .label, .kpi-card.primary .detail { color: var(--muted); }
.kpi-card strong { display: block; margin: 14px 0 10px; font-size: clamp(2rem, 4vw, 3.6rem); line-height: .9; letter-spacing: -.04em; }
.kpi-card .detail { color: var(--muted); font-size: .94rem; line-height: 1.45; }
.note-panel { align-items: flex-start; padding: 22px 24px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.055); }
.note-panel p:last-child { max-width: 760px; margin-bottom: 0; color: var(--muted); line-height: 1.55; }
@media (max-width: 900px) {
  .hero, .status-row, .actions, .note-panel { align-items: flex-start; flex-direction: column; }
  .hero { padding: 24px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .file-input { max-width: 100%; }
}
