/*
 * File: public/assets/auth.css
 * Purpose: Estilos del split-screen para login (página dedicada).
 */

.auth-body {
    margin: 0;
    min-height: 100vh;
    background: #fafbfc;
    color: #0f172a;
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* === Branding panel (izquierda) === */
.auth-brand {
    position: relative;
    background: linear-gradient(135deg, #1f3a8a 0%, #1e3478 38%, #142250 100%);
    color: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.auth-brand-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 80% 0%, rgba(255,255,255,0.10) 0%, transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(99,102,241,0.20) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(56,189,248,0.10) 0%, transparent 60%);
}
.auth-brand-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.7;
    /* mask-image removed (Chrome renderer instability in some configs) */
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    padding: 4rem 4.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    max-width: 640px;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,0.10);
    /* backdrop-filter removed (Chrome renderer crashes with code 11 in some configs) */
    border: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.auth-brand-logo i {
    font-size: 26px;
    color: white;
}

.auth-brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    /* Bootstrap 5.3 aplica --bs-heading-color por defecto en h1, lo que pisa
       el color: white heredado del panel oscuro. Forzamos contraste explícito. */
    color: #ffffff;
}

.auth-brand-tagline {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.78);
    margin-bottom: 3rem;
    max-width: 460px;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.auth-features li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    color: rgba(255,255,255,0.92);
    font-size: 0.9375rem;
    line-height: 1.5;
}
.auth-features li strong {
    display: block;
    font-weight: 600;
    color: white;
    margin-bottom: 0.125rem;
}
.auth-features li span {
    color: rgba(255,255,255,0.65);
    font-size: 0.875rem;
}
.auth-feature-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: white;
}

.auth-brand-footer {
    color: rgba(255,255,255,0.55);
    font-size: 0.8125rem;
    display: flex;
    justify-content: space-between;
    padding-top: 3rem;
    margin-top: auto;
}

/* === Form panel (derecha) === */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: white;
}

.auth-form-shell {
    width: 100%;
    max-width: 420px;
}

.auth-form-card {
    width: 100%;
}

.auth-form-mobile-brand {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.auth-form-mobile-brand .auth-brand-logo {
    background: linear-gradient(135deg, #1f3a8a, #142250);
    border: none;
    margin: 0;
    width: 44px;
    height: 44px;
    box-shadow: 0 4px 12px rgba(31,58,138,0.3);
}
.auth-form-mobile-brand .auth-brand-logo i { font-size: 22px; }
.auth-form-mobile-brand .auth-brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.auth-form-header { margin-bottom: 2rem; }
.auth-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1f3a8a;
    margin-bottom: 0.75rem;
}
.auth-form-header h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}
.auth-form-header p {
    color: #64748b;
    font-size: 0.9375rem;
    margin: 0;
}

.auth-alert {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}
.auth-alert i {
    flex-shrink: 0;
    color: #dc2626;
    margin-top: 0.125rem;
}

.auth-form .form-floating > .form-control {
    height: 58px;
    padding: 1.625rem 0.875rem 0.5rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: border-color .15s, box-shadow .15s;
}
.auth-form .form-floating > .form-control:focus {
    border-color: #1f3a8a;
    box-shadow: 0 0 0 4px rgba(31,58,138,0.10);
}
.auth-form .form-floating > label {
    color: #64748b;
    padding: 1rem 0.875rem;
}
.auth-form .form-floating > .form-control:focus ~ label,
.auth-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #1f3a8a;
    transform: scale(.85) translateY(-.6rem) translateX(.15rem);
}

.auth-password-field { position: relative; }
.auth-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    z-index: 10;
}
.auth-password-toggle:hover { color: #1f3a8a; background: #f1f5f9; }

.auth-submit {
    height: 52px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9375rem;
    box-shadow: 0 4px 14px rgba(31,58,138,0.25);
    transition: transform .1s, box-shadow .15s;
}
.auth-submit:hover {
    box-shadow: 0 6px 20px rgba(31,58,138,0.32);
    transform: translateY(-1px);
}
.auth-submit:active { transform: translateY(0); }

.auth-form-foot {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 0.8125rem;
    text-align: center;
}

/* === Responsive < 992 === */
@media (max-width: 991px) {
    .auth-grid { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-form-mobile-brand { display: flex; }
    .auth-main { padding: 2.5rem 1.5rem; }
}
@media (max-width: 1199px) and (min-width: 992px) {
    .auth-brand-inner { padding: 3rem 2.5rem; }
}
