:root {
  --bg-main: #0f172a;
  --bg-accent: #151f38;
  --panel: rgba(17, 24, 39, 0.88);
  --panel-strong: rgba(22, 29, 49, 0.96);
  --panel-soft: rgba(31, 41, 65, 0.72);
  --border: rgba(148, 163, 184, 0.14);
  --text-main: #f8fafc;
  --text-soft: #94a3b8;
  --text-muted: #64748b;
  --orange: #ff8d41;
  --orange-soft: rgba(255, 141, 65, 0.18);
  --cyan: #2dd4bf;
  --cyan-soft: rgba(45, 212, 191, 0.18);
  --pink: #f472b6;
  --pink-soft: rgba(244, 114, 182, 0.18);
  --shadow: 0 28px 60px rgba(2, 6, 23, 0.38);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 141, 65, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 22%),
    linear-gradient(180deg, #0b1120 0%, #111827 46%, #0f172a 100%);
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: relative;
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.94));
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--orange), #ffb067);
  color: #111827;
  font: 700 22px 'Space Grotesk', sans-serif;
  box-shadow: 0 18px 30px rgba(255, 141, 65, 0.26);
}

.brand-copy strong {
  display: block;
  font: 700 1.05rem 'Space Grotesk', sans-serif;
}

.brand-copy span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.sidebar-section {
  position: relative;
  z-index: 1;
  margin-top: 30px;
}

.sidebar-label {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--text-soft);
  background: transparent;
  transition: 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
  border-color: rgba(255, 141, 65, 0.2);
  background: linear-gradient(135deg, rgba(255, 141, 65, 0.18), rgba(255, 141, 65, 0.06));
  box-shadow: inset 0 0 0 1px rgba(255, 141, 65, 0.08);
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}

.sidebar-note {
  position: relative;
  z-index: 1;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.48);
  color: var(--text-soft);
  line-height: 1.6;
}

.sidebar-note strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-main);
  font-family: 'Space Grotesk', sans-serif;
}

.main {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar-title h1 {
  margin: 0;
  font: 700 clamp(1.8rem, 2vw, 2.45rem) 'Space Grotesk', sans-serif;
}

.topbar-title p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-soft);
}

.status-pill::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 0 8px rgba(45, 212, 191, 0.16);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 141, 65, 0.16), transparent 34%),
    linear-gradient(160deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.18), transparent 70%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-card h2 {
  position: relative;
  margin: 0;
  z-index: 1;
  font: 700 clamp(1.6rem, 1.8vw, 2.3rem) 'Space Grotesk', sans-serif;
}

.hero-card p {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--text-soft);
  line-height: 1.7;
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.meta-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.meta-card span {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.meta-card strong {
  display: block;
  margin-top: 8px;
  font: 700 1.25rem 'Space Grotesk', sans-serif;
}

.controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.control-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  flex: 1 1 180px;
}

.control-field label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.control-field input,
.control-field select {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.54);
  color: var(--text-main);
  outline: none;
}

.control-field input:focus,
.control-field select:focus {
  border-color: rgba(255, 141, 65, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 141, 65, 0.08);
}

.button-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--orange), #ffb067);
  box-shadow: 0 14px 24px rgba(255, 141, 65, 0.24);
}

.btn-secondary {
  color: var(--text-main);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.74);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: auto -32px -36px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-accent, rgba(255, 141, 65, 0.18)), transparent 70%);
}

.stat-card .label {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-card .metric {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font: 700 clamp(1.45rem, 1.6vw, 2rem) 'Space Grotesk', sans-serif;
}

.stat-card .subtle {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: var(--text-soft);
  line-height: 1.5;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.chart-panel,
.map-panel,
.info-panel {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.chart-panel {
  padding: 22px;
}

.chart-panel.wide,
.map-panel.wide,
.info-panel.wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title {
  margin: 0;
  font: 700 1.1rem 'Space Grotesk', sans-serif;
}

.panel-copy {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.panel-value {
  flex-shrink: 0;
  font: 700 1.7rem 'Space Grotesk', sans-serif;
}

.panel-value small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font: 500 0.78rem 'IBM Plex Sans', sans-serif;
  text-align: right;
}

.chart-surface {
  position: relative;
  min-height: 320px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.62), rgba(15, 23, 42, 0.45));
  overflow: hidden;
}

.chart-tooltip {
  position: absolute;
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.94);
  color: var(--text-main);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 16px));
  transition: opacity 140ms ease;
  box-shadow: 0 18px 28px rgba(2, 6, 23, 0.32);
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font: 700 0.96rem 'Space Grotesk', sans-serif;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.axis line,
.axis path,
.grid line {
  stroke: rgba(148, 163, 184, 0.12);
}

.axis text {
  fill: #7c8aa5;
  font-size: 12px;
}

.map-panel {
  padding: 22px;
}

.map-surface {
  min-height: 360px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  overflow: hidden;
}

.info-panel {
  padding: 22px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.info-grid a {
  color: var(--orange);
}

.info-item {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.28);
}

.info-item span {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-item strong {
  display: block;
  margin-top: 10px;
  font: 700 1rem 'Space Grotesk', sans-serif;
}

.accent-orange {
  --card-accent: var(--orange-soft);
}

.accent-cyan {
  --card-accent: var(--cyan-soft);
}

.accent-pink {
  --card-accent: var(--pink-soft);
}

.accent-slate {
  --card-accent: rgba(148, 163, 184, 0.18);
}

@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-bottom: 22px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .main {
    padding-top: 20px;
  }

  .hero-card,
  .stats-grid,
  .chart-grid,
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .main {
    padding: 18px;
  }

  .topbar,
  .hero-card,
  .stats-grid,
  .chart-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .button-row {
    width: 100%;
    flex-direction: column;
  }

  .button-row .btn {
    width: 100%;
  }
}