* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(239, 35, 60, 0.18), transparent 34rem),
    #07070a;
  color: #e5e7eb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 22px;
  background: #08080b;
  border-right: 1px solid rgba(239, 35, 60, 0.22);
}

.brand {
  margin-bottom: 28px;
}

.brand-eyebrow,
.overline,
.recommendation-label {
  color: #60a5fa;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-eyebrow,
.overline,
.recommendation-label {
  color: #ff3347;
}

.brand h1,
.hero h1 {
  margin: 6px 0 10px;
  color: #f9fafb;
  line-height: 1.05;
}

.brand h1 {
  font-size: 28px;
}

.brand p,
.hero p,
.recommendation p,
.recommendation small {
  color: #94a3b8;
}

.sidebar label {
  display: block;
  margin: 16px 0 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.sidebar h3 {
  margin: 26px 0 8px;
  color: #f8fafc;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.upload-box {
  padding: 16px;
  border: 1px dashed rgba(239, 35, 60, 0.6);
  border-radius: 14px;
  background: rgba(127, 29, 29, 0.16);
  color: #fecaca;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  margin-top: 16px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: #e30613;
  color: #fff;
}

.secondary-button {
  background: rgba(239, 35, 60, 0.14);
  color: #fecaca;
  border: 1px solid rgba(239, 35, 60, 0.38);
}

.status-text {
  min-height: 20px;
  margin-top: 12px;
  color: #fecaca;
  font-size: 12px;
}

.Select-control,
.Select-menu-outer,
.Select-value,
.Select-placeholder,
.Select-input,
.Select-input input,
.Select--multi .Select-value {
  background: #101014 !important;
  color: #f8fafc !important;
  border-color: rgba(239, 35, 60, 0.35) !important;
}

.Select-menu-outer {
  border: 1px solid rgba(239, 35, 60, 0.35) !important;
}

.VirtualizedSelectOption {
  background: #101014 !important;
  color: #f8fafc !important;
}

.VirtualizedSelectFocusedOption {
  background: #7f1d1d !important;
}

.content {
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero,
.panel,
.metric-card,
.recommendation {
  border: 1px solid rgba(239, 35, 60, 0.16);
  background: rgba(13, 13, 17, 0.82);
  border-radius: 24px;
}

.hero {
  padding: 28px;
}

.hero h1 {
  max-width: 920px;
  font-size: clamp(30px, 4vw, 56px);
}

.recommendation {
  padding: 20px;
}

.recommendation-value {
  margin: 8px 0;
  color: #ff3347;
  font-size: 34px;
  font-weight: 900;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  padding: 18px;
}

.metric-title {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  margin: 10px 0;
  color: #f8fafc;
  font-size: 28px;
  font-weight: 900;
}

.metric-detail {
  color: #94a3b8;
  font-size: 12px;
}

.metric-card.green .metric-value {
  color: #34d399;
}

.metric-card.red .metric-value {
  color: #fb7185;
}

.metric-card.blue .metric-value {
  color: #ff3347;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-card {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.insight-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 15px;
}

.insight-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
}

.insight-card.success {
  border-color: rgba(52, 211, 153, 0.28);
}

.insight-card.warning {
  border-color: rgba(251, 191, 36, 0.32);
}

.insight-card.danger {
  border-color: rgba(239, 35, 60, 0.42);
}

.table-wrap {
  max-height: 420px;
  overflow: auto;
}

.executive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.executive-table th,
.executive-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  text-align: left;
  vertical-align: top;
}

.executive-table th {
  position: sticky;
  top: 0;
  background: #111114;
  color: #fff;
  z-index: 1;
}

.executive-table td {
  color: #d1d5db;
}

.enrichment-box {
  margin-top: 16px;
}

.source-pill {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.source-pill strong,
.source-pill span,
.source-pill small {
  display: block;
}

.source-pill strong {
  color: #fff;
  font-size: 12px;
}

.source-pill span {
  margin: 3px 0;
  color: #fbbf24;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.source-pill.active span {
  color: #34d399;
}

.source-pill small {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.35;
}

.chart-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

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

.panel {
  min-width: 0;
  padding: 20px;
}

.panel h2 {
  margin: 0 0 14px;
  color: #f8fafc;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .app-shell,
  .hero,
  .chart-grid.two {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }
}
