:root {
  --navy-950: #06121e;
  --navy-900: #071522;
  --navy-850: #0b1a28;
  --navy-800: #101f2e;
  --navy-700: #1b2b3a;
  --cyan: #19c2d8;
  --cyan-soft: #71d9e7;
  --amber: #f4ae3d;
  --green: #62bd7d;
  --text: #f3f7fa;
  --muted: #9bb0c0;
  --border: rgba(137, 177, 204, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-950);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.dashboard-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 2%, rgba(25, 194, 216, .11), transparent 25rem),
    linear-gradient(180deg, #071522 0%, #06121e 100%);
}
.site-header {
  min-height: 92px;
  padding: 18px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 52px; height: 52px; border: 2px solid var(--cyan); border-radius: 16px;
  display: grid; place-items: center; color: var(--cyan); font-size: 30px; box-shadow: inset 0 0 20px rgba(25,194,216,.1);
}
.brand strong { display: block; font-size: clamp(18px, 2vw, 27px); letter-spacing: -.03em; }
.brand small { display: block; margin-top: 2px; color: var(--cyan-soft); font-size: 15px; }
.primary-button {
  min-height: 48px; border: 0; border-radius: 9px; padding: 0 22px; cursor: pointer;
  background: linear-gradient(135deg, #19c2d8, #18aeca); color: #03131e; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(25, 194, 216, .22); transition: transform .18s ease, box-shadow .18s ease;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(25, 194, 216, .32); }
.primary-button span { font-size: 20px; }
.privacy-strip {
  padding: 11px clamp(18px, 4vw, 56px); display: flex; align-items: center; gap: 12px;
  min-height: 52px; background: rgba(13, 43, 65, .78); border-bottom: 1px solid var(--border);
}
.privacy-strip > span { color: var(--cyan); font-size: 22px; }
.privacy-strip p { flex: 1; margin: 0; color: #dbe8ef; font-size: 14px; }
.privacy-strip a { color: var(--cyan-soft); font-weight: 700; font-size: 14px; }
.dashboard-grid {
  width: min(1560px, 100%); margin: 0 auto; padding: 24px clamp(18px, 3vw, 44px) 42px;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px;
}
.map-card, .panel {
  border: 1px solid var(--border); background: rgba(8, 25, 39, .88); border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .2); overflow: hidden;
}
.map-heading { min-height: 88px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { color: var(--cyan-soft); text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; }
.map-heading h1 { margin: 4px 0 0; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.035em; }
.demo-pill { border: 1px solid rgba(244,174,61,.38); background: rgba(244,174,61,.11); color: #ffd895; padding: 7px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.map-wrap { height: clamp(460px, 64vh, 690px); border-block: 1px solid var(--border); background: #0d1e2b; }
.leaflet-map { width: 100%; height: 100%; }
.leaflet-map .leaflet-tile-pane { filter: saturate(.72) brightness(.72) contrast(1.22) hue-rotate(155deg); }
.leaflet-control-zoom a { background: #102335 !important; color: white !important; border-color: var(--border) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #102335; color: white; }
.leaflet-popup-content { line-height: 1.55; }
.map-note { margin: 0; padding: 13px 18px; color: var(--muted); font-size: 13px; }
.control-column { display: flex; flex-direction: column; gap: 12px; }
.panel { padding: 18px; }
.panel h2 { margin: 0; font-size: 16px; }
.panel-title { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.panel-title > span { color: var(--cyan); font-size: 22px; }
.filters-panel label { display: grid; gap: 7px; margin-top: 13px; color: #dce9f0; font-size: 13px; font-weight: 700; }
select, input, textarea {
  width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px;
  background: var(--navy-800); color: var(--text);
}
textarea { padding-block: 10px; resize: vertical; }
.legend-panel ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 11px; }
.legend-panel li { display: grid; grid-template-columns: 12px 1fr auto; gap: 9px; align-items: center; color: #dce6ed; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.legend-panel li strong { color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metrics article {
  min-height: 118px; padding: 13px 7px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid rgba(25,194,216,.25); background: rgba(25,194,216,.065); border-radius: 9px; text-align: center;
}
.metrics article:nth-child(2) { border-color: rgba(244,174,61,.25); background: rgba(244,174,61,.065); }
.metrics article:nth-child(3) { border-color: rgba(98,189,125,.25); background: rgba(98,189,125,.065); }
.metrics span { color: var(--cyan); }
.metrics strong { font-size: 25px; margin: 2px 0; }
.metrics small { color: var(--muted); font-size: 10px; }
.methodology { max-width: 920px; margin: 0 auto; padding: 64px 24px 76px; text-align: center; }
.methodology h2 { margin: 0 0 16px; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.04em; }
.methodology p { margin: 0 auto; max-width: 760px; color: var(--muted); font-size: 17px; line-height: 1.7; }
footer {
  padding: 24px clamp(18px, 4vw, 56px); display: flex; justify-content: space-between; gap: 18px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 12px;
}
footer strong { color: white; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1100; background: rgba(1, 7, 12, .82); backdrop-filter: blur(7px);
  display: grid; place-items: center; padding: 20px;
}
.report-modal {
  width: min(760px, 100%); max-height: 92vh; overflow: auto; position: relative;
  background: #0c1d2b; border: 1px solid rgba(25,194,216,.32); border-radius: 14px; padding: clamp(22px, 4vw, 38px);
  box-shadow: 0 32px 100px rgba(0,0,0,.55);
}
.report-modal h2 { margin: 6px 0 6px; font-size: 30px; }
.report-modal > p { margin: 0 0 22px; color: var(--muted); line-height: 1.55; }
.close-button { position: absolute; right: 16px; top: 14px; background: transparent; border: 0; color: white; font-size: 30px; cursor: pointer; }
.form-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-preview label { display: grid; gap: 7px; color: #dce9f0; font-size: 13px; font-weight: 700; }
.form-preview label small { color: var(--cyan-soft); font-weight: 500; }
.date-grid { display: grid; grid-template-columns: .72fr 1.35fr .9fr; gap: 8px; }
.date-grid select { min-width: 0; padding-inline: 9px; }
.full-field { grid-column: 1 / -1; }
.modal-action { margin-top: 18px; width: 100%; }
.modal-action:disabled { cursor: wait; opacity: .72; transform: none; }
.consent-field {
  grid-template-columns: 22px 1fr !important; align-items: flex-start; gap: 11px !important;
  font-weight: 500 !important; line-height: 1.5;
}
.consent-field input { width: 20px; min-height: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cyan); }
.form-error { margin: 0; color: #ff9c91; font-size: 13px; }
.success-message { padding: 28px 0 8px; text-align: center; }
.success-message > span {
  width: 66px; height: 66px; margin: 0 auto 18px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(98,189,125,.13); border: 1px solid rgba(98,189,125,.4);
  color: var(--green); font-size: 34px; font-weight: 800;
}
.success-message p { max-width: 560px; margin: 0 auto; color: var(--muted); line-height: 1.65; }

@media (max-width: 980px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .control-column { display: grid; grid-template-columns: 1fr 1fr; }
  .metrics { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .site-header { min-height: 76px; padding-block: 12px; }
  .brand-mark { width: 43px; height: 43px; font-size: 24px; border-radius: 12px; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 12px; }
  .site-header .primary-button { position: fixed; z-index: 1050; left: 14px; right: 14px; bottom: 14px; width: calc(100% - 28px); }
  .privacy-strip { align-items: flex-start; }
  .privacy-strip a { display: none; }
  .dashboard-grid { padding-inline: 12px; padding-top: 12px; }
  .map-heading { align-items: flex-start; flex-direction: column; }
  .map-wrap { height: 58vh; min-height: 420px; }
  .control-column { display: flex; }
  .metrics { order: -1; overflow-x: auto; }
  .metrics article { min-width: 105px; }
  .form-preview { grid-template-columns: 1fr; }
  .date-grid { grid-template-columns: .7fr 1.3fr .9fr; }
  .full-field { grid-column: auto; }
  footer { flex-direction: column; padding-bottom: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
