/* ═══════════════════════════════════════════
   RESET + ROOT
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #F2F4F7;
  --s1:        #FFFFFF;
  --s2:        #F7F8FA;
  --s3:        #EEF0F4;
  --line:      rgba(0,0,0,.07);
  --a:         #4F6BFF;
  --a2:        #7C3AED;
  --grad:      linear-gradient(135deg, #4F6BFF, #7C3AED);
  --aglow:     rgba(79,107,255,.25);
  --danger:    #EF4444;
  --success:   #10B981;
  --warn:      #F59E0B;
  --t1:        #111827;
  --t2:        #6B7280;
  --t3:        #9CA3AF;
  --radius:    16px;
  --radius-sm: 12px;
  --safe-b:    env(safe-area-inset-bottom, 0px);
  --safe-t:    env(safe-area-inset-top, 0px);
  --glass:     rgba(255,255,255,.88);
  --glass-bdr: 1px solid rgba(0,0,0,.06);
  --glass-shadow: 0 2px 12px rgba(0,0,0,.08);
  --desktop-sidebar-width: 360px;
  --heat-low:  #2563eb;
  --heat-mid:  #0ea5e9;
  --heat-warm: #22c55e;
  --heat-hot:  #f59e0b;
  --heat-max:  #ef4444;
}

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
}

html.report-page-html,
body.report-page {
  overflow: auto;
}

body {
  font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--t1);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

body.report-page {
  overflow: auto;
  background: linear-gradient(180deg, #eef4ff 0%, #f7f9fc 100%);
}

.report-page-shell {
  min-height: 100dvh;
  padding: 0;
}

.report-page-card {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  border: 0;
  display: flex;
  flex-direction: column;
}

.report-page-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #eceef2;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
}

.report-page-back {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6f7380;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.report-page-heading {
  min-width: 0;
}

.report-page-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: #1a181e;
}

.report-page-card .rs-scroll {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
  padding-bottom: calc(var(--safe-b) + 104px);
}

.report-page-card .rs-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  margin-top: 0;
  background: #fff;
  box-shadow: 0 -8px 24px rgba(15, 15, 15, 0.06);
}

/* ═══════════════════════════════════════════
   MAP — full screen, always visible
═══════════════════════════════════════════ */
#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at top left, rgba(215, 244, 230, 0.34), transparent 34%),
    radial-gradient(circle at bottom right, rgba(201, 235, 248, 0.24), transparent 30%),
    linear-gradient(180deg, #d9f0e5 0%, #e7f5ec 56%, #dff2ea 100%);
}

.leaflet-container {
  background: transparent;
  font-family: 'Inter', sans-serif;
}
.leaflet-tile-pane {
  filter: saturate(.82) contrast(.94) brightness(1.08) hue-rotate(-12deg) sepia(.08);
}
.leaflet-overlay-pane canvas {
  filter: saturate(.92) contrast(.98) brightness(1.02);
}
.leaflet-control-zoom {
  border: none !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(60, 64, 67, 0.22) !important;
  margin-top: calc(var(--safe-t) + 86px) !important;
  margin-right: 14px !important;
}
.leaflet-control-zoom a {
  background: #fff !important;
  backdrop-filter: none !important;
  color: #3c4043 !important;
  border-bottom: 1px solid #e5e7eb !important;
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  font-size: 18px !important;
}
.leaflet-control-zoom a:hover {
  background: #f8fafc !important;
  color: #1a73e8 !important;
}

.leaflet-popup-content-wrapper {
  background: var(--glass) !important;
  backdrop-filter: blur(20px) !important;
  border: var(--glass-bdr) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.12) !important;
  color: var(--t1) !important;
}
.leaflet-popup-tip, .leaflet-popup-tip-container { display: none !important; }
.leaflet-popup-content { margin: 14px 16px !important; font-size: 13px !important; line-height: 1.5 !important; }
.leaflet-popup-close-button { color: var(--t2) !important; top: 8px !important; right: 8px !important; }
.leaflet-control-attribution {
  background: rgba(255,255,255,.74) !important;
  color: rgba(58, 74, 98, .48) !important;
  font-size: 9px !important;
  border-radius: 8px 0 0 0 !important;
  backdrop-filter: none !important;
}
.leaflet-control-attribution a { color: rgba(58, 74, 98, .56) !important; }
.leaflet-marker-pane,
.leaflet-shadow-pane,
.leaflet-popup-pane,
.leaflet-control-container {
  filter: none;
}

