/* ============================================================
   screens.css — Estilos específicos por pantalla
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   LOGIN — fondo montaña inmersivo
   ══════════════════════════════════════════════════════════════ */
#screen-login {
  justify-content: flex-end !important;
  align-items: stretch !important;
  padding: 0 !important;
  /* Gradiente montaña: cielo nocturno → verde pino → roca oscura */
  background:
    linear-gradient(
      180deg,
      #040B18 0%,
      #071420 18%,
      #0A1F18 42%,
      #0D2414 60%,
      #080C0A 100%
    ) !important;
  position: relative;
  overflow: hidden;
}

/* Silueta montaña SVG inline via pseudo-elemento */
#screen-login::before {
  content: '';
  position: absolute;
  bottom: 320px;
  left: 0; right: 0;
  height: 260px;
  background:
    /* pico izquierdo */
    radial-gradient(ellipse 180px 200px at 18% 100%, #0D1F14 60%, transparent 100%),
    /* pico central */
    radial-gradient(ellipse 240px 260px at 50% 110%, #0A1A10 55%, transparent 100%),
    /* pico derecho */
    radial-gradient(ellipse 160px 180px at 82% 100%, #0C1C12 60%, transparent 100%);
  pointer-events: none;
}

/* Estrellas (puntos blancos) */
#screen-login::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
  background-image:
    radial-gradient(1px 1px at 15% 12%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 32% 8%,  rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 72% 6%,  rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 20%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 28%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 65% 25%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 42% 32%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 35%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 8%  22%, rgba(255,255,255,0.9) 0%, transparent 100%);
  pointer-events: none;
}

/* Luna */
.login-moon {
  position: absolute;
  top: 10%;
  right: 20%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #E8F4E8, #C8E8C0);
  box-shadow: 0 0 20px rgba(200,232,192,0.4), 0 0 60px rgba(200,232,192,0.15);
  z-index: 1;
}

/* Tagline flotante arriba */
.login-tagline {
  position: absolute;
  top: 12%;
  left: 0; right: 0;
  text-align: center;
  z-index: 2;
  padding: 0 24px;
}
.login-tagline .logo-emoji { font-size: 52px; display: block; margin-bottom: 10px; }
.login-tagline h1 {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.login-tagline p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* Card que sube desde abajo (22A) */
@keyframes cardSlideUp {
  from { transform: translateY(72px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

.login-card {
  position: relative;
  z-index: 10;
  animation: cardSlideUp 0.48s cubic-bezier(0.4, 0, 0.2, 1) both;
  background: rgba(10, 16, 26, 0.82);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 40px;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-left: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.06);
}

/* Pill handle arriba del card */
.login-card::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto 24px;
}

.login-logo { display: none; } /* sustituido por .login-tagline */

.login-mode-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--color-text);
  letter-spacing: -0.4px;
}

.auth-toggle-row {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ══════════════════════════════════════════════════════════════
   COMPARE — tabla de 3 columnas
   ══════════════════════════════════════════════════════════════ */

/* Badge "Mejor" en el header */
.best-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-secondary);
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.35);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* Cabeceras de columna (sticky) */
.ct-headers {
  display: flex;
  flex-shrink: 0;
  padding: 10px 8px 0;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  z-index: 20;
}

.ct-label-col {
  width: 62px;
  flex-shrink: 0;
}

.ct-col {
  flex: 1;
  min-width: 0;
  padding: 0 3px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative; /* para el dropdown absoluto */
}

/* Columna mejor resaltada */
.ct-col.best-col .ct-search {
  border-color: var(--color-secondary);
}
.ct-col.best-col::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 3px;
  right: 3px;
  height: 2px;
  background: var(--color-secondary);
  border-radius: 2px;
}

/* Input de búsqueda compacto */
.ct-search {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 8px 7px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--color-text);
  outline: none;
  transition: var(--transition);
}
.ct-search:focus {
  border-color: rgba(52,199,89,0.5);
  background: rgba(52,199,89,0.07);
  box-shadow: 0 0 0 2px rgba(52,199,89,0.1);
}
.ct-search::placeholder { color: var(--color-text-muted); font-size: 11px; }

