/* ═══════════════════════════════════════════════════════════════════════
   ACCESO AL CRM — login.css · Ecomedicc · RONDA 12 (rediseño completo)
   Lo usan login.php, recuperar-contrasena.php, restablecer-contrasena.php, cambiar-contrasena.php,
   verificar-correo.php y verificar-2fa.php (prefijo .au-). Autocontenido: no depende de main.css.

   RONDA 21 · CAMBIO — diseño A «panel dividido» con la paleta del logo: azul marino + verde + menta.
     · Cruces médicas que caen con destello (en el panel de marca y, suaves, en el fondo del login).
     · Lema y frase del mismo tamaño, resumen breve de lo que abarca el CRM y sus 6 áreas.
     · Casilla «No soy un robot» enmarcada con su estado debajo (marcada, vencida, falta marcarla).
     · Botón: barra fina al entrar, barrido verde, aro suave y palomita; rojo y vibración si falla.
     · Todo el movimiento usa transform, opacity o clip-path (el latido del ECG también, antes stroke-dashoffset).
     · Las páginas simples (recuperar, 2FA…) toman la misma paleta sin cambiar su HTML.

   RONDA 31 · CAMBIO
     · Fondo del login: vuelven las manchas de color y los destellos (cruces que caen) salen del panel de marca;
       quedan detrás del login, sutiles y en los colores de las manchas.
     · Al pasar a «Solicitar acceso» los dos paneles cambian de lado (computadora: izquierda ↔ derecha; teléfono: arriba ↔ abajo).
     · En el teléfono vuelven el latido (ECG) y las insignias de confianza.
     · Turnstile: la caja de Cloudflare aparece sola; «Volver a verificar» solo si falla.
     · 2FA: las casillas laten mientras se comprueba el código y se ponen verdes si es correcto (entra solo).

   1 tokens · 2 fondo y cruces · 3 armazón · 4 marca + ECG · 5 panel y pestañas · 6 campos · 6b casilla (+ Turnstile, RONDA 21b)
   7 botones · 8 avisos · 9 medidor · 10 páginas simples · 11 2FA · 12 responsive · 13 movimiento reducido
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1 · Tokens (RONDA 21 · CAMBIO: paleta del logo) ── */
:root {
    --au-navy-9: #061630; --au-navy-8: #0a2342; --au-navy-7: #0f2f57; --au-navy-6: #17406f;
    --au-verde-7: #0b6b5a; --au-verde-6: #0b7a60; --au-verde-5: #0f9f77; --au-menta: #6ee7c2; --au-menta-2: #b5f5df;
    --au-acc: #0b7a60; --au-acc-2: #0f9f77; --au-acc-3: #17406f; --au-relleno: #0b7a60;
    --au-ok: #0b7a60; --au-warn: #d97706; --au-warn-txt: #92400e; --au-err: #dc2626;
    --au-bg: #edf2f8; --au-ink: #0b1b30; --au-ink-2: #2c3d55; --au-muted: #56677d; --au-line: #d5dfea;
    --au-card: rgba(255, 255, 255, .78); --au-card-solid: #ffffff; --au-field: #f3f6fa; --au-field-on: #ffffff;
    --au-brand-a: #061630; --au-brand-b: #0f2f57; --au-brand-c: #17406f; --au-cz-pag: #0f9f77; --au-cz-pag-2: #5b8bc9; --au-cz-pag-3: #3fcfa4; --au-cz-brillo: rgba(110, 231, 194, .55);
    --au-sh: 0 1px 2px rgba(8, 20, 40, .06), 0 40px 80px -40px rgba(8, 25, 50, .45);
    --au-r: 27px; --au-ease: cubic-bezier(.22, 1, .36, 1); --au-spring: cubic-bezier(.34, 1.56, .64, 1);
    --au-ecg: #6ee7c2; --au-ecg-vel: 2.8s;
}
[data-theme="dark"] {
    --au-acc: #5fdcb3; --au-acc-2: #6ee7c2; --au-ok: #5fdcb3; --au-warn-txt: #fbbf24;
    --au-bg: #040b17; --au-ink: #e5edf7; --au-ink-2: #c2cedd; --au-muted: #93a4ba; --au-line: #1b2b43;
    --au-card: rgba(10, 21, 39, .8); --au-card-solid: #0a1527; --au-field: #081222; --au-field-on: #0c1a2f;
    --au-brand-a: #040e20; --au-brand-b: #0b2546; --au-brand-c: #17406f; --au-cz-pag: #6ee7c2; --au-cz-pag-2: #7fa6d9; --au-cz-pag-3: #b5f5df; --au-cz-brillo: rgba(110, 231, 194, .45);
    --au-sh: 0 1px 2px rgba(0, 0, 0, .4), 0 40px 80px -40px rgba(0, 0, 0, .8);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
.crm-ico, .lucide { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -.16em; flex: 0 0 auto; }
.au-body {
    min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px 18px;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--au-ink);
    background: var(--au-bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* ── 2 · Fondo (RONDA 21 · CAMBIO) ── */
.au-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
/* Páginas simples: manchas suaves en azul marino y verde */
.au-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: auFlota 22s ease-in-out infinite alternate; }
.au-blob--1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -16vmax; background: radial-gradient(circle at 30% 30%, #6ee7c2, #0b6b5a 70%); opacity: .35; }
.au-blob--2 { width: 38vmax; height: 38vmax; right: -10vmax; bottom: -14vmax; background: radial-gradient(circle at 60% 40%, #5b8bc9, #0f2f57 70%); animation-delay: -7s; opacity: .32; }
.au-blob--3 { width: 24vmax; height: 24vmax; right: 18vmax; top: -8vmax; background: radial-gradient(circle, #b5f5df, transparent 70%); animation-delay: -12s; opacity: .4; }
[data-theme="dark"] .au-blob { opacity: .2; }
.au-dots { position: absolute; inset: 0; fill: rgba(15, 47, 87, .08); }
[data-theme="dark"] .au-dots { fill: rgba(110, 231, 194, .05); }
@keyframes auFlota { to { transform: translate(4vmax, 3vmax) scale(1.08); } }

/* RONDA 21 · NUEVO — cruces médicas que caen con destello (solo transform y opacity) */
.au-cruces { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* RONDA 31 · CAMBIO — los destellos pasan del panel de marca al fondo, detrás del login, sobre las manchas de color:
   sutiles, con un brillo suave y en los colores de las manchas (menta, verde y azul). Antes .16 / .2, sin brillo y solo azul marino. */
.au-cruces--pag { opacity: .5; }
[data-theme="dark"] .au-cruces--pag { opacity: .55; }
.au-cz { --s: 12px; position: absolute; top: 0; height: 100%; width: var(--s); left: 5%; animation: auCae 14s linear infinite; will-change: transform; }
.au-cz i { position: absolute; left: 0; bottom: 0; width: var(--s); height: var(--s); color: #ffffff; filter: drop-shadow(0 0 6px currentColor); animation: auBrilla 3.2s ease-in-out infinite; }
.au-cz:nth-child(3n) i { color: var(--au-menta); }
.au-cruces--pag .au-cz i { width: calc(var(--s) * 1.3); height: calc(var(--s) * 1.3); color: var(--au-cz-pag); filter: drop-shadow(0 0 6px var(--au-cz-brillo)); }
.au-cruces--pag .au-cz:nth-child(3n) i { color: var(--au-cz-pag-2); }
.au-cruces--pag .au-cz:nth-child(3n+1) i { color: var(--au-cz-pag-3); }
.au-cz i::before, .au-cz i::after { content: ''; position: absolute; background: currentColor; border-radius: 2px; }
.au-cz i::before { left: 34%; right: 34%; top: 0; bottom: 0; }
.au-cz i::after { top: 34%; bottom: 34%; left: 0; right: 0; }
.au-cz:nth-child(1) { left: 4%; --s: 10px; animation-duration: 13s; animation-delay: -2s; }
.au-cz:nth-child(2) { left: 11%; --s: 16px; animation-duration: 17s; animation-delay: -9s; }
.au-cz:nth-child(3) { left: 18%; --s: 8px; animation-duration: 11s; animation-delay: -5s; }
.au-cz:nth-child(4) { left: 26%; --s: 12px; animation-duration: 15s; animation-delay: -12s; }
.au-cz:nth-child(5) { left: 33%; --s: 18px; animation-duration: 19s; animation-delay: -3s; }
.au-cz:nth-child(6) { left: 41%; --s: 9px; animation-duration: 12s; animation-delay: -7s; }
.au-cz:nth-child(7) { left: 48%; --s: 14px; animation-duration: 16s; animation-delay: -14s; }
.au-cz:nth-child(8) { left: 55%; --s: 10px; animation-duration: 13s; animation-delay: -1s; }
.au-cz:nth-child(9) { left: 62%; --s: 16px; animation-duration: 18s; animation-delay: -10s; }
.au-cz:nth-child(10) { left: 69%; --s: 8px; animation-duration: 10s; animation-delay: -6s; }
.au-cz:nth-child(11) { left: 76%; --s: 13px; animation-duration: 15s; animation-delay: -4s; }
.au-cz:nth-child(12) { left: 83%; --s: 11px; animation-duration: 14s; animation-delay: -11s; }
.au-cz:nth-child(13) { left: 90%; --s: 17px; animation-duration: 20s; animation-delay: -8s; }
.au-cz:nth-child(14) { left: 96%; --s: 9px; animation-duration: 12s; animation-delay: -2.5s; }
.au-cz:nth-child(15) { left: 22%; --s: 7px; animation-duration: 9s; animation-delay: -4.5s; }
.au-cz:nth-child(16) { left: 72%; --s: 7px; animation-duration: 10s; animation-delay: -8.5s; }
/* RONDA 31 · NUEVO — 8 cruces más para el fondo de toda la pantalla */
.au-cz:nth-child(17) { left: 8%; --s: 14px; animation-duration: 21s; animation-delay: -15s; }
.au-cz:nth-child(18) { left: 37%; --s: 11px; animation-duration: 16s; animation-delay: -13s; }
.au-cz:nth-child(19) { left: 52%; --s: 19px; animation-duration: 22s; animation-delay: -6.5s; }
.au-cz:nth-child(20) { left: 65%; --s: 9px; animation-duration: 12s; animation-delay: -9.5s; }
.au-cz:nth-child(21) { left: 80%; --s: 15px; animation-duration: 18s; animation-delay: -16s; }
.au-cz:nth-child(22) { left: 93%; --s: 12px; animation-duration: 14s; animation-delay: -3.5s; }
.au-cz:nth-child(23) { left: 1.5%; --s: 18px; animation-duration: 20s; animation-delay: -11.5s; }
.au-cz:nth-child(24) { left: 44%; --s: 8px; animation-duration: 11s; animation-delay: -0.5s; }
.au-cz:nth-child(even) i { animation-duration: 2.4s; animation-delay: -1.1s; }
.au-cz:nth-child(4n) i { animation-duration: 4.1s; }
@keyframes auCae { 0% { transform: translate3d(0, -100%, 0); opacity: 0; } 10% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translate3d(0, 0, 0); opacity: 0; } }
@keyframes auBrilla { 0%, 100% { opacity: .3; transform: rotate(0deg) scale(.85); } 50% { opacity: 1; transform: rotate(45deg) scale(1.12); } }

/* ── 3 · Armazón ── */
.au-shell {
    position: relative; z-index: 1; width: min(1120px, 100%); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 8px;
    border-radius: calc(var(--au-r) + 7px); padding: 8px; background: color-mix(in srgb, var(--au-card-solid) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--au-line) 80%, transparent); box-shadow: var(--au-sh);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    animation: auEntra .7s var(--au-ease) both;
}
@keyframes auEntra { from { opacity: 0; transform: translateY(16px) scale(.985); } }

/* ── 4 · Marca + ECG (RONDA 21 · CAMBIO) ── */
.au-brand {
    position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 20px; padding: 30px 34px 24px;
    border-radius: var(--au-r); color: #eaf2fb; min-height: 600px;
    background: radial-gradient(90% 65% at 0% 100%, rgba(16, 163, 127, .5), transparent 62%), radial-gradient(70% 60% at 100% 0%, rgba(29, 78, 137, .85), transparent 70%), linear-gradient(160deg, var(--au-brand-b), var(--au-brand-a) 78%);
}
[data-theme="dark"] .au-brand {
    background: radial-gradient(90% 65% at 0% 100%, rgba(11, 107, 90, .5), transparent 62%), radial-gradient(70% 60% at 100% 0%, rgba(23, 64, 111, .7), transparent 70%), linear-gradient(160deg, var(--au-brand-b), var(--au-brand-a) 78%);
}
.au-brand > .au-cruces { z-index: -1; }   /* RONDA 31 · el panel ya no trae cruces; se deja por si otra página las usa */
.au-brand__top { display: flex; align-items: center; gap: 12px; }
.au-brand__logo { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; overflow: hidden; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.au-brand__logo img { width: 80%; height: 80%; object-fit: contain; }
/* Sin archivo de logo: cruz médica dibujada con CSS */
.au-brand__logo.is-sin { position: relative; }
.au-brand__logo.is-sin::before, .au-brand__logo.is-sin::after { content: ''; position: absolute; background: #ffffff; border-radius: 3px; }
.au-brand__logo.is-sin::before { width: 7px; height: 20px; }
.au-brand__logo.is-sin::after { width: 20px; height: 7px; }
.au-brand__name b { display: block; font-size: 1.05rem; letter-spacing: .07em; font-weight: 800; }
.au-brand__name small { display: block; margin-top: 4px; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--au-menta-2); }
.au-brand__mid { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
/* RONDA 21 · CAMBIO — «Sistema de gestión médica integral» y «Cada dato, cuidado como cada paciente.» del mismo tamaño */
.au-brand__title { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: clamp(1.6rem, 2.5vw, 2.15rem); line-height: 1.12; letter-spacing: -.02em; }
.au-brand__lema { font-weight: 700; color: #ffffff; }
.au-brand__frase { font-weight: 800; color: var(--au-menta); }
.au-brand__sub { margin: 0; max-width: 46ch; font-size: .97rem; line-height: 1.6; color: rgba(234, 242, 251, .84); }
.au-mods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.au-mods li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-size: .84rem; font-weight: 600; color: #eaf2fb; }
.au-mods .crm-ico { color: var(--au-menta); }
/* Electrocardiograma: el trazo encendido se descubre con clip-path */
.au-ecg { position: relative; height: 52px; margin: 0 -34px; }
.au-ecg svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.au-ecg polyline { fill: none; stroke: var(--au-ecg); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; transition: stroke .4s; }
.au-ecg__linea { opacity: .22; }
.au-ecg__on { position: absolute; inset: 0; filter: drop-shadow(0 0 5px var(--au-ecg)); animation: auBarre var(--au-ecg-vel) linear infinite; }
@keyframes auBarre { 0% { clip-path: inset(0 100% 0 0); opacity: 1; } 70% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
.au-ecg.is-rapido { --au-ecg-vel: 1.3s; }
.au-ecg.is-error { --au-ecg: #fca5a5; animation: auTiembla .45s; }
.au-ecg.is-ok { --au-ecg: #86efac; --au-ecg-vel: .9s; }
@keyframes auTiembla { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
/* Latido de las páginas simples (trazos .au-ecg__base / .au-ecg__pulse de auth_layout.php) */
.au-ecg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.au-ecg__base { stroke: rgba(255, 255, 255, .14); stroke-width: 2; }
.au-ecg__pulse { stroke: var(--au-ecg); stroke-width: 2.6; animation: auRespira var(--au-ecg-vel) ease-in-out infinite; }
@keyframes auRespira { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.au-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.au-trust li { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: rgba(234, 242, 251, .82); }
.au-trust .crm-ico { color: var(--au-menta); }

/* ── 5 · Panel y pestañas ── */
.au-panel { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px 28px 12px; min-width: 0; border-radius: var(--au-r); background: var(--au-card-solid); }
.au-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 16px; background: var(--au-field); border: 1px solid var(--au-line); }
.au-seg button { position: relative; z-index: 1; min-height: 44px; border: 0; background: none; padding: 10px 8px; font-family: inherit; font-weight: 700; font-size: .87rem; line-height: 1; color: var(--au-muted); cursor: pointer; border-radius: 12px; transition: color .3s; }
.au-seg button[aria-selected="true"] { color: var(--au-ink); }
.au-seg button:focus-visible { outline: 2px solid var(--au-acc); outline-offset: 2px; }
.au-seg__pill { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 12px; background: var(--au-card-solid); box-shadow: 0 1px 2px rgba(8, 20, 40, .08), 0 8px 18px -10px rgba(8, 20, 40, .35); transition: transform .45s var(--au-spring); }
[data-theme="dark"] .au-seg__pill { background: #152741; }
.au-shell[data-vista="registro"] .au-seg__pill { transform: translateX(100%); }
.au-views { display: grid; }
.au-view { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; transition: opacity .35s var(--au-ease), transform .45s var(--au-ease), visibility .35s; }
.au-view[data-vista="login"] { transform: translateX(0); }
.au-shell[data-vista="registro"] .au-view[data-vista="login"],
.au-shell[data-vista="login"] .au-view[data-vista="registro"] { opacity: 0; visibility: hidden; pointer-events: none; }
/* RONDA 21 · CAMBIO — la vista oculta no reserva alto: el login ya no mide lo que mide el registro (cabe en 1366×768) */
.au-views { position: relative; }
.au-shell[data-vista="registro"] .au-view[data-vista="login"],
.au-shell[data-vista="login"] .au-view[data-vista="registro"] { position: absolute; inset: 0; overflow: hidden; }
.au-shell[data-vista="registro"] .au-view[data-vista="login"] { transform: translateX(-14px); }
.au-shell[data-vista="login"] .au-view[data-vista="registro"] { transform: translateX(14px); }
/* RONDA 31 · NUEVO — al pasar a «Solicitar acceso» los dos paneles cambian de lado: la marca se va a la derecha
   (abajo en el teléfono) y el formulario a la izquierda (arriba). Al volver a «Iniciar sesión» regresan.
   El orden lo pone esta regla; el desplazamiento lo anima login.js (cambiarLados, técnica FLIP). */
.au-brand, .au-panel { position: relative; }
.au-shell[data-vista="registro"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
.au-shell[data-vista="registro"] .au-brand { order: 2; }
.au-shell.is-cambiando .au-brand { z-index: 3; }
.au-shell.is-cambiando .au-panel { z-index: 2; }
.au-view__head h2 { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; }
.au-view__head p { margin: 4px 0 0; font-size: .9rem; color: var(--au-muted); }
.au-panel__foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .78rem; color: var(--au-muted); }
.au-theme { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--au-line); background: var(--au-field); color: var(--au-ink-2); cursor: pointer; }
.au-theme:focus-visible { outline: 2px solid var(--au-acc); outline-offset: 2px; }
.au-theme__sol { display: none; } [data-theme="dark"] .au-theme__sol { display: inline-block; } [data-theme="dark"] .au-theme__luna { display: none; }

/* ── 6 · Campos (etiqueta flotante) ── */
.au-field { position: relative; }
.au-field input {
    width: 100%; height: 56px; padding: 22px 50px 8px 46px; border-radius: 15px; border: 1.5px solid var(--au-line); background: var(--au-field);
    font-family: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; color: var(--au-ink); outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
}
.au-field input:hover { border-color: color-mix(in srgb, var(--au-acc) 35%, var(--au-line)); }
.au-field input:focus { border-color: var(--au-acc); background: var(--au-field-on); box-shadow: 0 0 0 4px color-mix(in srgb, var(--au-acc) 16%, transparent); }
.au-field label { position: absolute; left: 46px; top: 18px; font-size: .92rem; color: var(--au-muted); pointer-events: none; transform-origin: left top; transition: transform .2s var(--au-ease), color .2s; }
.au-field input:focus + label, .au-field input:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.78); font-weight: 700; color: var(--au-acc); }
.au-field__ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--au-muted); display: grid; transition: color .2s; }
.au-field:focus-within .au-field__ico { color: var(--au-acc); }
.au-field.is-err input { border-color: var(--au-err); box-shadow: 0 0 0 4px color-mix(in srgb, var(--au-err) 12%, transparent); }
.au-field.is-ok input { border-color: color-mix(in srgb, var(--au-ok) 60%, var(--au-line)); }
.au-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 12px; border: 0; background: none; color: var(--au-muted); cursor: pointer; display: grid; place-items: center; }
.au-eye:hover { color: var(--au-ink); background: color-mix(in srgb, var(--au-acc) 8%, transparent); }
.au-eye:focus-visible { outline: 2px solid var(--au-acc); }
.au-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.au-caps { margin: -6px 0 0; display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--au-warn); }
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .85rem; }
.au-check { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; color: var(--au-ink-2); user-select: none; }
.au-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.au-check span { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--au-line); background: var(--au-field); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.au-check input:checked + span { background: var(--au-relleno); border-color: var(--au-relleno); }
.au-check input:checked + span::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.au-check input:focus-visible + span { outline: 2px solid var(--au-acc); outline-offset: 2px; }
.au-link { color: var(--au-acc); font-weight: 700; text-decoration: none; border-radius: 6px; }
.au-link:hover { text-decoration: underline; }
.au-trampa { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.au-fine { margin: 0; text-align: center; font-size: .78rem; color: var(--au-muted); }

/* ── 6b · Casilla «No soy un robot» (RONDA 21 · CAMBIO) ── */
.au-captcha { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 78px; padding: 8px 0 7px; border-radius: 16px; border: 1.5px solid var(--au-line); background: var(--au-field); transition: border-color .25s, background .25s; }
.au-captcha__caja { width: 100%; min-height: 78px; display: flex; justify-content: center; }
.au-captcha__estado { margin: 0; padding: 0 12px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: .8rem; font-weight: 600; line-height: 1.35; text-align: left; color: var(--au-muted); animation: auSube .35s var(--au-ease) both; }
.au-captcha__estado .crm-ico { flex: none; }
.au-captcha.is-ok { border-color: color-mix(in srgb, var(--au-ok) 55%, var(--au-line)); background: color-mix(in srgb, var(--au-ok) 6%, var(--au-field)); }
.au-captcha.is-ok .au-captcha__estado { color: var(--au-ok); }
.au-captcha.is-vencida, .au-captcha.is-falta, .au-captcha.is-repetir, .au-captcha.is-cargando { border-color: color-mix(in srgb, var(--au-warn) 55%, var(--au-line)); background: color-mix(in srgb, var(--au-warn) 7%, var(--au-field)); }
.au-captcha.is-vencida .au-captcha__estado, .au-captcha.is-falta .au-captcha__estado, .au-captcha.is-repetir .au-captcha__estado, .au-captcha.is-cargando .au-captcha__estado { color: var(--au-warn-txt); }
.au-captcha.is-error { border-color: color-mix(in srgb, var(--au-err) 50%, var(--au-line)); }
.au-captcha.is-error .au-captcha__estado { color: var(--au-err); }
[data-theme="dark"] .au-captcha.is-error .au-captcha__estado { color: #fca5a5; }
/* Aro que llama la atención cuando falta marcarla */
.au-captcha::after { content: ''; position: absolute; inset: -5px; border-radius: 21px; border: 2px solid var(--au-warn); opacity: 0; pointer-events: none; }
.au-captcha.is-falta::after, .au-captcha.is-repetir::after, .au-captcha.is-vencida::after { animation: auAro .9s ease-out 2; }
.au-captcha.is-falta { animation: auSacude .45s cubic-bezier(.36, .07, .19, .97); }
/* Widget implícito de las páginas simples (.g-recaptcha sin caja) */
.au-captcha > .g-recaptcha { display: flex; justify-content: center; }

/* RONDA 21b · NUEVO — Turnstile: botón «Verificar que soy humano» y, tras el clic, el widget de Cloudflare en su lugar */
.au-captcha--ts { min-height: 0; padding: 8px; gap: 7px; }
/* RONDA 31 · CAMBIO — la caja de Cloudflare se ve desde el inicio (antes display:none hasta el clic) y el botón
   solo sale si la verificación falla (.is-ts-reintentar) */
.au-captcha--ts .au-captcha__caja { display: flex; align-items: center; min-height: 65px; }
.au-captcha--ts.is-ts-activo .au-captcha__caja { animation: auSube .35s var(--au-ease) both; }
.au-captcha--ts .au-ts { display: none; }
.au-captcha--ts.is-ts-reintentar .au-ts { display: flex; }
.au-captcha--ts.is-ts-reintentar .au-captcha__caja { display: none; }
.au-ts-auto { display: inline-flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600; color: var(--au-ink-2); }
.au-ts-auto__giro { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--au-acc) 25%, transparent); border-top-color: var(--au-acc); animation: auGira .8s linear infinite; }
@keyframes auGira { to { transform: rotate(360deg); } }
.au-captcha--ts .au-captcha__caja > div { width: 100%; display: flex; justify-content: center; }
.au-ts { display: flex; align-items: center; gap: 12px; width: 100%; height: 65px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--au-line); background: var(--au-field-on); color: var(--au-ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(8, 20, 40, .06); transition: border-color .2s, transform .15s var(--au-ease); -webkit-tap-highlight-color: transparent; }
.au-ts:hover { border-color: color-mix(in srgb, var(--au-acc) 55%, var(--au-line)); }
.au-ts:focus-visible { outline: 2px solid var(--au-acc); outline-offset: 2px; }
.au-ts:active { transform: scale(.985); }
.au-ts__caja { position: relative; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; border: 2px solid #8a99ad; background: var(--au-card-solid); color: var(--au-acc); transition: border-color .2s, transform .25s var(--au-spring); }
.au-ts__caja .crm-ico { width: 14px; height: 14px; }   /* RONDA 31 · flecha de «Volver a verificar» */
.au-ts__caja::after { content: ''; position: absolute; inset: -7px; border-radius: 12px; border: 2px solid var(--au-acc); opacity: 0; transform: scale(.8); transition: opacity .2s, transform .25s var(--au-ease); }
.au-ts:hover .au-ts__caja, .au-ts:focus-visible .au-ts__caja { border-color: var(--au-acc); transform: scale(1.06); }
.au-ts:hover .au-ts__caja::after, .au-ts:focus-visible .au-ts__caja::after { opacity: .35; transform: none; }
.au-ts__txt { flex: 1; min-width: 0; font-size: .92rem; font-weight: 700; }
.au-ts__por { flex: none; display: flex; align-items: center; gap: 6px; font-size: .64rem; font-weight: 600; line-height: 1.25; color: var(--au-muted); }
.au-ts__por .crm-ico { width: 18px; height: 18px; color: var(--au-acc); }
.au-captcha.is-verificando { border-color: color-mix(in srgb, var(--au-acc) 40%, var(--au-line)); }
.au-captcha.is-verificando .au-captcha__estado { color: var(--au-ink-2); }
[data-theme="dark"] .au-ts { box-shadow: none; }
@media (max-width: 420px) { .au-ts__por > span { display: none; } }

/* ── 7 · Botones (RONDA 21 · CAMBIO: azul marino → verde y efectos al entrar) ── */
.au-btn {
    position: relative; isolation: isolate; height: 56px; border: 0; border-radius: 16px; cursor: pointer; color: #fff; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: inherit; font-weight: 800; font-size: 1rem; line-height: 1;
    background: linear-gradient(120deg, var(--au-navy-7) 0%, var(--au-navy-6) 45%, var(--au-verde-7) 100%);
    box-shadow: 0 14px 28px -14px rgba(10, 35, 66, .7), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .2s var(--au-ease);
}
[data-theme="dark"] .au-btn { background: linear-gradient(120deg, #17406f, #0b6b5a); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .8); }
.au-btn:hover { transform: translateY(-1px); }
.au-btn:active { transform: translateY(1px) scale(.99); }
.au-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--au-acc) 55%, transparent); outline-offset: 3px; }
.au-btn__txt { display: inline-block; }
.au-btn__txt.is-sube { animation: auSube .35s var(--au-ease) both; }
.au-btn__ico { display: inline-grid; transition: transform .3s var(--au-ease); }
.au-btn:hover .au-btn__ico { transform: translateX(3px); }
/* Barrido verde (clip-path) y aro suave al entrar */
.au-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(120deg, var(--au-verde-7), var(--au-verde-5)); clip-path: inset(0 100% 0 0 round 16px); }
.au-btn::after { content: ''; position: absolute; inset: -5px; border-radius: 21px; border: 2px solid var(--au-menta); opacity: 0; pointer-events: none; }
.au-btn.is-ok { animation: auRebote .5s var(--au-spring); }
.au-btn.is-ok::before { animation: auLlena .5s var(--au-ease) forwards; }
.au-btn.is-ok::after { animation: auAro .8s ease-out .25s; }
.au-btn.is-ok .au-btn__ico svg { animation: auTilde .45s .2s var(--au-ease) both; }
.au-btn.is-ok:hover .au-btn__ico { transform: none; }
/* Barra fina de progreso mientras entra */
.au-btn__beat { position: absolute; left: 16px; right: 16px; bottom: 8px; height: 2px; border-radius: 2px; transform: scaleX(0); transform-origin: left; background: rgba(255, 255, 255, .7); opacity: 0; }
.au-btn.is-loading { pointer-events: none; }
.au-btn.is-loading .au-btn__ico { animation: auPulso .9s ease-in-out infinite; }
.au-btn.is-loading .au-btn__beat { opacity: 1; animation: auCarga 1.2s var(--au-ease) infinite; }
/* Datos incorrectos: rojo y vibración breve */
.au-btn.is-err, [data-theme="dark"] .au-btn.is-err { background: linear-gradient(120deg, #7f1d1d, #b91c1c); animation: auSacude .45s cubic-bezier(.36, .07, .19, .97); }
.au-btn.is-err .au-btn__ico { display: none; }
@keyframes auPulso { 50% { transform: scale(1.25); } }
@keyframes auCarga { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes auSube { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes auLlena { to { clip-path: inset(0 0 0 0 round 16px); } }
@keyframes auRebote { 0% { transform: scale(.97); } 100% { transform: scale(1); } }
@keyframes auAro { 0% { opacity: .75; transform: scale(.97); } 100% { opacity: 0; transform: scale(1.07); } }
@keyframes auTilde { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes auSacude { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
.au-btn--ghost { background: var(--au-field); color: var(--au-ink); border: 1.5px solid var(--au-line); box-shadow: none; }
.au-btn--ghost::before, .au-btn--ghost::after { display: none; }
[data-theme="dark"] .au-btn--ghost { background: var(--au-field); }
.au-btn--ghost:hover { border-color: color-mix(in srgb, var(--au-acc) 40%, var(--au-line)); }
.au-or { display: flex; align-items: center; gap: 12px; font-size: .78rem; color: var(--au-muted); }
.au-or::before, .au-or::after { content: ''; flex: 1; height: 1px; background: var(--au-line); }
.au-google { height: 48px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: .92rem; color: var(--au-ink); background: var(--au-card-solid); border: 1.5px solid var(--au-line); transition: border-color .2s, transform .2s; }
.au-google:hover { border-color: color-mix(in srgb, var(--au-acc) 40%, var(--au-line)); transform: translateY(-1px); }
.au-google:focus-visible { outline: 3px solid color-mix(in srgb, var(--au-acc) 40%, transparent); }

/* ── 8 · Avisos ── */
.au-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: .86rem; font-weight: 600; line-height: 1.45; border: 1px solid; animation: auAparece .35s var(--au-ease); }
.au-alert .crm-ico { margin-top: 1px; }
.au-alert--ok { background: color-mix(in srgb, var(--au-ok) 9%, var(--au-card-solid)); border-color: color-mix(in srgb, var(--au-ok) 30%, transparent); color: color-mix(in srgb, var(--au-ok) 80%, var(--au-ink)); }
.au-alert--warn { background: color-mix(in srgb, var(--au-warn) 10%, var(--au-card-solid)); border-color: color-mix(in srgb, var(--au-warn) 32%, transparent); color: color-mix(in srgb, var(--au-warn) 75%, var(--au-ink)); }
.au-alert--err { background: color-mix(in srgb, var(--au-err) 9%, var(--au-card-solid)); border-color: color-mix(in srgb, var(--au-err) 35%, transparent); color: color-mix(in srgb, var(--au-err) 78%, var(--au-ink)); }
[data-theme="dark"] .au-alert--err .crm-ico { color: #fca5a5; }
.au-alert.is-sacude { animation: auTiembla .45s; }
@keyframes auAparece { from { opacity: 0; transform: translateY(-6px); } }

/* ── 9 · Medidor de contraseña ── */
.au-meter { display: grid; gap: 8px; margin-top: -4px; }
.au-meter__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.au-meter__bar i { height: 5px; border-radius: 99px; background: var(--au-line); transition: background .3s; }
.au-meter[data-n="1"] .au-meter__bar i:nth-child(-n+1) { background: var(--au-err); }
.au-meter[data-n="2"] .au-meter__bar i:nth-child(-n+2) { background: var(--au-warn); }
.au-meter[data-n="3"] .au-meter__bar i:nth-child(-n+3) { background: #65a30d; }
.au-meter[data-n="4"] .au-meter__bar i { background: var(--au-ok); }
.au-meter__lista { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .74rem; color: var(--au-muted); }
.au-meter__lista li { display: inline-flex; align-items: center; gap: 5px; transition: color .2s; }
.au-meter__lista li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; transition: background .2s; }
.au-meter__lista li.is-ok { color: var(--au-ok); }
.au-meter__lista li.is-ok::before { background: currentColor; }

/* ── 10 · Páginas simples (recuperar, restablecer, cambiar, verificar correo) ── */
.au-card {
    position: relative; z-index: 1; width: min(480px, 100%); padding: 30px 30px 24px; border-radius: calc(var(--au-r) + 3px);
    background: var(--au-card); border: 1px solid color-mix(in srgb, var(--au-line) 80%, transparent); box-shadow: var(--au-sh);
    -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); animation: auEntra .6s var(--au-ease) both;
    display: flex; flex-direction: column; gap: 16px;
}
.au-card__head { display: flex; align-items: center; gap: 14px; }
.au-card__ico { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; color: #fff; font-size: 1.35rem;
    background: linear-gradient(135deg, var(--au-navy-6), var(--au-verde-7)); box-shadow: 0 12px 22px -12px rgba(10, 35, 66, .7); }
.au-card__ico--ok { background: linear-gradient(135deg, #0f9f77, #0b6b5a); }
.au-card__ico--err { background: linear-gradient(135deg, #f87171, var(--au-err)); }
.au-card__ico--warn { background: linear-gradient(135deg, #fbbf24, var(--au-warn)); }
.au-card__head h1 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.au-card__head p { margin: 3px 0 0; font-size: .88rem; color: var(--au-muted); line-height: 1.45; }
.au-card__brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--au-muted); }
.au-card__brand img { width: 22px; height: 22px; object-fit: contain; }
.au-card__ecg { height: 34px; margin: -6px -30px 0; }
.au-card__ecg .au-ecg__base { stroke: color-mix(in srgb, var(--au-acc) 18%, transparent); }
.au-card__ecg .au-ecg__pulse { stroke: var(--au-acc-2); }
.au-texto { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--au-ink-2); }
.au-volver { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; font-size: .85rem; font-weight: 700; color: var(--au-muted); text-decoration: none; }
.au-volver:hover { color: var(--au-acc); }

/* ── 11 · Verificación en dos pasos ── */
.au-digits { display: flex; justify-content: center; gap: 8px; }
.au-digit { width: 50px; height: 60px; text-align: center; font-family: inherit; font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--au-ink); border-radius: 15px; border: 1.5px solid var(--au-line); background: var(--au-field); outline: none; caret-color: var(--au-acc); transition: border-color .2s, transform .15s, background .2s, box-shadow .2s; }
.au-digit:focus { border-color: var(--au-acc); background: var(--au-field-on); transform: translateY(-2px); box-shadow: 0 0 0 4px color-mix(in srgb, var(--au-acc) 14%, transparent); }
.au-digit.v2f-filled { border-color: color-mix(in srgb, var(--au-acc) 55%, var(--au-line)); background: color-mix(in srgb, var(--au-acc) 6%, var(--au-field-on)); }
.au-digits.is-err .au-digit { border-color: var(--au-err); animation: auTiembla .4s; }
.au-digit:nth-child(3) { margin-right: 10px; }
/* RONDA 31 · NUEVO — 2FA sin recargar: las casillas laten mientras se comprueba y se ponen verdes si el código es correcto */
.au-digits.is-verificando .au-digit { animation: auLateDig 1s ease-in-out infinite; }
.au-digits.is-verificando .au-digit:nth-child(2) { animation-delay: .08s; } .au-digits.is-verificando .au-digit:nth-child(3) { animation-delay: .16s; }
.au-digits.is-verificando .au-digit:nth-child(4) { animation-delay: .24s; } .au-digits.is-verificando .au-digit:nth-child(5) { animation-delay: .32s; }
.au-digits.is-verificando .au-digit:nth-child(6) { animation-delay: .4s; }
@keyframes auLateDig { 50% { transform: translateY(-3px); border-color: var(--au-acc); } }
.au-digits.is-ok .au-digit { border-color: var(--au-ok); background: color-mix(in srgb, var(--au-ok) 14%, var(--au-field-on)); color: var(--au-ok); transform: scale(1.04); transition: transform .25s var(--au-spring), background .2s, border-color .2s; }
.au-backup { width: 100%; height: 56px; text-align: center; font: 700 1.15rem/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .18em; text-transform: uppercase; border-radius: 15px; border: 1.5px solid var(--au-line); background: var(--au-field); color: var(--au-ink); outline: none; }
.au-backup:focus { border-color: var(--au-acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--au-acc) 14%, transparent); }
.au-timer { text-align: center; font-size: .8rem; color: var(--au-muted); }
.au-timer strong { color: var(--au-ink); font-variant-numeric: tabular-nums; }
.au-timer.v2f-timer--warn strong { color: var(--au-err); }
.au-plain-btn { border: 0; background: none; padding: 4px; min-height: 36px; font-family: inherit; font-weight: 700; font-size: .84rem; line-height: 1.3; color: var(--au-acc); cursor: pointer; border-radius: 8px; }
.au-plain-btn:hover { text-decoration: underline; }

/* ── 12 · Responsive ── */
@media (max-width: 900px) {
    .au-body { place-items: start center; }
    .au-shell, .au-shell[data-vista="registro"] { grid-template-columns: minmax(0, 1fr); max-width: 520px; border-radius: 28px; }   /* RONDA 31 · + registro */
    .au-brand { min-height: 0; padding: 22px 20px; gap: 16px; border-radius: 22px; }
    .au-brand__mid { margin-top: 0; gap: 10px; }
    .au-brand__title { font-size: 1.45rem; gap: 4px; }
    .au-brand__sub { font-size: .86rem; line-height: 1.5; }
    .au-mods { display: none; }
    /* RONDA 31 · CAMBIO — en el teléfono vuelven el latido y las insignias (antes: display:none).
       El trazo va más bajo y las insignias en una sola fila, para no alargar la tarjeta. */
    .au-brand .au-ecg { display: block; height: 36px; margin: 0 -20px; }
    .au-trust { gap: 6px 14px; font-size: .72rem; }
    .au-trust li { font-size: .72rem; }
    .au-panel { padding: 18px 16px 12px; gap: 16px; border-radius: 22px; }
    .au-view__head h2 { font-size: 1.25rem; }
    /* En una columna la vista oculta no debe reservar alto (el registro es más largo que el login) */
    .au-shell[data-vista="registro"] .au-view[data-vista="login"],
    .au-shell[data-vista="login"] .au-view[data-vista="registro"] { display: none; }
}
@media (max-width: 480px) {
    .au-body { padding: 12px; }
    .au-shell { padding: 6px; border-radius: 26px; }
    .au-brand { border-radius: 20px; }
    .au-brand__title { font-size: 1.3rem; }
    .au-brand__logo { width: 42px; height: 42px; border-radius: 13px; }
    .au-grid2 { grid-template-columns: 1fr; }
    .au-field input { height: 54px; }
    .au-panel__foot { font-size: .72rem; }
    .au-card { padding: 24px 18px 18px; }
    .au-digit { width: 42px; height: 54px; font-size: 1.3rem; }
    .au-digits { gap: 6px; }
    .au-digit:nth-child(3) { margin-right: 6px; }
}

/* ── 13 · Movimiento reducido ── */
@media (prefers-reduced-motion: reduce) {
    .au-blob, .au-ecg__pulse, .au-ecg__on, .au-shell, .au-card, .au-alert, .au-cz, .au-cz i, .au-captcha, .au-captcha::after, .au-captcha__estado,
    .au-btn, .au-btn::after, .au-btn__txt, .au-btn__beat, .au-btn__ico, .au-btn__ico svg, .au-captcha__caja { animation: none !important; }
    .au-ts, .au-ts__caja, .au-ts__caja::after { transition: none; }
    .au-ts-auto__giro { animation-duration: 2.4s; }   /* RONDA 31 · gira lento en vez de quedarse quieto: indica que trabaja */
    .au-digits.is-verificando .au-digit { animation: none; }   /* RONDA 31 */
    .au-cz { transform: translate3d(0, -45%, 0); opacity: .7; }
    .au-cz:nth-child(3n) { transform: translate3d(0, -78%, 0); }
    .au-cz:nth-child(4n) { transform: translate3d(0, -15%, 0); }
    .au-ecg__pulse { opacity: .7; }
    .au-btn.is-ok::before { animation: none; clip-path: inset(0 0 0 0 round 16px); }
    .au-btn.is-loading .au-btn__beat { transform: scaleX(1); }
    .au-view, .au-seg__pill, .au-btn { transition: none; }
}
