/* ============================================================
   VENEZUELA ALERTA SÍSMICA — Estilos v2
   Mobile-first · Bottom-sheet pattern · Inter font
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --brand:      #C8102E;
  --brand-dark: #9B0B22;
  --urgent:     #DC2626;
  --warning:    #D97706;
  --success:    #059669;
  --info:       #2563EB;
  --gray-50:    #F9FAFB;
  --gray-100:   #F3F4F6;
  --gray-200:   #E5E7EB;
  --gray-400:   #9CA3AF;
  --gray-600:   #4B5563;
  --gray-800:   #1F2937;
  --gray-900:   #111827;
  --surface:    #FFFFFF;
  --header-bg:  #0A0F1E;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.10), 0 4px 6px rgba(0,0,0,0.05);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --header-h: 56px;
  --nav-h:    68px;
  --flag-h:   4px;
}

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
  overflow: hidden;
}

/* ============================================================
   VENEZUELAN FLAG STRIP
   ============================================================ */
.flag-strip {
  height: var(--flag-h);
  background: linear-gradient(to right,
    #CF142B 0%, #CF142B 33.33%,
    #F4AE1F 33.33%, #F4AE1F 66.66%,
    #003087 66.66%, #003087 100%
  );
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  flex-shrink: 0;
}

/* ============================================================
   OFFLINE BANNER
   ============================================================ */
.offline-banner {
  position: fixed;
  top: var(--flag-h);
  left: 0;
  right: 0;
  background: #92400E;
  color: #FEF3C7;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  padding: 8px 16px;
  z-index: 999;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  line-height: 1.4;
}
.offline-banner.visible {
  transform: translateY(0);
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  height: var(--header-h);
  background: var(--header-bg);
  color: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 12px 0 16px;
  gap: 10px;
  position: fixed;
  top: var(--flag-h);
  left: 0;
  right: 0;
  z-index: 998;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), var(--shadow-md);
}

.header-logo {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
}
.header-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  border-radius: 8px;
  letter-spacing: -0.03em;
}

.header-text {
  flex: 1;
  min-width: 0;
}

.header-text h1 {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-text p {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-pills {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
}

.stat-pill {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 0.62rem;
  text-align: center;
  line-height: 1.25;
  color: rgba(255,255,255,0.85);
}
.stat-pill strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--surface);
}

/* ============================================================
   MAP — always full screen behind sheets
   ============================================================ */
#map-container {
  position: fixed;
  top: calc(var(--flag-h) + var(--header-h));
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

#map {
  width: 100%;
  height: 100%;
}

/* ============================================================
   MAP LEGEND
   ============================================================ */
.map-legend {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 12px;
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  line-height: 2;
  color: var(--gray-800);
}
.map-legend div {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Indicadores de color sobrios (reemplazan emojis circulares) */
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-trapped  { background: var(--urgent); }
.dot-building { background: var(--warning); }
.dot-missing  { background: var(--info); }
.dot-center   { background: var(--success); }
.dot-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

/* Iconos serios basados en caracteres tipográficos */
.icon-refresh::before { content: '↻'; }
.icon-check::before   { content: '✓'; color: var(--success); }
.icon-cross::before   { content: '✕'; color: var(--urgent); }
.icon-warning::before { content: '▲'; color: var(--warning); }
.icon-pin::before     { content: '◆'; color: var(--brand); }
.icon-calendar::before{ content: '◈'; color: var(--gray-600); }
.icon-phone::before   { content: '☎'; color: var(--gray-600); }
.icon-map::before     { content: '⌖'; color: var(--gray-600); }
.icon-location::before{ content: '⌖'; color: var(--brand); }
.icon-alert::before   { content: '!'; font-weight: 800; color: var(--urgent); }

/* ============================================================
   CUSTOM MAP MARKERS
   ============================================================ */
.map-marker {
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
  border: 2.5px solid rgba(255,255,255,0.85);
}

.map-marker .inner {
  transform: rotate(45deg);
  font-size: 1.1rem;
  line-height: 1;
}

.marker-trapped  { background: var(--urgent); }
.marker-building { background: var(--warning); }
.marker-missing  { background: var(--info); }
.marker-center   { background: var(--success); }

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.60); }
  50%       { box-shadow: 0 0 0 12px rgba(220,38,38,0); }
}
.marker-trapped {
  animation: markerPulse 1.6s infinite;
}

