/* =====================================================================
   app.css — Estilos propios (sin CDN ni fuentes web).
   Tema claro / oscuro con variables. Letra grande. 1366x768.
   ===================================================================== */
:root, :root[data-theme="light"] {
  --fondo: #f4f5f7;
  --panel: #ffffff;
  --panel-2: #f8f9fb;
  --texto: #1c2430;
  --texto-2: #4a5566;
  --texto-3: #6b7686;
  --borde: #d9dee6;
  --rejilla: #e6e9ef;
  --pri: #1f5fa8;
  --pri-2: #174a84;
  --pri-suave: #e6eef8;
  --acento: #c8561e;
  --verde: #1e8a4c;
  --verde-suave: #e3f4ea;
  --ambar: #c98a06;
  --ambar-suave: #fdf3dc;
  --rojo: #c0392b;
  --rojo-suave: #fbe5e2;
  --gris: #8a94a3;
  --gris-suave: #eceff3;
  --g1: #1f5fa8; --g2: #c8561e; --g3: #1e8a4c; --g4: #7b4bb7; --g5: #c98a06; --g6: #0f8a91; --g7: #b0356d;
  --sombra: 0 1px 3px rgba(20, 30, 50, .08), 0 1px 2px rgba(20, 30, 50, .06);
  --radio: 8px;
  --ancho-menu: 280px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --fondo: #14181e;
  --panel: #1c222a;
  --panel-2: #222a33;
  --texto: #e7ebf0;
  --texto-2: #b5bfcc;
  --texto-3: #8d98a7;
  --borde: #333d49;
  --rejilla: #2c3540;
  --pri: #5a9be6;
  --pri-2: #7fb2ee;
  --pri-suave: #1f3149;
  --acento: #e88a58;
  --verde: #3dbb74;
  --verde-suave: #183626;
  --ambar: #e8b43c;
  --ambar-suave: #3a3018;
  --rojo: #ec6a5c;
  --rojo-suave: #40201d;
  --gris: #7d8898;
  --gris-suave: #2a323c;
  --g1: #5a9be6; --g2: #e88a58; --g3: #3dbb74; --g4: #a883e0; --g5: #e8b43c; --g6: #3cc3c9; --g7: #e0709f;
  --sombra: 0 1px 3px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
}
a { color: var(--pri); }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 1.3rem; margin: 1.4rem 0 .7rem; }
h3 { font-size: 1.08rem; margin: 0 0 .6rem; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .45rem; flex-wrap: nowrap; height: 58px;
  background: var(--panel); border-bottom: 1px solid var(--borde); padding: .5rem .9rem; box-shadow: var(--sombra);
}
.barra .marca { display: flex; flex-direction: column; margin-right: auto; min-width: 0; flex: 1 1 auto; }
.barra .marca b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra > * { flex: none; }
.barra > .marca { flex: 1 1 auto; }
.barra .marca > span { font-size: .8rem; color: var(--texto-3); }
.barra label.mes { display: flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .9rem; }
.barra select { padding: .35rem .5rem; border: 1px solid var(--borde); border-radius: 6px; background: var(--panel-2); font-weight: 600; }
.barra .btn { font-size: .8rem; padding: .38rem .55rem; white-space: nowrap; }
#btn-menu { display: none; }

