/*
 * auth.css — Páginas de autenticación
 * FASE 15.1 — Login premium
 */

/* Fondo auth */
body {
    background: var(--theme-bg-auth,
        linear-gradient(135deg, #f0f4ff 0%, #e8edf8 50%, #eff2f8 100%));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Wrapper login — dos columnas en desktop */
.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 880px;
    min-height: 560px;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.14), 0 2px 12px rgba(0,0,0,.08);
}

/* Panel izquierdo — branding */
.auth-brand-panel {
    flex: 1;
    background: linear-gradient(150deg,
        var(--bs-primary) 0%,
        color-mix(in srgb, var(--bs-primary) 70%, #000) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 280px; height: 280px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    pointer-events: none;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -40px;
    width: 220px; height: 220px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
    pointer-events: none;
}

.auth-brand-logo {
    max-width: 260px;
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.auth-brand-headline {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.02em;
    margin-bottom: .625rem;
}

.auth-brand-sub {
    font-size: .9rem;
    opacity: .78;
    line-height: 1.5;
}

.auth-brand-badges {
    display: flex;
    flex-direction: column;
    gap: .625rem;
    position: relative;
    z-index: 1;
}

.auth-brand-badge {
    display: flex;
    align-items: center;
    gap: .625rem;
    font-size: .845rem;
    opacity: .88;
}

.auth-brand-badge i {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.15);
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .875rem;
    flex-shrink: 0;
}

/* Panel derecho — formulario */
.auth-form-panel {
    flex: 0 0 400px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.75rem 2.5rem;
    position: relative;
}

.auth-form-title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #111827;
    margin-bottom: .375rem;
}

.auth-form-subtitle {
    font-size: .875rem;
    color: #6b7280;
    margin-bottom: 1.75rem;
}

/* Campos */
.auth-form-panel .form-control {
    font-size: .9rem;
    border-radius: .5rem;
    border: 1px solid rgba(0,0,0,.14);
    padding: .6rem .875rem;
    background: #f9fafb;
    color: #111827;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.auth-form-panel .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .12);
    background: #fff;
    outline: none;
}

.auth-form-panel .form-control::placeholder { color: #9ca3af; }

.auth-form-panel .form-label {
    font-size: .855rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: .35rem;
}

.auth-form-panel .btn-primary {
    padding: .65rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    border-radius: .5rem;
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), .30);
    transition: all .15s;
}

.auth-form-panel .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(var(--bs-primary-rgb), .40);
    transform: translateY(-1px);
}

/* Fallback: sin panel izquierdo (mobile) */
@media (max-width: 767.98px) {
    .auth-wrapper {
        flex-direction: column;
        max-width: 440px;
        min-height: auto;
        border-radius: 1rem;
    }

    .auth-brand-panel {
        padding: 1.5rem 1.5rem 1.25rem;
        min-height: 0;
    }

    .auth-brand-headline { font-size: 1.15rem; }
    .auth-brand-badges { display: none; }

    .auth-form-panel {
        flex: none;
        padding: 2rem 1.75rem;
    }
}

@media (max-width: 480px) {
    body { padding: .75rem; }

    .auth-wrapper { border-radius: .75rem; }

    .auth-form-panel { padding: 1.5rem 1.25rem; }
}

/* Dark mode auth */
[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #0c0f16 0%, #111622 100%);
}

[data-bs-theme="dark"] .auth-form-panel {
    background: #161b27;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .auth-form-title { color: #e2e8f0; }
[data-bs-theme="dark"] .auth-form-subtitle { color: #8892a4; }

[data-bs-theme="dark"] .auth-form-panel .form-control {
    background: #1c2232;
    border-color: rgba(255,255,255,.12);
    color: #e2e8f0;
}

[data-bs-theme="dark"] .auth-form-panel .form-control:focus {
    background: #1f2638;
    border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .auth-form-panel .form-control::placeholder { color: #5c6880; }
[data-bs-theme="dark"] .auth-form-panel .form-label { color: #cbd5e1; }