/* ============================================================
   LEAFLET POPUP OVERRIDE
   ============================================================ */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  font-family: 'Inter', inherit !important;
  box-shadow: var(--shadow-lg) !important;
}
.leaflet-popup-content {
  font-size: 0.85rem !important;
  margin: 14px 16px !important;
  line-height: 1.5 !important;
}
.popup-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 5px;
  color: var(--gray-900);
}
.popup-detail {
  color: var(--gray-600);
  font-size: 0.78rem;
  margin-bottom: 2px;
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: stretch;
  z-index: 500;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.10);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.6rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--gray-400);
  transition: color 0.15s;
  padding: 6px 2px;
  min-height: 48px;
  position: relative;
}

.nav-btn .nav-icon {
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.15s;
}

.nav-btn.active {
  color: var(--brand);
}
.nav-btn.active .nav-icon {
  transform: scale(1.12);
}

/* center REPORTAR button */
.nav-btn-report {
  flex: 0 0 auto;
  width: 90px;
  margin: 0 4px;
  position: relative;
  bottom: 10px;
  height: calc(var(--nav-h) + 10px);
  align-self: flex-end;
}

.nav-btn-report-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--urgent);
  color: var(--surface);
  border-radius: 9999px;
  width: 100%;
  height: 54px;
  box-shadow: 0 4px 16px rgba(220,38,38,0.45), 0 2px 4px rgba(0,0,0,0.20);
  font-size: 0.6rem;
  font-weight: 700;
  font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.nav-btn-report-inner:active {
  background: var(--brand-dark);
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(220,38,38,0.30);
}
.nav-btn-report-inner .nav-icon {
  font-size: 1.4rem;
}

/* ============================================================
   BOTTOM SHEET SYSTEM
   ============================================================ */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 1050;
  transition: background 0.3s ease;
  pointer-events: none;
}
.sheet-overlay.visible {
  background: rgba(0,0,0,0.45);
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  max-height: 95vh;
  will-change: transform;
}

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

/* height variants */
.bottom-sheet.sh-partial {
  max-height: 72vh;
}
.bottom-sheet.sh-tall {
  max-height: 90vh;
}
.bottom-sheet.sh-full {
  max-height: 95vh;
}

.sheet-handle-bar {
  width: 40px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 10;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.sheet-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.sheet-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.sheet-close:hover { background: var(--gray-200); color: var(--gray-900); }
.sheet-close:active { transform: scale(0.95); }

.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 16px 20px 20px;
}

/* sheet with no header padding */
.sheet-body.no-pad {
  padding: 0;
}

/* ============================================================
   REPORT PICKER SHEET — 4 big cards
   ============================================================ */
.report-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 4px 0 8px;
}

.report-type-card {
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
  min-height: 120px;
}
.report-type-card:active {
  transform: scale(0.97);
}

.report-type-card.urgent-card   { background: #FEF2F2; }
.report-type-card.missing-card  { background: #EFF6FF; }
.report-type-card.building-card { background: #FFFBEB; }
.report-type-card.center-card   { background: #ECFDF5; }

.rtc-icon {
  font-size: 2rem;
  line-height: 1;
}
.rtc-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}
.rtc-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-600);
  line-height: 1.3;
}
.rtc-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.04em;
}
.rtc-badge.urgente { background: var(--urgent); color: white; }
.rtc-badge.info    { background: var(--info);   color: white; }
.rtc-badge.warning { background: var(--warning); color: white; }
.rtc-badge.success { background: var(--success); color: white; }

/* ============================================================
   SISMOS FAB (floating chip) + USGS PANEL
   ============================================================ */
.sismos-fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  right: 12px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  z-index: 200;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.sismos-fab:hover  { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.sismos-fab:active { transform: translateY(0); }

/* Map legend additions */
.legend-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 5px 0;
}
.legend-circle {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.8);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Stat pill variant for sismos */
.stat-pill-sismos {
  background: rgba(253, 224, 71, 0.18);
  border-color: rgba(253, 224, 71, 0.3);
}

