/* ==========================================================
   URBEX ARGENTINA — tema oscuro / estética urbana
   ========================================================== */
:root {
  --bg: #0b0b0d;
  --bg-panel: #16161a;
  --bg-panel-2: #1d1d23;
  --border: #2a2a31;
  --text: #e8e6e1;
  --text-muted: #9a978f;
  --accent: #e8b321;       /* amarillo industrial */
  --accent-dark: #b78a12;
  --danger: #e74c3c;
  --ok: #27ae60;
  --radius: 10px;
  --navbar-h: 56px;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

/* textura sutil de "grano" */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, #fff 2px, #fff 3px);
}

h1, h2, h3 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--text-muted); }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  overflow: visible;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--navbar-h);
  padding: 0 16px;
  background: rgba(13, 13, 16, 0.96);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -3px 0 0 var(--accent);
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--accent); }
.brand-icon { filter: grayscale(0.3); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.92rem;
}
.nav-links a:hover { background: var(--bg-panel-2); text-decoration: none; }
.nav-links .nav-cta {
  background: var(--accent);
  color: #111;
  font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); }
.nav-links .nav-admin { color: var(--accent); }
.nav-links .nav-muted { color: var(--text-muted); }

.nav-toggle { display: none; cursor: pointer; font-size: 1.4rem; margin-left: auto; }
.nav-toggle-check { display: none; }

/* ---------- Flash ---------- */
.flash-container {
  position: fixed;
  top: calc(var(--navbar-h) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1300;
  width: min(480px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.flash {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  animation: flash-in 0.25s ease;
}
.flash-success { border-left: 4px solid var(--ok); }
.flash-error { border-left: 4px solid var(--danger); }
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Layout ---------- */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  position: relative;
  z-index: 1;
}

/* ---------- Mapa principal ---------- */
.map-page { overflow: hidden; }
.map-main { padding: 0; }

#map {
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: #0a0e10;
}

.leaflet-container {
  font-family: var(--font-body);
  background: #0a0e10;
}

/* Dark theme overrides for Leaflet controls */
.leaflet-control-zoom a {
  background: rgba(22, 22, 26, 0.94) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--bg-panel-2) !important;
}
.leaflet-bar {
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
}
.leaflet-bar a { border-bottom-color: var(--border) !important; }
.leaflet-control-attribution {
  background: rgba(10, 10, 12, 0.65) !important;
  color: rgba(255, 255, 255, 0.35) !important;
  font-size: 0.65rem !important;
}
.leaflet-control-attribution a { color: rgba(255, 255, 255, 0.45) !important; }
.leaflet-div-icon { background: none !important; border: none !important; }

/* pin personalizado — círculo de color con icono SVG + punta hacia abajo */
.urbex-pin-wrap { background: none; border: none; }
.urbex-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.7));
  transition: transform 0.12s ease, filter 0.12s ease;
}
.urbex-pin:hover {
  transform: scale(1.2) translateY(-3px);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.9));
}
.urbex-pin-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c, #95a5a6);
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.urbex-pin-circle svg { display: block; }
.urbex-pin-tip {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--c, #95a5a6);
  margin-top: -1px;
}

/* ---------- Barra de filtros ---------- */
.map-disclaimer-link {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  background: rgba(10,10,12,0.55);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: auto;
  transition: color 0.15s;
}
.map-disclaimer-link:hover { color: rgba(255,255,255,0.9); }

.disclaimer-page {
  max-width: 640px;
  margin: 60px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.disclaimer-page h1 { margin: 0; }
.disclaimer-page p { line-height: 1.7; color: var(--muted); margin: 0; }

.filter-bar {
  position: fixed;
  top: calc(var(--navbar-h) + 12px);
  left: 12px;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  max-width: calc(100vw - 24px);
}

.filter-bar select,
.danger-filter summary {
  background: rgba(22, 22, 26, 0.94);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.danger-filter { position: relative; }
.danger-filter summary { list-style: none; user-select: none; }
.danger-filter summary::-webkit-details-marker { display: none; }
.danger-count { color: var(--accent); font-weight: 600; }

.danger-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: rgba(22, 22, 26, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 220px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
}
.danger-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.danger-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
}
.danger-options input { accent-color: var(--accent); }

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 0 0;
  text-align: left;
}


