:root {
  --navy: #02162f;
  --panel: rgba(3, 24, 49, 0.80);
  --cyan: #27dfff;
  --border: rgba(255, 255, 255, 0.78);
  --white: #ffffff;
}

* { box-sizing: border-box; }
html, body, #react-entry-point { width: 100%; min-height: 100%; margin: 0; }
body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(0, 196, 255, 0.15), transparent 24%),
    linear-gradient(135deg, rgba(0, 61, 111, 0.18) 25%, transparent 25%) 0 0/240px 140px,
    linear-gradient(225deg, rgba(0, 61, 111, 0.18) 25%, transparent 25%) 0 0/240px 140px,
    linear-gradient(315deg, rgba(0, 61, 111, 0.12) 25%, transparent 25%) 120px 70px/240px 140px,
    linear-gradient(45deg, rgba(0, 61, 111, 0.12) 25%, transparent 25%) 120px 70px/240px 140px,
    #00132c;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .62;
  background:
    linear-gradient(110deg, transparent 0 67%, rgba(0,229,255,.23) 67.2% 67.5%, transparent 67.8%),
    linear-gradient(0deg, transparent 0 66%, rgba(0,229,255,.16) 66.2% 66.5%, transparent 66.8%);
}

.app-shell { min-height: 100vh; padding: 8px 10px 64px; position: relative; }
.header {
  min-height: 82px;
  display: grid;
  grid-template-columns: 280px minmax(440px, 1fr) minmax(480px, 42%);
  gap: 16px;
  align-items: start;
}
.logo-box, .title-panel {
  background: rgba(2, 20, 43, .58);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  min-height: 68px;
}
.logo-box { display: flex; align-items: center; padding: 6px 16px; }
.logo { width: 225px; max-height: 58px; object-fit: contain; }
.title-panel { text-align: center; padding: 5px 20px; }
.page-title { font-size: 25px; font-weight: 800; line-height: 1.2; text-shadow: 0 2px 5px #000; }
.subtitle { font-size: 13px; font-weight: 700; margin-top: 3px; }
.filter-bar { display: grid; grid-template-columns: 1fr 1.25fr 1.55fr; gap: 10px; align-items: end; }
.filter-label { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.filter-group, .date-filter-group { min-width: 0; }
.Select-control, .DateInput_input {
  background: rgba(2, 24, 49, .92) !important;
  border: 1px solid rgba(255,255,255,.78) !important;
  color: white !important;
  border-radius: 0 !important;
}
.Select-value-label, .Select-placeholder, .Select-input > input { color: white !important; }
.Select-menu-outer { background: #061c38 !important; color: white !important; z-index: 10000; }
.VirtualizedSelectFocusedOption { background: #124a73 !important; }
.DateRangePickerInput { background: transparent !important; display: flex !important; }
.DateInput { width: 50% !important; background: transparent !important; }
.DateInput_input { font-size: 12px !important; padding: 8px 4px !important; }
.DateRangePickerInput_arrow_svg { fill: white !important; }

.dashboard-page { min-height: calc(100vh - 155px); }
.overview-top { display: grid; grid-template-columns: 1.55fr .85fr; gap: 20px; height: 310px; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 16px 28px; padding: 22px 32px 6px; }
.kpi-card {
  background: rgba(1, 22, 45, .77);
  border: 1.5px solid rgba(255,255,255,.85);
  border-radius: 30px;
  box-shadow: 10px 12px 16px rgba(215, 235, 255, .28);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 106px;
}
.kpi-value { font-size: 36px; font-weight: 800; line-height: 1.05; }
.kpi-label { font-size: 17px; margin-top: 10px; }
.chart-panel {
  position: relative;
  background: var(--panel);
  border: 1.4px solid var(--border);
  border-radius: 9px;
  box-shadow: 10px 12px 16px rgba(215, 235, 255, .24);
  overflow: hidden;
  min-height: 0;
}
.section-title { text-align: center; font-size: 23px; font-weight: 800; height: 40px; padding-top: 5px; text-shadow: 0 2px 4px #000; }
.chart { height: calc(100% - 40px); min-height: 220px; }
.overview-bottom { display: grid; grid-template-columns: 1.65fr .95fr; gap: 20px; height: 285px; margin-top: 15px; }
.two-column-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.three-column-row { display: grid; grid-template-columns: 1.08fr 1fr .92fr; gap: 16px; }
.risk-top, .score-top { height: 265px; margin: 0 64px 26px; }
.risk-bottom, .score-bottom { height: 345px; }
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 48px;
  background: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: stretch;
  z-index: 999;
  border-top: 1px solid #c8c8c8;
}
.nav-button {
  min-width: 150px;
  border: 0;
  border-right: 1px solid #d2d2d2;
  background: #fff;
  color: #111;
  font-size: 15px;
  cursor: pointer;
  padding: 0 24px;
}
.nav-button.active { border-bottom: 4px solid #008a75; font-weight: 600; }

@media (max-width: 1150px) {
  .header { grid-template-columns: 230px 1fr; }
  .filter-bar { grid-column: 1 / -1; }
  .overview-top, .overview-bottom { height: auto; grid-template-columns: 1fr; }
  .kpi-grid { min-height: 300px; }
  .overview-donut, .month-panel, .smoker-panel { height: 340px; }
  .risk-top, .score-top { margin: 0 0 20px; }
  .two-column-row, .three-column-row { height: auto; grid-template-columns: 1fr; }
  .two-column-row .chart-panel, .three-column-row .chart-panel { height: 350px; margin-bottom: 18px; }
}

@media (max-width: 700px) {
  .app-shell { padding: 6px 6px 64px; }
  .header { display: block; }
  .logo-box, .title-panel { margin-bottom: 8px; }
  .filter-bar { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; padding: 12px 4px; gap: 10px; }
  .kpi-value { font-size: 28px; }
  .nav-button { min-width: 0; flex: 1; padding: 0 6px; }
}