/* Sismos summary card */
.sismos-summary-card {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--gray-200);
}
.sismos-summary-loader {
  font-size: 0.85rem;
  color: var(--gray-400);
  text-align: center;
  padding: 8px 0;
}
.sismos-summary-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sismos-summary-mag {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -1px;
}
.sismos-summary-info {
  flex: 1;
  min-width: 0;
}
.sismos-summary-info strong {
  font-size: 0.82rem;
  display: block;
  margin-bottom: 2px;
}
.sismos-summary-info p {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-bottom: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sismos-summary-total {
  text-align: center;
  flex-shrink: 0;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.sismos-summary-total span {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gray-900);
}
.sismos-summary-total small {
  font-size: 0.65rem;
  color: var(--gray-400);
  display: block;
  margin-top: 3px;
}

/* Controls row */
.sismos-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.sismos-controls .filter-chips {
  margin-bottom: 0;
  flex: 1;
}
.btn-refresh {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--gray-600);
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-refresh:hover    { background: var(--gray-200); }
.btn-refresh:disabled { opacity: 0.5; cursor: not-allowed; }

/* Sismo list items */
.sismo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.sismo-item:last-child { border-bottom: none; }

.mag-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.mag-num {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.mag-lbl {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: 0.9;
}

.sismo-info    { flex: 1; min-width: 0; }
.sismo-place   {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sismo-meta {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-bottom: 1px;
}
.sismo-ago    { color: var(--brand); font-weight: 600; }

.btn-map-pin {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-map-pin:hover { opacity: 1; transform: scale(1.2); }

/* Source attribution */
.sismos-source {
  font-size: 0.7rem;
  color: var(--gray-400);
  text-align: center;
  padding: 14px 0 4px;
  border-top: 1px solid var(--gray-100);
  margin-top: 8px;
}

/* ============================================================
   REAL-TIME TRAPPED ALERT
   ============================================================ */
.trapped-alert {
  position: fixed;
  top: calc(var(--flag-h) + var(--header-h) + 10px);
  left: 12px;
  right: 12px;
  background: var(--urgent);
  color: white;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  z-index: 900;
  box-shadow: 0 8px 24px rgba(220,38,38,0.40);
  animation: alertSlideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
@keyframes alertSlideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.trapped-alert-icon { font-size: 1.8rem; flex-shrink: 0; }
.trapped-alert-body { flex: 1; }
.trapped-alert-title {
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 3px;
}
.trapped-alert-msg {
  font-size: 0.78rem;
  opacity: 0.90;
}
.trapped-alert-close {
  background: rgba(255,255,255,0.20);
  border: none;
  color: white;
  font-size: 1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
}
.trapped-alert.fade-out {
  animation: alertFadeOut 0.4s ease forwards;
}
@keyframes alertFadeOut {
  to { opacity: 0; transform: translateY(-12px); }
}

/* ============================================================
   SEARCH SHEET CONTENT
   ============================================================ */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.search-box input { flex: 1; }
.search-box button { width: auto; flex-shrink: 0; }

.filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 7px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 9999px;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-600);
  transition: all 0.15s;
  font-family: inherit;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--surface);
}

/* ============================================================
   SECTION HEADER inside sheets
   ============================================================ */
.section-head {
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}
.section-head p {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}
.card-urgent   { border-left: 4px solid var(--urgent); }
.card-warning  { border-left: 4px solid var(--warning); }
.card-success  { border-left: 4px solid var(--success); }
.card-info     { border-left: 4px solid var(--info); }

.card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--gray-900);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 16px; }

label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

/* Required field indicator — red dot */
label .req-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--urgent);
  flex-shrink: 0;
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Inter', inherit;
  color: var(--gray-900);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.10);
}

input.field-error, select.field-error, textarea.field-error {
  border-color: var(--urgent);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
}

.field-error-msg {
  font-size: 0.72rem;
  color: var(--urgent);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 380px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---- GPS location input ---- */
.location-group { position: relative; }

.location-group input {
  padding-right: 90px;
}

.gps-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 11px;
  background: var(--info);
  color: var(--surface);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  min-height: 36px;
  transition: background 0.15s;
}
.gps-btn:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
}