.popup-vio { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.popup-loc { color: var(--t2); font-size: 12px; }

/* ═══════════════════════════════════════════
   MAP OVERLAYS
═══════════════════════════════════════════ */
.map-topbar {
  position: absolute;
  top: calc(var(--safe-t) + 12px);
  left: 14px; right: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.mtp-title, .mtp-count {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--glass-bdr);
  border-radius: 99px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  pointer-events: auto;
  box-shadow: var(--glass-shadow);
}
.mtp-title { color: var(--t1); }
.mtp-count { color: var(--t2); }
.mtp-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

.map-filters {
  position: absolute;
  top: calc(var(--safe-t) + 16px);
  left: 0; right: 0;
  z-index: 10;
  pointer-events: none;
}
.mf-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  touch-action: pan-x;
  align-items: center;
}
.mf-scroll::-webkit-scrollbar { display: none; }

.mf-chip {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 16px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 999px;
  color: #3c4043;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
  -webkit-tap-highlight-color: transparent;
}
.mf-chip:active { transform: scale(.94); }
.mf-chip.active {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.4);
}

.map-legend {
  display: none;
}
.ml-bar {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--heat-low), var(--heat-mid), var(--heat-warm), var(--heat-hot), var(--heat-max));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 6px 16px rgba(37, 99, 235, 0.18);
  margin-bottom: 7px;
}
.ml-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #667085;
}

/* ═══════════════════════════════════════════
   MAP MARKERS
═══════════════════════════════════════════ */
.mpin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--marker-size, 42px);
  height: var(--marker-size, 42px);
}
.mpin-core {
  position: relative;
  z-index: 2;
  width: calc(var(--marker-size, 42px) - 4px);
  height: calc(var(--marker-size, 42px) - 4px);
  border-radius: 999px;
  border: 2px solid rgba(255, 252, 250, 0.96);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.24), transparent 34%),
    radial-gradient(circle at 76% 78%, rgba(255, 171, 158, 0.78) 0%, rgba(255, 171, 158, 0.78) 20%, rgba(255, 171, 158, 0) 50%),
    linear-gradient(135deg, #ef5350 0%, #e44747 58%, #cf3d3d 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: var(--marker-font-size, 18px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 8px 18px rgba(218, 136, 155, 0.28);
}
.mpin::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 0 0 2px rgba(255, 249, 246, 0.9);
}
.mpin::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(239, 83, 80, 0.2) 0%, rgba(239, 83, 80, 0.08) 58%, rgba(239, 83, 80, 0) 76%);
  z-index: 1;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   FAB — Floating Action Button
═══════════════════════════════════════════ */
.fab {
  position: absolute;
  bottom: calc(var(--safe-b) + 81px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 184px;
  padding: 14px 24px 14px 12px;
  background: linear-gradient(90deg, #3f8cff 0%, #2570ea 100%);
  border: none;
  border-radius: 99px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 2px rgba(255,255,255,1), inset 0 1px 148px rgba(255,255,255,.08), inset 0 -8px 29px rgba(255,255,255,.17), 0 6px 24px rgba(37,112,234,.28);
  transition: bottom .28s cubic-bezier(.32,.72,0,1), transform .15s, box-shadow .15s, opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
  overflow: visible;
}
.fab.fab-raised {
  bottom: calc(var(--safe-b) + min(50dvh, 420px) + 20px);
}
.fab-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fab-label {
  white-space: nowrap;
}
.fab:active {
  transform: translateX(-50%) scale(.94);
  box-shadow: inset 0 0 2px rgba(255,255,255,.92), inset 0 1px 148px rgba(255,255,255,.06), inset 0 -8px 29px rgba(255,255,255,.12), 0 3px 12px rgba(37,112,234,.24);
}
.fab.hidden-fab {
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   VIOLATIONS SHEET
═══════════════════════════════════════════ */
.violations-sheet {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  visibility: visible;
}
.violations-sheet[data-state="peek"] {
  display: block;
  pointer-events: none;
}
.violations-sheet[data-state="open"] {
  display: block;
  pointer-events: none;
}
.violations-sheet[data-state="hidden"] {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.violations-sheet-panel {
  position: absolute;
  inset: auto 0 0 0;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  background: rgba(255,255,255,.98);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(calc(100% - 54px - env(safe-area-inset-bottom, 0px)));
  transform-origin: bottom center;
  transition: transform .32s cubic-bezier(.32,.72,0,1), height .32s cubic-bezier(.32,.72,0,1), max-height .32s cubic-bezier(.32,.72,0,1), border-radius .24s ease, box-shadow .24s ease;
  box-shadow: 0 -6px 24px rgba(26,24,30,.08);
  pointer-events: auto;
  will-change: transform;
  touch-action: pan-y;
}
.violations-sheet .rs-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 54px;
  padding: 6px 16px 10px;
  border-bottom-color: transparent;
  cursor: pointer;
}
.violations-sheet .rs-handle {
  margin: 0 auto 8px;
  background: #d9d7d7;
}
.violations-sheet .rs-header-row {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease;
  height: auto;
  overflow: visible;
}
.violations-sheet .rs-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: #1a181e;
}
.violations-sheet[data-state="peek"] .report-list-view,
.violations-sheet[data-state="hidden"] .report-list-view {
  display: none;
}
.violations-sheet[data-state="open"] .violations-sheet-panel {
  transform: translateY(0);
  height: min(50dvh, 420px);
  max-height: min(50dvh, 420px);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -14px 36px rgba(26,24,30,.12);
}
.violations-sheet[data-state="open"] .report-list-view {
  display: block;
}
.violations-sheet[data-state="open"] .rs-header {
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 12px;
  border-bottom-color: #f0f0f0;
}
.violations-sheet[data-state="open"] .rs-header-row {
  opacity: 1;
  transform: translateY(0);
  height: auto;
  margin-top: 0;
}

/* ═══════════════════════════════════════════
   REPORT SHEET — overlay form
═══════════════════════════════════════════ */
.report-sheet {
  position: absolute;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}
.report-sheet.open {
  pointer-events: all;
  visibility: visible;
}
.report-sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0.22);
}
.report-sheet-panel {
  position: absolute;
  inset: auto 0 0 0;
  height: 78vh;
  max-height: 78vh;
  background: #fff;
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transform-origin: bottom center;
  transition: transform .38s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -10px 32px rgba(26,24,30,.12);
  will-change: transform;
}
.report-sheet.open .report-sheet-panel {
  transform: translateY(0);
}

