/* Pantallas de acceso (login, recuperar y restablecer contraseña). Prefijo au-*. */
body.au-page { background: #fff; }
.au-page .wrapper-full-page, .au-page .full-page { min-height: 100vh; padding: 0; }
.au-page .full-page:after, .au-page .full-page:before { display: none !important; }
.au-page .full-page > .content { padding: 0 !important; margin: 0 !important; min-height: 100vh; }

.au-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; font-family: 'Titillium Web', 'Segoe UI', Roboto, sans-serif; color: #1f2937; }

/* Panel de marca */
.au-brand { position: relative; display: flex; flex-direction: column; padding: 48px 56px 32px; background: #f4f5f7; overflow: hidden; isolation: isolate; }
.au-brand-logo { width: min(360px, 80%); height: auto; align-self: center; }
.au-points { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 14px; }
.au-points li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #111827; }
.au-points i { color: #c91219; font-size: 16px; }
.au-brand-foot { margin-top: auto; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.85); }
.au-brand-foot p { margin: 0; }

/* Panel del formulario */
.au-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; background: #fff; }
.au-card { width: 100%; max-width: 400px; }
.au-mobile-logo { display: none; width: 220px; max-width: 70%; margin: 0 auto 28px; }
.au-title { font-size: 28px; font-weight: 700; color: #111827; margin: 0; letter-spacing: -.01em; }
.au-title::after { content: ''; display: block; width: 44px; height: 4px; border-radius: 4px; background: #c91219; margin-top: 8px; }
.au-lead { margin: 18px 0 0; font-size: 14.5px; line-height: 1.5; color: #6b7280; }

.au-form { margin-top: 28px; }
.au-field { margin-bottom: 16px; }
.au-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; text-transform: none; }
.au-control { position: relative; }
.au-control > i.au-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 15px; pointer-events: none; transition: color .15s; }
.au-control input.au-input { width: 100%; height: 46px !important; padding: 0 44px 0 42px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; font-size: 15px; color: #111827; transition: border-color .15s, box-shadow .15s; }
.au-control input.au-input::placeholder { color: #9ca3af; }
.au-control input.au-input:hover { border-color: #9ca3af; }
.au-control input.au-input:focus { outline: none; border-color: #c91219; box-shadow: 0 0 0 3px rgba(201,18,25,.14); }
.au-control:focus-within > i.au-ico { color: #c91219; }
.au-control input.au-input.is-invalid { border-color: #dc2626; background-image: none; }
.au-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #6b7280; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.au-toggle:hover { background: #f3f4f6; color: #111827; }
.au-toggle:focus-visible { outline: 2px solid #c91219; outline-offset: 1px; }
.au-error { display: block; margin-top: 6px; font-size: 12.5px; color: #b91c1c; }

.au-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; flex-wrap: wrap; }
.au-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: #374151; cursor: pointer; user-select: none; text-transform: none; }
.au-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.au-check .au-box { width: 18px; height: 18px; border: 1.5px solid #9ca3af; border-radius: 5px; background: #fff; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.au-check .au-box::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px) scale(0); transition: transform .12s; }
.au-check input:checked + .au-box { background: #c91219; border-color: #c91219; }
.au-check input:checked + .au-box::after { transform: rotate(-45deg) translate(1px,-1px) scale(1); }
.au-check input:focus-visible + .au-box { box-shadow: 0 0 0 3px rgba(201,18,25,.2); }
.au-link { color: #c91219; font-size: 14px; font-weight: 600; text-decoration: none; }
.au-link:hover { color: #9f0e14; text-decoration: underline; }
.au-link:focus { color: #9f0e14; }

.au-submit { width: 100%; height: 46px; border: 0; border-radius: 10px; background: #c91219; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .01em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 2px 6px rgba(201,18,25,.28); transition: background .15s, box-shadow .15s, transform .05s; }
.au-submit:hover { background: #b10f15; box-shadow: 0 4px 12px rgba(201,18,25,.32); }
.au-submit:active { transform: translateY(1px); }
.au-submit:focus, .au-submit:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(201,18,25,.25); color: #fff; }
.au-submit[disabled] { opacity: .75; cursor: progress; }
.au-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; }

.au-notice { margin-top: 20px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; }
.au-notice--ok { background: #ecfdf3; border: 1px solid #a7f3d0; color: #065f46; }
.au-notice--err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.au-foot { margin-top: 36px; display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 22px; border-top: 1px solid #f0f1f3; }
.au-foot img { height: 56px; width: auto; max-width: 100%; opacity: .9; }

@media (max-width: 991.98px) {
  .au-shell { grid-template-columns: 1fr; }
  .au-brand { display: none; }
  .au-mobile-logo { display: block; }
  .au-main { justify-content: flex-start; padding-top: 48px; min-height: 100vh; }
}
@media (prefers-reduced-motion: reduce) { .au-page * { transition: none !important; } }

/* Logo animado (1120x286: la marca ocupa el 26 % izquierdo). Una sola imagen en dos capas. */
.au-logo { position: relative; width: min(360px, 80%); aspect-ratio: 1120 / 286; align-self: center; }
.au-logo img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.au-logo-mark { clip-path: inset(0 74% 0 0); transform-origin: 13% 50%; animation: au-mark-in .9s cubic-bezier(.34, 1.56, .64, 1) both; }
.au-logo-text { clip-path: inset(0 0 0 26%); animation: au-text-in .9s .35s cubic-bezier(.22, .8, .3, 1) both; }
/* Brillo que cruza el logo de vez en cuando; solo se ve sobre las zonas oscuras y rojas. */
.au-logo::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.85) 50%, transparent 58%) 130% 0 / 260% 100% no-repeat;
    -webkit-mask: var(--logo) center / 100% 100% no-repeat; mask: var(--logo) center / 100% 100% no-repeat;
    animation: au-sheen 6s 1.6s ease-in-out infinite; }
@keyframes au-mark-in { from { opacity: 0; transform: scale(.55) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes au-text-in { from { opacity: 0; clip-path: inset(0 100% 0 26%); transform: translateX(-14px); } to { opacity: 1; clip-path: inset(0 0 0 26%); transform: none; } }
@keyframes au-sheen { 0% { background-position: 130% 0; } 28%, 100% { background-position: -30% 0; } }

/* Panel: la ilustración respira lento, las viñetas entran en cascada y los checks laten por turnos. */
.au-points li { opacity: 0; animation: au-point-in .6s cubic-bezier(.22, .8, .3, 1) forwards; }
.au-points li:nth-child(1) { animation-delay: 1.1s; }
.au-points li:nth-child(2) { animation-delay: 1.3s; }
.au-points li:nth-child(3) { animation-delay: 1.5s; }
.au-points li:nth-child(4) { animation-delay: 1.7s; }
@keyframes au-point-in { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.au-points i { animation: au-check-pop 4.8s ease-in-out infinite; }
.au-points li:nth-child(1) i { animation-delay: 2.4s; }
.au-points li:nth-child(2) i { animation-delay: 2.7s; }
.au-points li:nth-child(3) i { animation-delay: 3s; }
.au-points li:nth-child(4) i { animation-delay: 3.3s; }
@keyframes au-check-pop { 0%, 12%, 100% { transform: scale(1); } 6% { transform: scale(1.35); } }
.au-brand-foot { animation: au-point-in .8s 2s ease both; }

/* Escena: la ilustración original con capas animadas encima (ver auth/escena.blade.php). */
.au-brand > *:not(.au-scene) { position: relative; z-index: 1; }
.au-scene { position: absolute; inset: 0; width: 100%; height: 100% !important; z-index: 0; font-family: inherit; }
.sc-breathe { transform-origin: 50% 60%; animation: sc-breathe 22s ease-in-out infinite alternate; }
.sc-spark { stroke-dasharray: .09 1; stroke-dashoffset: .09; animation: sc-run 4.6s 1.4s cubic-bezier(.45, 0, .25, 1) infinite; }
.sc-ping { transform-box: fill-box; transform-origin: center; opacity: 0; animation: sc-ping 2.4s 1.6s ease-out infinite; }
.sc-ping--2 { animation-delay: 2.4s; }
.sc-ping--slow { animation-duration: 3.4s; animation-delay: 2s; }
.sc-ping--slow.sc-ping--2 { animation-delay: 3.7s; }
.sc-ping--3 { animation-delay: 3s; }
.sc-glow { opacity: 0; animation: sc-glow 3.8s 1.8s ease-in-out infinite; }
.sc-sweep { transform-box: fill-box; animation: sc-sweep 5.5s 2.2s ease-in-out infinite; }
.sc-pop { opacity: 0; transform-box: fill-box; transform-origin: center; animation: sc-pop .8s var(--d, 2s) cubic-bezier(.34, 1.4, .64, 1) forwards; }
.sc-float { transform-box: fill-box; animation: sc-float var(--f, 6s) var(--fd, 0s) ease-in-out infinite; }
@keyframes sc-breathe { from { transform: scale(1); } to { transform: scale(1.045); } }
@keyframes sc-run { 0% { stroke-dashoffset: .09; opacity: 0; } 8% { opacity: 1; } 55% { stroke-dashoffset: -1; opacity: 1; } 62%, 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes sc-ping { 0% { transform: scale(.55); opacity: .75; } 75%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes sc-glow { 0%, 100% { opacity: 0; } 50% { opacity: .9; } }
@keyframes sc-sweep { 0% { transform: translateX(-140px) skewX(-12deg); } 45%, 100% { transform: translateX(320px) skewX(-12deg); } }
@keyframes sc-pop { from { opacity: 0; transform: translateY(24px) scale(.88); } to { opacity: 1; transform: none; } }
@keyframes sc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---- Panel del formulario: tarjeta elevada, fondo con trama y entrada escalonada ---- */
.au-main { position: relative; overflow: hidden; isolation: isolate; background: #fff; }
.au-main::before { content: ''; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(520px 340px at 100% 100%, rgba(200,30,22,.10), transparent 70%),
        radial-gradient(420px 260px at 0% 0%, rgba(29,26,27,.05), transparent 70%),
        radial-gradient(circle, #E4E4E7 1.2px, transparent 1.6px) 0 0 / 26px 26px;
    -webkit-mask: linear-gradient(135deg, #000 0%, transparent 38%, transparent 62%, #000 100%); mask: linear-gradient(135deg, #000 0%, transparent 38%, transparent 62%, #000 100%); }
.au-main::after { content: ''; position: absolute; right: -90px; bottom: -90px; width: 260px; height: 260px; z-index: -1; border-radius: 50%;
    border: 18px solid #C81E16; border-left-color: transparent; border-top-color: transparent; opacity: .9; transform: rotate(12deg); }
.au-card { max-width: 430px; padding: 40px 40px 26px; background: #fff; border: 1px solid #EDEDEF; border-radius: 22px;
    box-shadow: 0 1px 0 #fff inset, 0 24px 60px -18px rgba(29,26,27,.22), 0 4px 14px rgba(29,26,27,.05); position: relative; }
.au-title { font-size: 30px; }
.au-lead { margin-top: 18px; }
.au-form { margin-top: 26px; }
.au-label { font-size: 12.5px; letter-spacing: .01em; color: #27272A; }
.au-control > i.au-ico { left: 4px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; font-size: 15px; top: 50%; border-radius: 9px; }
.au-control input.au-input { height: 50px !important; padding-left: 50px; border-color: #E4E4E7; background: #FAFAFA; border-radius: 12px; font-size: 15px; }
.au-control input.au-input:hover { background: #fff; border-color: #C4C4CA; }
.au-control input.au-input:focus { background: #fff; border-color: #C81E16; box-shadow: 0 0 0 4px rgba(200,30,22,.12); }
.au-control:focus-within > i.au-ico { color: #fff; background: #C81E16; }
.au-control input.au-input.is-invalid { background: #FEF7F7; animation: au-shake .38s; }
.au-submit { position: relative; overflow: hidden; height: 52px; border-radius: 12px; font-size: 15.5px; background: linear-gradient(180deg, #D3231A, #B81A12); box-shadow: 0 10px 22px -8px rgba(200,30,22,.55); }
.au-submit::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); }
.au-submit:hover { background: linear-gradient(180deg, #DA271E, #B81A12); box-shadow: 0 14px 26px -8px rgba(200,30,22,.6); transform: translateY(-1px); }
.au-submit:hover::after { left: 130%; transition: left .7s ease; }
.au-submit:active { transform: translateY(1px); }
.au-foot { margin-top: 28px; padding-top: 18px; }
.au-foot img { height: 50px; }
.au-help { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: #71717A; }
.au-help a { color: #1D1A1B; font-weight: 700; text-decoration: none; border-bottom: 1px solid #C81E16; }
.au-help a:hover { color: #C81E16; }
.au-caps { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: #B45309; animation: au-rise .25s ease both; }

/* Entrada escalonada del formulario */
.au-card .au-title, .au-card .au-lead, .au-card .au-field, .au-card .au-row, .au-card .au-submit, .au-card .au-foot, .au-card .au-help, .au-card .au-notice { animation: au-rise .6s cubic-bezier(.22, .8, .3, 1) both; }
.au-card .au-title { animation-delay: .05s; } .au-card .au-lead { animation-delay: .12s; }
.au-card .au-notice { animation-delay: .16s; }
.au-card .au-field:nth-of-type(1) { animation-delay: .2s; } .au-card .au-field:nth-of-type(2) { animation-delay: .28s; }
.au-card .au-field:nth-of-type(3) { animation-delay: .34s; }
.au-card .au-row { animation-delay: .38s; } .au-card .au-submit { animation-delay: .44s; }
.au-card .au-foot { animation-delay: .52s; } .au-card .au-help { animation-delay: .58s; }
@keyframes au-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes au-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (max-width: 991.98px) { .au-card { border: 0; box-shadow: none; padding: 8px 4px 20px; } .au-main::after { display: none; } }

/* Autocompletado del navegador: mantiene el gris del diseño en lugar del azul de Chrome */
.au-control input.au-input:-webkit-autofill, .au-control input.au-input:-webkit-autofill:hover, .au-control input.au-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #111827; caret-color: #111827; -webkit-box-shadow: 0 0 0 1000px #FAFAFA inset; box-shadow: 0 0 0 1000px #FAFAFA inset; transition: background-color 9999s ease-out; }
.au-control input.au-input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 4px rgba(200,30,22,.12); box-shadow: 0 0 0 1000px #fff inset, 0 0 0 4px rgba(200,30,22,.12); }

/* Calma: tras 18 s o al escribir, se detienen los bucles (lo que flota se queda quieto donde está) */
.au-calm .sc-float, .au-calm .sc-breathe, .au-calm .au-points i { animation-play-state: paused; }
.au-calm .sc-ping, .au-calm .sc-spark, .au-calm .sc-glow, .au-calm .sc-sweep, .au-calm .au-logo::after { animation: none; opacity: 0; }

/* Crear/restablecer contraseña: la cuenta viene del enlace y no se edita */
.au-control input.au-input.au-input--fijo { background: #F4F4F5; color: #52525B; border-color: #E4E4E7; cursor: default; }
.au-control input.au-input.au-input--fijo:hover { border-color: #E4E4E7; }
.au-control input.au-input.au-input--fijo:focus { box-shadow: none; border-color: #E4E4E7; }
.au-hint { display: block; margin-top: 6px; font-size: 12.5px; color: #71717A; }
.au-back--suave { font-weight: 500; color: #52525B; font-size: 13.5px; }
.au-back--suave:hover { color: #1D1A1B; }
