:root {
  color-scheme: dark;
  --bg: #071315;
  --panel: rgba(16, 34, 36, 0.92);
  --panel-soft: rgba(12, 26, 28, 0.86);
  --line: rgba(114, 145, 149, 0.22);
  --text: #edf5f5;
  --muted: #93a8aa;
  --highlight: #53d1c0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(83, 209, 192, 0.14), transparent 26%),
    radial-gradient(circle at top left, rgba(242, 188, 104, 0.1), transparent 30%),
    linear-gradient(180deg, #071315 0%, #091b1d 46%, #061113 100%);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero, .panel, .stat-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-radius: 28px;
  padding: 28px 30px;
}

.eyebrow, .panel-kicker, .stat-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.hero h1 {
  margin: 10px 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.96;
}

.subcopy, .generated-at {
  margin: 0;
  color: var(--muted);
}

.refresh-button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--highlight) 0%, #2aa899 100%);
  color: #052527;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.stat-grid, .chart-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart-grid { grid-template-columns: 1.08fr 1.32fr; }

.stat-card, .panel {
  border-radius: 24px;
  padding: 20px 22px;
}

.stat-value {
  margin: 12px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 0.94;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 8px 0 0;
  font-size: 1.35rem;
}

.chart-wrap {
  position: relative;
  min-height: 300px;
}

.chart-wrap.tall { min-height: 360px; }
.table-panel { margin-top: 18px; }

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  background: var(--panel-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  background: #0b181a;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(114, 145, 149, 0.14);
  white-space: nowrap;
}

tbody tr:hover { background: rgba(83, 209, 192, 0.06); }
.empty-state { color: var(--muted); }

@media (max-width: 1080px) {
  .stat-grid, .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 18px, 1240px); padding-top: 16px; }
  .hero { flex-direction: column; align-items: start; padding: 22px; }
  .stat-grid, .chart-grid { grid-template-columns: 1fr; }
  .panel, .stat-card { border-radius: 22px; }
  th, td { padding: 12px 14px; }
}