/* Header */
.rs-header {
  flex-shrink: 0;
  background: var(--s1);
  padding: 8px 16px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.rs-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.rs-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: #1a181e;
}
.rs-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #dedcdc;
  margin: 0 auto 12px;
}

/* Scrollable form area */
.rs-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 16px;
}
.rs-scroll::-webkit-scrollbar { display: none; }

.report-list-view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}
.report-list-view::-webkit-scrollbar { display: none; }
.report-list-item {
  width: 100%;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e3e3e3;
  border-radius: 0;
  padding: 16px;
  text-align: left;
  font-family: inherit;
  margin-bottom: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-list-item.is-active {
  background: #f8fbff;
}
.report-list-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.report-list-vehicle {
  font-size: 14px;
  line-height: 20px;
  color: #272727;
  font-weight: 500;
  letter-spacing: 0.035px;
  margin-bottom: 0;
}
.report-list-subline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.report-list-tags {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
  width: 100%;
}
.report-list-tag {
  font-size: 13px;
  line-height: 20px;
  padding: 0 6px;
  border-radius: 2px;
  background: #e6e6e6;
  color: #757575;
  font-weight: 400;
}
.report-list-more {
  font-size: 13px;
  line-height: 20px;
  color: #757575;
  font-weight: 400;
  white-space: nowrap;
}
.report-list-location {
  font-size: 13px;
  line-height: 18px;
  color: #757575;
  font-weight: 400;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-list-separator {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #d9d9d9;
  flex: 0 0 auto;
}
.report-list-meta {
  font-size: 13px;
  line-height: 18px;
  color: #757575;
  white-space: nowrap;
  flex: 0 0 auto;
}
.report-list-empty {
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 20px;
  color: #757575;
}

.detail-sheet {
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  visibility: hidden;
}

.detail-sheet.open {
  pointer-events: none;
  visibility: visible;
}

.detail-sheet-scrim {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.detail-sheet-panel {
  position: absolute;
  inset: auto 0 0 0;
  height: min(50dvh, 420px);
  max-height: min(50dvh, 420px);
  background: #fff;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -12px 32px rgba(26,24,30,.14);
  pointer-events: auto;
}

.detail-sheet.open .detail-sheet-panel {
  transform: translateY(0);
}

.detail-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 calc(var(--safe-b) + 16px);
}

.detail-sheet-body::-webkit-scrollbar {
  display: none;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px;
  border-bottom: 1px solid #e3e3e3;
  background: #fff;
}

.detail-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.detail-vehicle {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 0.04px;
  color: #272727;
}

.detail-meta-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.detail-location,
.detail-time {
  font-size: 14px;
  line-height: 20px;
  color: #757575;
  font-weight: 400;
}

.detail-location {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.detail-reporter {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 0.04px;
  color: #272727;
}

.detail-note {
  font-size: 14px;
  line-height: 20px;
  color: #757575;
  font-weight: 400;
}

.detail-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.detail-image-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.detail-image {
  width: 100%;
  height: 153px;
  object-fit: cover;
  display: block;
  background: #d9d9d9;
}

.detail-image-grid-single .detail-image {
  width: 159px;
  max-width: 100%;
}

.detail-sheet .rs-header-row {
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.detail-sheet-close {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #757575;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* Pinned CTA at bottom of sheet */
.rs-cta {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: #fff;
  border-top: 1px solid #e8e8e8;
}

.report-label-row {
  margin-bottom: 8px;
}

#report-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.violations-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #96a0b5;
}
.req { color: #ef4444; }

.field-wrap-inline {
  position: relative;
}

.sheet-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  background: #fff;
  color: #1a181e;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  line-height: 20px;
  padding: 13px 16px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.sheet-input::placeholder {
  color: #757575;
}
.sheet-input:focus {
  border-color: #2570ea;
  box-shadow: 0 0 0 3px rgba(37,112,234,.08);
}
.sheet-input-location {
  padding-right: 52px;
}
.sheet-inline-action {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #757575;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-strip-section {
  margin-bottom: 14px;
}
.photo-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.photo-add-btn {
  border: 1px solid #d9def5;
  background: #f7f9ff;
  color: #275fd6;
  border-radius: 999px;
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.photo-add-plus {
  font-size: 16px;
  line-height: 1;
}
.photo-strip-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.photo-strip-list::-webkit-scrollbar { display: none; }
.photo-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(17,24,39,.72);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.upload-hint {
  font-size: 12px;
  color: #8f8f8f;
}

/* ═══════════════════════════════════════════
   VIOLATION TILES
═══════════════════════════════════════════ */
.vtile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
  margin-bottom: 12px;
}

.vtile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  color: #6b7280;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.vtile:active { transform: scale(.96); }
.vtile.sel {
  background: #fff;
  border-color: #e3e3e3;
  color: #1a181e;
  box-shadow: none;
}
.vt-emoji {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0;
}
.vt-label {
  flex: 1;
  line-height: 1.3;
  padding-right: 28px;
}
.vt-tick {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #2570ea;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  opacity: 0;
  transition: opacity .18s, transform .25s cubic-bezier(.34,1.56,.64,1);
}
.vtile.sel .vt-tick { opacity: 1; transform: translateY(-50%) scale(1); }

/* ═══════════════════════════════════════════
   INPUTS
═══════════════════════════════════════════ */
.textarea-wrap { position: relative; }
.report-textarea-wrap {
  margin-bottom: 8px;
}
.report-textarea {
  min-height: 48px;
  resize: none;
  padding-top: 14px;
}

#gps-btn.pulsing {
  color: var(--a); border-color: var(--a);
  animation: iconPulse .9s ease-in-out infinite alternate;
}
@keyframes iconPulse {
  from { box-shadow: none; }
  to   { box-shadow: 0 0 0 4px rgba(79,107,255,.15); }
}

.field-error {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--danger); margin-top: -4px;
  padding-left: 2px; font-weight: 500;
  margin-bottom: 8px;
}

.geocode-row {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 8px; background: var(--s2);
  border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px;
}
.geo-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--a); animation: geoBlink 1.3s ease-in-out infinite;
}
@keyframes geoBlink {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .25; transform: scale(.55); }
}
.geocode-text { font-size: 12px; color: var(--t2); }

