/**
 * AUTH CSS - Estilos para páginas de autenticación
 * Archivo: app/static/css/auth/auth.css
 * Descripción: Estilos modularizados para login, register, reset password
 * Creado: Enero 2026
 */

/* ============================================
   FONDO Y CONTENEDOR PRINCIPAL
   ============================================ */

.auth-premium-bg {
    background: var(--tema-gradiente-fondo, linear-gradient(135deg, #e1f2ff 0%, #cce7ff 50%, #e1f2ff 100%));
    position: relative;
    overflow: hidden;
}

.auth-premium-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(30,144,255,0.05) 50%, transparent 70%);
    animation: shimmer 8s infinite;
    pointer-events: none;
}

/* ============================================
   TARJETA DE AUTENTICACIÓN
   ============================================ */

.auth-premium-card {
    border: 1px solid var(--tema-borde-color, rgba(30, 144, 255, 0.2));
    box-shadow: var(--tema-sombra-fuerte, 0 25px 60px rgba(30, 144, 255, 0.15));
    backdrop-filter: blur(20px);
    background: var(--tema-fondo-panel, rgba(255, 255, 255, 0.95));
    position: relative;
    overflow: hidden;
    padding: 0;
}

/* ============================================
   HEADER DE AUTENTICACIÓN
   ============================================ */

.auth-premium-header {
    background: var(--tema-gradiente-primario, linear-gradient(135deg, var(--premium-primary), var(--premium-secondary)));
    padding: 40px 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-premium-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

.auth-icon-container {
    margin-bottom: 20px;
}

.auth-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 0;
}

.auth-premium-body {
    padding: 40px;
}

/* ============================================
   FORMULARIOS PREMIUM
   ============================================ */

.premium-form-group {
    margin-bottom: 24px;
}

.premium-form-label {
    color: var(--tema-primario, var(--premium-primary));
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 0.95rem;
}

.premium-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.premium-input-icon {
    position: absolute;
    left: 16px;
    z-index: 3;
    color: var(--tema-primario, var(--premium-primary));
    font-size: 1rem;
}

.premium-form-control {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--tema-borde-color, rgba(30, 144, 255, 0.2));
    border-radius: 12px;
    font-size: 1rem;
    background: var(--tema-fondo-tarjeta, rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: var(--tema-texto-primario, var(--premium-text));
}

.premium-form-control:focus {
    outline: none;
    border-color: var(--tema-borde-activo, var(--premium-primary));
    box-shadow: var(--tema-sombra-suave, 0 0 0 4px rgba(30, 144, 255, 0.1));
    background: var(--tema-fondo-tarjeta, white);
}

.premium-form-control::placeholder {
    color: var(--tema-texto-silenciado, #999);
}

.premium-toggle-password {
    position: absolute;
    right: 16px;
    z-index: 3;
    background: none;
    border: none;
    color: var(--tema-primario, var(--premium-primary));
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.premium-toggle-password:hover {
    background: var(--tema-fondo-hover, rgba(30, 144, 255, 0.1));
    color: var(--tema-secundario, var(--premium-secondary));
}

.premium-form-error {
    color: var(--tema-peligro, #dc3545);
    font-size: 0.875rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
}

.premium-form-error::before {
    content: '⚠';
    margin-right: 6px;
}

/* ============================================
   LINKS Y CHECKBOX
   ============================================ */

.premium-link {
    color: var(--tema-primario, var(--premium-primary));
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.premium-link:hover {
    color: var(--tema-secundario, var(--premium-secondary));
    text-decoration: underline;
}

.premium-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.premium-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--tema-primario, var(--premium-primary));
    border-radius: 4px;
}

.premium-checkbox-label {
    color: var(--tema-texto-primario, var(--premium-text));
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

/* ============================================
   DIVIDER Y SOCIAL LOGIN
   ============================================ */

.premium-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.premium-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--tema-borde-color, rgba(30, 144, 255, 0.3)), transparent);
}

.premium-divider span {
    background: var(--tema-fondo-tarjeta, white);
    padding: 0 20px;
    color: var(--tema-texto-silenciado, var(--premium-text-muted));
    font-size: 0.875rem;
    position: relative;
}

