/* ============================================================
   LOGIN – Diseño corporativo (split screen)
   ============================================================ */

.container-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #969696;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(29, 78, 216, 0.14) 0%, transparent 50%);
    padding: 24px;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.login-shell {
    width: 100%;
    max-width: 760px;
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 25px 70px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    animation: fadeInUp 0.5s ease-out;
}

/* ---------------- Panel izquierdo: marca ---------------- */
.login-brand {
    flex: 1 1 46%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 28px;
    background: linear-gradient(160deg, #0b1c33 0%, #0f2947 45%, #123a5e 100%);
    color: #e8edf5;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(37, 99, 235, 0.16) 0%, transparent 50%);
    pointer-events: none;
}

.login-brand::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand-content {
    position: relative;
    z-index: 1;
}

.login-brand-logo {
    margin-bottom: 20px;
}

.login-brand-logo img {
    max-width: 76px;
    max-height: 52px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.login-brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0 0 8px;
    color: #ffffff;
    line-height: 1.25;
}

.login-brand-subtitle {
    font-size: 0.95rem;
    color: #a9bcd6;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

.login-brand-footer {
    position: absolute;
    z-index: 1;
    left: 28px;
    right: 28px;
    bottom: 20px;
    font-size: 0.72rem;
    color: #7b8fac;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------------- Panel derecho: formulario ---------------- */
.login-panel {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 32px;
    background: #ffffff;
}

.login-card {
    width: 100%;
    max-width: 320px;
}

.logo-section {
    margin-bottom: 20px;
}

.login-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
    background: #eaf1ff;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.logo-section h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.welcome-text {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 9px 12px 9px 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    background-color: #f8fafc;
    font-size: 0.92rem;
    font-weight: 500;
    color: #0f172a;
    transition: all 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: #2563eb;
}

.login-button {
    width: 100%;
    padding: 10px 20px;
    color: #ffffff;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-top: 6px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.4);
}

.login-button:hover {
    box-shadow: 0 6px 16px -2px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.login-button i {
    transition: transform 0.2s ease;
    font-size: 0.85rem;
}

.login-button:hover i {
    transform: translateX(3px);
}

.login-security-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 18px 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: left;
}

.login-security-note i {
    color: #94a3b8;
    font-size: 0.8rem;
}

.verification-badge {
    text-align: center;
    margin-top: 24px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.verification-badge:hover {
    opacity: 1;
}

.verification-badge img {
    max-width: 100px;
    height: auto;
    filter: grayscale(0.2);
    transition: filter 0.3s ease;
}

.verification-badge:hover img {
    filter: grayscale(0);
}

/* Responsive Design */
@media screen and (max-width: 860px) {
    .login-shell {
        flex-direction: column;
        max-width: 460px;
        min-height: 0;
    }

    .login-brand {
        padding: 36px 32px;
    }

    .login-brand-footer {
        display: none;
    }

    .login-panel {
        padding: 36px 32px;
    }
}

@media screen and (max-width: 480px) {
    .container-login {
        padding: 0;
    }

    .login-shell {
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .login-brand {
        padding: 32px 24px;
    }

    .login-panel {
        padding: 32px 24px;
        flex: 1;
    }

    .login-card {
        max-width: none;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de carga */
.login-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