/* ═══════════════════════════════════════════
   CTA BUTTON
═══════════════════════════════════════════ */
.cta-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #3f8cff 0%, #2570ea 100%);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: inset 0 0 2px rgba(255,255,255,1), inset 0 1px 148px rgba(255,255,255,.08), inset 0 -8px 29px rgba(255,255,255,.17);
  transition: opacity .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.cta-btn:active { transform: scale(.97); }
.cta-btn:disabled { opacity: .45; }
.cta-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.2) 50%, transparent 65%);
  transform: translateX(-100%);
}
.cta-btn:not(:disabled):active::after { animation: ctaSweep .4s ease forwards; }
@keyframes ctaSweep { to { transform: translateX(110%); } }

.cta-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
.app-toast {
  position: fixed;
  bottom: calc(var(--safe-b) + 100px);
  left: 16px; right: 16px;
  z-index: 2000;
  background: var(--s1);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  transform: translateY(120%);
  opacity: 0;
  transition: transform .38s cubic-bezier(.34,1.56,.64,1), opacity .3s;
}
.app-toast.show { transform: translateY(0); opacity: 1; }

.toast-check {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.2);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#toast-msg { flex: 1; font-size: 14px; font-weight: 600; color: var(--t1); }

/* ═══════════════════════════════════════════
   UTIL
═══════════════════════════════════════════ */
.hidden { display: none !important; }