.gps-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.gps-btn.loading .gps-spinner { display: block; }
.gps-btn.loading .gps-icon    { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.gps-status {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-top: 5px;
}
.gps-status.ok  { color: var(--success); }
.gps-status.err { color: var(--urgent); }

/* ---- Address autocomplete ---- */
.address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  z-index: 20;
  list-style: none;
  padding: 4px 0;
}
.address-suggestions:empty { display: none; }
.address-suggestions li {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--gray-700);
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
}
.address-suggestions li:last-child { border-bottom: none; }
.address-suggestions li:hover,
.address-suggestions li:focus {
  background: var(--gray-50);
}
.address-suggestions li strong {
  display: block;
  font-weight: 600;
  color: var(--gray-900);
}
.address-suggestions li small {
  display: block;
  color: var(--gray-500);
  font-size: 0.72rem;
  margin-top: 2px;
}

/* ---- Photo upload ---- */
.photo-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 600;
}
.photo-label-tag {
  font-size: 0.72rem;
  font-weight: 500;
  background: #FEF3C7;
  color: #92400E;
  padding: 2px 8px;
  border-radius: 99px;
}
.photo-upload {
  border: 2.5px dashed var(--brand);
  border-radius: var(--radius-md);
  background: #FFF5F5;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}
.photo-upload:hover { background: #FFE8E8; }
.photo-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.photo-upload-body {
  padding: 24px 16px 20px;
}
.photo-upload-icon { font-size: 2.6rem; }
.photo-upload-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand);
  margin-top: 8px;
}
.photo-upload-hint {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 4px;
}
.photo-preview {
  width: 100%;
  max-height: 220px;
  display: none;
  object-fit: cover;
  border-radius: 0;
}
.photo-remove {
  display: block;
  width: 100%;
  padding: 6px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 3;
}
.photo-tip {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 6px;
}
.photo-warning {
  font-size: 0.82rem;
  color: #92400E;
  background: #FEF3C7;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-text-link {
  background: none;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.btn-text-link-cancel { color: var(--gray-400); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Inter', inherit;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  text-align: center;
  line-height: 1;
  min-height: 52px;
  letter-spacing: -0.01em;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  color: var(--surface);
  box-shadow: 0 2px 8px rgba(200,16,46,0.30);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }

.btn-green {
  background: var(--success);
  color: var(--surface);
  box-shadow: 0 2px 8px rgba(5,150,105,0.30);
}
.btn-green:hover:not(:disabled) { background: #047857; }

.btn-blue {
  background: var(--info);
  color: var(--surface);
}
.btn-blue:hover:not(:disabled) { background: #1d4ed8; }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-800);
  border: 1.5px solid var(--gray-300);
}
.btn-secondary:hover:not(:disabled) { background: var(--gray-200); }

.btn-danger {
  background: #DC2626;
  color: #fff;
  border: none;
}
.btn-danger:hover:not(:disabled) { background: #B91C1C; }

.btn-warning {
  background: var(--warning);
  color: #fff;
  border: none;
}
.btn-warning:hover:not(:disabled) { filter: brightness(0.92); }

.btn-outline {
  background: var(--surface);
  color: var(--brand);
  border: 2px solid var(--brand);
  box-shadow: none;
}

.btn-urgent {
  background: var(--urgent);
  color: var(--surface);
  box-shadow: 0 2px 12px rgba(220,38,38,0.40);
  animation: urgentGlow 2s infinite;
}
@keyframes urgentGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.40); }
  50%       { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}

.btn-sm {
  padding: 10px 16px;
  font-size: 0.82rem;
  min-height: 40px;
  width: auto;
}
.btn-xs {
  padding: 6px 12px;
  font-size: 0.72rem;
  min-height: 32px;
  width: auto;
  border-radius: 9999px;
}

.btn-row {
  display: flex;
  gap: 10px;
}
.btn-row .btn { flex: 1; }

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.form-actions .btn { width: 100%; }

/* loading state */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
  flex-shrink: 0;
}
.btn.loading .btn-spinner { display: block; }
.btn.loading .btn-text    { opacity: 0.75; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
}
.badge-missing { background: #FEF3C7; color: #92400E; }
.badge-found   { background: #D1FAE5; color: #065F46; }
.badge-urgent  { background: #FEE2E2; color: #991B1B; }
.badge-open    { background: #D1FAE5; color: #065F46; }
.badge-full    { background: #FEE2E2; color: #991B1B; }
.badge-closed  { background: var(--gray-100); color: var(--gray-600); }

/* ============================================================
   CENTER CARDS
   ============================================================ */
.center-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--gray-100);
  border-left: 4px solid var(--success);
}
.center-card.full   { border-left-color: var(--urgent); }
.center-card.closed { border-left-color: var(--gray-400); }
.center-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--gray-900);
}
.center-card p {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 3px;
}

.needs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.need-tag {
  background: #EFF6FF;
  color: var(--info);
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* ============================================================
   EMERGENCY CONTACTS SHEET
   ============================================================ */
.contact-list { list-style: none; }
.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.contact-list li:last-child { border-bottom: none; }
.contact-icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-text { flex: 1; }
.contact-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-900);
}
.contact-text small {
  font-size: 0.75rem;
  color: var(--gray-400);
}
.contact-number {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}

