
/* Fondo de pantalla DentalSoft - Tema Oscuro Profesional */

/* Fondo principal para dashboard */
.dentalsoft-background {
    background-image: 
        linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(26, 35, 126, 0.7)),
        url('../images/dentalsoft_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Overlay con patrón hexagonal */
.dentalsoft-background::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(100, 181, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(26, 35, 126, 0.1) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
}

/* Fondo para login */
.login-background {
    background-image: 
        linear-gradient(135deg, rgba(18, 18, 18, 0.8), rgba(26, 35, 126, 0.6)),
        url('../images/dentalsoft_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
}

/* Overlay animado para login */
.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(100, 181, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(26, 35, 126, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(46, 125, 50, 0.1) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Fondo sutil para el dashboard */
.dashboard-background {
    background-image: 
        linear-gradient(135deg, rgba(18, 18, 18, 0.95), rgba(26, 35, 126, 0.8)),
        url('../images/dentalsoft_background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.3;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Patrón de cuadrícula sutil */
.grid-pattern {
    background-image: 
        linear-gradient(rgba(100, 181, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 181, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    opacity: 0.3;
}

/* Efectos de partículas */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -4;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(100, 181, 246, 0.6);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive backgrounds */
@media (max-width: 1366px) {
    .dentalsoft-background,
    .login-background,
    .dashboard-background {
        background-image: 
            linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(26, 35, 126, 0.7)),
            url('../images/dentalsoft_background_1366x768.png');
    }
}

@media (max-width: 1280px) {
    .dentalsoft-background,
    .login-background,
    .dashboard-background {
        background-image: 
            linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(26, 35, 126, 0.7)),
            url('../images/dentalsoft_background_1280x720.png');
    }
}

@media (max-width: 1024px) {
    .dentalsoft-background,
    .login-background,
    .dashboard-background {
        background-image: 
            linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(26, 35, 126, 0.7)),
            url('../images/dentalsoft_background_1024x768.png');
    }
}

@media (max-width: 800px) {
    .dentalsoft-background,
    .login-background,
    .dashboard-background {
        background-image: 
            linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(26, 35, 126, 0.7)),
            url('../images/dentalsoft_background_800x600.png');
    }
    
    /* Reducir efectos en móviles para mejor rendimiento */
    .dentalsoft-background::before,
    .login-background::before {
        display: none;
    }
}

/* Clases de utilidad para backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #1a237e, #3f51b5) !important;
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #121212, #1e1e1e) !important;
}

.bg-medical {
    background: linear-gradient(135deg, #1a237e, #0d47a1) !important;
}

/* Overlay para mejorar legibilidad */
.content-overlay {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(100, 181, 246, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Animaciones de entrada */
@keyframes slideInFromLeft {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromTop {
    0% { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Aplicar animaciones */
.sidebar-fixed {
    animation: slideInFromLeft 0.5s ease-out;
}

.main-content {
    animation: slideInFromRight 0.5s ease-out;
}

.navbar {
    animation: slideInFromTop 0.5s ease-out;
}

.card, .alert, .modal {
    animation: fadeInUp 0.3s ease-out;
}
