/* ============================================
   LOGIN MODERNO - FOX DR.
   Gradientes suaves y diseño profesional
   ============================================ */

/* === RESET Y VARIABLES === */
:root {
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    --color-accent: #00d4ff;
    --color-success: #48bb78;
    --color-warning: #f6ad55;
    --color-error: #fc8181;
    --color-text: #2d3748;
    --color-text-light: #718096;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === BODY Y FONDO === */
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, #667eea 0%, #764ba2 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Efecto de partículas en el fondo */
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.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* === CONTENEDOR PRINCIPAL === */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

/* === TARJETA DE LOGIN === */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === HEADER === */
.login-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    padding: 25px 30px 20px; /* Reducido de 40px 30px 30px */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-logo {
    display: none; /* OCULTO */
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.login-logo img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-title {
    position: relative;
    z-index: 1;
    color: white;
    font-size: 22px; /* Reducido de 24px */
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.login-subtitle {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px; /* Reducido de 14px */
    margin-top: 6px; /* Reducido de 8px */
}
/* === BODY DE LA TARJETA === */
.login-body {
     padding: 30px 30px 25px; /* Reducido de 40px 30px */
}

/* === GRUPOS DE FORMULARIO === */
.form-group {
    margin-bottom: 20px; /* Reducido de 25px */
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px; /* Reducido de 14px */
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px; /* Reducido de 8px */
    transition: var(--transition);
}

/* === INPUTS === */
.form-control {
    width: 100%;
    padding: 12px 14px; /* Reducido de 14px 16px */
    padding-right: 40px; /* Reducido de 45px */
    font-size: 14px; /* Reducido de 15px */
    color: var(--color-text);
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px; /* Reducido de 12px */
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    background: white;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: #cbd5e0;
}

/* SELECT específico */
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

/* === TRANSFORMAR A MAYÚSCULAS === */
.transf_mayuscula {
    text-transform: uppercase;
}

/* === ICONOS DE VALIDACIÓN === */
.input-wrapper {
    position: relative;
}

.validation-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.validation-icon.show {
    opacity: 1;
}

.validation-icon.success {
    color: var(--color-success);
}

.validation-icon.error {
    color: var(--color-error);
}

.validation-icon.warning {
    color: var(--color-warning);
}

/* Mensaje de validación */
.validation-message {
    font-size: 12px;
    margin-top: 6px;
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.validation-message.show {
    display: block;
}

.validation-message.success {
    color: var(--color-success);
}

.validation-message.error {
    color: var(--color-error);
}

.validation-message.warning {
    color: var(--color-warning);
}

/* === ESTADOS DE VALIDACIÓN === */
.is-valid {
    border-color: var(--color-success) !important;
    background-color: #f0fff4 !important;
}

.is-invalid {
    border-color: var(--color-error) !important;
    background-color: #fff5f5 !important;
}

.is-warning {
    border-color: var(--color-warning) !important;
    background-color: #fffaf0 !important;
}

/* === BOTÓN DE INGRESO === */
.btn-login {
    width: 100%;
    padding: 14px; /* Reducido de 16px */
    font-size: 15px; /* Reducido de 16px */
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border: none;
    border-radius: 10px; /* Reducido de 12px */
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    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.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === LOADER === */
.btn-login .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-login.loading .spinner {
    display: block;
}

.btn-login.loading .btn-text {
    display: none;
}

/* === FOOTER === */
.login-footer {
    padding: 15px 30px; /* Reducido de 20px 30px */
    background: #f7fafc;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.login-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 13px; /* Reducido de 14px */
    font-weight: 500;
    transition: var(--transition);
}

.login-footer a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* === CHECKBOX RECORDAR === */
.remember-group {
    display: flex;
    align-items: center;
    margin-bottom: 18px; /* Reducido de 20px */
}

.remember-group input[type="checkbox"] {
    width: 16px; /* Reducido de 18px */
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.remember-group label {
    font-size: 13px; /* Reducido de 14px */
    color: var(--color-text-light);
    cursor: pointer;
    user-select: none;
}

/* === RESPONSIVE === */
/* === RESPONSIVE === */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-card {
        border-radius: 16px;
    }
    
    .login-header {
        padding: 20px 20px 15px; /* Más compacto en móvil */
    }
    
    .login-body {
        padding: 25px 20px 20px; /* Más compacto en móvil */
    }
    
    .login-title {
        font-size: 18px; /* Reducido de 20px */
    }
    
    .login-subtitle {
        font-size: 12px;
    }
    
    .login-logo img {
        max-width: 120px; /* Reducido de 150px */
    }
    
    .form-control {
        padding: 11px 12px; /* Más compacto */
        padding-right: 38px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 13px; /* Más compacto */
        font-size: 14px;
    }
    
    .form-group {
        margin-bottom: 16px; /* Más compacto */
    }
}

/* === ANIMACIÓN DE ENTRADA === */
.fade-in {
    animation: fadeIn 0.5s ease;
}

/* === ALERTAS === */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.alert-warning {
    background-color: #fffaf0;
    color: #975a16;
    border: 1px solid #f6ad55;
}

.alert-error {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #fc8181;
}

.alert-success {
    background-color: #f0fff4;
    color: #276749;
    border: 1px solid #48bb78;
}

.alert .close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin-left: 10px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}