/**
 * Dashboard CSS - Admin Panel
 */

.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    color: white;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-change {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.stat-change.neutral {
    color: var(--text-muted);
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.chart-card .card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chart-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container canvas {
    max-height: 300px;
}

/* Activity Card */
.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.activity-card .card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.activity-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.activity-icon.borrador {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}

.activity-icon.por_aprobar {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.activity-icon.aprobado {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.activity-icon.impreso {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

.activity-icon.enviado {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.activity-icon.cancelado {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-description {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.activity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.activity-badge.borrador {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}

.activity-badge.por_aprobar {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.activity-badge.aprobado {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.activity-badge.impreso {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

.activity-badge.enviado {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.activity-badge.cancelado {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Responsive */
@media (max-width: 1200px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .chart-container canvas {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .stat-icon {
        width: 48px;
        height: 48px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}