* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #556B2F; /* Verde olivo principal */
    --primary-dark: #3d4d21;
    --primary-light: #6B8E23;
    --accent-color: #8FBC8F;
    --text-color: #333;
    --text-light: #666;
    --background: #f8f9fa;
    --white: #ffffff;
    --border-color: #e1e5eb;
    --success-color: #28a745;
    --error-color: #dc3545;
}

body {
    background: linear-gradient(135deg, #1a2f0d 0%, #3d4d21 50%, #556B2F 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 176, 76, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(106, 142, 35, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(85, 107, 47, 0.15) 0%, transparent 50%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    width: 100%;
    max-width: 850px;
    min-height: 520px;
    animation: slideUp 0.8s ease-out;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--white);
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(85, 107, 47, 0.3);
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(10deg) scale(1.05);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.welcome-text {
    margin-bottom: 30px;
}

.welcome-text h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.welcome-text p {
    color: var(--text-light);
    font-size: 15px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group input {
    width: 100%;
    padding: 14px 50px 14px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--background);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.1);
}

.form-group label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 15px;
    pointer-events: none;
    transition: all 0.3s ease;
    background: var(--white);
    padding: 0 5px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
}

.input-icon {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 16px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s ease;
    padding: 5px;
    border-radius: 4px;
}

.toggle-password:hover {
    color: var(--primary-color);
    background: rgba(85, 107, 47, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

.remember-me label {
    color: var(--text-light);
    font-size: 14px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(85, 107, 47, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(85, 107, 47, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    display: block;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-light);
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.register-link {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

.image-section {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(139, 176, 76, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(106, 142, 35, 0.2) 0%, transparent 50%);
    z-index: 1;
}

.institutional-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    z-index: 2;
}

.institution-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    transition: all 0.5s ease;
}

.floating-logo {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

.institution-logo:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.3));
}

.image-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    position: relative;
    z-index: 2;
}

.image-placeholder p {
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.image-footer {
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.security-badge {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.security-badge i {
    margin-right: 5px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: var(--white);
    font-weight: 600;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--error-color);
}

/* Responsive */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        max-width: 450px;
    }
    
    .image-section {
        display: none;
    }
    
    .login-section {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .login-section {
        padding: 25px 20px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .welcome-text h1 {
        font-size: 24px;
    }
}

/* Estilos para las alertas profesionales */
.alert-overlay {
    backdrop-filter: blur(5px);
}

.success-alert {
    border: 1px solid rgba(85, 107, 47, 0.2);
}

/* Efectos de partículas para la alerta de éxito */
.success-alert::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 176, 76, 0.1) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}