/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta de Colores Azul y Blanco */
    --primary-blue: #0066CC;
    --secondary-blue: #0052A3;
    --light-blue: #4A90E2;
    --extra-light-blue: #E3F2FD;
    --dark-blue: #003D7A;
    --white: #FFFFFF;
    --light-gray: #F5F7FA;
    --medium-gray: #E0E6ED;
    --text-dark: #2C3E50;
    --text-light: #6B7C93;
    --error-red: #E74C3C;
    --success-green: #27AE60;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 102, 204, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 102, 204, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 102, 204, 0.2);
    
    /* Transiciones */
    --transition: all 0.3s ease;
}

/* Estilos Globales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Contenedor Principal */
.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.6s ease-out;
}

/* Caja de Login */
.login-box {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue), var(--light-blue));
}

/* Sección del Logo */
.logo-section {
    text-align: center;
    margin-bottom: 35px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

.logo-circle i {
    font-size: 36px;
    color: var(--white);
}

.logo-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 400;
}

/* Formulario */
.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-blue);
    width: 16px;
}

.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-dark);
    transition: var(--transition);
    background-color: var(--light-gray);
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.form-group input::placeholder {
    color: var(--text-light);
}

/* Wrapper para el input de contraseña */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
    font-size: 16px;
}

.toggle-password:hover {
    color: var(--primary-blue);
}

/* Mensajes de Error */
.error-message {
    display: block;
    color: var(--error-red);
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
    font-weight: 500;
}

/* Opciones del Formulario */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

/* Botón de Login */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    background: var(--medium-gray);
    cursor: not-allowed;
    transform: none;
}

/* Alertas */
.alert {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.alert.error {
    background-color: #FADBD8;
    color: var(--error-red);
    border-left: 4px solid var(--error-red);
}

.alert.success {
    background-color: #D5F4E6;
    color: var(--success-green);
    border-left: 4px solid var(--success-green);
}

/* Footer Links */
.footer-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

.footer-links p {
    font-size: 14px;
    color: var(--text-light);
}

.footer-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

/* Decoración de Fondo */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    33% {
        transform: translateY(-30px) translateX(30px);
    }
    66% {
        transform: translateY(30px) translateX(-30px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries - Responsivo */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .login-box {
        padding: 35px 25px;
        border-radius: 15px;
    }
    
    .logo-circle {
        width: 70px;
        height: 70px;
    }
    
    .logo-circle i {
        font-size: 30px;
    }
    
    .logo-section h1 {
        font-size: 28px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .circle-1 {
        width: 200px;
        height: 200px;
    }
    
    .circle-2 {
        width: 150px;
        height: 150px;
    }
    
    .circle-3 {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .logo-section h1 {
        font-size: 24px;
    }
    
    .form-group input[type="email"],
    .form-group input[type="password"] {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .logo-circle {
        width: 60px;
        height: 60px;
    }
    
    .logo-circle i {
        font-size: 26px;
    }
    
    .logo-section h1 {
        font-size: 22px;
    }
}

/* Modo de impresión */
@media print {
    .background-decoration {
        display: none;
    }
}
