@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  font-family: "Montserrat", sans-serif;
  background: #0c1420;
  color: #eaf0f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 82% 0%, rgba(35, 91, 112, 0.22), transparent 34rem),
    #0c1420;
}

a {
  color: #85d1df;
  text-decoration: none;
}

a:hover {
  color: #b0e5ec;
  text-decoration: underline;
}

.app-shell {
  min-height: 100vh;
}

.page-header,
.page-main {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
}

.page-header {
  padding: 48px 0 34px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-row > div:last-child {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(133, 209, 223, 0.34);
  border-radius: 17px;
  background: linear-gradient(145deg, #1d4855, #122634);
  color: #a4e0e8;
  font-family: "Montserrat", sans-serif;
  font-size: 23px;
  font-weight: 800;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}

.eyebrow {
  margin: 0 0 7px;
  color: #7fb9c8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Montserrat", sans-serif;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.page-intro {
  max-width: 660px;
  margin: 18px 0 0 70px;
  color: #9cacc0;
  font-size: 15px;
  line-height: 1.65;
}

.page-main {
  padding-bottom: 44px;
}

.data-status {
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid rgba(87, 169, 145, 0.22);
  border-radius: 12px;
  background: rgba(31, 92, 75, 0.15);
  color: #94d3b8;
  font-size: 12px;
}

.data-status.warning {
  border-color: rgba(242, 182, 109, 0.28);
  background: rgba(132, 83, 27, 0.15);
  color: #f0c58e;
}

.summary-section,
.dashboard-section {
  margin-bottom: 22px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.chart-card {
  border: 1px solid rgba(167, 187, 211, 0.11);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(25, 38, 55, 0.96), rgba(17, 28, 42, 0.96));
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.metric-card {
  min-height: 142px;
  padding: 20px 22px 18px;
  border-top: 2px solid rgba(127, 185, 200, 0.46);
}

.metric-card.tmax {
  border-top-color: #e7a66f;
}

.metric-card.tmin {
  border-top-color: #85b9d1;
}

.metric-card.rainfall {
  border-top-color: #72c4d6;
}

.metric-card.tmean {
  border-top-color: #b7a3d8;
}

.metric-card.sunshine {
  border-top-color: #e5cb72;
}

.metric-card.raindays1mm {
  border-top-color: #75b3a5;
}

.metric-label {
  margin-bottom: 12px;
  color: #99a9bd;
  font-size: 12px;
  font-weight: 600;
}

.metric-value {
  margin-bottom: 7px;
  color: #f0f4fa;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(24px, 2.7vw, 32px);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.metric-detail,
.section-note {
  margin-bottom: 0;
  color: #8999ae;
  font-size: 11px;
  line-height: 1.6;
}

.summary-section > .section-note {
  margin: 12px 3px 0;
}

.dashboard-section {
  padding: 24px;
  border: 1px solid rgba(167, 187, 211, 0.1);
  border-radius: 20px;
  background: rgba(18, 29, 43, 0.66);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 5px;
}

.metric-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.metric-toolbar > .dash-dropdown {
  width: min(360px, 100%);
  flex: 0 0 min(360px, 100%);
}

.metric-selector {
  width: 100%;
  color: #eaf0f8;
}

.Select-control,
.Select-menu-outer,
.Select-option,
.Select-value-label {
  border-color: rgba(167, 187, 211, 0.18) !important;
  background-color: #172436 !important;
  color: #dce5f0 !important;
}

.Select-control {
  min-height: 42px !important;
  border-radius: 10px !important;
}

.Select-placeholder,
.Select-arrow {
  color: #9eacc0 !important;
}

.regional-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
}

.chart-card {
  min-width: 0;
  padding: 8px 8px 0;
}

.chart-card .dash-graph {
  width: 100%;
}

.dashboard-section > .section-note {
  margin: 13px 2px 0;
}

.load-error {
  padding: 22px;
  border: 1px solid rgba(242, 182, 109, 0.22);
  border-radius: 14px;
  background: rgba(132, 83, 27, 0.12);
  color: #e8c99e;
}

.error-detail {
  margin: 8px 0 0;
  color: #bca98f;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.load-error {
  margin-top: 12px;
}

.page-footer {
  padding: 12px 3px 2px;
  color: #718198;
  font-size: 11px;
}

@media (max-width: 900px) {
  .regional-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-header,
  .page-main {
    width: calc(100vw - 32px);
  }

  .page-header {
    padding: 30px 0 24px;
  }

  .page-intro {
    margin-left: 0;
    font-size: 14px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .metric-card {
    min-height: 0;
    padding: 16px 18px;
  }

  .metric-value {
    font-size: 27px;
  }

  .dashboard-section {
    padding: 17px 12px;
    border-radius: 16px;
  }

  .metric-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .metric-toolbar > .dash-dropdown {
    width: 100%;
    flex-basis: auto;
  }

  .metric-selector {
    width: 100%;
  }
}