/* ============================================================
   TIPS GRID
   ============================================================ */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tip-card {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-sm);
  padding: 12px;
}
.tip-card.danger { background: #FFF1F2; border-color: #FCA5A5; }
.tip-card h5 {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--gray-900);
}
.tip-card ul {
  font-size: 0.72rem;
  color: var(--gray-600);
  padding-left: 14px;
}
.tip-card li { margin-bottom: 3px; }

/* ============================================================
   CHECKBOX GRID
   ============================================================ */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-800);
  min-height: 36px;
}
.check-item input {
  width: 18px;
  height: 18px;
  min-height: unset;
  cursor: pointer;
  accent-color: var(--brand);
}

/* ============================================================
   INFO BOX
   ============================================================ */
.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: #1E40AF;
  margin-bottom: 14px;
  line-height: 1.5;
}
.info-box strong { display: block; margin-bottom: 3px; }
.info-box.warning { background: #FFFBEB; border-color: #FCD34D; color: #92400E; }
.info-box.urgent  { background: #FFF1F2; border-color: #FCA5A5; color: #991B1B; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 10px; }
.empty-state p { font-size: 0.85rem; font-weight: 500; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--flag-h) + var(--header-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(340px, 92vw);
}

.toast {
  background: var(--gray-900);
  color: var(--surface);
  padding: 12px 20px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: var(--shadow-lg);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--urgent); }
.toast.info    { background: var(--info); }
.toast.online  { background: var(--success); }

@keyframes toastIn  {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

/* ============================================================
   MODAL / MARK FOUND SHEET
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1500;
  display: flex;
  align-items: flex-end;
  animation: fadeInOverlay 0.2s;
}
@keyframes fadeInOverlay { from { opacity: 0; } }
.modal-sheet {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px 20px 28px;
  width: 100%;
  max-height: 75vh;
  overflow-y: auto;
  animation: slideUpModal 0.28s ease;
}
@keyframes slideUpModal { from { transform: translateY(40px); } }
.modal-sheet h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 16px; }

/* ============================================================
   DIVIDERS
   ============================================================ */
hr {
  border: none;
  border-top: 1px solid var(--gray-100);
  margin: 16px 0;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title-row h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* ============================================================
   RESPONSIVE — TABLET / DESKTOP
   ============================================================ */
@media (min-width: 640px) {
  .report-picker-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tips-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .bottom-sheet {
    left: 50%;
    right: auto;
    width: 500px;
    transform: translateX(-50%) translateY(100%);
    border-radius: var(--radius-xl);
    bottom: 20px;
    max-height: 85vh;
  }
  .bottom-sheet.open {
    transform: translateX(-50%) translateY(0);
  }

  .map-legend {
    bottom: calc(var(--nav-h) + 24px);
  }
}

/* ============================================================
   UI REFINEMENTS — cards, lists, stats
   ============================================================ */

/* ── Stats pills ── */
.stat-pill {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 5px 9px;
  font-size: 0.6rem;
  text-align: center;
  line-height: 1.25;
  color: rgba(255,255,255,0.9);
  min-width: 48px;
  backdrop-filter: blur(4px);
}
.stat-pill strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--surface);
}

/* ── Person cards ── */
.person-card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  padding: 0;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.person-card:active {
  transform: scale(0.99);
}
.person-card.missing { border-left: 4px solid var(--urgent); }
.person-card.found   { border-left: 4px solid var(--success); background: #F0FDF4; }

.person-avatar {
  width: 100%;
  height: 220px;
  border-radius: 0;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  flex-shrink: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
  cursor: pointer;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-avatar .avatar-fallback { opacity: 0.6; }
.person-avatar[role="button"]:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }

.person-content { flex: 1; min-width: 0; padding: 14px; }

.person-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.person-header h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}

.person-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.meta-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 3px 8px;
  border-radius: 999px;
}

