:root {
  --bg: #0f0f14;
  --panel: #171722;
  --panel-soft: #1f1f2b;
  --text: #f3f1ec;
  --muted: #b1a9a0;
  --accent: #f0a44c;
  --accent-2: #6dd6c6;
  --danger: #ef6f6c;
  --warn: #f6c177;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #1a1a26 0%, #0f0f14 55%, #0c0c10 100%);
  min-height: 100vh;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.5;
  z-index: 0;
}

.bg-glow-one {
  width: 420px;
  height: 420px;
  background: rgba(240, 164, 76, 0.45);
  top: -120px;
  left: -120px;
}

.bg-glow-two {
  width: 520px;
  height: 520px;
  background: rgba(109, 214, 198, 0.3);
  bottom: -200px;
  right: -180px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}

h1 {
  font-family: "Newsreader", serif;
  font-size: 34px;
  margin: 0 0 8px;
}

.subhead {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.header-meta {
  padding: 10px 14px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.tabs {
  display: inline-flex;
  gap: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  margin-bottom: 22px;
}

.tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab.active {
  background: var(--accent);
  color: #24170b;
  font-weight: 600;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.metric-card strong {
  font-size: 26px;
}

.metric-card p {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.panel-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.chart-card,
.coverage-card,
.table-card,
.detail-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-header h2 {
  margin: 0;
  font-size: 18px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.coverage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.coverage-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px 12px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions input {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0f0f14;
  color: var(--text);
  padding: 8px 14px;
  min-width: 220px;
}

.ghost-btn {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.detail-stack {
  display: grid;
  gap: 16px;
}

.detail-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}

.detail-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 10px;
}

.pill-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pill-row label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.status-missing {
  background: rgba(239, 111, 108, 0.2);
  color: #ffb4ae;
}

.status-out {
  background: rgba(246, 193, 119, 0.2);
  color: #ffd7a1;
}

.status-low {
  background: rgba(109, 214, 198, 0.2);
  color: #b7f3e9;
}

.status-in {
  background: rgba(255, 255, 255, 0.08);
  color: #d8d2ca;
}

@media (max-width: 980px) {
  .panel-row {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .header {
    flex-direction: column;
  }
}