/* ---------- Diseño general ---------- */
.contenedor { display: flex; min-height: calc(100vh - 58px); }
.lateral {
  width: var(--ancho-menu); flex: 0 0 var(--ancho-menu); background: var(--panel); border-right: 1px solid var(--borde);
  position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; padding: .7rem .6rem 2rem;
}
.buscador { width: 100%; padding: .5rem .65rem; border: 1px solid var(--borde); border-radius: 6px; background: var(--panel-2); margin-bottom: .6rem; }
#menu a { text-decoration: none; color: var(--texto); }
.menu-inicio { display: block; padding: .45rem .55rem; border-radius: 6px; font-weight: 700; }
.menu-inicio.activo, #menu li a.activo { background: var(--pri-suave); color: var(--pri-2); }
.menu-mod { margin: .15rem 0; }
.menu-mod summary { cursor: pointer; padding: .45rem .4rem; font-weight: 700; font-size: .88rem; color: var(--texto-2); border-radius: 6px; list-style: none; display: flex; align-items: center; gap: .45rem; }
.menu-mod summary::-webkit-details-marker { display: none; }
.menu-mod summary::after { content: "▸"; margin-left: auto; color: var(--texto-3); }
.menu-mod[open] summary::after { content: "▾"; }
.menu-mod summary:hover { background: var(--panel-2); }
.mod-n { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--pri); color: #fff; font-size: .78rem; flex: none; }
.menu-mod ul { list-style: none; margin: 0 0 .3rem; padding: 0 0 0 .3rem; }
.menu-mod li a { display: flex; align-items: center; gap: .4rem; padding: .32rem .45rem; border-radius: 6px; font-size: .88rem; }
.menu-mod li a:hover { background: var(--panel-2); }
.herr-n { font-variant-numeric: tabular-nums; color: var(--texto-3); font-weight: 700; font-size: .8rem; }
.herr-t { flex: 1; }
.marca-m { display: inline-block; font-size: .68rem; font-weight: 800; color: var(--acento); border: 1px solid var(--acento); border-radius: 4px; padding: 0 .25rem; line-height: 1.3; }
.marca-m.grande { font-size: .8rem; padding: .05rem .4rem; }
.punto-estado { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; flex: none; margin-left: .2rem; }
.punto-estado.est-ejemplo { background: var(--gris); }
.punto-estado.est-mios { background: var(--verde); }
.punto-estado.est-borrador { background: var(--ambar); }
.sin-result { color: var(--texto-3); font-size: .9rem; padding: .4rem; }
.principal { flex: 1; min-width: 0; padding: 1.1rem 1.4rem 3rem; outline: none; }