@media (max-width: 599px) {
  .leaflet-control-zoom {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════
   TABLET+
═══════════════════════════════════════════ */
@media (min-width: 600px) {
  .fab {
    bottom: calc(var(--safe-b) + 81px);
  }
  .fab.fab-raised {
    bottom: calc(var(--safe-b) + min(50dvh, 420px) + 24px);
  }

  .report-sheet-panel {
    max-width: 380px;
    left: auto;
    right: 20px;
    border-radius: 12px;
    bottom: 20px;
    height: 78vh;
    max-height: 78vh;
  }
  .violations-sheet-panel {
    max-width: 380px;
    left: auto;
    right: 20px;
    bottom: 20px;
    border-radius: 18px;
    height: 54px;
    max-height: 54px;
  }
  .violations-sheet[data-state="open"] .violations-sheet-panel {
    height: min(50dvh, 420px);
    max-height: min(50dvh, 420px);
  }

  .map-legend {
    top: calc(var(--safe-t) + 88px);
    right: 20px;
  }
  .report-sheet-scrim { background: transparent; }
}

@media (min-width: 1024px) {
  .map-filters {
    top: 16px;
    left: calc(var(--desktop-sidebar-width) + 40px);
    right: 24px;
  }

  .mf-scroll {
    padding: 0;
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible;
    max-width: 760px;
  }

  .mf-chip {
    min-height: 40px;
    padding: 0 16px;
  }

  .mf-chip.active {
    box-shadow: 0 1px 3px rgba(26, 115, 232, 0.4);
  }

  .map-legend {
    top: 58px;
    right: 24px;
  }

  .leaflet-control-zoom {
    display: none !important;
  }

  .fab {
    left: calc(var(--desktop-sidebar-width) + 24px);
    bottom: 28px;
    transform: none;
  }

  .fab:active {
    transform: scale(.97);
  }

  .fab.hidden-fab {
    transform: translateY(100px);
  }

  .fab.fab-raised {
    bottom: 28px;
  }

  .violations-sheet {
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--desktop-sidebar-width);
    pointer-events: all;
  }

  .violations-sheet-panel {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: var(--desktop-sidebar-width);
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 0;
    transform: none;
    box-shadow: 8px 0 24px rgba(17, 24, 39, 0.08);
    border: 0;
    border-right: 1px solid rgba(17, 24, 39, 0.08);
  }

  .violations-sheet[data-state="peek"] .violations-sheet-panel {
    height: 96px;
    min-height: 96px;
    max-height: 96px;
    overflow: hidden;
  }

  .violations-sheet[data-state="open"] .violations-sheet-panel {
    height: auto;
    max-height: none;
    border-radius: 0;
  }

  .violations-sheet .rs-header {
    min-height: 56px;
    padding: 4px 20px;
    cursor: default;
  }

  .violations-sheet .rs-handle {
    display: none;
  }

  .violations-sheet .rs-title {
    font-size: 16px;
    line-height: 22px;
  }

  .violations-sheet[data-state="open"] .rs-header {
    min-height: 56px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .report-list-view {
    padding: 0;
  }

  .report-list-item {
    border-radius: 0;
    padding: 16px;
  }

  .detail-sheet-scrim {
    display: none;
  }

  .detail-sheet-panel {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: var(--desktop-sidebar-width);
    height: auto;
    max-height: none;
    border-radius: 16px 16px 0 0;
  }

  .report-sheet-panel {
    top: 24px;
    bottom: 24px;
    right: 24px;
    width: min(400px, calc(100vw - 96px));
    max-width: none;
    height: auto;
    max-height: none;
    border-radius: 24px;
  }

  .report-sheet-scrim {
    background: rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(2px);
  }

  .app-toast {
    left: calc(var(--desktop-sidebar-width) + 48px);
    right: auto;
    width: min(360px, calc(100vw - var(--desktop-sidebar-width) - 72px));
    bottom: 32px;
  }
}
