* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #85050c 0%, #004E89 80%);
    position: relative;
}

/* Efecto de fondo animado */
body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50%, -50%); }
}

.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: 880px;
    width: 90%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-image {
    flex: 1;
    background: url('../img/fondo_intro.webp') center/cover;
    position: relative;
    min-height: 380px;
}

.login-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.image-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.image-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.image-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.95;
}

.login-form {
    flex: 1;
    padding: 35px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    text-align: center;
    margin-bottom: 22px;
}

.logo img {
    max-width: 180px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.login-form h1 {
    color: #333;
    font-size: 1.6rem;
    margin-bottom: 6px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #FF6B35;
    font-size: 1rem;
    z-index: 1;
}

.form-group input {
    width: 100%;
    padding: 13px 13px 13px 42px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #FF6B35;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

.password-toggle {
    position: absolute;
    right: 15px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1;
}

.password-toggle:hover {
    color: #FF6B35;
}

.forgot-password {
    text-align: right;
    margin-top: -5px;
    margin-bottom: 16px;
}

.forgot-password a {
    color: #004E89;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #FF6B35;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: rgb(199, 0, 3);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(133, 5, 12, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(133, 5, 12, 0.6);
}

.btn-login:active {
    transform: translateY(0);
}

.register-link {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.register-link a {
    color: #004E89;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #FF6B35;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        width: 95%;
        margin: 20px;
    }

    .login-image {
        min-height: 250px;
        order: -1;
    }

    .image-content {
        padding: 30px;
    }

    .image-content h2 {
        font-size: 1.8rem;
    }

    .image-content p {
        font-size: 1rem;
    }

    .login-form {
        padding: 40px 30px;
    }

    .login-form h1 {
        font-size: 1.6rem;
    }

    .logo img {
        max-width: 200px;
    }

    .social-login {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 30px 20px;
    }

    .logo {
        margin-bottom: 30px;
    }

    .login-form h1 {
        font-size: 1.4rem;
    }

    .form-group input {
        padding: 12px 12px 12px 40px;
    }

    .btn-login {
        padding: 14px;
        font-size: 1rem;
    }
}

/* Animación de carga */
.btn-login.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #334155;
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: #e2e8f0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.page-footer p {
    margin: 0;
    line-height: 1.5;
}

.page-footer p:first-child {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

.page-footer a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page-footer a:hover {
    color: #93c5fd;
    text-decoration: underline;
}