/* ---------- Botones ---------- */
.btn {
  border: 1px solid var(--borde); background: var(--panel); border-radius: 6px; padding: .5rem .85rem; cursor: pointer; font-weight: 600;
}
.btn:hover { background: var(--panel-2); }
.btn:focus-visible, .pest:focus-visible, .ctl:focus-visible, a:focus-visible { outline: 3px solid var(--pri); outline-offset: 1px; }
.btn-pri { background: var(--pri); color: #fff; border-color: var(--pri); }
.btn-pri:hover { background: var(--pri-2); }
.btn-peligro { color: var(--rojo); border-color: var(--rojo); }
.btn-sec { background: var(--panel-2); }
.btn-peq { font-size: .85rem; padding: .3rem .6rem; margin-top: .4rem; }
.btn-ico { border: none; background: transparent; cursor: pointer; color: var(--texto-3); font-size: .95rem; padding: .2rem .4rem; border-radius: 4px; }
.btn-ico:hover { color: var(--rojo); background: var(--rojo-suave); }

/* ---------- Estados ---------- */
.chip-estado { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 700; border: 1px solid transparent; }
.chip-estado.est-ejemplo { background: var(--gris-suave); color: var(--texto-2); border-color: var(--borde); }
.chip-estado.est-mios { background: var(--verde-suave); color: var(--verde); border-color: var(--verde); }
.chip-estado.est-borrador { background: var(--ambar-suave); color: var(--ambar); border-color: var(--ambar); }
.etiq-ejemplo { font-size: .82rem; font-weight: 700; color: var(--acento); border: 1px dashed var(--acento); border-radius: 4px; padding: .1rem .45rem; }
.etiq-ilus { font-size: .72rem; font-weight: 700; color: var(--g4); border: 1px dashed var(--g4); border-radius: 4px; padding: 0 .3rem; margin-left: .35rem; white-space: nowrap; vertical-align: middle; }
.aviso-pend { color: var(--ambar); font-weight: 700; font-size: .9rem; }
#banner-almac { background: var(--rojo); color: #fff; padding: .5rem 1rem; font-weight: 600; }

/* ---------- Encabezado de herramienta ---------- */
.herr-cab { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.2rem; box-shadow: var(--sombra); }
.herr-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; font-size: .85rem; color: var(--texto-3); }
.herr-num { font-weight: 800; color: #fff; background: var(--pri); border-radius: 6px; padding: .05rem .5rem; font-size: .9rem; }
.herr-cab h1 { margin: .35rem 0 .25rem; font-size: 1.5rem; }
.intro { margin: 0 0 .6rem; color: var(--texto-2); max-width: 70rem; }
.herr-estado { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .7rem; }
.acciones { display: flex; flex-wrap: wrap; gap: .4rem; }
.acciones .btn { font-size: .86rem; padding: .42rem .7rem; }
.herr-pie { margin-top: 1.4rem; padding-top: .7rem; border-top: 1px solid var(--borde); display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; font-size: .8rem; color: var(--texto-3); }

/* ---------- Pestañas ---------- */
.pestanas { display: flex; flex-wrap: wrap; gap: .25rem; margin: 1rem 0 0; border-bottom: 2px solid var(--borde); }
.pest { border: 1px solid transparent; border-bottom: none; background: transparent; padding: .55rem 1rem; cursor: pointer; font-weight: 600; color: var(--texto-2); border-radius: 6px 6px 0 0; margin-bottom: -2px; }
.pest:hover { background: var(--panel-2); }
.pest.activa { background: var(--panel); border-color: var(--borde); border-bottom: 2px solid var(--panel); color: var(--pri-2); }
.panel { background: var(--panel); border: 1px solid var(--borde); border-top: none; border-radius: 0 0 var(--radio) var(--radio); padding: 1.1rem 1.2rem; }
.pest-impresa { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.2rem; margin-top: 1rem; }
.pest-tit { margin-top: 0; }

/* ---------- Bloques y campos ---------- */
.bloque { margin: 0 0 1.3rem; }
.bloque:last-child { margin-bottom: 0; }
.dos-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.2rem; }
.tres-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.fila-campos { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: flex-end; margin-bottom: .7rem; }
.campo { display: flex; flex-direction: column; gap: .25rem; min-width: 180px; flex: 1 1 200px; }
.campo-ancho { flex-basis: 100%; }
.campo-medio { flex: 2 1 320px; }
.campo-corto { flex: 0 1 150px; min-width: 120px; }
.campo-e { font-weight: 600; font-size: .9rem; color: var(--texto-2); }
.campo-c { display: flex; align-items: center; gap: .3rem; }
.campo-c .ctl { flex: 1; min-width: 0; }
.afijo { color: var(--texto-3); font-weight: 600; }
.campo-check { flex-direction: row; align-items: center; gap: .55rem; min-width: 0; flex: 1 1 100%; }
.campo-check input { width: 1.25rem; height: 1.25rem; flex: none; }
.ayuda { color: var(--texto-3); font-size: .8rem; }
.ctl { border: 1px solid var(--borde); border-radius: 6px; background: var(--panel-2); padding: .45rem .55rem; width: 100%; }
.ctl:disabled { opacity: .75; }
textarea.ctl { resize: vertical; min-height: 2.6rem; }
.ctl-num, .ctl-dinero, .ctl-pct { text-align: right; font-variant-numeric: tabular-nums; }
.checklist { display: flex; flex-direction: column; gap: .5rem; }
.nota { color: var(--texto-3); font-size: .88rem; margin: .4rem 0; }
.nota-info { background: var(--pri-suave); color: var(--texto); padding: .55rem .8rem; border-radius: 6px; }
.nota-alerta { background: var(--ambar-suave); color: var(--texto); padding: .55rem .8rem; border-radius: 6px; border-left: 4px solid var(--ambar); }
.alerta { padding: .7rem 1rem; border-radius: 6px; margin: .7rem 0; font-weight: 600; }
.alerta-rojo { background: var(--rojo-suave); color: var(--rojo); border-left: 4px solid var(--rojo); }
.alerta-verde { background: var(--verde-suave); color: var(--verde); border-left: 4px solid var(--verde); }
.alerta-ambar { background: var(--ambar-suave); color: var(--ambar); border-left: 4px solid var(--ambar); }
.error { color: var(--rojo); font-weight: 600; }
.desplegable { border: 1px solid var(--borde); border-radius: 6px; padding: .5rem .8rem; margin: .5rem 0; background: var(--panel-2); }
.desplegable summary { cursor: pointer; font-weight: 700; }
.enlace-herr { font-weight: 600; }
.dato-origen { font-size: .78rem; color: var(--texto-3); }