/* Dropdown de resultados */
.ct-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: rgba(15, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow-dropdown);
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
}
/* En la última columna el dropdown se abre hacia la izquierda */
#ct-col-2 .ct-dropdown {
  left: auto;
  right: 0;
}
.ct-dropdown-item {
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.12s;
}
.ct-dropdown-item:last-child { border-bottom: none; }
.ct-dropdown-item:first-child { border-radius: 14px 14px 0 0; }
.ct-dropdown-item:last-child  { border-radius: 0 0 14px 14px; }
.ct-dropdown-item:only-child  { border-radius: 14px; }
.ct-dropdown-item:active { background: rgba(52,199,89,0.1); }
.ct-dropdown-item-text { flex: 1; min-width: 0; }
.ct-dropdown-item .loc-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ct-dropdown-item .loc-detail {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ct-dropdown-item .loc-elev {
  font-size: 10px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  background: var(--bg-primary);
  border-radius: 4px;
  padding: 2px 5px;
}

/* Nombre y subtítulo de ubicación */
.ct-loc-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 13px;
}
.ct-loc-sub {
  font-size: 9px;
  color: var(--color-text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 11px;
}

/* Score badge */
.ct-score-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
}
.ct-score-empty {
  color: var(--color-text-muted);
  font-size: 14px;
}
.ct-score-badge {
  border-radius: 10px;
  padding: 5px 6px;
  text-align: center;
  min-width: 52px;
  cursor: default;
}
.ct-score-badge .snum {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.5px;
}
.ct-score-badge .slabel {
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.3px;
  margin-top: 1px;
}

/* Loading spinner en columna */
.ct-col-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 80px;
  color: var(--color-text-muted);
  font-size: 11px;
}

/* ── Tabla de métricas ──────────────────────────────────── */
.ct-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-height) + 16px);
}