.person-detail {
  font-size: 0.82rem;
  color: var(--gray-700);
  margin-bottom: 6px;
  line-height: 1.4;
}
.person-detail .detail-label {
  font-weight: 700;
  color: var(--gray-900);
}

.person-description {
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.4;
  margin-bottom: 6px;
}

.person-state {
  font-size: 0.78rem;
  color: var(--info);
  font-weight: 600;
  margin-bottom: 6px;
}

.person-footer {
  font-size: 0.72rem;
  color: var(--gray-400);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.person-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Center cards ── */
.center-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--success);
  transition: transform 0.15s;
}
.center-card:active { transform: scale(0.99); }
.center-card.full   { border-left-color: var(--urgent); }
.center-card.closed { border-left-color: var(--gray-400); }

.center-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.center-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.center-title { flex: 1; min-width: 0; }
.center-title h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 5px;
}

.center-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.center-row {
  font-size: 0.82rem;
  color: var(--gray-700);
  line-height: 1.4;
}
.center-row a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.center-needs {
  margin-top: 4px;
}
.needs-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-900);
  display: block;
  margin-bottom: 5px;
}
.needs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.need-tag {
  background: #EFF6FF;
  color: var(--info);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.center-notes {
  font-size: 0.78rem;
  color: var(--gray-500);
  background: var(--gray-50);
  padding: 8px 10px;
  border-radius: 10px;
  margin-top: 4px;
}

/* ── Sismos summary ── */
.sismos-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.summary-mag {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.summary-mag span:first-child {
  font-size: 1.3rem;
}
.summary-mag span:last-child {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}
.summary-info { flex: 1; min-width: 0; }
.summary-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.summary-place {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.summary-time {
  font-size: 0.78rem;
  color: var(--gray-500);
}
.summary-count {
  text-align: center;
  flex-shrink: 0;
  background: var(--gray-100);
  border-radius: 12px;
  padding: 10px 14px;
}
.summary-count span {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gray-900);
}
.summary-count small {
  font-size: 0.65rem;
  color: var(--gray-400);
  display: block;
  margin-top: 3px;
}

/* ── Sismo cards ── */
.sismo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.sismo-mag {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.sismo-mag-num {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
}
.sismo-mag-lbl {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: 0.95;
}
.sismo-body { flex: 1; min-width: 0; }
.sismo-place {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sismo-meta {
  font-size: 0.74rem;
  color: var(--gray-500);
  margin-bottom: 2px;
}
.sismo-ago {
  color: var(--brand);
  font-weight: 700;
}
.sismo-pin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.sismo-pin:active { transform: scale(0.92); background: var(--gray-200); }

/* ============================================================
   PHOTO LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 16px;
  animation: fadeInOverlay 0.2s;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.lightbox-close:active { transform: scale(0.92); }

/* ============================================================
   HONEYPOT + CAPTCHA
   ============================================================ */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.captcha-group {
  background: #F8FAFC;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px;
}

.captcha-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.captcha-question {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-900);
  letter-spacing: 0.5px;
}

.btn-refresh-captcha {
  background: var(--surface);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.btn-refresh-captcha:active { transform: scale(0.95); }

/* ============================================================
   ADMIN AUTOCOMPLETE
   ============================================================ */
.autocomplete-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
  z-index: 210;
  position: relative;
}
.autocomplete-item {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: .9rem;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--gray-100); }

/* ============================================================
   DIRECTIONS LINKS
   ============================================================ */
.popup-directions,
.trapped-alert-directions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--brand);
  text-decoration: none;
}
.popup-directions::before,
.trapped-alert-directions::before {
  content: '→';
}
.popup-directions:hover,
.trapped-alert-directions:hover {
  text-decoration: underline;
}
.trapped-alert-directions {
  margin-top: 4px;
}
