* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: visible;
}

.login-container {
    width: 100%;
    max-width: 600px; /* Mucho más grande horizontalmente */
    background: #ffffff;
    border-radius: 24px;
    padding: 100px 60px 60px; /* Mucho más grande vertical y horizontalmente */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: visible;
}

/* scroll interno */
.login-scroll {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none;
    padding-right: 5px;
}

    .login-scroll::-webkit-scrollbar {
        display: none;
    }

/* ===== AVATAR SUTIL ===== */
.avatar-container {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a2540, #173652);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ===== HEADER ===== */
.login-header {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 45px; /* Más espacio antes del formulario */
}

    .login-header h2 {
        color: #0a2540;
        font-size: 2.2rem;
        font-weight: 800;
        letter-spacing: -0.5px;
        margin-bottom: 5px;
    }

    .login-header p {
        color: #64748b;
        font-size: 0.95rem;
        font-weight: 500;
    }

/* ===== FORM ===== */
.form-group {
    margin-bottom: 30px; /* Separación más grande entre inputs */
}

label {
    display: block;
    margin-bottom: 8px;
    color: #0a2540;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

    .input-wrapper i:not(.password-toggle) {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #1f4662;
        font-size: 1.1rem;
        opacity: 0.6;
        transition: opacity 0.3s;
    }

input, select {
    width: 100%;
    padding: 18px 50px !important; /* Inputs más altos */
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    outline: none;
    font-size: 1.05rem;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.3s;
    font-weight: 500;
    appearance: none; /* Quitar flecha por defecto */
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230a2540' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 1.2rem;
    padding-right: 45px !important;
}

input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

input:focus, select:focus {
    border-color: #0a2540;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10, 37, 64, 0.08);
}

        input:focus + i:not(.password-toggle) {
            opacity: 1;
            color: #0a2540;
        }

/* ===== PASSWORD TOGGLE A LA DERECHA ===== */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #1f4662;
    font-size: 1.1rem;
    opacity: 0.6;
    z-index: 2;
    transition: opacity 0.3s;
}

    .password-toggle:hover {
        opacity: 1;
        color: #0a2540;
    }

/* ===== CHECKBOX Y LINKS ===== */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0 25px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .remember input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: #0a2540;
    }

    .remember label {
        margin-bottom: 0;
        cursor: pointer;
        color: #1f4662;
    }

