/**
 * Estilos Corporativos - Mapa oficial de antenas de telefonía móvil y radiación
 * Adaptado a tema claro / oscuro corporativo ([data-theme="dark"])
 * Tipografías: Outfit, Inter, JetBrains Mono
 */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores tema claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-bg-light: rgba(2, 132, 199, 0.08);

  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

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

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* Selector corporativo unificado de tema oscuro */
[data-theme="dark"],
html.dark,
body.dark {
  --bg-page: #0b0f17;
  --bg-card: #131b26;
  --bg-card-subtle: #1a2434;
  --bg-input: #101623;
  --border-color: #243042;
  --border-subtle: #334155;

  --text-main: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-bg-light: rgba(56, 189, 248, 0.12);

  --accent-success: #34d399;
  --accent-warning: #fbbf24;
  --accent-danger: #f87171;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
}

/* Reset y estructura básica */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.text-mono {
  font-family: var(--font-mono);
}

/* Layout Canónico */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Sidebar publicitario AdSense (Desktop >= 1536px) */
.tool-ad-sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* Hero Card */
.antenna-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hero-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-bg-light);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: pulseRing 2s infinite ease-out;
}

@keyframes pulseRing {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.decree-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card-subtle);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-lead {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

/* Barra de búsqueda */
.search-toolbar-card {
  position: relative;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.search-input-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1 1 280px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-field {
  width: 100%;
  height: 44px;
  padding: 0 2.5rem 0 2.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9375rem;
  font-family: var(--font-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg-light);
}

.btn-clear-input {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-clear-input:hover {
  color: var(--text-main);
}

.btn-action-gps {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.25rem;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

[data-theme="dark"] .btn-action-gps {
  color: #0b0f17;
  font-weight: 700;
}

.btn-action-gps:hover {
  background: var(--primary-hover);
}

.btn-action-gps:active {
  transform: scale(0.98);
}

/* Menú desplegable de sugerencias */
.search-dropdown-menu {
  position: absolute;
  top: calc(100% - 10px);
  left: 1rem;
  right: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  list-style: none;
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
}

.search-suggestion-item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item:focus {
  background-color: var(--primary-bg-light);
  color: var(--primary);
}

/* Chips de ciudades */
.quick-chips-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.875rem;
  overflow: hidden;
}

.chips-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.chips-scroll-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chips-scroll-container::-webkit-scrollbar {
  display: none;
}

.quick-city-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.quick-city-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg-light);
}

/* Filtros */
.filters-bar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.875rem;
}

.filter-control-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Selects adaptados a tema claro y oscuro */
.filter-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 40px 0 0.875rem;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: var(--font-main);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

[data-theme="dark"] .filter-select {
  background-color: var(--bg-input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.filter-select option {
  background-color: var(--bg-card);
  color: var(--text-main);
}

/* KPIs resumen */
.kpis-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-content {
  display: flex;
  flex-direction: column;
}

.kpi-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Contenedor del Mapa Leaflet */
.map-view-section {
  position: relative;
  margin-bottom: 2rem;
}

.map-container-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.antennas-map-element {
  width: 100%;
  height: 540px;
  background-color: #0b0f17;
  z-index: 10;
}

/* Estilos de controles Leaflet para evitar colisiones y modo oscuro */
.leaflet-top.leaflet-left {
  top: 12px;
  left: 12px;
}

.leaflet-control-zoom a {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-color: var(--border-color) !important;
}

.leaflet-control-layers {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-color: var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
  font-family: var(--font-main) !important;
  font-size: 0.8125rem !important;
}

.leaflet-control-layers-base label {
  color: var(--text-main) !important;
  margin-bottom: 4px;
}

/* Indicador de carga sobre mapa */
.map-loading-badge {
  position: absolute;
  top: 14px;
  left: 64px; /* Separado para evitar colisión con botones zoom */
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 500;
  pointer-events: none;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: spinnerPulse 1s infinite alternate;
}

@keyframes spinnerPulse {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* Leyenda flotante */
.map-floating-legend {
  position: absolute;
  bottom: 20px;
  left: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  box-shadow: var(--shadow-md);
  z-index: 500;
  font-size: 0.75rem;
  pointer-events: auto;
}

.legend-header {
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.legend-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Banner de aviso sobre zoom */
.map-hint-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.2);
  color: var(--primary);
  font-size: 0.8125rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
}

/* Estilos de Popups de Leaflet */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border-color);
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.popup-card-content {
  padding: 0.875rem 1rem;
}

.popup-op-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.4rem;
}

.popup-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.popup-address {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.btn-popup-open-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  height: 32px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

[data-theme="dark"] .btn-popup-open-detail {
  color: #0b0f17;
  font-weight: 700;
}

.btn-popup-open-detail:hover {
  background: var(--primary-hover);
}

/* Listado de estaciones */
.detected-stations-section {
  margin-bottom: 2.5rem;
}

.stations-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stations-section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.stations-section-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.count-badge {
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
}

.stations-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.station-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.station-summary-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.station-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.station-card-address {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.card-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 0.65rem;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

/* Guía Educativa y FAQ */
.educational-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.guide-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-success);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guide-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.guide-lead {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question .chevron-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-question .chevron-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.faq-answer p {
  margin-top: 0.75rem;
}

.faq-answer ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

.faq-answer li {
  margin-top: 0.35rem;
}

/* Modal Accesible de Ficha de Estación */
.accessible-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-dialog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPopIn 0.2s ease-out;
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  background: var(--bg-card-subtle);
}

.modal-header-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.modal-operator-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.modal-decree-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  padding-right: 2rem;
}

.modal-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  padding-right: 2rem;
}

.btn-close-modal {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.modal-body-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Callout de Cumplimiento Sanitario */
.compliance-callout-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.compliance-icon-box {
  color: var(--accent-success);
  flex-shrink: 0;
  margin-top: 2px;
}

.compliance-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.compliance-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Métricas destacadas modal */
.modal-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.modal-metric-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.modal-metric-card .metric-lbl {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.modal-metric-card .metric-val {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Tablas del modal */
.modal-section-block {
  margin-bottom: 1.5rem;
}

.modal-section-heading {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.modal-section-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.table-responsive-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.modal-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}

.modal-data-table th {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.modal-data-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  white-space: nowrap;
}

.modal-data-table tr:last-child td {
  border-bottom: none;
}

.acimut-clarification {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.75rem;
}

/* Acciones del footer del modal */
.modal-footer-actions {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-modal-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 1rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-action:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-modal-close-main {
  height: 38px;
  padding: 0 1.25rem;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

[data-theme="dark"] .btn-modal-close-main {
  color: #0b0f17;
  font-weight: 700;
}

.btn-modal-close-main:hover {
  background: var(--primary-hover);
}

/* Toast de notificación rápida */
.toast-notification-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toastSlideUp 0.25s ease-out;
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .tool-with-sidebar {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: 1.375rem;
  }

  .antennas-map-element {
    height: 440px;
  }

  .modal-metrics-grid {
    grid-template-columns: 1fr;
  }

  .search-input-wrapper {
    flex: 1 1 100%;
  }

  .btn-action-gps {
    width: 100%;
    justify-content: center;
  }
}
