/* =====================================================
   DASHBOARD - Estilos modernos para dashboards
   ===================================================== */

/* Gradientes para cards de métricas */
.gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gradient-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.gradient-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* Cards con efectos hover */
.stat-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-card-gradient {
    transition: all 0.3s ease;
}

.stat-card-gradient:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Timeline de actividad */
.activity-timeline {
    position: relative;
    padding-left: 2rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 0.375rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #e5e7eb 0%, transparent 100%);
}

.activity-item {
    position: relative;
    padding-left: 1.5rem;
    padding-bottom: 1.5rem;
}

.activity-item:last-child {
    padding-bottom: 0;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -1.625rem;
    top: 0.375rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: white;
    border: 2px solid currentColor;
    z-index: 1;
}

.activity-item.activity-green::before {
    color: #10b981;
}

.activity-item.activity-blue::before {
    color: #3b82f6;
}

.activity-item.activity-yellow::before {
    color: #f59e0b;
}

.activity-item.activity-red::before {
    color: #ef4444;
}

.activity-item.activity-purple::before {
    color: #8b5cf6;
}

/* Progress bars animados */
.animated-progress {
    transition: width 1s ease-out;
}

.progress-bar-wrapper {
    position: relative;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-success {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.progress-warning {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.progress-danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.progress-primary {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

/* Badges de estado */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-badge-neutral {
    background-color: #f3f4f6;
    color: #374151;
}

/* Quick action cards */
.quick-action-card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.quick-action-card:hover {
    background-color: #eff6ff;
    border-color: #3b82f6;
    transform: scale(1.02);
}

.quick-action-card:active {
    transform: scale(0.98);
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container canvas {
    max-height: 100%;
}

/* KPI Cards con iconos */
.kpi-card {
    position: relative;
    overflow: hidden;
}

.kpi-card::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%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

/* Launch progress cards */
.launch-card {
    transition: all 0.3s ease;
}

.launch-card:hover {
    transform: translateX(4px);
    border-color: #8b5cf6;
    background-color: #faf5ff;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

/* Leaderboard / Top performers */
.leaderboard-item {
    transition: all 0.2s ease;
}

.leaderboard-item:hover {
    background-color: #f9fafb;
    transform: translateX(4px);
}

.leaderboard-rank {
    display: flex;
    align-items: center;
    justify-center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.leaderboard-rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.leaderboard-rank-2 {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    color: white;
}

.leaderboard-rank-3 {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

.leaderboard-rank-other {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .chart-container {
        height: 250px;
    }
    
    .activity-timeline {
        padding-left: 1.5rem;
    }
    
    .kpi-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Skeleton loaders para cuando cargan los datos */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Stats comparison (actual vs previous) */
.stat-comparison {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-comparison.positive {
    color: #10b981;
}

.stat-comparison.negative {
    color: #ef4444;
}

.stat-comparison svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

/* Module section headers */
.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.module-icon {
    width: 2rem;
    height: 2rem;
    margin-right: 0.5rem;
}

/* Grid de cards responsivo mejorado */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
}

.dashboard-grid-1 {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
    .dashboard-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .dashboard-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .dashboard-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tooltips para gráficos */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}


