* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #001d47;
    --primary-dark-blue: #002355;
    --accent-blue: #00308F;
    --light-blue: #e6f0ff;
    --light-gray: #f8f9fa;
    --border-gray: #e9ecef;
    --text-dark: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 35px rgba(0, 31, 77, 0.15);
}

.login-body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.login-container {
    display: flex;
    width: 80%;
    max-width: 1100px;
    height: 550px;
    background: var(--white);
    border-radius: 5px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Lado izquierdo - Formulario */
.login-card {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    padding: 40px;
    background: var(--white);
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    border-bottom: 2px solid var(--light-blue);
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text h1 {
    text-align: left;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.logo-text p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Formulario */
.form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header p {
        text-align: left;
    color: var(--text-light);
    font-size: 0.9rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-container {
    position: relative;
}

.input-container i:first-of-type {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--primary-blue);
    z-index: 2;
}

.input-container input {
    width: 100%;
    height: 50px;
    padding: 20px 16px 0 48px;
    font-size: 14px;
    background: var(--white);
    border: none;
    border-bottom: 2px solid var(--primary-blue);
    border-radius: 0;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
}

.input-container input:focus {
    border-bottom-color: var(--accent-blue);
    background: var(--light-blue);
}

.input-container label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--primary-blue);
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-container input:focus + label,
.input-container input:not(:placeholder-shown) + label {
    top: 0;
    left: 48px;
    font-size: 0.7rem;
    color: var(--accent-blue);
    background: var(--white);
    padding: 2px 6px;
    z-index: 2;
    transform: translateY(0);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-blue);
}

.login-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 31, 77, 0.2);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 31, 77, 0.3);
    gap: 15px;
}

.login-btn:hover .bx-chevron-right {
    transform: translateX(3px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn i {
    transition: all 0.3s ease;
}

.login-btn .bx-chevron-right {
    font-size: 1.1em;
}

.error-global {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 15px;
}

.login-footer {
    margin-top: auto;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-gray);
}

.login-footer p {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* Lado derecho - Bienvenida */
.welcome-section {
    flex: 1;
    background: url('../img/egresados.jpeg') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(
            ellipse at center,
            rgba(0, 35, 105, 0.4) 0%,
            rgba(5, 49, 116, 0.6) 70%,
            rgba(0, 35, 105, 0.8) 100%
        ),
        linear-gradient(
            to bottom right,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%
        );
}

.welcome-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 500px;
    padding: 20px;
}

/* Header de institución con logo */
.institution-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px 15px 15px 50px;
    backdrop-filter: blur(10px);
}

.institution-logo {
    width: 80px;
    height: 70px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.institution-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    padding: 2px;
}

.institution-name {
    text-align: left;
}

.institution-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.welcome-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
}

.welcome-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}

.welcome-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    margin: 0 auto 20px;
    border: none;
}

.welcome-description {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Información adicional */
.additional-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.info-item:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.info-item i {
    font-size: 1.2rem;
    color: var(--light-blue);
    min-width: 24px;
}

/* Responsive */
@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
        height: auto;
        max-width: 450px;
    }
    
    .welcome-section {
        display: none;
    }
    
    .login-card {
        flex: 1;
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .login-body {
        padding: 10px;
    }
    
    .login-card {
        padding: 25px 20px;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    /* Ajustes responsive para el header de institución */
    .institution-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .institution-name {
        text-align: center;
    }
    
    .institution-title {
        font-size: 1.3rem;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .institution-logo {
        width: 50px;
        height: 50px;
    }
    
    .login-btn {
        padding: 0 15px;
    }
    
    .login-btn .btn-text {
        font-size: 0.9rem;
    }
}