.social-login-premium {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.premium-btn-social {
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-premium {
    background: linear-gradient(135deg, #db4437, #ff6b6b);
    border: 2px solid rgba(219, 68, 55, 0.3);
    color: white;
}

.google-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(219, 68, 55, 0.4);
    color: white;
}

.facebook-premium {
    background: linear-gradient(135deg, #4267B2, #5890ff);
    border: 2px solid rgba(66, 103, 178, 0.3);
    color: white;
}

.facebook-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 103, 178, 0.4);
    color: white;
}

/* ============================================
   FOOTER Y LINKS
   ============================================ */

.auth-premium-footer {
    text-align: center;
    color: var(--tema-texto-silenciado, var(--premium-text-muted));
    font-size: 0.95rem;
}

.premium-link-bold {
    color: var(--tema-primario, var(--premium-primary));
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.premium-link-bold:hover {
    color: var(--tema-secundario, var(--premium-secondary));
    text-decoration: underline;
}

/* ============================================
   BOTONES PREMIUM
   ============================================ */

.premium-btn {
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
}

.premium-btn-primary {
    background: var(--tema-gradiente-primario, linear-gradient(135deg, var(--premium-primary), var(--premium-secondary)));
    color: white;
    box-shadow: var(--tema-sombra-media, 0 4px 15px rgba(30, 144, 255, 0.3));
}

.premium-btn-primary:hover {
    background: linear-gradient(135deg, var(--tema-secundario, var(--premium-secondary)), var(--tema-primario, var(--premium-primary)));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--tema-sombra-fuerte, 0 8px 25px rgba(30, 144, 255, 0.4));
}

.premium-btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--tema-sombra-media, 0 4px 15px rgba(30, 144, 255, 0.3));
}

/* Estado desactivado (gris) */
.premium-btn-primary:disabled,
.premium-btn-primary[disabled] {
    background: #e9ecef !important;
    background-image: none !important;
    color: #adb5bd !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
    border: 1px solid #dee2e6 !important;
}

.premium-btn-primary:disabled i,
.premium-btn-primary[disabled] i,
.premium-btn-primary:disabled span,
.premium-btn-primary[disabled] span {
    color: #adb5bd !important; /* Iconos y texto grises */
}

.premium-btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.premium-btn::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;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .auth-premium-header {
        padding: 30px 25px 25px;
    }
    
    .auth-premium-body {
        padding: 25px;
    }
    
    .auth-title {
        font-size: 1.7rem;
    }
    
    .social-login-premium {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TEMA FUTURISTA
   ============================================ */

html[data-tema="futurista"] .auth-premium-bg {
    background: #0a0a0a !important;
}

html[data-tema="futurista"] .auth-premium-bg::before {
    background: linear-gradient(45deg, transparent 30%, rgba(0,247,255,0.03) 50%, transparent 70%) !important;
}

html[data-tema="futurista"] .auth-premium-card {
    background: rgba(5, 15, 30, 0.95) !important;
    border: 1px solid rgba(0, 247, 255, 0.4) !important;
    box-shadow: 0 0 30px rgba(0, 247, 255, 0.2), 0 25px 60px rgba(0, 0, 0, 0.5) !important;
}

html[data-tema="futurista"] .auth-premium-header {
    background: linear-gradient(135deg, rgba(0, 50, 80, 0.9), rgba(0, 80, 120, 0.7)) !important;
    border-bottom: 1px solid rgba(0, 247, 255, 0.4) !important;
}

html[data-tema="futurista"] .auth-title {
    color: #00f7ff !important;
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.5) !important;
}

html[data-tema="futurista"] .auth-subtitle {
    color: rgba(255, 255, 255, 0.7) !important;
}

html[data-tema="futurista"] .auth-premium-body {
    background: transparent !important;
}

html[data-tema="futurista"] .premium-form-control {
    background: transparent !important;
    border: 1px solid rgba(0, 247, 255, 0.4) !important;
    color: #ffffff !important;
}

html[data-tema="futurista"] .premium-form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

html[data-tema="futurista"] .premium-form-control:focus {
    background: rgba(0, 247, 255, 0.05) !important;
    border-color: #00f7ff !important;
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.3) !important;
}

html[data-tema="futurista"] .premium-input-icon,
html[data-tema="futurista"] .premium-form-label {
    color: #00f7ff !important;
}

html[data-tema="futurista"] .premium-toggle-password {
    color: #00f7ff !important;
}

html[data-tema="futurista"] .premium-toggle-password:hover {
    background: rgba(0, 247, 255, 0.1) !important;
}

html[data-tema="futurista"] .premium-link,
html[data-tema="futurista"] .premium-link-bold {
    color: #00f7ff !important;
}

html[data-tema="futurista"] .premium-link:hover,
html[data-tema="futurista"] .premium-link-bold:hover {
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(0, 247, 255, 0.5) !important;
}

html[data-tema="futurista"] .premium-checkbox-label {
    color: #ffffff !important;
}

html[data-tema="futurista"] .premium-checkbox {
    accent-color: #00f7ff !important;
}

