:root {
  --navy: #02162f;
  --panel: rgba(3, 24, 49, 0.86);
  --cyan: #27dfff;
  --border: rgba(255, 255, 255, 0.72);
  --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%);
}

.page { min-height: 100vh; padding: 10px 12px; position: relative; }
.shell {
  display: grid;
  grid-template-columns: 365px minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  margin: 0;
}

.sidebar {
  background: rgba(2, 20, 43, .82);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 12px;
  padding: 15px 18px 18px;
  box-shadow: 8px 10px 18px rgba(0,0,0,.24);
  align-self: start;
  position: sticky;
  top: 10px;
  z-index: 20;
}
.logo-box {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  margin-bottom: 13px;
}
.logo {
  width: 100%;
  max-width: 335px;
  max-height: 108px;
  object-fit: contain;
  display: block;
}
.filters-heading {
  color: var(--cyan);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .6px;
  margin: 7px 2px 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(39,223,255,.35);
}

.content { min-width: 0; }
.title-panel {
  background: rgba(2, 20, 43, .70);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 10px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7px 18px;
  font-size: clamp(24px, 1.7vw, 31px);
  font-weight: 800;
  text-shadow: 0 2px 5px #000;
}
.demo-note {
  margin: 6px 2px 7px;
  padding: 6px 11px;
  border-left: 3px solid var(--cyan);
  background: rgba(2, 20, 43, .58);
  font-size: 12px;
  line-height: 1.25;
  color: rgba(255,255,255,.91);
}

.filter-group { margin: 13px 0 16px; }
.filter-title {
  font-size: 18px;
  font-weight: 750;
  margin: 0 0 8px 2px;
  letter-spacing: .1px;
}
.hint {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255,255,255,.80);
  margin: 13px 2px 1px;
}
.Select-control,
.site-dropdown .Select-control {
  background: rgba(2, 24, 49, .97) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  color: white !important;
  min-height: 48px;
  border-radius: 5px !important;
}
.Select-value-label, .Select-placeholder, .Select-input > input { color: white !important; }
.Select-placeholder { line-height: 46px !important; font-size: 15px !important; }
.Select-menu-outer { background: #061c38 !important; color: white !important; z-index: 9999 !important; }
.VirtualizedSelectFocusedOption { background: #124a73 !important; }
.Select--multi .Select-value {
  background: rgba(39,223,255,.12) !important;
  border: 1px solid rgba(39,223,255,.55) !important;
  color: white !important;
  margin-top: 7px !important;
}
.Select--multi .Select-value-label { color: white !important; }
.Select--multi .Select-multi-value-wrapper { min-height: 46px; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin: 8px 22px 10px;
}
.kpi-card {
  background: rgba(1, 22, 45, .84);
  border: 1.5px solid rgba(255,255,255,.84);
  border-radius: 27px;
  box-shadow: 8px 9px 14px rgba(215, 235, 255, .19);
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px;
}
.kpi-value { font-size: clamp(34px, 2.45vw, 44px); font-weight: 800; line-height: 1.04; }
.kpi-label { font-size: 18px; margin-top: 9px; }

.map-panel, .table-panel {
  background: var(--panel);
  border: 1.4px solid var(--border);
  border-radius: 10px;
  box-shadow: 7px 8px 13px rgba(215, 235, 255, .17);
  overflow: hidden;
}
.map-panel {
  height: 385px;
  min-height: 385px;
}
.section-title {
  text-align: center;
  font-size: clamp(20px, 1.4vw, 24px);
  font-weight: 800;
  height: 38px;
  padding-top: 5px;
  text-shadow: 0 2px 4px #000;
}
.map-graph-wrap {
  height: calc(100% - 38px);
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.map-graph-wrap > div,
.map-graph-wrap .dash-graph,
.map-graph-wrap .js-plotly-plot,
.map-graph-wrap .plot-container,
.map-graph-wrap .svg-container,
.map { height: 100% !important; width: 100% !important; min-height: 0 !important; }

.tables-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.table-panel { height: 350px; min-height: 0; }

@media (min-width: 1101px) and (min-height: 850px) {
  body { overflow-y: auto; }
  .page { min-height: 100vh; }
  .content {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

@media (max-height: 849px) and (min-width: 1101px) {
  .shell { grid-template-columns: 340px minmax(0, 1fr); }
  .logo-box { min-height: 102px; }
  .logo { max-height: 88px; max-width: 310px; }
  .filters-heading { font-size: 20px; margin-bottom: 11px; }
  .filter-group { margin: 9px 0 11px; }
  .filter-title { font-size: 16px; margin-bottom: 5px; }
  .Select-control, .site-dropdown .Select-control { min-height: 42px; }
  .Select-placeholder { line-height: 40px !important; }
  .kpi-card { min-height: 112px; }
  .map-panel { height: 300px; min-height: 300px; }
  .table-panel { height: 300px; }
}

@media (max-width: 1100px) {
  body { overflow-y: auto; }
  .shell { grid-template-columns: 280px minmax(0, 1fr); }
  .logo { max-width: 255px; }
  .logo-box { min-height: 102px; }
  .filters-heading { font-size: 19px; }
  .filter-title { font-size: 15px; }
  .kpi-row { gap: 12px; margin-left: 0; margin-right: 0; }
  .kpi-value { font-size: 28px; }
  .map-panel { height: 300px; min-height: 300px; }
  .tables-row { grid-template-columns: 1fr; }
  .table-panel { height: 300px; }
}

@media (max-width: 760px) {
  .page { padding: 6px; }
  .shell { display: block; }
  .sidebar { position: static; margin-bottom: 10px; }
  .logo { max-width: 300px; }
  .kpi-row { grid-template-columns: 1fr; }
  .title-panel { font-size: 21px; }
  .map-panel { height: 220px; min-height: 220px; }
}


/* Desktop presentation: use the viewport and keep map/tables readable. */
@media (min-width: 1101px) and (min-height: 850px) {
  .page { min-height: 100vh; padding-bottom: 8px; }
  .content { min-height: calc(100vh - 20px); }
  .map-panel { height: clamp(360px, 41vh, 420px); min-height: 360px; }
  .table-panel { height: clamp(330px, 36vh, 390px); }
}

@media (min-width: 1101px) and (max-height: 849px) {
  .map-panel { height: 320px; min-height: 320px; }
  .table-panel { height: 315px; }
}


/* Rectangular map: fill the whole allotted panel. */
.map-panel { height: 340px !important; min-height: 340px !important; }
.map-graph-wrap, .map-graph-wrap > div, .map-graph-wrap .dash-graph,
.map-graph-wrap .js-plotly-plot, .map-graph-wrap .plot-container,
.map-graph-wrap .svg-container, #site-map {
  width: 100% !important; height: 100% !important; min-width: 0 !important; min-height: 0 !important;
}
@media (min-width: 1101px) {
  .map-panel { height: clamp(315px, 35vh, 360px) !important; min-height: 315px !important; }
}