@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --azul-oscuro: #0f2460;
    --azul-principal: #1E3A8A;
    --azul-secundario: #3B82F6;
    --verde: #10B981;
    --verde-claro: #34d399;
    --blanco: #FFFFFF;
    --gris-fondo: #F9FAFB;
    --gris-borde: #E5E7EB;
    --gris-texto: #374151;
    --gris-suave: #6B7280;
    --rojo: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #0f2460, #1E3A8A, #2563eb);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 560px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

/* ===== PANEL IZQUIERDO (branding) ===== */
.login-branding {
    flex: 1.1;
    background: linear-gradient(145deg, #0f2460 0%, #1E3A8A 40%, #2563eb 100%);
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -70px;
    right: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.18);
}

.login-branding::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
}

/* Logo */
.branding-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.logo-text {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

.logo-sub {
    display: block;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 300;
    margin-top: 2px;
}

/* Hero */
.branding-hero {
    z-index: 1;
}

.branding-hero h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 14px;
}

.branding-hero h2 span {
    color: var(--verde-claro);
}

.branding-hero p {
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 28px;
}

/* Badges de características */
.branding-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    backdrop-filter: blur(4px);
}

.badge-icon {
    width: 30px;
    height: 30px;
    background: rgba(52, 211, 153, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.badge-item span {
    color: #e0f2fe;
    font-size: 12px;
    font-weight: 400;
}

/* Footer branding */
.branding-footer {
    color: #4b7ab5;
    font-size: 11px;
    z-index: 1;
}

/* ===== PANEL DERECHO (formulario) ===== */
.login-form-panel {
    flex: 1;
    background: #fff;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.form-header p {
    font-size: 13px;
    color: var(--gris-suave);
    margin-bottom: 32px;
}

/* Alerta de error */
.alerta-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #B91C1C;
    font-size: 13px;
}

/* Campos */
.campo {
    margin-bottom: 18px;
}

.campo label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--gris-suave);
    margin-bottom: 7px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.input-wrap {
    position: relative;
}

.input-wrap i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 15px;
}

.campo input {
    width: 100%;
    padding: 11px 13px 11px 38px;
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--gris-texto);
    background: var(--gris-fondo);
    outline: none;
    transition: border 0.2s, box-shadow 0.2s, background 0.2s;
}

.campo input:focus {
    border-color: var(--azul-secundario);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #fff;
}

/* Fila recordar/olvidé */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.check-recordar {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--gris-suave);
    cursor: pointer;
}

.check-recordar input {
    accent-color: var(--azul-secundario);
    width: 14px;
    height: 14px;
}

.link-olvide {
    font-size: 13px;
    color: var(--azul-secundario);
    text-decoration: none;
    font-weight: 500;
}

.link-olvide:hover {
    text-decoration: underline;
}

/* Botón principal */
.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--azul-principal), var(--azul-secundario));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

/* Divider */
.form-divider {
    text-align: center;
    margin: 18px 0;
    font-size: 12px;
    color: #D1D5DB;
    position: relative;
}

.form-divider::before,
.form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--gris-borde);
}

.form-divider::before { left: 0; }
.form-divider::after  { right: 0; }

/* Footer form */
.form-footer {
    text-align: center;
    font-size: 12px;
    color: var(--gris-suave);
    margin-top: 4px;
}

.form-footer a {
    color: var(--azul-secundario);
    font-weight: 500;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 680px) {
    .login-branding {
        display: none;
    }

    .login-wrapper {
        border-radius: 16px;
    }

    .login-form-panel {
        padding: 36px 28px;
    }
}
