/* ============================================================
   ADRIÁN F2-F4 — Sistema de diseño "Polaris-like"
   Light mode únicamente (deliberado). Cero webfonts, cero CDN.
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f1f1f1;
  color: #303030;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

svg { font-family: inherit; }
.ic { display: inline-block; vertical-align: middle; flex: none; }

.oculto { display: none !important; }

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
}

.marca { display: flex; align-items: baseline; min-width: 0; }

.wordmark {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.lema {
  font-size: 11px;
  color: #8a8a8a;
  margin-left: 10px;
  white-space: nowrap;
}

.chip-salud {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #303030;
  border: 1px solid #454545;
  color: #e3e3e3;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.chip-salud:hover { background: #3a3a3a; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8a8a8a;
  flex: none;
}

.dot-verde { background: #3dc38a; box-shadow: 0 0 0 3px rgba(61, 195, 138, .18); }
.dot-ambar { background: #f2b13e; box-shadow: 0 0 0 3px rgba(242, 177, 62, .18); }
.dot-rojo  { background: #f06565; box-shadow: 0 0 0 3px rgba(240, 101, 101, .18); }

/* ---------- Layout: sidebar + contenido ---------- */

.layout { padding-top: 56px; }

.sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: 240px;
  background: #ebebeb;
  padding: 14px 10px;
  overflow-y: auto;
  z-index: 40;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #303030;
  text-decoration: none;
  margin-bottom: 2px;
  user-select: none;
}