/* ---------- Tarjeta de vista previa ---------- */
.preview-card {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 1050;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  animation: flash-in 0.2s ease;
}
.preview-card.hidden { display: none; }

.preview-handle { display: none; }

.preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.85rem;
}

.preview-photo {
  height: 150px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-panel-2);
}
.preview-photo.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.5;
}

.preview-body { padding: 14px 16px 16px; }
.preview-name {
  margin: 6px 0 4px;
  font-size: 1.15rem;
}
.preview-meta { font-size: 0.85rem; color: var(--text-muted); }

.cat-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--cat-color, #95a5a6) 22%, transparent);
  color: var(--cat-color, #95a5a6);
  border: 1px solid var(--cat-color, #95a5a6);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.preview-dangers { margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 5px; }

.danger-chip {
  display: inline-block;
  background: rgba(231, 76, 60, 0.14);
  color: #f1948a;
  border: 1px solid rgba(231, 76, 60, 0.4);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #141414; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--bg-panel-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #26262e; }
.btn-danger { background: rgba(231, 76, 60, 0.15); color: #f1948a; border: 1px solid rgba(231, 76, 60, 0.5); }
.btn-danger:hover { background: rgba(231, 76, 60, 0.3); }
.btn-lg { padding: 12px 26px; font-size: 1rem; width: 100%; }
.preview-actions { display: flex; gap: 8px; }
.preview-actions .preview-link { flex: 1; }

/* ---------- Detalle de spot ---------- */
.spot-detail { position: relative; }

.pending-banner {
  background: rgba(232, 179, 33, 0.12);
  border: 1px solid rgba(232, 179, 33, 0.45);
  color: var(--accent);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 18px;
  font-weight: 500;
}
.danger-banner {
  background: rgba(192, 57, 43, 0.12);
  border: 1px solid rgba(192, 57, 43, 0.5);
  color: #e74c3c;
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 18px;
  font-weight: 500;
  line-height: 1.5;
}

.spot-header h1 { margin: 8px 0; font-size: 1.9rem; }

.spot-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.spot-header-actions { display: flex; align-items: center; gap: 8px; }
.inline-form { display: inline; }

.fav-btn {
  display: inline-block;
  background: var(--bg-panel);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
button.fav-btn:hover { color: var(--accent); border-color: var(--accent); }
.fav-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(232, 179, 33, 0.1);
}

.spot-category-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--cat-color, #95a5a6) 20%, transparent);
  color: var(--cat-color, #95a5a6);
  border: 1px solid var(--cat-color, #95a5a6);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.spot-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.status-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--status-color, #95a5a6) 18%, transparent);
  color: var(--status-color, #95a5a6);
  border: 1px solid var(--status-color, #95a5a6);
  border-radius: 999px;
  padding: 2px 12px;
  font-weight: 600;
  font-size: 0.82rem;
}

.rating-display.muted { color: var(--text-muted); font-weight: 400; }

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.photo-gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: opacity 0.15s ease;
}
.photo-gallery img:hover { opacity: 0.85; }

.spot-section { margin: 28px 0; }
.spot-section h2 {
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.spot-description { white-space: pre-line; }

.danger-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ----- Sección de peligros (cuadritos) ----- */
.danger-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.danger-title-group { display: flex; flex-direction: column; gap: 2px; }
.danger-header h2 {
  border: none;
  padding: 0;
  margin: 0;
}
.danger-legend {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* cuadritos de peligro */
.danger-box-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.danger-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px 7px 12px;
  font-size: 0.9rem;
}
.danger-box-label { font-weight: 500; }
.danger-box-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-panel-2);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}
/* peligros señalados por el autor: dorados */
.danger-box.author {
  background: rgba(232, 179, 33, 0.1);
  border-color: rgba(232, 179, 33, 0.55);
  color: var(--accent);
}
.danger-box.author .danger-box-count {
  background: rgba(232, 179, 33, 0.18);
  color: var(--accent);
}

/* botón × para que el admin elimine un flag */
.danger-box-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.danger-box-remove:hover {
  color: var(--danger);
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.5);
}

/* botón "+" sutil para confirmar/agregar peligros */
.danger-add { position: relative; }
.danger-add summary { list-style: none; }
.danger-add summary::-webkit-details-marker { display: none; }
.danger-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.danger-add-btn:hover { color: var(--accent); border-color: var(--accent); }
.danger-add[open] .danger-add-btn { transform: rotate(45deg); color: var(--accent); border-color: var(--accent); }

.danger-add-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 280px;
  max-width: calc(100vw - 32px);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6);
}
.danger-add-hint { margin: 0 0 4px; font-size: 0.8rem; }
.danger-add-row { display: flex; }
.danger-add-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  font-size: 0.86rem;
  font-family: var(--font-body);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}
.danger-add-toggle:hover { background: var(--bg-panel); }
.danger-add-toggle .vote-count {
  margin-left: auto;
  font-size: 0.78rem;
}
.danger-add-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.danger-add-toggle.voted { color: var(--accent); }
.danger-add-toggle.voted .danger-add-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #141414;
}