/* ---------- Tablas ---------- */
.tabla-envoltura { overflow-x: auto; max-width: 100%; }
.tabla { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tabla th, .tabla td { border: 1px solid var(--rejilla); padding: .35rem .45rem; vertical-align: top; text-align: left; }
.tabla thead th { background: var(--panel-2); font-size: .82rem; color: var(--texto-2); position: sticky; top: 0; }
.tabla tfoot td { background: var(--panel-2); font-weight: 700; }
.tabla td.num, .tabla th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla-edit td { padding: .2rem; }
.tabla-edit .ctl { padding: .3rem .4rem; font-size: .88rem; }
.tabla-edit textarea.ctl { min-height: 2.2rem; }
.col-acc { width: 2.4rem; text-align: center !important; }
.col-n { width: 2.2rem; text-align: center !important; color: var(--texto-3); }
.celda-calc { background: var(--panel-2); font-variant-numeric: tabular-nums; text-align: right; vertical-align: middle !important; white-space: nowrap; }
.tabla-meses { font-size: .82rem; }
.tabla-meses th, .tabla-meses td { text-align: right; white-space: nowrap; }
.tabla-meses .col-fija { text-align: left; position: sticky; left: 0; background: var(--panel); z-index: 1; min-width: 10.5rem; max-width: 16rem; white-space: normal; }
.tabla-meses thead .col-fija { background: var(--panel-2); z-index: 2; }
.tabla-meses .ctl { min-width: 4.1rem; padding: .22rem .25rem; font-size: .8rem; }
.tabla-meses td, .tabla-meses th { padding: .25rem .3rem; }
.tabla-meses .mes-actual { background: var(--pri-suave); }
.tabla-meses .fila-calc td { background: var(--panel-2); font-weight: 600; }
.tabla-meses .fila-calc td.mes-actual { background: var(--pri-suave); }
.celda-total { font-weight: 700; background: var(--panel-2); }
.fila-destacada td { background: var(--pri-suave); }

/* ---------- Semáforo, KPIs ---------- */
.luz { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.luz i { width: .8rem; height: .8rem; border-radius: 50%; display: inline-block; }
.luz-verde { color: var(--verde); } .luz-verde i { background: var(--verde); }
.luz-ambar { color: var(--ambar); } .luz-ambar i { background: var(--ambar); }
.luz-rojo { color: var(--rojo); } .luz-rojo i { background: var(--rojo); }
.luz-gris { color: var(--gris); } .luz-gris i { background: var(--gris); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; margin: .5rem 0 1rem; }
.kpi { background: var(--panel-2); border: 1px solid var(--borde); border-left: 5px solid var(--gris); border-radius: var(--radio); padding: .65rem .8rem; }
.kpi-verde { border-left-color: var(--verde); } .kpi-ambar { border-left-color: var(--ambar); } .kpi-rojo { border-left-color: var(--rojo); } .kpi-azul { border-left-color: var(--pri); }
.kpi-t { font-size: .8rem; color: var(--texto-2); font-weight: 600; }
.kpi-v { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: .15rem 0; }
.kpi-s { font-size: .78rem; color: var(--texto-3); }
.kpi-enlace { text-decoration: none; color: inherit; }
.grafico { position: relative; width: 100%; margin: .4rem 0 1rem; }
.leyenda-sem { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; margin: .3rem 0 .8rem; }

/* Barra de progreso */
.prog { height: .75rem; background: var(--gris-suave); border-radius: 999px; overflow: hidden; min-width: 80px; }
.prog > div { height: 100%; border-radius: 999px; }
.prog-verde > div { background: var(--verde); } .prog-ambar > div { background: var(--ambar); } .prog-rojo > div { background: var(--rojo); } .prog-azul > div, .prog-gris > div { background: var(--pri); }

/* Cuadrantes (FODA, Ansoff) */
.cuadrantes { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.cuadrante { border: 1px solid var(--borde); border-radius: var(--radio); padding: .8rem; background: var(--panel-2); }
.cuadrante h3 { display: flex; justify-content: space-between; align-items: center; }
.cuad-f { border-top: 5px solid var(--verde); } .cuad-d { border-top: 5px solid var(--ambar); } .cuad-o { border-top: 5px solid var(--pri); } .cuad-a { border-top: 5px solid var(--rojo); }
.contador { background: var(--pri); color: #fff; border-radius: 999px; padding: 0 .55rem; font-size: .85rem; }

/* Embudo visual */
.embudo { display: flex; flex-direction: column; align-items: center; gap: .3rem; margin: .6rem 0; }
.embudo-et { color: #fff; text-align: center; padding: .55rem .5rem; border-radius: 6px; font-weight: 700; min-width: 180px; }
.embudo-et small { display: block; font-weight: 500; opacity: .9; }

/* Mapa de calor */
.calor td { text-align: center; font-weight: 600; }

/* Organigrama */
.organigrama { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.org-caja { border: 2px solid var(--pri); background: var(--pri-suave); border-radius: 8px; padding: .5rem .8rem; text-align: center; font-weight: 700; }
.org-caja small { display: block; font-weight: 500; color: var(--texto-2); }
.org-hijos { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.org-hijos .org-caja { border-color: var(--acento); background: var(--panel-2); min-width: 150px; }

/* Línea de tiempo */
.linea-tiempo td.lt { text-align: center; font-size: .75rem; min-width: 2.2rem; }
.lt-verde { background: var(--verde) !important; color: #fff; } .lt-ambar { background: var(--ambar) !important; color: #fff; } .lt-rojo { background: var(--rojo) !important; color: #fff; } .lt-plan { background: var(--pri-suave) !important; }

/* Tarjetas */
.tarjeta { border: 1px solid var(--borde); border-radius: var(--radio); background: var(--panel-2); padding: .9rem 1rem; }
.tarjeta h3 { margin-bottom: .4rem; }
.tarjeta.sel { border: 2px solid var(--pri); }

/* ---------- Inicio ---------- */
.portada { background: linear-gradient(135deg, var(--pri) 0%, var(--pri-2) 100%); color: #fff; border-radius: 12px; padding: 1.5rem 1.6rem; }
:root[data-theme="dark"] .portada { background: linear-gradient(135deg, #1f3a5f 0%, #172b45 100%); }
.portada h1 { margin: .2rem 0 .5rem; font-size: 1.9rem; }
.portada .sobre { margin: 0; opacity: .9; font-weight: 600; }
.portada .lead { max-width: 60rem; margin: 0 0 1rem; }
.pasos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.paso { display: flex; gap: .6rem; background: rgba(255, 255, 255, .12); border-radius: 8px; padding: .7rem; }
.paso p { margin: .2rem 0 0; font-size: .88rem; }
.paso-n { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: #fff; color: var(--pri-2); font-weight: 800; flex: none; }
.mosaico { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.tarjeta-mod { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: .9rem 1rem; box-shadow: var(--sombra); }
.tarjeta-mod h3 { display: flex; gap: .5rem; align-items: center; }
.tarjeta-mod ul { list-style: none; padding: 0; margin: 0; }
.tarjeta-mod li { padding: .18rem 0; display: flex; align-items: center; gap: .35rem; font-size: .92rem; }
.tarjeta-mod li a { text-decoration: none; color: var(--texto); flex: 1; }
.tarjeta-mod li a:hover { color: var(--pri); }

/* ---------- Avisos flotantes ---------- */
#avisos { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: flex; flex-direction: column; gap: .5rem; max-width: 420px; }
.aviso-flot { background: var(--panel); border: 1px solid var(--borde); border-left: 5px solid var(--pri); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); padding: .7rem .9rem; border-radius: 6px; font-weight: 600; transition: opacity .5s; }
.aviso-ok { border-left-color: var(--verde); }
.aviso-error { border-left-color: var(--rojo); }
.aviso-flot.salir { opacity: 0; }
#btn-salir-imp { display: none; }
body.modo-impresion #btn-salir-imp { display: inline-block; }

/* ---------- Reporte ejecutivo (38) ---------- */
.reporte { display: flex; flex-direction: column; gap: 1rem; }
.diapo { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 1.4rem 1.6rem; box-shadow: var(--sombra); min-height: 420px; }
.diapo h2 { margin-top: 0; color: var(--pri-2); border-bottom: 3px solid var(--acento); padding-bottom: .35rem; }
.diapo-portada { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(135deg, var(--pri) 0%, var(--pri-2) 100%); color: #fff; }
.diapo-portada h1 { font-size: 2.2rem; margin: .3rem 0; }
.diapo-portada p { margin: .2rem 0; }
.diapo .comentario { background: var(--panel-2); border-left: 4px solid var(--acento); padding: .5rem .8rem; margin-top: .8rem; font-style: italic; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  :root { --ancho-menu: 250px; }
  html { font-size: 16px; }
}
@media (max-width: 1250px) {
  .barra .marca > span { display: none; }
}
@media (max-width: 860px) {
  .barra { flex-wrap: wrap; height: auto; }
  #btn-menu { display: inline-block; }
  .lateral { position: fixed; left: 0; top: 58px; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--sombra); }
  body.menu-abierto .lateral { transform: none; }
  .cuadrantes { grid-template-columns: 1fr; }
  .principal { padding: .8rem; }
}
.txt-rojo { color: var(--rojo); font-weight: 700; }
:root[data-theme="dark"] .btn-pri, :root[data-theme="dark"] .herr-num, :root[data-theme="dark"] .mod-n, :root[data-theme="dark"] .contador { color: #0b1a2e; }
@media print { .diapo { font-size: 12pt; } .diapo .kpi-v { font-size: 20pt; } }
.chip-v { display: inline-block; background: var(--acento); color: #fff; border-radius: 4px; padding: 0 .35rem; font-size: .75rem; margin-right: .25rem; vertical-align: 1px; }
.chip-demo { display: inline-block; background: var(--acento); color: #fff; border-radius: 4px; padding: .05rem .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .01em; margin-right: .35rem; vertical-align: 1px; }
.bloque-demo { background: var(--pri-suave); border: 1px solid var(--pri); border-radius: var(--radio); padding: .8rem 1rem; margin: 1rem 0 1.5rem; }
.bloque-demo p { margin: .2rem 0; }
.bloque-demo a { color: var(--pri); font-weight: 700; }

/* ---------- S1-5: banda de la demo, carga y elementos antes en línea ---------- */
.banda-demo { background: var(--acento); color: #fff; padding: .45rem 1rem; font-weight: 700; text-align: center; }
.cargando { padding: 2rem; opacity: .8; }
.sin-js { padding: 2rem; }
.alerta.conflicto { margin-top: .75rem; }
.alerta.conflicto .btn { margin-top: .5rem; }
.ctl-vista { outline: 2px dashed var(--acento); outline-offset: 1px; }
@media print { .banda-demo { display: none; } }

/* ---------- S1-8: Pronóstico (39) ---------- */
.kpi-conservador { border-left-color: var(--ambar); } .kpi-moderado { border-left-color: var(--pri); } .kpi-optimista { border-left-color: var(--verde); }
.rango-cab { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.rango-cab h3 { margin: 0; }
.advertencia-pronostico { margin: .5rem 0 1rem; }
.metodo-desactivado { opacity: .75; background: var(--panel-2); }
tr.metodo-desactivado td { color: var(--gris); }
.etiq-desactivado { display: inline-block; background: var(--gris); color: #fff; border-radius: 4px; padding: 0 .4rem; font-size: .72rem; font-weight: 700; vertical-align: 2px; }

/* ---------- S2-2b: páginas de acceso ---------- */
.pagina-acceso { background: var(--fondo, #f6f7f9); }
.acceso { max-width: 30rem; margin: 3rem auto; padding: 1.5rem 1.75rem; background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); }
.acceso h1 { margin-top: .25rem; }
.acceso-marca { margin: 0; opacity: .8; }
.form-acceso { display: grid; gap: .8rem; margin: 1rem 0; }
.form-acceso .campo input { width: 100%; }
.campo-check { display: flex; gap: .5rem; align-items: flex-start; }
.campo-trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.resultado { padding: .7rem .9rem; border-radius: var(--radio); margin: 1rem 0; }
.resultado-ok { background: var(--verde-suave); }
.resultado-error { background: var(--rojo-suave); }
.acceso-enlaces { font-size: .92rem; }
/* S2c: contraseña con botón para mostrarla u ocultarla, y confirmación del correo antes de crear la cuenta */
.campo-clave { display: flex; gap: .4rem; align-items: center; }
.campo-clave input { flex: 1; min-width: 0; }
.ver-clave { display: inline-flex; padding: .35rem; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--panel); color: inherit; cursor: pointer; }
.ver-clave[aria-pressed="true"] { background: var(--panel-2); }
.confirmar-correo { padding: .8rem 1rem; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--panel-2); margin: 1rem 0; }
.banda-correo { padding: .5rem 1rem; background: var(--amarillo-suave, #fff4cc); color: inherit; border-bottom: 1px solid var(--borde); font-size: .95rem; }
.boton-enlace { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: inherit; text-decoration: underline; }
.confirmar-correo p { margin-top: 0; font-weight: 600; word-break: break-all; }

/* ---------- S2-4: página de Planes ---------- */
.acceso-ancho { max-width: 60rem; }
.tabla-planes th[scope="row"] { text-align: left; font-weight: 600; }
.tabla-planes td, .tabla-planes thead th { text-align: center; }
.banda-enlace { color: #fff; text-decoration: underline; margin-left: .35rem; }

/* ---------- S2-5: panel del equipo ---------- */
.acceso-panel { max-width: 90rem; }
.acceso-panel section { margin: 1.5rem 0; }
.acceso-panel td input[type="text"] { width: 14rem; }
.panel-sesion { margin: -.25rem 0 1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
#mensaje .btn, #mensaje a { margin-left: .25rem; }
.resultado-info { background: var(--panel-2); }

/* ---------- S1-6: textos legales ---------- */
.legal-version { font-weight: 600; margin: .75rem 0 0; }
.legal-anterior { padding: .7rem .9rem; border-radius: var(--radio); margin: .75rem 0; }
.legal-anterior { background: var(--panel-2); }
.legal-texto { line-height: 1.55; }
.legal-texto h1, .legal-texto h2 { margin-top: 1.6rem; }
.legal-texto table { width: 100%; border-collapse: collapse; margin: 1rem 0; display: block; overflow-x: auto; }
.legal-texto th, .legal-texto td { border: 1px solid var(--borde); padding: .45rem .6rem; text-align: left; vertical-align: top; }
.legal-versiones { border-top: 1px solid var(--borde); margin-top: 2rem; }
.form-legal { display: grid; gap: .5rem; max-width: 50rem; margin: 1rem 0; }
.form-legal textarea { width: 100%; font-family: inherit; }
.legal-ver, .conf-texto { white-space: pre-wrap; max-height: 20rem; overflow: auto; background: var(--panel-2); padding: .6rem .8rem; border-radius: var(--radio); }
.legal-confirmar { border: 1px solid var(--borde); border-radius: var(--radio); padding: .8rem 1rem; }
.legal-nota { font-size: .92rem; opacity: .85; }