.nav-item .ic { color: #5c5f62; }

.nav-item:hover { background: #e0e0e0; }

.nav-item.activo {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  font-weight: 600;
}

.nav-item.activo:hover { background: #ffffff; }

.nav-seccion {
  font-size: 11px;
  font-weight: 600;
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 18px 12px 6px;
}

.sidebar .nav-seccion:first-child { margin-top: 4px; }

.nav-off { color: #9d9d9d; cursor: default; }
.nav-off .ic { color: #b5b5b5; }
.nav-off:hover { background: transparent; }

.contenido {
  margin-left: 240px;
  min-height: calc(100vh - 56px);
}

.contenido-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
}

/* ---------- Cabecera de página ---------- */

.pagina-cab {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.pagina-titulo {
  font-size: 20px;
  font-weight: 700;
  color: #303030;
  margin: 0;
  line-height: 1.25;
}

.pagina-sub {
  font-size: 12px;
  color: #616161;
  margin: 4px 0 0;
}

.pagina-acciones {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- Botones ---------- */

.btn-primario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  background: #008060;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primario:hover { background: #006e52; }
.btn-primario .ic { color: #ffffff; }
.btn-block { width: 100%; }

.btn-secundario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  background: #ffffff;
  color: #303030;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #8a8a8a;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-secundario:hover { background: #f6f6f6; }

.btn-primario:disabled,
.btn-secundario:disabled {
  opacity: .55;
  cursor: default;
}

/* ---------- Cards ---------- */

.card {
  background: #ffffff;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
  padding: 20px;
  margin-bottom: 16px;
}

.card-cab { margin-bottom: 14px; }

.card-titulo {
  font-size: 13px;
  font-weight: 650;
  color: #303030;
  margin: 0;
}

.card-sub {
  font-size: 12px;
  color: #616161;
  margin: 2px 0 0;
}

/* ---------- KPIs ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.kpi { padding: 16px 20px; margin-bottom: 0; }

.kpi-label { font-size: 12px; color: #616161; }

.kpi-valor {
  font-size: 26px;
  font-weight: 700;
  color: #303030;
  margin-top: 4px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.kpi-valor.pos { color: #0c5132; }
.kpi-valor.neg { color: #8e0b21; }

.kpi-delta {
  font-size: 11px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.delta-pos { color: #0c5132; }
.delta-neg { color: #8e0b21; }
.delta-neutra { color: #8a8a8a; }

.kpi-nota { font-size: 11px; color: #8a8a8a; margin-top: 4px; }

/* Zonas (card resumen de atribución) */
.zonas { margin-top: 6px; }

.zona-fila {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 3px 0;
}

.zona-nombre { color: #303030; font-weight: 500; }
.zona-dato { color: #303030; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
  vertical-align: middle;
}

.b-activa   { background: #cdfee1; color: #0c5132; }
.b-pausada  { background: #e3e3e3; color: #616161; }
.b-escalera { background: #e0f0ff; color: #00527c; }
.b-ctwa     { background: #ffe8d1; color: #5e4200; }
.b-rojo     { background: #fed1d7; color: #8e0b21; }
.b-ambar    { background: #fff1d6; color: #5e4200; }
.b-azul     { background: #e0f0ff; color: #00527c; }
.b-morado   { background: #f1e6ff; color: #5c2e91; }

/* ---------- Tablas ---------- */

.tabla-wrap { overflow-x: auto; }

.tabla {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.tabla-ancha { min-width: 820px; }
.tabla-fuentes { min-width: 480px; }
.tabla-media { min-width: 520px; }

.tabla th {
  font-size: 12px;
  font-weight: 600;
  color: #616161;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e3e3e3;
  white-space: nowrap;
}

.tabla td {
  font-size: 13px;
  color: #303030;
  padding: 10px;
  border-bottom: 1px solid #ebebeb;
  vertical-align: middle;
}

.tabla tbody tr:hover { background: #f6f6f7; }
.tabla tbody tr.fila-detalle:hover { background: #fafafa; }
.tabla tbody tr:last-child td { border-bottom: none; }

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

th.num { text-align: right; }

.vacio {
  font-size: 13px;
  color: #616161;
  padding: 16px 4px;
  margin: 0;
}

/* Campañas: filas expandibles */

.fila-exp { cursor: pointer; }

.celda-nombre { min-width: 240px; }

.camp-nombre { font-weight: 500; margin-right: 6px; }

.chev {
  display: inline-block;
  width: 16px;
  color: #8a8a8a;
  margin-right: 4px;
  transition: transform .15s ease;
  vertical-align: middle;
}

.fila-exp.abierta .chev { transform: rotate(90deg); }

.fila-detalle td { background: #fafafa; padding: 0 10px 14px; }

.subtitulo-peldanos {
  font-size: 12px;
  font-weight: 600;
  color: #616161;
  margin: 12px 0 0 26px;
}

.subtabla {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
  margin: 6px 0 2px 26px;
  min-width: 0;
}

.subtabla th {
  font-size: 11px;
  font-weight: 600;
  color: #8a8a8a;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #e3e3e3;
}

.subtabla td {
  font-size: 12px;
  color: #303030;
  padding: 6px 8px;
  border-bottom: 1px solid #ebebeb;
}

.subtabla tr:last-child td { border-bottom: none; }

.pie-generado {
  font-size: 11px;
  color: #8a8a8a;
  margin: 10px 0 0;
  text-align: right;
}

/* Atribución */

.check-verde { color: #008060; margin-right: 4px; }
.check-verde .ic { vertical-align: -3px; }
.cobrado-cero { color: #8a8a8a; }
.celda-camp { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nota-pie { font-size: 12px; color: #8a8a8a; margin: 12px 0 0; }

/* Mini-barra de fuentes */

.celda-barra { width: 140px; }

.minibar {
  width: 120px;
  height: 8px;
  background: #f1f1f1;
  border-radius: 4px;
  overflow: hidden;
}

.minibar span {
  display: block;
  height: 100%;
  background: #008060;
  border-radius: 4px;
}

.minibar span.mb-ambar { background: #f2b13e; }

.minibar-ancha { width: 100%; max-width: 420px; margin-top: 10px; }

/* ---------- Chips de filtro ---------- */

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip {
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #303030;
  cursor: pointer;
}

.chip:hover { background: #f6f6f6; }

.chip.activo {
  background: #303030;
  border-color: #303030;
  color: #ffffff;
  font-weight: 600;
}

/* ---------- Cohorte madura ---------- */

.cohorte-cuerpo {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

.cohorte-grande {
  font-size: 34px;
  font-weight: 700;
  color: #303030;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.cohorte-frase { font-size: 12px; color: #616161; margin-top: 4px; }

.cohorte-stats {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.cohorte-mini {
  font-size: 16px;
  font-weight: 600;
  color: #303030;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Gráfico ---------- */

.grafico-wrap { overflow-x: auto; }

.grafico-wrap svg {
  display: block;
  min-width: 620px;
  width: 100%;
  height: auto;
}

.leyenda {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  font-size: 12px;
  color: #616161;
}

.leyenda .cuadro {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
}

/* ---------- Banners ---------- */

.banner-parcial {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff8e1;
  border: 1px solid #ffd6a4;
  color: #5e4200;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.banner-parcial .ic { color: #5e4200; margin-top: 1px; }

.banner-gris {
  background: #f6f6f6;
  border: 1px solid #e3e3e3;
  color: #616161;
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.banner-gris strong { color: #303030; }

/* ---------- Error de carga ---------- */

.card-error { text-align: center; padding: 32px 20px; }

.error-titulo { font-size: 14px; font-weight: 600; color: #8e0b21; margin: 0 0 6px; }

.error-detalle { font-size: 12px; color: #616161; margin: 0 0 16px; overflow-wrap: anywhere; }

/* ---------- Skeleton loaders ---------- */

.skel {
  background: #e3e3e3;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* ---------- Pantalla de clave ---------- */

.pantalla-clave {
  position: fixed;
  inset: 0;
  background: #f1f1f1;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card-clave { width: 100%; max-width: 380px; padding: 28px; margin: 0; }

.clave-cab {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.ic-candado { color: #008060; width: 26px; height: 26px; }

.clave-marca {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1a1a1a;
}

.clave-sub { font-size: 12px; color: #616161; margin: 2px 0 0; }

.clave-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #303030;
  margin-bottom: 6px;
}

/* ---------- Inputs, select y textarea (estilo Polaris) ---------- */

.input, .select, .textarea {
  width: 100%;
  border: 1px solid #8a8a8a;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: #303030;
  background: #ffffff;
}

.input {
  height: 38px;
  padding: 0 12px;
  margin-bottom: 14px;
}

.select {
  height: 38px;
  padding: 0 10px;
}

.textarea {
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #008060;
  box-shadow: 0 0 0 2px rgba(0, 128, 96, .18);
}

.campo { margin-bottom: 12px; }
.campo .input { margin-bottom: 0; }

.campo-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #303030;
  margin-bottom: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.form-grid .campo { margin-bottom: 0; }

.clave-error {
  font-size: 12px;
  color: #8e0b21;
  margin: -6px 0 12px;
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  padding: 20px;
  max-height: min(85vh, 680px);
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}

.modal-titulo {
  font-size: 15px;
  font-weight: 650;
  color: #303030;
  margin: 0 0 14px;
}

.modal-sub {
  font-size: 12px;
  color: #616161;
  margin: -8px 0 14px;
}

.modal-filas { margin-bottom: 4px; }

.modal-fila {
  display: flex;
  gap: 10px;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f1f1;
}

.modal-fila:last-child { border-bottom: none; }

.modal-k {
  width: 96px;
  flex: none;
  color: #616161;
  font-weight: 600;
  font-size: 12px;
  padding-top: 1px;
}

.modal-v { color: #303030; overflow-wrap: anywhere; min-width: 0; }

.modal-codigo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #303030;
  background: #f6f6f6;
  border-radius: 6px;
  padding: 3px 8px;
  overflow-wrap: anywhere;
  min-width: 0;
}

.modal-botones {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- Toasts ---------- */

.toast-raiz {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
  overflow-wrap: anywhere;
  animation: toast-entrar .25s ease;
}

.toast-ok { background: #008060; }
.toast-error { background: #d82c0d; }

.toast-salir {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
}

@keyframes toast-entrar {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Cerebro: cards de recomendación ---------- */

.rec-card { border-left: 4px solid #8a8a8a; }
.rec-card.g-critica { border-left-color: #d82c0d; }
.rec-card.g-alta    { border-left-color: #f2b13e; }
.rec-card.g-media   { border-left-color: #2c6ecb; }
.rec-card.g-info    { border-left-color: #8a8a8a; }

.rec-cab {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.rec-titulo {
  font-size: 14px;
  font-weight: 650;
  color: #303030;
  margin: 0;
  line-height: 1.35;
}

.rec-porque {
  font-size: 13px;
  color: #303030;
  line-height: 1.5;
  margin: 6px 0 0;
}

.rec-pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.chip-fuente {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #616161;
  background: #f6f6f6;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  padding: 2px 8px;
}

/* ---------- Cobranza / conciliación ---------- */

.conc-cuerpo {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

.conc-dif-mal { color: #8e0b21; }
.conc-dif-bien { color: #0c5132; }

.texto-ambar { color: #916a00; font-weight: 600; }

/* ---------- Operación ---------- */

.estado-valor {
  font-size: 16px;
  font-weight: 650;
  color: #303030;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.timer-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #ebebeb;
  font-size: 13px;
}

.timer-fila:last-child { border-bottom: none; }

.timer-nombre { font-weight: 500; min-width: 0; }

.timer-dato {
  color: #616161;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
}

/* ---------- Calendario: timeline ---------- */

.timeline { position: relative; }

.timeline::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #e3e3e3;
}

.tl-item {
  position: relative;
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.tl-item:last-child { margin-bottom: 0; }

.tl-fecha {
  width: 52px;
  flex: none;
  text-align: center;
  background: #ffffff;
  position: relative;
  z-index: 1;
  padding: 4px 0;
  align-self: flex-start;
}

.tl-dia {
  font-size: 22px;
  font-weight: 700;
  color: #303030;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.tl-mes {
  font-size: 11px;
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.tl-caja {
  flex: 1;
  min-width: 0;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 12px 14px;
  background: #ffffff;
}

.tl-caja.tl-hoy {
  border-color: #008060;
  box-shadow: 0 0 0 1px rgba(0, 128, 96, .35);
}

.tl-cab {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-nombre {
  font-size: 13px;
  font-weight: 600;
  color: #303030;
}

.tl-regla {
  font-size: 13px;
  color: #616161;
  line-height: 1.5;
  margin: 6px 0 0;
}

/* ---------- Creativos: sol por sol ---------- */

.sps {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sps-alto  { color: #0c5132; }
.sps-medio { color: #4aa06f; }
.sps-bajo  { color: #8e0b21; }

.leyenda-lista {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: #303030;
  line-height: 1.6;
}

.leyenda-lista li { margin-bottom: 4px; }

/* ---------- Experimentos ---------- */

.exp-cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.exp-titulo {
  font-size: 14px;
  font-weight: 650;
  color: #303030;
  margin: 0;
}

.exp-linea {
  font-size: 13px;
  color: #303030;
  line-height: 1.5;
  margin: 8px 0 0;
}

.exp-k {
  font-size: 12px;
  font-weight: 600;
  color: #616161;
}

.exp-resultado {
  background: #f6f6f6;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.exp-pie {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ---------- Bottom nav (móvil) ---------- */

.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #ffffff;
  border-top: 1px solid #e3e3e3;
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
}

.bn-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 6px;
  font-size: 10px;
  color: #616161;
  text-decoration: none;
  user-select: none;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.bn-tab .ic { color: #616161; }

.bn-tab.activo { color: #008060; font-weight: 600; }
.bn-tab.activo .ic { color: #008060; }

/* ---------- Panel "Más" (móvil) ---------- */

.panel-mas-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 80;
}

.panel-mas {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  z-index: 85;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
}

.pm-titulo {
  font-size: 13px;
  font-weight: 650;
  color: #303030;
  margin: 0 0 12px;
}

.pm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pm-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  font-size: 11px;
  color: #303030;
  text-decoration: none;
  text-align: center;
  user-select: none;
}

.pm-item .ic { color: #5c5f62; }

.pm-item.activo {
  border-color: #008060;
  color: #008060;
  font-weight: 600;
}

.pm-item.activo .ic { color: #008060; }

/* ---------- Móvil (breakpoint 760, regla del proyecto) ---------- */

@media (max-width: 760px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .lema { display: none; }

  .contenido { margin-left: 0; }

  .contenido-inner {
    padding: 16px;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card { padding: 16px; }
  .kpi { padding: 14px 16px; }
  .kpi-valor { font-size: 22px; }

  /* Con dos botones (p. ej. Experimentos) la cabecera no debe empujar el body
     más allá del viewport: se permite envolver y que las acciones se encojan. */
  .pagina-cab { align-items: center; flex-wrap: wrap; }
  .pagina-acciones { flex: 0 1 auto; }

  .cohorte-cuerpo { align-items: flex-start; flex-direction: column; gap: 14px; }
  .cohorte-stats { margin-left: 0; }

  .celda-camp { max-width: 140px; }

  .form-grid { grid-template-columns: 1fr; gap: 12px; }

  .conc-cuerpo { align-items: flex-start; flex-direction: column; gap: 14px; }

  .toast-raiz { bottom: calc(76px + env(safe-area-inset-bottom)); }

  .timeline::before { left: 22px; }
  .tl-fecha { width: 44px; }
  .tl-dia { font-size: 19px; }
}