.detail-map {
  height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  z-index: 1;
}
.coords-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.coords {
  font-size: 0.86rem;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  user-select: all;
}
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

/* puntuación con estrellas */
.rating-form { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rating-form-dual { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rating-rows { display: flex; flex-direction: column; gap: 5px; }
.rating-row { display: flex; align-items: center; gap: 10px; }
.rating-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 86px;
}
.rating-display { color: var(--accent); font-weight: 600; }
.rating-display-danger { color: var(--danger); font-weight: 600; }

.star-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  font-size: 1.9rem;
  line-height: 1;
}
.star-rating input { display: none; }
.star-rating label {
  color: #3a3a42;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.1s ease;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: var(--accent);
}
/* variante roja para peligrosidad */
.star-rating-danger label:hover,
.star-rating-danger label:hover ~ label,
.star-rating-danger input:checked ~ label {
  color: var(--danger);
}

/* reportes */
.report-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.report-form textarea { resize: vertical; }

.report-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* botón sutil de adjuntar foto (ícono de imagen a la derecha) */
.report-attach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.report-attach:hover { color: var(--accent); background: var(--bg-panel); }
.report-attach input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.report-attach svg { display: block; }
.report-attach.has-files { color: var(--accent); }
.report-attach-count {
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 12px;
}
.report-attach.has-files .report-attach-count::before { content: '📷 '; }

.report {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.report-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 0.88rem;
}
.report p { margin: 0; white-space: pre-line; }

.report-photo-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
}

.report-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.report-photos img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.report-photos img:hover { opacity: 0.85; }

.report-delete-btn {
  margin-left: auto;
  background: none;
  border: none;
  padding: 0 2px;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.35;
  transition: opacity 0.15s, color 0.15s;
  line-height: 1;
}
.report-delete-btn:hover { opacity: 1; color: var(--danger); }

/* edición de fotos existentes */
.photo-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.photo-edit-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  font-weight: 400 !important;
  cursor: grab;
  position: relative;
  transition: opacity 0.15s;
}
.photo-edit-item:active { cursor: grabbing; }
.photo-edit-item.dragging { opacity: 0.3; }
.photo-drag-handle {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 4px;
  padding: 3px 4px;
  line-height: 0;
  pointer-events: none;
  user-select: none;
}
.photo-edit-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.photo-edit-item:has(input:checked) img {
  outline: 2px solid var(--danger);
  opacity: 0.5;
}

.spot-footer {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 0.85rem;
}