html[data-tema="futurista"] .auth-premium-footer {
    color: rgba(255, 255, 255, 0.7) !important;
}

html[data-tema="futurista"] .premium-divider span {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

html[data-tema="futurista"] .premium-btn-primary {
    background: transparent !important;
    border: 1px solid #00f7ff !important;
    color: #00f7ff !important;
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.3) !important;
}

html[data-tema="futurista"] .premium-btn-primary:hover {
    background: rgba(0, 247, 255, 0.1) !important;
    box-shadow: 0 0 25px rgba(0, 247, 255, 0.5) !important;
    color: #ffffff !important;
}

html[data-tema="futurista"] .premium-btn-primary:disabled,
html[data-tema="futurista"] .premium-btn-primary[disabled] {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

html[data-tema="futurista"] .premium-btn-primary:disabled i,
html[data-tema="futurista"] .premium-btn-primary[disabled] i,
html[data-tema="futurista"] .premium-btn-primary:disabled span,
html[data-tema="futurista"] .premium-btn-primary[disabled] span {
    color: rgba(255, 255, 255, 0.3) !important;
}

html[data-tema="futurista"] .premium-icon-container {
    background: transparent !important;
    border-color: #00f7ff !important;
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.4) !important;
}

html[data-tema="futurista"] .premium-icon-container i {
    color: #00f7ff !important;
}

/* Estilos adicionales futurista para registro */
html[data-tema="futurista"] .password-strength-premium {
    background: rgba(0, 247, 255, 0.1) !important;
}

html[data-tema="futurista"] .requirement-premium {
    color: rgba(255, 255, 255, 0.6) !important;
    background: transparent !important;
}

html[data-tema="futurista"] .requirement-premium.invalid {
    color: rgba(255, 100, 100, 0.8) !important;
    background: rgba(255, 100, 100, 0.1) !important;
}

html[data-tema="futurista"] .requirement-premium.valid {
    color: #00f7ff !important;
    background: rgba(0, 247, 255, 0.1) !important;
}

html[data-tema="futurista"] .requirement-premium.invalid i {
    color: rgba(255, 100, 100, 0.8) !important;
}

html[data-tema="futurista"] .requirement-premium.valid i {
    color: #00f7ff !important;
}

html[data-tema="futurista"] .terms-premium {
    background: rgba(0, 247, 255, 0.05) !important;
    border: 1px solid rgba(0, 247, 255, 0.2) !important;
}

html[data-tema="futurista"] .terms-premium:hover {
    background: rgba(0, 247, 255, 0.1) !important;
    border-color: rgba(0, 247, 255, 0.4) !important;
}

html[data-tema="futurista"] .premium-info-box {
    background: rgba(0, 247, 255, 0.05) !important;
    border: 1px solid rgba(0, 247, 255, 0.3) !important;
}

html[data-tema="futurista"] .info-icon {
    color: #00f7ff !important;
}

html[data-tema="futurista"] .info-content p {
    color: #ffffff !important;
}

html[data-tema="futurista"] .premium-form-error {
    color: #ff6b6b !important;
}

/* ============================================
   FUTURISTA - INPUTS CON MÁXIMA ESPECIFICIDAD
   Para asegurar que ningún otro CSS sobreescriba
   ============================================ */

html[data-tema="futurista"] .auth-premium-body .premium-form-control,
html[data-tema="futurista"] .auth-premium-card .premium-form-control,
html[data-tema="futurista"] .premium-input-group .premium-form-control,
html[data-tema="futurista"] input.premium-form-control,
html[data-tema="futurista"] .premium-form-control[type="text"],
html[data-tema="futurista"] .premium-form-control[type="email"],
html[data-tema="futurista"] .premium-form-control[type="password"] {
    background: transparent !important;
    background-color: transparent !important;
    border: 1px solid rgba(0, 247, 255, 0.4) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Autofill del navegador - Chrome/Safari */
html[data-tema="futurista"] .premium-form-control:-webkit-autofill,
html[data-tema="futurista"] .premium-form-control:-webkit-autofill:hover,
html[data-tema="futurista"] .premium-form-control:-webkit-autofill:focus,
html[data-tema="futurista"] .premium-form-control:-webkit-autofill:active,
html[data-tema="futurista"] input.premium-form-control:-webkit-autofill,
html[data-tema="futurista"] input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(5, 15, 30, 0.95) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: transparent !important;
    transition: background-color 5000s ease-in-out 0s !important;
    caret-color: #00f7ff !important;
}

/* Firefox autofill */
html[data-tema="futurista"] .premium-form-control:autofill,
html[data-tema="futurista"] input:autofill {
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
}
