:root {
  --bg: #091422;
  --bg-soft: #102036;
  --card: rgba(15, 31, 50, 0.88);
  --line: rgba(181, 207, 236, 0.15);
  --text: #e8f2ff;
  --muted: #93aac2;
  --accent: #22b3ff;
  --accent-2: #7bf5ca;
  --danger: #ff5d7a;
  --cone: #f97316;
  --cone-dark: #ea580c;
  /* civic palette */
  --red: #FF3B30;
  --yellow: #FFCC00;
  --green: #34C759;
  /* civic UI system tokens */
  --color-bg: #0B0F14;
  --color-surface: #111827;
  --color-text: #E5E7EB;
  --color-muted: #9CA3AF;
  --color-success: #22C55E;
  --color-warning: #FACC15;
  --color-danger: #F97316;
  --color-critical: #EF4444;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); font-family: "Sora", "Segoe UI", sans-serif; background: radial-gradient(circle at 20% 0%, #18385c 0, var(--bg) 45%), var(--bg); min-height: 100vh; }
.bg-blur { position: fixed; border-radius: 999px; filter: blur(60px); opacity: 0.22; z-index: 0; }
.bg-blur-a { width: 360px; height: 360px; background: #f97316; top: -120px; left: -80px; }
.bg-blur-b { width: 320px; height: 320px; background: #00ff9d; bottom: -120px; right: -100px; }
.site-header, .layout { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 18px; }
.site-header { display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: .03em; }
nav a { color: var(--text); text-decoration: none; margin-left: 14px; opacity: .9; }
nav a:hover { color: var(--accent); }
.layout { display: grid; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 16px 48px rgba(0, 8, 20, .35); }
.hero h1 { font-size: clamp(1.8rem, 2.8vw, 2.8rem); line-height: 1.15; margin: 0 0 8px; }
.hero p { color: var(--muted); }
.eyebrow { color: var(--accent-2); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.badge { background: rgba(34, 179, 255, .15); border: 1px solid rgba(34, 179, 255, .35); color: #8fddff; font-size: .75rem; border-radius: 999px; padding: 5px 10px; }
.badge-alt { color: #9effcf; border-color: rgba(123,245,202,.4); background: rgba(123,245,202,.12); }
.map-wrap { position: relative; }
#publicMap, #premiumMap { height: 470px; border-radius: 12px; overflow: hidden; background: var(--bg-soft); }

/* ── MAP KPI OVERLAY ── */
.map-kpi-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(255,255,255,0.96);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 210px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  color: #1a1a2e;
  pointer-events: none;
}
.mkpi-row { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 10px; }
.mkpi-block { display: flex; flex-direction: column; gap: 1px; }
.mkpi-num { font-size: 2rem; font-weight: 800; line-height: 1; color: #EF4444; font-variant-numeric: tabular-nums; }
.mkpi-fixed { color: #16a34a; }
.mkpi-sub { font-size: .72rem; color: #6b7280; font-weight: 600; }
.mkpi-label { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: #9ca3af; font-weight: 600; }
.mkpi-sev-row { display: flex; gap: 6px; border-top: 1px solid #e5e7eb; padding-top: 8px; }
.mkpi-sev { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; background: #f9fafb; border-radius: 8px; padding: 5px 3px; }
.mkpi-sev span:first-child { font-size: 1.05rem; }
.mkpi-sev span:last-child { font-size: .78rem; font-weight: 700; color: #374151; }
.stat-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); margin-top: 14px; }
.metric { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(7,20,34,.4); }
.metric strong { font-size: 1.45rem; display: block; }
.metric span { color: var(--muted); font-size: .88rem; }
.notice { margin-top: 14px; border: 1px solid rgba(255, 93, 122, .35); border-radius: 12px; padding: 12px; background: rgba(255, 93, 122, .08); color: #ffd7df; }
.form-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-help { grid-column: 1 / -1; margin: 0; }
.step-title { grid-column: 1 / -1; margin: 8px 0 0; color: var(--accent-2); font-size: 1rem; }
.action-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 10px; }
.filter-note { margin: 0 0 12px; }
#locationStatus { grid-column: 1 / -1; }
textarea { grid-column: 1 / -1; min-height: 110px; }
.preview { grid-column: 1 / -1; width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
button, input, textarea, select { width: 100%; border-radius: 12px; border: 1px solid var(--line); padding: 11px 12px; background: rgba(8, 21, 36, .62); color: var(--text); }
button { background: linear-gradient(135deg, #11a8ff, #0f8cd7); border: none; font-weight: 600; cursor: pointer; min-height: 46px; }
button:hover { transform: translateY(-1px); }
button.danger { background: linear-gradient(135deg, #ff7690, #ef4265); }
.inline-form { display: grid; grid-template-columns: 1fr 180px; gap: 10px; }
.small { color: var(--muted); }
.hidden { display: none; }
.report-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.report-list li { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(7,20,34,.4); transition: transform .15s, border-color .15s; }
.report-list li:hover { transform: translateY(-2px); border-color: rgba(34,179,255,.3); }
.report-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.report-card-head strong { flex: 1; }
.report-meta, .report-flags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: .88rem; }
.report-body { margin: 0; }
.severity-pill, .status-pill, .priority-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: .76rem; font-weight: 700; border: 1px solid transparent; }
/* Fissure — green */
.severity-low { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.4); color: #86efac; }
/* Trou — blue-ish info */
.severity-medium { background: rgba(250,204,21,.12); border-color: rgba(250,204,21,.4); color: #fde68a; }
/* Nid-de-poule — orange */
.severity-high { background: rgba(249,115,22,.16); border-color: rgba(249,115,22,.45); color: #fdba74; }
/* Cratère — red */
.severity-critical { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.45); color: #fca5a5; }
.status-new { background: rgba(34,179,255,.14); border-color: rgba(34,179,255,.35); color: #8fddff; }
.status-verified { background: rgba(123,245,202,.1); border-color: rgba(123,245,202,.35); color: #9effcf; }
.status-in_progress { background: rgba(249,115,22,.16); border-color: rgba(249,115,22,.45); color: #fdba74; }
.status-fixed { background: rgba(123,245,202,.14); border-color: rgba(123,245,202,.35); color: #b8ffe6; }
.priority-low { background: rgba(34,179,255,.14); border-color: rgba(34,179,255,.35); color: #8fddff; }
.priority-medium { background: rgba(255,179,71,.14); border-color: rgba(255,179,71,.35); color: #ffd39e; }
.priority-high { background: rgba(255,93,122,.12); border-color: rgba(255,93,122,.35); color: #ffc0cb; }
.priority-fixed { background: rgba(123,245,202,.12); border-color: rgba(123,245,202,.35); color: #b8ffe6; }
.report-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.report-photo { display: grid; gap: 6px; }
.report-photo span { color: var(--muted); font-size: .8rem; }
.report-photo img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: rgba(8, 21, 36, .62); }
.comment-block { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.comment-title { margin: 0 0 8px; font-size: .95rem; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.comment-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: rgba(8, 21, 36, .46); }
.comment-item strong { display: block; margin-bottom: 4px; }
.comment-item p { margin: 0 0 4px; }
.comment-empty { color: var(--muted); margin: 0; }
.comment-form { display: grid; grid-template-columns: 180px 1fr auto; gap: 8px; margin-top: 10px; align-items: start; }
.comment-form textarea { grid-column: 2; /* override global textarea{grid-column:1/-1} to keep the 3-col name|body|send layout */ }
.comment-form button { width: auto; min-width: 150px; }
.comment-form .comment-notice { grid-column: 1 / -1; margin: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,93,122,.35); background: rgba(255,93,122,.08); color: #ffd7df; font-size: .88rem; }
.comment-form .comment-notice.success { border-color: rgba(123,245,202,.45); background: rgba(123,245,202,.08); color: #9effcf; }
.admin-report-form { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0,1fr)); margin-top: 12px; }
.empty-state { color: var(--muted); margin: 0; }
.cone-row { display: flex; gap: 18px; align-items: flex-end; justify-content: center; margin: 16px 0 6px; opacity: 0.82; }
.cone-row svg { width: 26px; height: auto; }

/* Dashboard KPI section */
.kpi-section { padding: 20px; }
.kpi-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.account-info { color: var(--muted); margin-top: 4px; font-size: .9rem; }
.kpi-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.btn-icon { width: auto; min-height: 36px; padding: 6px 12px; font-size: 1.1rem; border-radius: 10px; }
button.compact { width: auto; min-height: 36px; padding: 6px 16px; font-size: .9rem; }

/* Refresh bar */
.refresh-bar { font-size: .78rem; color: var(--muted); padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }

/* Quick admin action buttons */
.quick-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.qa-btn { width: auto; padding: 5px 12px; font-size: .78rem; min-height: 30px; border-radius: 8px; font-weight: 600; opacity: .75; }
.qa-btn:hover { opacity: 1; }
.qa-btn.active { opacity: 1; outline: 2px solid var(--cone); }
.qa-btn-verified { background: linear-gradient(135deg, rgba(123,245,202,.25), rgba(123,245,202,.12)); color: #9effcf; border: 1px solid rgba(123,245,202,.4); }
.qa-btn-in_progress { background: linear-gradient(135deg, rgba(249,115,22,.25), rgba(249,115,22,.12)); color: #fdba74; border: 1px solid rgba(249,115,22,.4); }
.qa-btn-fixed { background: linear-gradient(135deg, rgba(123,245,202,.2), rgba(123,245,202,.08)); color: #b8ffe6; border: 1px solid rgba(123,245,202,.35); }
.qa-btn-critical { background: linear-gradient(135deg, rgba(255,93,122,.2), rgba(255,93,122,.08)); color: #ffc0cb; border: 1px solid rgba(255,93,122,.35); }
.after-photo-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.after-photo-row input { flex: 1; }
.after-photo-row button { width: auto; padding: 8px 14px; }
.admin-block { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.admin-block-title { margin: 0 0 8px; font-size: .9rem; color: var(--cone); font-weight: 600; }

/* Reset filters button */
.btn-reset-filters { width: auto; padding: 5px 14px; font-size: .8rem; min-height: 32px; border-radius: 8px; font-weight: 600; background: rgba(255,93,122,.12); border: 1px solid rgba(255,93,122,.35); color: #ffc0cb; margin-bottom: 8px; }
.btn-reset-filters:hover { background: rgba(255,93,122,.22); }

/* Address autocomplete */
.autocomplete-wrap { position: relative; grid-column: 1 / -1; }
.autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; margin: 4px 0 0; padding: 4px 0; list-style: none; background: #0d2035; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,8,20,.5); max-height: 240px; overflow-y: auto; }
.autocomplete-list li { padding: 10px 14px; cursor: pointer; font-size: .9rem; color: var(--text); }
.autocomplete-list li:hover, .autocomplete-list li[aria-selected="true"] { background: rgba(34,179,255,.15); color: var(--accent); }

/* Auth pages */
.auth-main { max-width: 440px; margin: 40px auto; padding: 0 18px; }
.auth-card { padding: 28px; }
.auth-card h1 { margin: 6px 0 18px; font-size: 1.8rem; }
.auth-card form { display: grid; gap: 10px; margin-bottom: 14px; }

/* ── HERO SECTION ── */
.hero-section {
  position: relative;
  z-index: 1;
  padding: 60px 0 0;
  overflow: hidden;
}
.hero-inner {
  padding-top: 0;
  padding-bottom: 0;
}
.hero-text {
  max-width: 680px;
  margin-bottom: 32px;
}
.live-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #fff 30%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0 0 28px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ── CTA BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--red), #c0392b);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 14px;
  padding: 14px 24px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(255,59,48,.35);
  transition: transform .15s, box-shadow .15s;
  min-height: 0;
  width: auto;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255,59,48,.5);
}
.btn-primary.btn-large {
  font-size: 1.15rem;
  padding: 18px 32px;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid rgba(34,179,255,.35);
  border-radius: 14px;
  padding: 13px 22px;
  background: rgba(34,179,255,.08);
  transition: background .15s, color .15s;
  min-height: 0;
  width: auto;
}
.btn-secondary:hover { background: rgba(34,179,255,.18); color: #fff; }

/* Submit button override */
.btn-submit-report {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--red), #c0392b);
  box-shadow: 0 4px 24px rgba(255,59,48,.3);
}
.btn-submit-report:hover { box-shadow: 0 8px 32px rgba(255,59,48,.5); }

/* ── LIVE indicator ── */
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(1.4); }
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: live-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--red);
  border: 1px solid rgba(255,59,48,.4);
  background: rgba(255,59,48,.1);
  border-radius: 999px;
  padding: 4px 10px;
  letter-spacing: .04em;
  margin-left: 0;
  white-space: nowrap;
}
.live-pill::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: live-pulse 1.6s ease-in-out infinite;
}

/* ── IMPACT GRID (stats) ── */
.impact-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.impact-metric {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 14px;
  background: rgba(7,20,34,.55);
  transition: border-color .2s;
}
.impact-metric:hover { border-color: rgba(34,179,255,.4); }
.impact-metric .im-icon { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.impact-metric .im-value {
  font-size: 1.85rem;
  font-weight: 800;
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}
.impact-metric .im-label { color: var(--muted); font-size: .82rem; }
.impact-metric.im-danger .im-value { color: var(--red); }
.impact-metric.im-danger { border-color: rgba(255,59,48,.3); }
.impact-metric.im-danger.pulse-glow { animation: danger-glow 2s ease-in-out infinite; }
@keyframes danger-glow {
  0%, 100% { box-shadow: none; border-color: rgba(255,59,48,.3); }
  50% { box-shadow: 0 0 18px rgba(255,59,48,.4); border-color: rgba(255,59,48,.7); }
}
.impact-metric.im-warn .im-value { color: var(--yellow); }
.impact-metric.im-success .im-value { color: var(--green); }

/* ── MAP filter pills ── */
.map-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pill-filter {
  width: auto;
  min-height: 34px;
  padding: 5px 14px;
  font-size: .82rem;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(8,21,36,.7);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.pill-filter:hover { transform: none; }
.pill-critical { border-color: rgba(255,59,48,.4); color: #ffb3b3; }
.pill-critical:hover, .pill-critical.active { background: rgba(255,59,48,.18); border-color: rgba(255,59,48,.7); color: #fff; }
.pill-active { border-color: rgba(255,204,0,.4); color: var(--yellow); }
.pill-active:hover, .pill-active.active { background: rgba(255,204,0,.15); border-color: rgba(255,204,0,.7); color: #fff; }
.pill-fixed { border-color: rgba(52,199,89,.4); color: var(--green); }
.pill-fixed:hover, .pill-fixed.active { background: rgba(52,199,89,.15); border-color: rgba(52,199,89,.7); color: #fff; }

/* ── HOW IT WORKS ── */
.how-section h2 { margin: 6px 0 20px; font-size: 1.4rem; }
.how-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.how-step {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(7,20,34,.4);
  transition: border-color .2s;
}
.how-step:hover { border-color: rgba(123,245,202,.4); }
.how-icon { font-size: 2rem; line-height: 1; }
.how-step strong { font-size: 1rem; color: var(--text); }
.how-step p { color: var(--muted); margin: 0; font-size: .88rem; line-height: 1.6; }

/* ── VIRAL CARD ── */
.viral-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(34,179,255,.06), rgba(123,245,202,.06));
  border-color: rgba(123,245,202,.2);
  padding: 32px 24px;
}
.viral-quote {
  margin: 0 0 14px;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  font-style: normal;
}
.viral-quote::before { content: '❝ '; color: var(--accent-2); }
.viral-quote::after { content: ' ❞'; color: var(--accent-2); }
.viral-sub { color: var(--muted); margin: 0; font-size: .95rem; }
.viral-sub strong { color: var(--accent-2); font-weight: 700; }

/* ── HOT ZONES ── */
.hot-zones-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.hot-zone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7,20,34,.4);
}
.hot-zone-name { font-weight: 600; font-size: .92rem; }
.hot-zone-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.hz-badge {
  font-size: .72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid transparent;
}
.hz-badge-red { background: rgba(255,59,48,.12); border-color: rgba(255,59,48,.4); color: #ffb3b3; }
.hz-badge-yellow { background: rgba(255,204,0,.1); border-color: rgba(255,204,0,.4); color: var(--yellow); }
.hz-badge-green { background: rgba(52,199,89,.1); border-color: rgba(52,199,89,.4); color: var(--green); }
.hz-empty { color: var(--muted); font-size: .88rem; }

/* ── IMPACT SECTION ── */
.impact-section { padding: 28px; }
.impact-section-title { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; margin: 8px 0 28px; line-height: 1.2; }
.impact-big-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}
.impact-big-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7,20,34,.5);
  gap: 8px;
  transition: border-color .2s, transform .2s;
}
.impact-big-stat:hover { border-color: rgba(123,245,202,.4); transform: translateY(-2px); }
.ibs-icon { font-size: 2.2rem; line-height: 1; }
.ibs-value { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1; color: var(--accent-2); }
.ibs-label { color: var(--muted); font-size: .85rem; }

/* ── VIRAL HOOK ── */
.viral-hook-card {
  background: linear-gradient(135deg, rgba(255,59,48,.08) 0%, rgba(15,31,50,.9) 100%);
  border-color: rgba(255,59,48,.2);
  padding: 40px 32px;
  text-align: center;
}
.viral-hook-inner { max-width: 580px; margin: 0 auto; }
.viral-hook-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; margin: 0 0 14px; line-height: 1.2; }
.viral-hook-sub { color: var(--muted); font-size: .97rem; line-height: 1.7; margin: 0 0 26px; }

@media (max-width: 780px) {
  .impact-big-grid { grid-template-columns: 1fr; }
  .viral-hook-card { padding: 28px 18px; }
}
.cta-final-card {
  text-align: center;
  padding: 40px 28px;
  background: linear-gradient(135deg, rgba(255,59,48,.06), rgba(15,31,50,.9));
  border-color: rgba(255,59,48,.25);
}
.cta-final-title {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.25;
}
.cta-final-sub { color: var(--muted); margin: 0 0 24px; font-size: .97rem; line-height: 1.6; }

/* ── nav CTA ── */
.nav-cta {
  display: inline-block;
  background: var(--red);
  color: #fff !important;
  border-radius: 10px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: .88rem;
  opacity: 1 !important;
  transition: background .15s;
}
.nav-cta:hover { background: #cc2e25; color: #fff; }

@media (max-width: 780px) {
  .site-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .site-header nav { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; align-items: center; }
  nav a { margin: 0; width: auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(8, 21, 36, .5); }
  .nav-cta { padding: 9px 16px; border: none; background: var(--red); }
  .refresh-bar { width: auto; }
  .form-grid, .action-row, .admin-report-form, .comment-form { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  #publicMap, #premiumMap { height: 360px; }
  .kpi-header { flex-direction: column; gap: 10px; }
  .comment-form { grid-template-columns: 1fr; }
  .auth-main { margin: 24px auto; }
  .auth-card { padding: 22px 18px; }
  .hero-section { padding: 32px 0 0; }
  .hero-title { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .hero-ctas { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .how-grid { grid-template-columns: 1fr; }
  .cta-final-card { padding: 28px 18px; }
  .map-filter-pills { gap: 6px; }
}
.map-unavailable { padding: 30px; text-align: center; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.file-upload-label { display: block; grid-column: 1 / -1; width: 100%; border-radius: 12px; border: 1px solid var(--line); padding: 11px 12px; background: rgba(8,21,36,.62); color: var(--text); font-weight: 600; text-align: center; cursor: pointer; transition: border-color .15s, color .15s; }
.file-upload-label:hover { border-color: var(--accent); color: var(--accent); }

/* Location status indicator */
#locationStatus { transition: color .2s; }
.location-idle { color: var(--muted); }
.location-pending { color: var(--accent); }
.location-active { color: var(--accent-2); font-weight: 600; }
.location-error { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════════════════
   WAR ROOM — CIVIC CONTROL CENTER (dashboard.html only, scoped to .wr-page)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Override base background */
.wr-page {
  background: radial-gradient(circle at 50% 0%, #0d1a2a 0, #070A0F 55%), #070A0F;
  --wr-panel: #0E141B;
  --wr-line: rgba(181,207,236,.12);
  --wr-red: #FF3B30;
  --wr-yellow: #FFCC00;
  --wr-green: #34C759;
  --wr-blue: #0A84FF;
}
.wr-page .bg-blur { display: none; }

/* ── TOP LIVE STATUS BAR ── */
@keyframes wr-dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,59,48,.5); }
  50% { opacity: .7; box-shadow: 0 0 0 5px rgba(255,59,48,0); }
}
.wr-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(7,10,15,.95);
  border-bottom: 1px solid var(--wr-line);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}
.wr-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.wr-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--wr-red);
  flex-shrink: 0;
  animation: wr-dot-pulse 1.6s ease-in-out infinite;
}
.wr-brand-name {
  font-weight: 800;
  font-size: .88rem;
  letter-spacing: .1em;
  color: var(--text);
  white-space: nowrap;
}
.wr-live-badge {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--wr-green);
  border: 1px solid rgba(52,199,89,.5);
  background: rgba(52,199,89,.1);
  border-radius: 4px;
  padding: 2px 7px;
}
.wr-topbar-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.wr-tstat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
}
.wr-tstat span { font-size: 1.15rem; font-weight: 800; }
.wr-tstat em { color: var(--muted); font-style: normal; font-size: .75rem; }
.wr-tstat-critical span { color: var(--wr-red); }
.wr-tstat-warn span { color: var(--wr-yellow); }
.wr-tstat-ok span { color: var(--wr-green); }
.wr-tstat-info span { color: var(--wr-blue); }
.wr-topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.wr-account-info { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.wr-sync-time { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.wr-btn-icon {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--wr-line);
  color: var(--text);
  width: auto;
  min-height: 32px;
  padding: 4px 11px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.wr-btn-icon:hover { background: rgba(255,255,255,.12); transform: none; }
.wr-btn-logout {
  background: rgba(255,59,48,.12);
  border: 1px solid rgba(255,59,48,.3);
  color: #ffb3b3;
  width: auto;
  min-height: 32px;
  padding: 4px 14px;
  font-size: .8rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.wr-btn-logout:hover { background: rgba(255,59,48,.22); transform: none; }

/* ── MAIN WAR ROOM GRID ── */
.wr-main {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  gap: 0;
  height: calc(100vh - 53px);
  overflow: hidden;
}

/* ── KPI PANEL (left) ── */
.wr-kpi-panel {
  background: var(--wr-panel);
  border-right: 1px solid var(--wr-line);
  padding: 18px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wr-panel-label {
  margin: 0;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
}
@keyframes wr-critical-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); border-color: rgba(255,59,48,.4); }
  50%       { box-shadow: 0 0 20px rgba(255,59,48,.4); border-color: rgba(255,59,48,.8); }
}
.wr-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--wr-line);
  border-radius: 12px;
  background: rgba(7,20,34,.5);
  transition: border-color .2s;
}
.wr-kpi-icon { font-size: 1.2rem; }
.wr-kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.wr-kpi-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
}
.wr-kpi-total { border-color: rgba(34,179,255,.25); }
.wr-kpi-total .wr-kpi-value { color: var(--accent); }
.wr-kpi-active { border-color: rgba(255,204,0,.3); }
.wr-kpi-active .wr-kpi-value { color: var(--wr-yellow); }
.wr-kpi-critical {
  border-color: rgba(255,59,48,.4);
  animation: wr-critical-glow 2.4s ease-in-out infinite;
}
.wr-kpi-critical .wr-kpi-value { color: var(--wr-red); }
.wr-kpi-fixed { border-color: rgba(52,199,89,.3); }
.wr-kpi-fixed .wr-kpi-value { color: var(--wr-green); }
.wr-filter-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}
.wr-select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--wr-line);
  padding: 8px 10px;
  background: rgba(8,21,36,.7);
  color: var(--text);
  font-size: .82rem;
}

/* ── MAP CENTER ── */
.wr-map-center {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #070A0F;
}
.wr-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--wr-line);
  flex-shrink: 0;
}
.wr-map {
  flex: 1;
  min-height: 0;
}

/* ── INCIDENT STREAM (right) ── */
.wr-feed-panel {
  background: var(--wr-panel);
  border-left: 1px solid var(--wr-line);
  padding: 14px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wr-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
@keyframes wr-feed-slide {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wr-feed-item {
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid var(--wr-line);
  background: rgba(7,20,34,.55);
  animation: wr-feed-slide .25s ease-out;
  font-size: .8rem;
  line-height: 1.5;
}
.wr-feed-item.fi-critical { border-left-color: var(--wr-red); }
.wr-feed-item.fi-high     { border-left-color: var(--wr-yellow); }
.wr-feed-item.fi-fixed    { border-left-color: var(--wr-green); }
.wr-feed-item.fi-info     { border-left-color: var(--wr-blue); }
.wr-feed-time {
  display: block;
  color: var(--muted);
  font-size: .7rem;
  margin-bottom: 3px;
  font-family: monospace;
}
.wr-feed-msg { color: var(--text); }
.wr-feed-loc { color: var(--muted); font-size: .75rem; }
.wr-feed-empty { color: var(--muted); font-size: .85rem; padding: 12px 0; }

/* ── PRIORITY QUEUE (bottom) ── */
.wr-priority-section {
  border-top: 1px solid var(--wr-line);
  background: var(--wr-panel);
  padding: 16px 20px;
  overflow-y: auto;
  max-height: 480px;
}
.wr-priority-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.wr-report-list li {
  border-color: var(--wr-line);
  background: rgba(7,20,34,.55);
}

/* ── WAR ROOM RESPONSIVE ── */
@media (max-width: 1100px) {
  .wr-main { grid-template-columns: 220px 1fr 260px; }
}
@media (max-width: 860px) {
  .wr-main {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .wr-kpi-panel { flex-direction: row; flex-wrap: wrap; }
  .wr-kpi-card  { flex: 1 1 140px; }
  .wr-map { height: 360px; }
  .wr-feed-panel { max-height: 340px; }
  .wr-topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .wr-topbar-stats { gap: 12px; }
  .wr-priority-section { max-height: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   OPS-ROOM UPGRADES — grid overlay, alerts, pulse markers, heatmap
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Subtle grid overlay on the war-room page ── */
.wr-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(34,179,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,179,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Alert banner stack ── */
.wr-alert-container {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  width: min(680px, 96vw);
  pointer-events: none;
}

@keyframes wr-alert-in {
  from { opacity: 0; transform: translateY(-24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)     scale(1);   }
}
@keyframes wr-alert-out {
  from { opacity: 1; transform: translateY(0)     scale(1);   max-height: 80px; }
  to   { opacity: 0; transform: translateY(-16px) scale(.96); max-height: 0;    }
}

.wr-alert {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: wr-alert-in .3s cubic-bezier(.2,.8,.3,1) both;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  overflow: hidden;
}
.wr-alert.dismissing {
  animation: wr-alert-out .4s ease-in both;
  pointer-events: none;
}
.wr-alert-critical {
  background: rgba(255,59,48,.18);
  border-color: rgba(255,59,48,.55);
}
.wr-alert-warning {
  background: rgba(255,204,0,.14);
  border-color: rgba(255,204,0,.45);
}
.wr-alert-info {
  background: rgba(34,179,255,.12);
  border-color: rgba(34,179,255,.4);
}
.wr-alert-success {
  background: rgba(52,199,89,.12);
  border-color: rgba(52,199,89,.4);
}
.wr-alert-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.3; }
.wr-alert-body { flex: 1; min-width: 0; }
.wr-alert-title {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.wr-alert-critical .wr-alert-title { color: #ff8080; }
.wr-alert-warning  .wr-alert-title { color: #ffe066; }
.wr-alert-info     .wr-alert-title { color: #7fd4ff; }
.wr-alert-success  .wr-alert-title { color: #7dffc0; }
.wr-alert-msg { font-size: .78rem; color: rgba(232,242,255,.8); line-height: 1.5; }
.wr-alert-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 0 0 12px 12px;
  animation: wr-alert-timer linear both;
}
.wr-alert-critical .wr-alert-progress { background: rgba(255,59,48,.7); }
.wr-alert-warning  .wr-alert-progress { background: rgba(255,204,0,.7); }
.wr-alert-info     .wr-alert-progress { background: rgba(34,179,255,.7); }
.wr-alert-success  .wr-alert-progress { background: rgba(52,199,89,.7); }
@keyframes wr-alert-timer {
  from { width: 100%; }
  to   { width: 0%;   }
}

/* ── Custom map markers with pulse ring ── */
.wr-marker {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
}
.wr-marker-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 1;
}
.wr-marker-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: wr-marker-pulse 2.2s ease-out infinite;
}

@keyframes wr-marker-pulse {
  0%   { transform: scale(.5); opacity: .7; }
  100% { transform: scale(2.2); opacity: 0; }
}

.wr-marker-critical .wr-marker-dot { background: #EF4444; box-shadow: 0 0 8px #EF4444; }
.wr-marker-critical .wr-marker-ring { color: #EF4444; animation-duration: 1.4s; }
.wr-marker-high     .wr-marker-dot { background: #F97316; box-shadow: 0 0 6px #F97316; }
.wr-marker-high     .wr-marker-ring { color: #F97316; }
.wr-marker-medium   .wr-marker-dot { background: #FACC15; }
.wr-marker-medium   .wr-marker-ring { color: #FACC15; animation-duration: 3s; }
.wr-marker-low      .wr-marker-dot { background: #22C55E; }
.wr-marker-low      .wr-marker-ring { color: #22C55E; animation-duration: 4s; }
.wr-marker-fixed    .wr-marker-dot { background: #34C759; }
.wr-marker-fixed    .wr-marker-ring { display: none; }
