/* Estilos personalizados adicionales */

/* Paleta de colores institucional BID/Apple */
:root {
    --primary-orange: #f97316;
    --primary-teal: #14b8a6;
    --neutral-gray: #6b7280;
    --light-gray: #f3f4f6;
    --dark-gray: #374151;
    --success-green: #10b981;
    --warning-amber: #f59e0b;
    --error-red: #ef4444;
}

.transition-all {
    transition: all 0.3s ease;
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.hover\:-translate-y-1:hover {
    transform: translateY(-0.25rem);
}

/* Animaciones suaves para las transiciones de vista */
.view-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-transition.active {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos para los gráficos */
.chart-container {
    width: 100%;
    height: 320px;
}

/* Hover effects mejorados */
.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.08);
}

/* Mejoras visuales para elementos interactivos */
.indicator-card {
    border: 1px solid #e5e7eb;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator-card:hover {
    border-color: #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

/* Estilos para el modal */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid-responsive {
        grid-template-columns: 1fr;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.gradient-dynamic {
  background: linear-gradient(-45deg, #f97316, #fb923c, #14b8a6, #5eead4, #fff7ed, #f0fdfa);
  background-size: 500% 500%;
  animation: gradientBG 12s ease infinite;
}

@keyframes gradientBG {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
}


        /* Estilos personalizados adicionales */
        /* Paleta de colores institucional BID/Apple */        
        
        /* Menú lateral moderno estilo Metabase */
        .sidebar-modern {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-right: 1px solid rgba(229, 231, 235, 0.8);
        }
        
        .nav-item-modern {
            transition: all 0.2s ease;
            border-radius: 8px;
            margin: 2px 0;
        }
        
        .nav-item-modern:hover {
            background: rgba(249, 115, 22, 0.08);
            transform: translateX(2px);
        }
        
        .nav-item-modern.active {
            background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(20, 184, 166, 0.1));
            border-left: 3px solid var(--primary-orange);
        }
        
        .nav-icon {
            width: 18px;
            height: 18px;
            opacity: 0.7;
            transition: opacity 0.2s ease;
        }
        
        .nav-item-modern:hover .nav-icon {
            opacity: 1;
        }
        
        /* Call to action buttons modernos */
        .cta-modern {
            background: linear-gradient(135deg, rgba(249, 115, 22, 0.05), rgba(20, 184, 166, 0.05));
            border: 1px solid rgba(249, 115, 22, 0.2);
            transition: all 0.3s ease;
        }
        
        .cta-modern:hover {
            background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(20, 184, 166, 0.1));
            border-color: rgba(249, 115, 22, 0.4);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
        }

        /* Estilos para tree menu desplegable */
        .tree-menu {
            transition: all 0.3s ease;
        }
        
        .tree-item {
            transition: all 0.2s ease;
            border-radius: 8px;
            margin: 2px 0;
        }
        
        .tree-item:hover {
            background: rgba(249, 115, 22, 0.08);
            transform: translateX(2px);
        }
        
        .tree-item.active {
            background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(20, 184, 166, 0.1));
            border-left: 3px solid var(--primary-orange);
        }
        
        .tree-submenu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            margin-left: 20px;
        }
        
        .tree-submenu.expanded {
            max-height: none;
        }
        
        .tree-toggle {
            transition: transform 0.2s ease;
        }
        
        .tree-toggle.rotated {
            transform: rotate(90deg);
        }
        
        /* Estilos para links con hover */
        .data-link {
            cursor: pointer;
            transition: all 0.2s ease;
            border-radius: 4px;
            padding: 2px 4px;
        }
        
        .data-link:hover {
            background: rgba(249, 115, 22, 0.1);
            transform: scale(1.05);
        }
        
        /* Tooltips personalizados con fondo sólido para mejor usabilidad */
        .tippy-box[data-theme~='custom'] {
            background: #1f2937;
            color: white;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 500;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
        }
        
        .tippy-box[data-theme~='custom'][data-placement^='top'] > .tippy-arrow::before {
            border-top-color: #1f2937;
        }
        
        .tippy-box[data-theme~='custom'][data-placement^='bottom'] > .tippy-arrow::before {
            border-bottom-color: #1f2937;
        }
        
        .tippy-box[data-theme~='custom'][data-placement^='left'] > .tippy-arrow::before {
            border-left-color: #1f2937;
        }
        
        .tippy-box[data-theme~='custom'][data-placement^='right'] > .tippy-arrow::before {
            border-right-color: #1f2937;
        }
  