/**
 * Página de login - diseño split (bienvenida | formulario)
 * Estilo moderno con panel izquierdo decorativo y panel derecho blanco.
 */
.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Nunito', -apple-system, sans-serif;
    background: linear-gradient(135deg, #1e4a7e 0%, #163a66 50%, #1a5c4a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 960px;
    width: 100%;
    min-height: 580px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ========== Panel izquierdo ========== */
.login-panel-left {
    position: relative;
    background: linear-gradient(160deg, #1e4a7e 0%, #163a66 40%, #0d3d32 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.login-panel-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.login-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.login-circle-1 {
    width: 280px;
    height: 280px;
    top: -80px;
    right: -80px;
}

.login-circle-2 {
    width: 180px;
    height: 180px;
    bottom: -40px;
    left: -40px;
    background: rgba(255, 255, 255, 0.05);
}

.login-circle-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 20%;
    background: rgba(255, 255, 255, 0.06);
}

.login-panel-content {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
}

.login-welcome {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 0 0.5rem 0;
}

.login-headline {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    opacity: 0.95;
    margin: 0 0 1.5rem 0;
}

.login-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    opacity: 0.9;
    max-width: 320px;
    margin: 0 auto;
}

/* ========== Panel derecho ========== */
.login-panel-right {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.login-form-wrap {
    width: 100%;
    max-width: 360px;
}

.login-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.login-form-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 1.75rem 0;
}

.login-error,
.login-ok {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.login-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-ok {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Inputs */
.login-input-wrap {
    position: relative;
    margin-bottom: 1rem;
}

.login-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
}

.login-input-wrap input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.75rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input-wrap input:focus {
    outline: none;
    border-color: #1e4a7e;
    box-shadow: 0 0 0 3px rgba(30, 74, 126, 0.15);
}

.login-input-wrap input::placeholder {
    color: #9ca3af;
}

/* Toggle mostrar contraseña */
.login-input-wrap .login-toggle-pwd {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
}

.login-toggle-pwd:hover {
    color: #6b7280;
}

/* Opciones */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
    cursor: pointer;
}

.login-remember input {
    width: 1rem;
    height: 1rem;
}

.login-forgot {
    font-size: 0.9rem;
    color: #1e4a7e;
    text-decoration: none;
}

.login-forgot:hover {
    text-decoration: underline;
}

/* Botones */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    border: none;
}

.login-btn-primary {
    background: linear-gradient(135deg, #1e4a7e, #163a66);
    color: #fff;
    margin-bottom: 1rem;
}

.login-btn-primary:hover {
    background: linear-gradient(135deg, #163a66, #122d52);
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.login-divider span {
    padding: 0 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

.login-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.login-btn-secondary:hover {
    background: #f9fafb;
}

/* Sign up / secondary links */
.login-signup {
    margin: 1.5rem 0 0 0;
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
}

.login-signup a {
    color: #1e4a7e;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.login-signup a:hover {
    text-decoration: underline;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .login-panel-left {
        padding: 2rem;
        min-height: 220px;
    }

    .login-welcome {
        font-size: 1.5rem;
    }

    .login-headline {
        font-size: 1rem;
    }

    .login-desc {
        display: none;
    }

    .login-panel-right {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 1rem;
    }

    .login-panel-left,
    .login-panel-right {
        padding: 1.5rem;
    }
}