.forgot-link {
    color: #0a2540;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

/* ===== BOTÓN ===== */
.login-btn {
    width: 100%;
    padding: 20px; /* Botón más grande */
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(10, 37, 64, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(10, 37, 64, 0.3);
        background: linear-gradient(145deg, #1f4662, #0a2540);
    }

    .login-btn i {
        font-size: 1.2rem;
    }

/* ===== REGISTER LINK ===== */
.register-link {
    text-align: center;
    margin-top: 25px;
    color: #1f4662;
    font-size: 0.95rem;
}

    .register-link a {
        color: #0a2540;
        text-decoration: none;
        font-weight: 600;
        margin-left: 5px;
        cursor: pointer;
    }

        .register-link a:hover {
            text-decoration: underline;
        }



/* ===== RESPONSIVE ===== */
@media (max-height: 700px) {
    .avatar {
        width: 130px;
        height: 130px;
        font-size: 2.3rem;
    }

    .avatar-container {
        top: -70px;
    }

    .login-container {
        padding-top: 75px;
    }

    .login-scroll {
        max-height: 68vh;
    }
}

@media (max-height: 600px) {
    .avatar {
        width: 120px;
        height: 120px;
        font-size: 2.1rem;
    }

    .avatar-container {
        top: -65px;
    }

    .login-container {
        padding-top: 70px;
    }

    .login-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-height: 500px) {
    .avatar {
        width: 110px;
        height: 110px;
        font-size: 1.9rem;
    }

    .avatar-container {
        top: -60px;
    }

    .login-container {
        padding-top: 65px;
    }

    .login-header h2 {
        font-size: 1.6rem;
    }

    .login-header p {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    .login-container {
        padding: 75px 20px 25px;
    }
    .avatar {
        width: 120px;
        height: 120px;
        font-size: 2.1rem;
    }
    .avatar-container {
        top: -65px;
    }
    .login-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 380px) {
    .login-container {
        padding: 75px 25px 25px;
    }

    .avatar {
        width: 120px;
        height: 120px;
        font-size: 2.1rem;
    }

    .avatar-container {
        top: -65px;
    }

    .login-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 320px) {
    .login-container {
        padding: 70px 20px 20px;
    }

    .avatar {
        width: 110px;
        height: 110px;
        font-size: 1.9rem;
    }

    .avatar-container {
        top: -60px;
    }

    input {
        padding: 12px 40px !important;
    }
}

/* Ajuste para autocompletado */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
    border: 2px solid #0a2540;
}

/* ===== BACK LINK ===== */
.back-link-container {
    text-align: center;
    margin-top: 25px;
}

.back-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-link i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.back-link:hover {
    color: #0a2540;
}

.back-link:hover i {
    transform: translateX(-4px);
}

/* ===== VALIDATION ERRORS (PREMIUM) ===== */
.field-validation-error {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    background-color: #fff5f5;
    border: 1.5px solid #fda4af;
    border-radius: 12px;
    color: #e11d48;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.05);
    animation: fadeInError 0.3s ease-out;
}

.field-validation-error::before {
    content: "\f06a"; /* FontAwesome exclamation-circle */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.95rem;
    color: #e11d48;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SWEETALERT2 PREMIUM CUSTOMIZATION ===== */
.swal2-popup {
    border-radius: 24px !important;
    font-family: 'Inter', 'Outfit', sans-serif !important;
    padding: 35px 30px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: #ffffff !important;
}

.swal2-title {
    color: #0a2540 !important;
    font-size: 1.7rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    margin-bottom: 8px !important;
}

.swal2-html-container {
    color: #64748b !important;
    font-size: 0.98rem !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
}

/* Confirm Button - Dark Blue Gradient */
.swal2-styled.swal2-confirm {
    background: linear-gradient(145deg, #0a2540, #1f4662) !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 14px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(10, 37, 64, 0.2) !important;
    transition: all 0.3s !important;
    border: none !important;
}

.swal2-styled.swal2-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(10, 37, 64, 0.3) !important;
    background: linear-gradient(145deg, #1f4662, #0a2540) !important;
}

.swal2-styled.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.5) !important;
}

/* Cancel Button - Slate Muted */
.swal2-styled.swal2-cancel {
    background: #64748b !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 14px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2) !important;
    transition: all 0.3s !important;
    border: none !important;
}

.swal2-styled.swal2-cancel:hover {
    background: #475569 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.3) !important;
}

.swal2-styled.swal2-cancel:focus {
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.5) !important;
}

/* Deny Button - Rose/Red Warning */
.swal2-styled.swal2-deny {
    background: #ef4444 !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 14px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
    transition: all 0.3s !important;
    border: none !important;
}

.swal2-styled.swal2-deny:hover {
    background: #dc2626 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3) !important;
}

/* Icon Customizations */
.swal2-icon.swal2-success {
    border-color: #10b981 !important;
}

.swal2-icon.swal2-success [class^=swal2-success-line] {
    background-color: #10b981 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border: 4px solid rgba(16, 185, 129, 0.2) !important;
}

.swal2-icon.swal2-error {
    border-color: #ef4444 !important;
}

.swal2-icon.swal2-error [class^=swal2-x-mark-line] {
    background-color: #ef4444 !important;
}

.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.swal2-icon.swal2-info {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

.swal2-icon.swal2-question {
    border-color: #64748b !important;
    color: #64748b !important;
}

/* Utility classes */
.d-none {
    display: none !important;
}
