/**
 * Auth + cuenta — Regiticket (cereza + negro, misma atmósfera que la landing).
 */
:root {
    --rt-cherry: #b91830;
    --rt-cherry-light: #d42440;
    --rt-cherry-deep: #7d0f22;
    --rt-black: #060606;
    --rt-panel: rgba(16, 16, 18, 0.78);
    --rt-border: rgba(185, 24, 48, 0.4);
}

/* Fondo: primera imagen del carrusel + overlays (variable en layouts auth / app) */
.rt-brand-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background-color: #030303;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, rgba(8, 8, 10, 0.45) 38%, rgba(0, 0, 0, 0.9) 100%),
        radial-gradient(ellipse 120% 90% at 50% -25%, rgba(185, 24, 48, 0.38), transparent 55%),
        radial-gradient(ellipse 70% 60% at 100% 20%, rgba(185, 24, 48, 0.14), transparent 50%),
        radial-gradient(ellipse 60% 50% at 0% 80%, rgba(125, 15, 34, 0.2), transparent 50%),
        linear-gradient(168deg, rgba(185, 24, 48, 0.09) 0%, transparent 42%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 80px,
            rgba(255, 255, 255, 0.02) 80px,
            rgba(255, 255, 255, 0.02) 81px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 80px,
            rgba(255, 255, 255, 0.015) 80px,
            rgba(255, 255, 255, 0.015) 81px
        ),
        var(
            --rt-auth-hero-image,
            linear-gradient(180deg, #080808 0%, #030303 45%, #050505 100%)
        );
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto, auto, auto, auto, auto, auto, auto, cover;
}

.rt-brand-atmosphere::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 32%;
    width: min(120vw, 720px);
    height: min(120vw, 720px);
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(185, 24, 48, 0.22) 0%, transparent 62%);
    filter: blur(72px);
    opacity: 0.95;
    animation: rt-atmosphere-pulse 22s ease-in-out infinite alternate;
}

.rt-brand-atmosphere::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.35;
    mix-blend-mode: overlay;
}

@keyframes rt-atmosphere-pulse {
    0% {
        opacity: 0.75;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rt-brand-atmosphere::before {
        animation: none;
    }
}

.rt-auth-body {
    position: relative;
    min-height: 100dvh;
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: #030303;
    color: #f5f5f5;
}

.rt-auth-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    isolation: isolate;
    background: rgba(4, 4, 4, 0.82);
    border-bottom: 1px solid var(--rt-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.rt-auth-brand-logo {
    filter: drop-shadow(0 2px 10px rgba(185, 24, 48, 0.35));
}

.rt-auth-main {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: 100%;
    min-height: 100dvh;
    /* Header fijo: espacio real para que el formulario no quede tapado */
    padding-top: max(7.25rem, calc(5.5rem + env(safe-area-inset-top, 0px)), 12vh);
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* flex-start: formularios largos (p. ej. registro) pueden hacer scroll sin recortes */
    justify-content: flex-start;
}

.rt-auth-main > .container {
    width: 100%;
    flex: 1 1 auto;
}

.rt-auth-card {
    position: relative;
    background: var(--rt-panel);
    border: 1px solid var(--rt-border);
    border-radius: 1.25rem;
    padding: clamp(1.85rem, 4.5vw, 2.5rem);
    box-shadow:
        0 28px 56px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.rt-auth-card--focus {
    text-align: center;
}

.rt-auth-card--focus::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 3px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 36, 64, 0.5),
        var(--rt-cherry-light),
        var(--rt-cherry),
        var(--rt-cherry-light),
        rgba(212, 36, 64, 0.5),
        transparent
    );
    pointer-events: none;
}

.rt-auth-card--focus > * {
    position: relative;
    z-index: 1;
}

.rt-auth-card-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(252, 165, 165, 0.95);
    margin-bottom: 0.5rem;
}

.rt-auth-form .mb-3,
.rt-auth-form .mb-4 {
    text-align: center;
}

.rt-auth-form .form-control,
.rt-auth-form .invalid-feedback {
    text-align: left;
}

.rt-auth-verify-icon {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.25rem;
    color: #fecaca;
    background: linear-gradient(145deg, rgba(185, 24, 48, 0.35), rgba(18, 18, 20, 0.9));
    border: 1px solid rgba(185, 24, 48, 0.45);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.45),
        0 0 40px rgba(185, 24, 48, 0.12);
}

.rt-auth-card-title {
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: clamp(1.45rem, 3.5vw, 1.75rem);
    color: #fff;
    margin-bottom: 0.35rem;
}

.rt-auth-card-lead {
    font-size: 0.9rem;
    color: #a3a3a3;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.rt-auth-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #d4d4d4;
    margin-bottom: 0.4rem;
}

.rt-auth-body .form-control {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fafafa;
    padding: 0.65rem 0.9rem;
    border-radius: 0.5rem;
}

.rt-auth-body .form-control:focus {
    border-color: rgba(185, 24, 48, 0.65);
    box-shadow: 0 0 0 3px rgba(185, 24, 48, 0.2);
    background: rgba(15, 15, 15, 0.95);
    color: #fff;
}

.rt-auth-body .form-control::placeholder {
    color: #737373;
}

.rt-auth-body .form-check-input {
    border-color: rgba(255, 255, 255, 0.25);
    background-color: rgba(10, 10, 10, 0.8);
}

.rt-auth-body .form-check-input:checked {
    background-color: var(--rt-cherry);
    border-color: var(--rt-cherry);
}

.rt-auth-body .form-check-label {
    font-size: 0.875rem;
    color: #c4c4c4;
}

/* Botones de envío: usar .btn.btn-sm.rt-btn-cherry (ver public/css/rt-buttons.css) */

.rt-auth-link {
    color: #fca5a5 !important;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.rt-auth-link:hover {
    color: #fecaca !important;
    text-decoration: underline;
}

.rt-auth-inline-submit {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: #fca5a5;
    font-weight: 600;
    font-size: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.rt-auth-inline-submit:hover {
    color: #fecaca;
}

/* Enlaces del header de auth / cuenta: .btn.btn-sm.rt-btn-cherry.px-3 (public/css/rt-buttons.css) */

.rt-auth-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(185, 24, 48, 0.35), transparent);
    margin: 1.5rem 0;
}

.rt-auth-alert {
    border-radius: 0.5rem;
    border: 1px solid rgba(34, 197, 94, 0.45);
    background: rgba(22, 101, 52, 0.25);
    color: #bbf7d0;
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
}

.rt-auth-body .invalid-feedback {
    font-size: 0.8rem;
}

/* Campo contraseña: botón ver/ocultar encima del input (derecha) + medidor opcional */
.rt-password-field__wrap {
    position: relative;
    z-index: 0;
}

.rt-password-field__input {
    position: relative;
    z-index: 1;
    padding-right: 2.65rem !important;
}

.rt-password-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: none;
    border-radius: 0.45rem;
    background: transparent;
    color: #a3a3a3;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.rt-password-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.rt-password-toggle:focus-visible {
    outline: 2px solid rgba(244, 114, 182, 0.55);
    outline-offset: 2px;
}

.rt-password-meter__label {
    font-weight: 600;
}

.rt-password-field--unsafe .rt-password-meter__label {
    color: #fca5a5;
}

.rt-password-field--safe .rt-password-meter__label {
    color: #86efac;
}