.ct-row {
  display: flex;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ct-row:nth-child(even) { background: rgba(255,255,255,0.02); }

.ct-row-label {
  width: 62px;
  flex-shrink: 0;
  padding: 6px 4px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.ct-row-label .rl-icon  { font-size: 15px; line-height: 1; }
.ct-row-label .rl-text  { font-size: 9px; color: var(--color-text-muted); font-weight: 600; letter-spacing: 0.3px; text-align: center; }

.ct-cell {
  flex: 1;
  padding: 6px 3px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}
.ct-cell .cu { font-size: 10px; font-weight: 400; color: var(--color-text-muted); }
.ct-cell .ci { font-size: 18px; line-height: 1.1; display: block; }
.ct-cell .cs { font-size: 9px; color: var(--color-text-muted); display: block; margin-top: 1px; }
.ct-cell.empty-cell { color: var(--color-text-muted); font-weight: 400; font-size: 12px; }

/* 16B — mejor valor en verde, peor en rojo */
.ct-cell.best-val  { color: var(--color-optimo); }
.ct-cell.worst-val { color: var(--color-adverso); }

/* Fila de acciones */
.ct-actions-row {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--color-border);
  padding: 8px 0;
}
.ct-action-space { width: 62px; flex-shrink: 0; }
.ct-action-cell {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 0 3px;
}
.ct-btn-fav {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 2px;
  line-height: 1;
  opacity: 0.8;
}
.ct-btn-fav:active { opacity: 1; transform: scale(1.2); }
.ct-btn-detail {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 9px;
  background: rgba(52, 199, 89, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(52, 199, 89, 0.2);
  cursor: pointer;
  font-family: var(--font-body);
  text-align: center;
  letter-spacing: 0.2px;
  transition: background 0.15s;
}
.ct-btn-detail:active { background: rgba(52, 199, 89, 0.18); }
.ct-btn-clear {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 15px;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 2px;
  line-height: 1;
  opacity: 0.6;
}
.ct-btn-clear:active { opacity: 1; color: var(--color-adverso); }

/* Estado vacío */
.ct-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 12px;
  color: var(--color-text-muted);
  text-align: center;
}
.ct-empty-icon { font-size: 44px; }
.ct-empty-state p { font-size: 13px; line-height: 1.6; }

/* ══════════════════════════════════════════════════════════════
   DETAIL
   ══════════════════════════════════════════════════════════════ */
#screen-detail .screen-body { padding: 0; }

.detail-hero {
  padding: 20px 16px;
  background: linear-gradient(180deg, #0D1F3A 0%, var(--bg-primary) 100%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.detail-hero-icon { font-size: 48px; }

.detail-hero-info h2 { font-size: 20px; color: var(--color-text); }
.detail-hero-info .detail-coords { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
.detail-hero-info .detail-elevation { font-size: 13px; color: var(--color-accent); margin-top: 2px; }

.detail-section {
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
}
.detail-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.detail-current-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
  background: transparent;
  border-bottom: 1px solid var(--color-border);
}

.detail-current-item {
  background: var(--bg-card);
  border-radius: var(--border-radius-sm);
  padding: 14px 12px;
  text-align: center;
}
.detail-current-value {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--color-text);
}
.detail-current-label {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

/* Reviews */
.review-form-section {
  padding: 16px;
}
.review-form-section h3 {
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--color-text);
}

/* ══════════════════════════════════════════════════════════════
   FAVORITES — lista compacta (12C)
   ══════════════════════════════════════════════════════════════ */
.favorites-list {
  padding: 8px 0;
  padding-bottom: calc(var(--nav-height) + 24px);
  display: flex;
  flex-direction: column;
}

/* Item compacto de una línea */
.favorite-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}
.favorite-item:active { background: rgba(255,255,255,0.04); }

.favorite-icon { font-size: 15px; color: var(--color-text-muted); flex-shrink: 0; }

.favorite-info { flex: 1; min-width: 0; }
.favorite-name  { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.favorite-coords { font-size: 11px; color: var(--color-text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fav-del-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 16px;
  padding: 6px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
  line-height: 1;
}
.fav-del-btn:active { opacity: 1; color: var(--color-adverso); }

/* ══════════════════════════════════════════════════════════════
   MAP
   ══════════════════════════════════════════════════════════════ */
#screen-map {
  position: relative;
  /* Evitar que el mapa quede detrás del nav (evita el blur naranjo/marrón) */
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
}

#leaflet-map {
  flex: 1;
  width: 100%;
  min-height: 0;
  z-index: 1;
}

/* Forzar que Leaflet no rompa el layout */
.leaflet-container {
  background: #0D1A2D;
  height: 100%;
}

.leaflet-tile { filter: brightness(0.75) hue-rotate(190deg); }

/* Barra de atribución de Leaflet en tema oscuro (elimina el "bar marrón") */
.leaflet-control-attribution {
  background: rgba(13, 17, 23, 0.75) !important;
  color: var(--color-text-muted) !important;
  font-size: 10px !important;
  backdrop-filter: blur(4px);
}
.leaflet-control-attribution a {
  color: var(--color-primary) !important;
}
.leaflet-bar a,
.leaflet-control-zoom a {
  background: rgba(13, 17, 23, 0.85) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}

/* ══════════════════════════════════════════════════════════════
   PROFILE — hero centrado vertical (14A)
   ══════════════════════════════════════════════════════════════ */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 16px 24px;
  background: linear-gradient(180deg, #0D1F3A 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

/* Avatar más grande en el hero */
.profile-hero .profile-avatar {
  width: 96px;
  height: 96px;
  font-size: 38px;
  border: 3px solid rgba(52,199,89,0.3);
  box-shadow: 0 0 0 6px rgba(52,199,89,0.07);
}

.profile-hero-info h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.4px;
}
.profile-hero-info p {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin: 16px;
}

.profile-stat-item {
  background: var(--bg-card);
  padding: 14px 8px;
  text-align: center;
}
.profile-stat-value { font-family: var(--font-heading); font-size: 20px; font-weight: 700; }
.profile-stat-label { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

.profile-details {
  padding: 0 16px 16px;
}
.profile-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.profile-detail-row:last-child { border-bottom: none; }
.profile-detail-icon { font-size: 18px; width: 28px; text-align: center; }
.profile-detail-label { font-size: 12px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; flex: 1; }
.profile-detail-value { font-size: 14px; font-weight: 600; }

/* Edit form */
.profile-edit-form {
  padding: 16px;
}

.photo-upload-area {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.photo-upload-btn {
  padding: 8px 14px;
  background: var(--bg-card-alt);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--border-radius-sm);
  color: var(--color-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.photo-upload-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ══════════════════════════════════════════════════════════════
   SETTINGS — estilo iOS (18B)
   ══════════════════════════════════════════════════════════════ */
.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  padding-bottom: calc(var(--nav-height) + 24px);
}

/* Sección sin card exterior */
.settings-section {
  background: none;
  border: none;
  border-radius: 0;
  overflow: visible;
  margin-bottom: 28px;
}

/* Título flotante encima del grupo */
.settings-section-title {
  padding: 0 4px 9px;
  background: none;
  border-bottom: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--color-text-muted);
}

/* Filas agrupadas con fondo sutil */
.settings-row,
.settings-user-info {
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 12px;
}

/* Primera fila del grupo: esquinas arriba */
.settings-section-title + .settings-row,
.settings-section-title + .settings-user-info {
  border-radius: 12px 12px 0 0;
}

/* Última fila del grupo: esquinas abajo, sin borde */
.settings-row:last-child,
.settings-user-info:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

/* Si solo hay una fila: todas las esquinas */
.settings-section-title + .settings-row:last-child {
  border-radius: 12px;
}

.settings-row label { font-size: 14px; color: var(--color-text); }
.settings-row .settings-control { flex-shrink: 0; }
.settings-user-info .user-email { font-size: 13px; color: var(--color-text-muted); }

.settings-logout-area { padding: 4px 0; }

/* ══════════════════════════════════════════════════════════════
   SECTORS
   ══════════════════════════════════════════════════════════════ */
.sectors-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sectors-search-wrap {
  position: relative;
  margin: 16px;
}
.sectors-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}
.sectors-search-wrap .input-search {
  padding-left: 36px;
}

.sectors-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--color-border);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
}
.filter-label-note {
  font-size: 10px;
  text-transform: none;
  opacity: 0.7;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filter-pill {
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.filter-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.filter-pill:active { transform: scale(0.93); opacity: 0.85; }

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}

.sectors-count {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.sectors-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 16px;
}

.sector-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sector-card:active {
  transform: scale(0.98);
}

.sector-card-main {
  display: flex;
  padding: 14px;
  gap: 12px;
  align-items: center;
}
.sector-card-info {
  flex: 1;
  min-width: 0;
}
.sector-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 4px;
}
.sector-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.sector-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-card-alt);
  color: var(--color-text-muted);
}
.sector-tag-estilo { background: rgba(88, 166, 255, 0.1); color: var(--color-primary); font-weight: 600; }
.sector-tag-dist { background: rgba(46, 160, 67, 0.1); color: var(--color-accent); }
.sector-tag-sub { background: rgba(210, 168, 255, 0.1); color: #d2a8ff; }
.sector-card-ccaa {
  font-size: 11px;
  color: var(--color-text-muted);
}

.sector-card-score {
  flex-shrink: 0;
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.score-skeleton {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--color-border);
  animation: pulse 1.5s infinite;
}

.score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: #fff;
}
.score-badge-optimo    { background: var(--color-optimo); }
.score-badge-aceptable { background: var(--color-aceptable); }
.score-badge-adverso   { background: var(--color-adverso); }

.score-number { font-size: 18px; font-weight: 700; font-family: var(--font-heading); }
.score-label { font-size: 9px; text-transform: uppercase; font-weight: 600; }

.score-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 10px;
  color: var(--color-text-muted);
}
.score-na {
  font-size: 12px; color: var(--color-text-muted);
}

.sectors-loading {
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 13px;
}

/* Detail sector styles */
.sector-detail-header {
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
}
.sector-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subsectors-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.subsector-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.subsector-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.subsector-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--color-text);
  transition: background 0.15s, border-color 0.15s;
}
.subsector-chip-btn {
  cursor: pointer;
  justify-content: space-between;
  width: 100%;
}
.subsector-chip-btn:hover,
.subsector-chip-btn:active {
  background: var(--bg-card-alt);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.subsector-chip-arrow {
  margin-left: auto;
  font-size: 16px;
  color: var(--color-text-muted);
  font-weight: 300;
}
.subsector-chip-btn:hover .subsector-chip-arrow {
  color: var(--color-primary);
}
.subsector-chip-icon {
  font-size: 14px;
}

.sector-sources {
  display: flex;flex-wrap:wrap;gap:8px;
}
