:root {
  --bg: #08111f;
  --bg-2: #0d1830;
  --text: #e5eefc;
  --muted: #9fb2d1;
  --card: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.13);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #153063 0%, transparent 28%),
    radial-gradient(circle at bottom right, #10213f 0%, transparent 30%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 280px;
  height: 280px;
  left: -80px;
  top: -40px;
  background: #2563eb;
}

.orb-2 {
  width: 260px;
  height: 260px;
  right: -70px;
  top: 180px;
  background: #14b8a6;
}

.orb-3 {
  width: 220px;
  height: 220px;
  left: 30%;
  bottom: -70px;
  background: #8b5cf6;
}

.page-shell {
  max-width: 1450px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.glass {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 24px;
  padding: 28px;
  margin-bottom: 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9cc2ff;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 42px;
  line-height: 1.05;
  margin: 0 0 10px 0;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 860px;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.badge-ok {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #b8f7c8;
}

.badge-muted {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d7e2f6;
}

.hero-right {
  display: grid;
  gap: 14px;
  align-content: center;
}

.hero-stat {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--muted);
}

.hero-stat-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
  word-break: break-word;
}

.controls {
  display: grid;
  grid-template-columns: 2.1fr 1fr 1fr 1fr 1fr 1fr 1fr 1.6fr;
  gap: 14px;
  padding: 18px;
  margin-bottom: 20px;
  align-items: end;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control label {
  font-size: 13px;
  font-weight: 700;
  color: #dbeafe;
}

.control small {
  color: var(--muted);
  font-size: 11px;
}

input[type="text"],
input[type="number"],
button {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  outline: none;
  background: rgba(255,255,255,0.06);
  color: var(--white);
  padding: 10px 14px;
  transition: 0.2s ease;
}

input[type="range"] {
  width: 100%;
  accent-color: #60a5fa;
}

input:focus,
button:focus {
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.14);
}

.value-tag {
  width: fit-content;
  min-width: 50px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  font-weight: 700;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
}

.toggle-wrap input {
  width: 18px;
  height: 18px;
}

.buttons {
  display: grid;
  gap: 10px;
}

.btn {
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: none;
}

.btn-secondary {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  border: none;
}

.btn-danger {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  border: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  border-radius: 22px;
  padding: 20px;
  color: var(--white);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.metric-title {
  font-size: 13px;
  opacity: 0.92;
}

.metric-value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 900;
}

.metric-sub {
  margin-top: 9px;
  font-size: 12px;
  opacity: 0.82;
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.two-col.large-left {
  grid-template-columns: 1.7fr 1fr;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.panel-tag {
  display: inline-block;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}

.chart {
  width: 100%;
}

.medium-chart {
  min-height: 320px;
}

.tall-chart {
  min-height: 430px;
}

.insight-box {
  min-height: 320px;
  border-radius: 18px;
  padding: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #dbeafe;
  line-height: 1.75;
  white-space: pre-line;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

th {
  color: #bfdbfe;
  font-weight: 800;
  background: rgba(255,255,255,0.03);
}

td {
  color: #e5eefc;
}

@media (max-width: 1280px) {
  .controls {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col,
  .two-col.large-left,
  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 14px;
  }

  .hero h1 {
    font-size: 31px;
  }

  .metrics-grid,
  .controls {
    grid-template-columns: 1fr;
  }
}