/* ---------- Report section ---------- */
.report-section {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.report-details summary { list-style: none; }
.report-details summary::-webkit-details-marker { display: none; }
.report-summary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: #e74c3c;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid #c0392b66;
  border-radius: var(--radius);
  background: #c0392b11;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}
.report-summary-btn:hover { background: #c0392b22; border-color: #c0392b99; }
.report-details[open] .report-summary-btn { background: #c0392b22; border-color: #c0392b99; }
.report-form-inline {
  margin-top: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-form-hint { margin: 0; font-size: 0.83rem; }
.report-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.report-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
}
.report-sent { font-size: 0.83rem; }
.auth-nudge { margin: 8px 0 0; font-size: 0.82rem; color: var(--text-muted); }

/* estrellas en el formulario de nuevo spot */
.star-rating-form {
  margin: 4px 0 2px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  gap: 10px;
}
.star-rating-form .star-rating { font-size: 2.5rem; }
.star-rating-form .rating-label { font-size: 0.82rem; min-width: 96px; }
.form-rating-hint { margin: 6px 0 0; font-size: 0.82rem; }

/* ---------- Formularios ---------- */
.form-page h1, .auth-page h1, .admin-page h1, .error-page h1 { margin-bottom: 4px; }

.spot-form, .auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

.spot-form label, .auth-form label, .form-group .form-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
select, textarea, input[type="file"] {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232, 179, 33, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.danger-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.danger-fieldset legend {
  font-weight: 600;
  padding: 0 8px;
  font-size: 0.92rem;
}
.danger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
.check-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 400 !important;
  font-size: 0.9rem;
  cursor: pointer;
}
.check-label input { accent-color: var(--accent); }

.picker-map {
  height: 340px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: crosshair;
  z-index: 1;
}

.coords-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.coord-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 150px;
  font-weight: 400;
}
.coord-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.coords-field {
  font-family: 'Courier New', monospace !important;
  font-size: 0.9rem !important;
  letter-spacing: 0.02em;
}
.coords-status {
  margin: 6px 0 0;
  font-size: 0.84rem;
}

/* ---------- Drop zone de fotos ---------- */
.photo-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}
.photo-drop-zone:hover,
.photo-drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(232, 179, 33, 0.04);
}
.photo-drop-zone.drag-over { border-style: solid; }

.photo-drop-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 20px;
  color: var(--text-muted);
  pointer-events: none;
}
.photo-drop-hint p { margin: 0 0 5px; font-size: 0.9rem; }
.photo-drop-hint p:last-child { margin-bottom: 0; }
.hint-icon { opacity: 0.35; flex-shrink: 0; }
.photo-drop-sub { font-size: 0.8rem !important; }
.photo-drop-hint .btn-link { pointer-events: auto; }

/* compact strip when files are present */
.photo-drop-zone.has-files .photo-drop-hint {
  padding: 9px 14px;
  border-top: 1px dashed var(--border);
  gap: 8px;
}
.photo-drop-zone.has-files .hint-icon { display: none; }
.photo-drop-zone.has-files .photo-drop-sub { display: none; }
.photo-drop-zone.has-files .photo-drop-hint p { font-size: 0.84rem; margin: 0; }

.photo-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 12px 0;
}
.photo-preview-item {
  position: relative;
  width: 86px;
  height: 86px;
  flex-shrink: 0;
}
.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}
.photo-preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.12s ease;
}
.photo-preview-remove:hover { background: var(--danger); }
.photo-drop-count { margin: 6px 0 0; font-size: 0.82rem; }

kbd {
  display: inline-block;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Video thumbnail ---------- */
.video-thumb-link {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 560px;
  border: 1px solid var(--border);
  line-height: 0;
  transition: opacity 0.15s ease;
}
.video-thumb-link:hover { opacity: 0.85; }
.video-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-panel-2);
}
.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.video-thumb-link:hover .video-play-overlay { opacity: 0.8; }

/* ---------- Auth ---------- */
.auth-page {
  max-width: 400px;
  margin: 32px auto;
}

