/* TENDON - estilo compartido (pagina publica, portal y sistema del equipo).  DISEÑO «CLARO» (v3, nov 2026).
   Referencia: Ajustes, Salud y Wallet de Apple. Fondo gris muy suave, tarjetas blancas, titulos grandes y azul del sistema.
   El modo oscuro sigue solo al del aparato (prefers-color-scheme). Todos los colores salen de las variables de :root:
   para cambiar un color se cambia AQUI, nunca escrito a mano en otra hoja.

   Reglas del diseño:
   - Base neutra (gris, blanco, tinta). El azul (--clave) solo en lo que se puede tocar y en lo activo.
   - Verde / naranja / rojo solo para estados (al corriente / por vencer / vencido).
   - Nada de adornos: sin brillos, sin fondos animados, sin cursores con luz. El movimiento solo explica algo:
     cambiar de seccion (se desliza), tocar (se hunde), cargar (esqueleto) y terminar (palomita / aviso). */

:root {
  color-scheme: light dark;
  /* superficies */
  --fondo: #f2f2f7;            /* fondo de la pagina */
  --fondo-2: #e9e9ef;          /* menu lateral */
  --sup: #ffffff;              /* tarjetas */
  --sup-2: #f2f2f7;            /* cajas dentro de una tarjeta */
  --campo: rgba(118, 118, 128, 0.12);   /* fondo de campos y botones neutros */
  --campo-2: rgba(118, 118, 128, 0.2);
  --barra: rgba(249, 249, 251, 0.86);   /* barras que flotan (abajo en celular, cabeza) */
  /* tinta */
  --texto: #1c1c1e;
  --suave: #636366;
  --tenue: #8e8e93;
  --borde: rgba(60, 60, 67, 0.2);
  --borde-2: rgba(60, 60, 67, 0.12);
  --t: 28, 28, 30;             /* la tinta en numeros, para transparencias: rgba(var(--t), .08) */
  /* color clave */
  --clave: #007aff;
  --clave-oscuro: #0062cc;     /* al presionar / texto azul sobre blanco */
  --clave-claro: #0062cc;      /* texto azul */
  --chispa: #007aff;
  --azul: #0062cc;
  --c: 0, 122, 255;            /* el azul en numeros */
  --sobre-clave: #fff;
  /* estados */
  --ok: #1f7a37;      --ok-f: rgba(52, 199, 89, 0.16);
  --aviso: #a34d00;   --aviso-f: rgba(255, 149, 0, 0.18);
  --mal: #c9001c;     --mal-f: rgba(255, 59, 48, 0.13);
  --rojo: #ff3b30;
  /* grises y segundo color (los usan las bandas del equipo) */
  --gris-1: #ffffff; --gris-2: #f7f7fa; --gris-3: #ececf0; --gris-4: #d1d1d6; --gris-5: #636366; --gris-6: #3a3a3c;
  --morado: #5856d6; --morado-oscuro: #4543b8; --morado-claro: #4d4bc4; --morado-tenue: rgba(88, 86, 214, 0.12);
  /* compatibilidad con hojas anteriores */
  --vidrio: var(--sup); --vidrio-2: var(--sup);
  --sombra: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
  --sombra-alta: 0 12px 40px rgba(0, 0, 0, 0.16);
  --sombra-glow: 0 0 0 4px rgba(var(--c), 0.18);
  /* pagina publica: fondo color papel, texto sobre fotos y marcos de laptop / telefono */
  --papel: #fbfaf8; --papel-2: #f3f1ec;
  --sobre-foto: #ffffff; --f: 255, 255, 255;
  --velo-1: rgba(10, 10, 12, 0.62); --velo-2: rgba(10, 10, 12, 0.52); --velo-3: rgba(10, 10, 12, 0.86);
  --marco: #1d1d1f; --marco-base: #c9c9ce;
  /* forma y letra */
  --radio: 16px;
  --radio-chico: 10px;
  --letra: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --titulo: var(--letra);
  --marca: "Helvetica Neue", Helvetica, Arial, sans-serif;     /* el nombre tendon: Helvetica negrita, minusculas */
  --ancho: 1120px;
  /* movimiento */
  --suave-mov: cubic-bezier(0.25, 0.8, 0.25, 1);
  --rebote: cubic-bezier(0.3, 1.3, 0.5, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #000000; --fondo-2: #111113; --sup: #1c1c1e; --sup-2: #2c2c2e;
    --campo: rgba(118, 118, 128, 0.24); --campo-2: rgba(118, 118, 128, 0.36); --barra: rgba(22, 22, 24, 0.86);
    --texto: #ffffff; --suave: #a1a1a8; --tenue: #7c7c82; --borde: rgba(84, 84, 88, 0.65); --borde-2: rgba(84, 84, 88, 0.4); --t: 255, 255, 255;
    --clave: #0a84ff; --clave-oscuro: #409cff; --clave-claro: #409cff; --chispa: #0a84ff; --azul: #409cff; --c: 10, 132, 255;
    --ok: #30d158; --ok-f: rgba(48, 209, 88, 0.18); --aviso: #ff9f0a; --aviso-f: rgba(255, 159, 10, 0.18); --mal: #ff6961; --mal-f: rgba(255, 69, 58, 0.2); --rojo: #ff453a;
    --gris-1: #1c1c1e; --gris-2: #232326; --gris-3: #2c2c2e; --gris-4: #48484a; --gris-5: #a1a1a8; --gris-6: #d1d1d6;
    --morado: #5e5ce6; --morado-oscuro: #7d7aff; --morado-claro: #a5a3ff; --morado-tenue: rgba(94, 92, 230, 0.22);
    --sombra: none; --sombra-alta: 0 16px 50px rgba(0, 0, 0, 0.6);
    --papel: #0b0b0c; --papel-2: #141416; --marco: #2c2c2e; --marco-base: #48484a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--fondo); color: var(--texto);
  font: 17px/1.47 var(--letra); letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { font-family: var(--titulo); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
a { color: var(--clave-claro); text-decoration: none; }
a:hover { color: var(--clave); }
img, svg { max-width: 100%; }
small { font-size: 0.82em; }
::selection { background: rgba(var(--c), 0.25); }
:focus-visible { outline: 3px solid rgba(var(--c), 0.55); outline-offset: 2px; border-radius: 8px; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }
.oculto { display: none !important; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.degradado { color: var(--texto); }
.acento { color: var(--clave); }
.acento-morado { color: var(--morado-claro); }
.etiqueta { display: inline-flex; align-items: center; gap: 8px; font: 600 0.8rem/1 var(--letra); color: var(--clave-claro); letter-spacing: 0; }

/* ---------------------------------------------------------------- tarjetas (la clase se llama .vidrio por historia: ya no hay vidrio) */
.vidrio { position: relative; background: var(--sup); border-radius: var(--radio); box-shadow: var(--sombra); }

/* ---------------------------------------------------------------- botones
   .btn = boton neutro (gris con texto azul).  .principal / .pulso = azul lleno: uno solo por pantalla.
   .secundario = gris con texto negro.  .fantasma = solo texto.  .peligro = rojo. */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 12px; cursor: pointer;
  font: 600 1rem/1 var(--letra); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  color: var(--clave-claro); background: var(--campo);
  transition: transform 0.12s var(--suave-mov), background 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.btn:hover { color: var(--clave-claro); background: var(--campo-2); }
.btn:active { transform: scale(0.97); opacity: 0.8; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn.principal, .btn.pulso { color: var(--sobre-clave); background: var(--clave); }
.btn.principal:hover, .btn.pulso:hover { color: var(--sobre-clave); background: var(--clave-oscuro); }
@media (prefers-color-scheme: dark) { .btn.principal:hover, .btn.pulso:hover { background: #0071e3; } }
/* el boton que envia un formulario es el principal aunque no lleve la clase */
form .btn[type=submit]:not(.secundario):not(.fantasma):not(.peligro) { color: var(--sobre-clave); background: var(--clave); }
form .btn[type=submit]:not(.secundario):not(.fantasma):not(.peligro):hover { background: var(--clave-oscuro); }
.btn.secundario { color: var(--texto); background: var(--campo); }
.btn.secundario:hover { color: var(--texto); background: var(--campo-2); }
.btn.fantasma { background: transparent; color: var(--clave-claro); padding: 0 12px; }
.btn.fantasma:hover { background: var(--campo); }
.btn.peligro { color: #fff; background: var(--rojo); }
.btn.peligro:hover { color: #fff; background: var(--rojo); opacity: 0.88; }
.btn.chico { min-height: 34px; padding: 0 14px; font-size: 0.88rem; border-radius: 9px; }
.btn.grande { min-height: 52px; padding: 0 28px; font-size: 1.06rem; border-radius: 14px; }
.btn.ancho { width: 100%; }
.btn .cargando { border-color: color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; }

/* ---------------------------------------------------------------- formularios */
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo > span, .campo > label { font-size: 0.82rem; color: var(--suave); font-weight: 500; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 0; border-radius: var(--radio-chico);
  font: inherit; color: var(--texto); background: var(--campo);
  transition: box-shadow 0.15s, background 0.15s;
}
textarea { min-height: 110px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.500 5 5 5-5'/%3E%3C/svg%3E"); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 3px rgba(var(--c), 0.35); }
input::placeholder, textarea::placeholder { color: var(--tenue); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--clave); flex: none; }
input[type=file] { padding: 9px; }
.fila-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }
.error-form { color: var(--mal); font-size: 0.9rem; min-height: 1.4em; margin: 4px 0 10px; }
.ok-form { color: var(--ok); }

/* ---------------------------------------------------------------- estado de pago y chips */
.estado, .chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 0.8rem; line-height: 1.3; white-space: nowrap; color: var(--suave); background: var(--campo);
}
.estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estado.al_corriente, .chip.ok { color: var(--ok); background: var(--ok-f); }
.estado.por_vencer, .chip.aviso { color: var(--aviso); background: var(--aviso-f); }
.estado.vencido, .chip.mal { color: var(--mal); background: var(--mal-f); }
.chip.azul { color: var(--clave-claro); background: rgba(var(--c), 0.12); }
.chip.morado, .estado.morado { color: var(--morado-claro); background: var(--morado-tenue); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
button.chip { cursor: pointer; font-family: inherit; }
button.chip:active { opacity: 0.6; }

/* ---------------------------------------------------------------- tablas */
.tabla-caja { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th { text-align: left; font-weight: 500; color: var(--tenue); font-size: 0.8rem; padding: 8px 12px; border-bottom: 1px solid var(--borde-2); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--borde-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
@media (hover: hover) { tbody tr:hover td { background: rgba(var(--t), 0.025); } }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- avisos discretos (abajo) */
#avisos { position: fixed; z-index: 10000; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; width: min(92vw, 440px); pointer-events: none; }
.aviso-flotante {
  display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 11px 18px; border-radius: 999px; pointer-events: auto;
  background: rgba(40, 40, 44, 0.94); color: #fff; font-size: 0.92rem; font-weight: 500; box-shadow: var(--sombra-alta);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  animation: subir 0.32s var(--rebote);
}
.aviso-flotante::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #8e8e93; flex: none; }
.aviso-flotante.ok::before { background: #30d158; }
.aviso-flotante.error::before { background: #ff453a; }
@keyframes subir { from { opacity: 0; transform: translateY(14px) scale(0.96); } }

/* ---------------------------------------------------------------- ventanas: en computadora al centro; en celular, hoja que sube desde abajo */
dialog.ventana { border: 0; padding: 0; background: transparent; color: var(--texto); width: min(94vw, 540px); max-height: 90vh; overflow: visible; }
dialog.ventana.ancha { width: min(94vw, 760px); }
dialog.ventana::backdrop { background: rgba(0, 0, 0, 0.36); animation: velo 0.25s ease both; }
dialog.ventana[open] { animation: aparecer-ventana 0.28s var(--suave-mov); }
@keyframes aparecer-ventana { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes velo { from { opacity: 0; } }
.ventana-caja { position: relative; padding: 26px; max-height: 90vh; overflow-y: auto; overflow-x: hidden; background: var(--sup); border-radius: 20px; box-shadow: var(--sombra-alta); }
.ventana-caja h3 { font-size: 1.32rem; margin-bottom: 12px; padding-right: 40px; }
.ventana-cerrar { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--campo); color: var(--suave); font-size: 1.25rem; line-height: 1; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.ventana-cerrar:hover { background: var(--campo-2); color: var(--texto); }
.botones-ventana { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 640px) {
  dialog.ventana, dialog.ventana.ancha { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92dvh; }
  dialog.ventana[open] { animation: hoja-sube 0.34s var(--suave-mov); }
  .ventana-caja { border-radius: 22px 22px 0 0; max-height: 92dvh; padding: 30px 20px calc(22px + env(safe-area-inset-bottom)); }
  .ventana-caja::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--borde); }
  .botones-ventana { flex-direction: column-reverse; }
  .botones-ventana .btn { width: 100%; }
}
@keyframes hoja-sube { from { transform: translateY(100%); } }

/* ---------------------------------------------------------------- aparecer (pagina publica): solo un desvanecido corto */
html.js .aparece { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--suave-mov), transform 0.5s var(--suave-mov); }
html.js .aparece.visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- cargando: rueda chica en botones, esqueleto en secciones */
.cargando { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(var(--t), 0.2); border-top-color: var(--suave); animation: rodar 0.7s linear infinite; }
@keyframes rodar { to { transform: rotate(360deg); } }
.esqueleto, .vacio:has(> .cargando), .cargando-app {
  display: block; min-height: 220px; padding: 0; border-radius: var(--radio); color: transparent;
  background:
    linear-gradient(90deg, transparent, rgba(var(--t), 0.05), transparent) 0 0 / 200% 100%,
    linear-gradient(rgba(var(--t), 0.07), rgba(var(--t), 0.07)) 20px 24px / 38% 20px no-repeat,
    linear-gradient(rgba(var(--t), 0.05), rgba(var(--t), 0.05)) 20px 68px / calc(100% - 40px) 14px no-repeat,
    linear-gradient(rgba(var(--t), 0.05), rgba(var(--t), 0.05)) 20px 96px / 82% 14px no-repeat,
    linear-gradient(rgba(var(--t), 0.05), rgba(var(--t), 0.05)) 20px 124px / 64% 14px no-repeat,
    linear-gradient(rgba(var(--t), 0.05), rgba(var(--t), 0.05)) 20px 168px / 30% 30px no-repeat,
    var(--sup);
  animation: esqueleto 1.3s linear infinite;
}
.vacio:has(> .cargando) > .cargando, .cargando-app > .cargando { display: none; }
.cargando-app { margin: max(24px, 8vh) auto; width: min(92vw, 720px); }
@keyframes esqueleto { from { background-position: 200% 0, 20px 24px, 20px 68px, 20px 96px, 20px 124px, 20px 168px, 0 0; } to { background-position: -200% 0, 20px 24px, 20px 68px, 20px 96px, 20px 124px, 20px 168px, 0 0; } }

/* ---------------------------------------------------------------- caminar entre secciones
   La seccion nueva entra deslizandose desde la derecha y la anterior sale a la izquierda; al regresar, al reves.
   Lo activa comun.js (caminar) con la API de View Transitions; donde no existe, la seccion nueva solo entra con la clase .entra. */
.zona-seccion { view-transition-name: seccion; }
::view-transition-old(seccion), ::view-transition-new(seccion) { animation-duration: 0.3s; animation-timing-function: var(--suave-mov); }
::view-transition-old(seccion) { animation-name: sale-izq; }
::view-transition-new(seccion) { animation-name: entra-der; }
html.atras::view-transition-old(seccion) { animation-name: sale-der; }
html.atras::view-transition-new(seccion) { animation-name: entra-izq; }
html.pestana::view-transition-old(seccion) { animation-name: sale-quieto; animation-duration: 0.15s; }
html.pestana::view-transition-new(seccion) { animation-name: entra-quieto; animation-duration: 0.2s; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
@keyframes sale-izq { to { opacity: 0; transform: translateX(-28px); } }
@keyframes entra-der { from { opacity: 0; transform: translateX(44px); } }
@keyframes sale-der { to { opacity: 0; transform: translateX(28px); } }
@keyframes entra-izq { from { opacity: 0; transform: translateX(-44px); } }
@keyframes sale-quieto { to { opacity: 0; } }
@keyframes entra-quieto { from { opacity: 0; } }
.entra { animation: entra-der 0.3s var(--suave-mov); }
.entra.atras { animation-name: entra-izq; }

/* palomita que se dibuja al terminar una accion */
.palomita { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-f); color: var(--ok); display: grid; place-items: center; margin: 0 auto 14px; animation: palomita 0.4s var(--rebote); }
.palomita svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.600; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: trazo 0.35s 0.18s ease-out forwards; }
@keyframes palomita { from { transform: scale(0.5); opacity: 0; } }
@keyframes trazo { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- nombre y version */
.logo { font: 700 1.5rem/1 var(--marca); letter-spacing: -0.03em; color: var(--texto); display: inline-flex; align-items: center; }
.logo:hover { color: var(--texto); }
.version-pie { margin: 0; padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); text-align: center; font-size: 0.72rem; color: rgba(var(--t), 0.3); pointer-events: none; user-select: none; }
body:has(.eq-app) > .version-pie { display: none; }

/* ---------------------------------------------------------------- intro (intro.js): las fibras se tensan y forman «tendon». Una vez por sesion. */
#intro { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; background: var(--fondo); animation: intro-fuera 1.3s linear forwards; }
#intro.saltada { animation: none; opacity: 0; transition: opacity 0.18s; pointer-events: none; }
.intro-caja { position: relative; width: min(88vw, 560px); display: grid; place-items: center; }
.intro-caja svg { position: absolute; left: 0; top: 50%; width: 100%; height: 190px; margin-top: -95px; overflow: visible; max-width: none; transform: translateY(0.62em); font-size: clamp(3rem, 15vw, 5.6rem); }
.intro-caja path { opacity: 0; will-change: transform, opacity; animation: intro-fibra 1.1s cubic-bezier(0.6, 0, 0.2, 1) forwards; animation-delay: calc(var(--i) * 30ms); }
.intro-nombre { position: relative; font: 700 clamp(3rem, 15vw, 5.6rem)/1 var(--marca); letter-spacing: -0.03em; color: var(--texto); opacity: 0; will-change: transform, opacity; animation: intro-nombre 1.3s var(--suave-mov) forwards; }
@keyframes intro-fibra { 0% { opacity: 0; transform: scale(0.5, 1.7); } 28% { opacity: 1; transform: scale(1, 1.15); } 62% { opacity: 1; transform: scale(1.04, 0.012); } 100% { opacity: 1; transform: scale(1.08, 0.012); } }
@keyframes intro-nombre { 0%, 42% { opacity: 0; transform: translateY(10px) scale(1.04); } 72%, 100% { opacity: 1; transform: none; } }
@keyframes intro-fuera { 0%, 84% { opacity: 1; } 100% { opacity: 0; } }
@keyframes intro-quieto { 0% { opacity: 0; } 40%, 100% { opacity: 1; } }

/* ---------------------------------------------------------------- reducir movimiento (lo pide el aparato) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html.js .aparece { opacity: 1; transform: none; }
  .intro-caja svg { display: none; }
  #intro { animation-duration: 1.2s !important; }
  .intro-nombre { animation: intro-quieto 1.2s ease forwards !important; animation-duration: 1.2s !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ===== PORTAL VIVO (nivel pro) =====
   Colores propios del portal de clientes (web/portal): fondo color hueso como la pagina publica, sombras suaves y,
   en modo oscuro, un neutro profundo (no negro puro). El portal los toma en html.portal (ver portal.css). */
:root {
  --pv-fondo: #f6f5f1; --pv-fondo-2: #efede8;                 /* hueso: fondo de la pagina y del menu */
  --pv-sup: #ffffff; --pv-sup-2: #f5f4f0;                     /* tarjetas y cajas dentro de tarjetas */
  --pv-barra: rgba(250, 249, 246, 0.84);                      /* barra de abajo en celular */
  --pv-sombra: 0 1px 2px rgba(24, 22, 18, 0.04), 0 12px 32px -14px rgba(24, 22, 18, 0.12);
  --pv-sombra-alta: 0 2px 6px rgba(24, 22, 18, 0.05), 0 28px 64px -24px rgba(24, 22, 18, 0.26);
  --pv-curva: cubic-bezier(0.22, 1, 0.36, 1);                 /* la unica curva de movimiento del portal */
}
@media (prefers-color-scheme: dark) {
  :root {
    --pv-fondo: #0f1012; --pv-fondo-2: #15161a; --pv-sup: #1b1c20; --pv-sup-2: #25272c; --pv-barra: rgba(18, 19, 22, 0.84);
    --pv-sombra: 0 0 0 1px rgba(255, 255, 255, 0.06); --pv-sombra-alta: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 28px 64px -24px rgba(0, 0, 0, 0.7);
  }
}

/* ===== VIDRIO (nivel pro) =====
   Colores del vidrio del sistema del equipo (web/equipo): paneles translucidos sobre una foto real muy desenfocada.
   Solo son variables: no cambian nada por si solas. Las usa web/equipo/acceso.css y equipo.css.
   -panel = tarjetas sobre la foto.  -barra = barras que flotan (con desenfoque).  -hoja = ventanas y menu del celular.
   -firme = tablas y formularios (casi solido, para leer bien).  -solido = respaldo sin transparencia (equipos lentos).
   Los que terminan en -aa son la version con contraste WCAG AA (4.5:1) de un color que ya existia. */
:root {
  --vidrio-panel: rgba(255, 255, 255, 0.72);
  --vidrio-barra: rgba(246, 246, 249, 0.74);
  --vidrio-hoja: rgba(250, 250, 252, 0.88);
  --vidrio-firme: rgba(255, 255, 255, 0.93);
  --vidrio-solido: #ffffff;
  --vidrio-solido-2: #f4f4f7;
  --vidrio-borde: rgba(255, 255, 255, 0.78);       /* borde fino del vidrio */
  --vidrio-filo: rgba(60, 60, 67, 0.1);            /* raya exterior que lo separa del fondo */
  --vidrio-luz: rgba(255, 255, 255, 0.95);         /* linea de luz de 1 px arriba */
  --vidrio-sombra: 0 1px 2px rgba(15, 20, 30, 0.04), 0 10px 30px rgba(15, 20, 30, 0.07);
  --vidrio-sombra-alta: 0 24px 70px rgba(15, 20, 30, 0.24);
  --vidrio-velo: rgba(20, 22, 28, 0.3);            /* lo que oscurece detras de una ventana */
  --vidrio-campo: rgba(118, 118, 128, 0.13);       /* campos y botones neutros sobre vidrio */
  --vidrio-campo-2: rgba(118, 118, 128, 0.22);
  --vidrio-activo: #ffffff;                        /* la opcion elegida de un control segmentado */
  --suave-aa: #55555a;
  --tenue-aa: #66666b;
  --ok-aa: #17642b; --aviso-aa: #8a4100; --mal-aa: #b3001a;      /* texto de estado sobre su fondo de color */
  --clave-aa: #0062cc;                             /* fondo azul con texto blanco */
  --clave-aa-2: #0055b3;
  --clave-texto-aa: #0058b8;                       /* texto azul sobre vidrio */
  --rojo-aa: #d70015;                              /* fondo rojo con texto blanco */
}
@media (prefers-color-scheme: dark) {
  :root {
    --vidrio-panel: rgba(40, 40, 44, 0.68);
    --vidrio-barra: rgba(28, 28, 31, 0.72);
    --vidrio-hoja: rgba(34, 34, 38, 0.88);
    --vidrio-firme: rgba(30, 30, 33, 0.93);
    --vidrio-solido: #1e1e21;
    --vidrio-solido-2: #161618;
    --vidrio-borde: rgba(255, 255, 255, 0.09);
    --vidrio-filo: rgba(0, 0, 0, 0.5);
    --vidrio-luz: rgba(255, 255, 255, 0.16);
    --vidrio-sombra: 0 10px 30px rgba(0, 0, 0, 0.32);
    --vidrio-sombra-alta: 0 24px 70px rgba(0, 0, 0, 0.6);
    --vidrio-velo: rgba(0, 0, 0, 0.5);
    --vidrio-campo: rgba(255, 255, 255, 0.08);
    --vidrio-campo-2: rgba(255, 255, 255, 0.14);
    --vidrio-activo: #5a5a5f;
    --suave-aa: #b6b6bd;
    --tenue-aa: #a2a2a9;
    --ok-aa: #30d158; --aviso-aa: #ff9f0a; --mal-aa: #ff8a84;
    --clave-aa: #0a6edc;
    --clave-aa-2: #085fc0;
    --clave-texto-aa: #6ab2ff;
    --rojo-aa: #d92a20;
  }
}