/* ---------- Admin / Mis spots ---------- */
.admin-card {
  display: flex;
  gap: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.admin-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.admin-card-body { flex: 1; min-width: 200px; }
.admin-card-body p { margin: 0 0 8px; font-size: 0.85rem; }

.admin-thumb {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--bg-panel-2);
  opacity: 0.6;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-actions .btn { width: 130px; }

.admin-card-compact { padding: 10px 14px; }
.admin-thumb-sm {
  width: 60px;
  height: 60px;
}
.admin-actions-inline {
  flex-direction: row;
  align-items: center;
}
.admin-actions-inline .btn { width: auto; }
.admin-card-review { border-color: #c0392b44; }
.report-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}
.report-chip {
  background: #c0392b22;
  color: #e74c3c;
  border: 1px solid #c0392b44;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.78rem;
}
.review-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c0392b;
  color: #fff;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-ok { background: rgba(39, 174, 96, 0.15); color: #58d68d; border: 1px solid rgba(39, 174, 96, 0.5); }
.status-pending { background: rgba(232, 179, 33, 0.12); color: var(--accent); border: 1px solid rgba(232, 179, 33, 0.45); }

/* ---------- Error ---------- */
.error-page {
  text-align: center;
  padding: 64px 0;
}
.error-page h1 { font-size: 5rem; margin: 0; color: var(--accent); }
.error-page .btn { margin-top: 16px; width: auto; }

/* ---------- Mobile (≤720px) ---------- */
@media (max-width: 720px) {
  /* Hamburger */
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--navbar-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(13, 13, 16, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 8px 12px 16px;
    gap: 2px;
    z-index: 1200;
  }
  .nav-toggle-check:checked ~ .nav-links { display: flex; }
  .nav-links a { padding: 13px 12px; min-height: 44px; display: flex; align-items: center; }

  /* Filter bar */
  .filter-bar { gap: 6px; }
  .filter-bar select, .danger-filter summary {
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  /* Spot detail */
  .spot-header h1 { font-size: 1.5rem; }
  .photo-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .photo-gallery img { height: 110px; }

  /* Admin */
  .admin-actions { flex-direction: row; width: 100%; }
  .admin-actions form { flex: 1; }
  .admin-actions .btn { width: 100%; }
}

/* ---------- Phone (≤480px) ---------- */
@keyframes slide-up {
  from { transform: translateY(56px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@media (max-width: 480px) {
  /* Prevent iOS auto-zoom on focused inputs */
  input[type="text"], input[type="email"], input[type="password"], input[type="url"],
  select, textarea { font-size: 16px; }

  /* Touch targets ≥44px */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-sm { min-height: 38px; }
  .fav-btn { min-height: 44px; }
  .danger-add-toggle { min-height: 44px; }
  .report-radio-label { min-height: 40px; }
  .nav-links a { min-height: 48px; }

  /* Bottom drawer — preview card */
  .preview-card {
    left: 0; right: 0; bottom: 0;
    width: 100%;
    border-radius: 18px 18px 0 0;
    border-left: none; border-right: none; border-bottom: none;
    max-height: 80vh;
    overflow-x: hidden;
    overflow-y: auto;
    animation: slide-up 0.22s ease;
  }
  .preview-handle {
    display: block;
    width: 40px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto 4px;
    flex-shrink: 0;
  }
  .preview-close { top: 10px; right: 12px; width: 32px; height: 32px; font-size: 1rem; }
  .preview-photo { height: 190px; }
  .preview-body { padding: 12px 16px 24px; }

  /* Danger filter: full-width dropdown */
  .danger-options {
    position: fixed;
    top: auto; bottom: 0; left: 0; right: 0;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    padding: 16px 16px 32px;
    min-width: 0;
    max-height: 65vh;
    overflow-y: auto;
    z-index: 1200;
  }

  /* Photo gallery: 2-column full-width */
  .photo-gallery { grid-template-columns: 1fr 1fr; gap: 6px; }
  .photo-gallery img { height: 130px; }

  /* Spot header */
  .spot-header h1 { font-size: 1.35rem; }
  .spot-header-top { flex-wrap: wrap; }
  .spot-meta { gap: 8px; font-size: 0.88rem; }

  /* Detail map shorter */
  .detail-map { height: 200px; }

  /* Coords row stacks */
  .coords-row { flex-direction: column; align-items: stretch; }
  .coords-row .btn { width: 100%; text-align: center; justify-content: center; }
  .coords { word-break: break-all; }

  /* Form: single column, full-width */
  .form-row { grid-template-columns: 1fr; }
  .coords-input-row { flex-direction: column; align-items: stretch; }
  .coord-group { min-width: 0; }
  .picker-map { height: 220px; }

  /* Rating form */
  .rating-form, .rating-form-dual { flex-wrap: wrap; gap: 10px; }
  .star-rating-form { padding: 12px; }
  .star-rating-form .star-rating { font-size: 2.2rem; }

  /* Admin */
  .admin-card { flex-wrap: wrap; }
  .admin-thumb { width: 64px; height: 64px; }
  .admin-actions .btn { min-height: 44px; }

  /* Disclaimer */
  .map-disclaimer-link { font-size: 0.7rem; padding: 3px 8px; }
}
