/* Dashboard-specific styles */
/* assets/css/dashboard.css */

/* Stat Cards */
.stat-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
}
.stat-card.dark {
    background: var(--background_color);
    color: var(--white1);
}
.stat-card.dark .stat-label { color: var(--text_color_mute_alt); }
.stat-card.dark .stat-value { color: var(--white1); }
.stat-label { color: #6c757d; font-size: 13px; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 700; color: #212529; }

/* Cards */
.chart-card,
.section-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
}

/* Filter Buttons */
.btn-filter { font-size: 12px; padding: 6px 14px; }
.btn-filter.active { 
    background-color: var(--color-accent); 
    color: white; 
    border-color: var(--color-accent); 
}

/* Event Rows - Optimized with will-change for animations */
.event-row {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 0;
    cursor: pointer;
    transition: background 0.15s ease-out;
    will-change: background-color;
}
.event-row[data-bs-target] {
    position: relative;
}
.event-row[data-bs-target]::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 24px;
    border: solid #9ca3af;
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}
.event-row[data-bs-target].expanded::after {
    transform: rotate(-135deg);
    top: 28px;
}
.event-row:hover {
    background-color: #f8f9fa;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}
.event-row:last-child { border-bottom: none; }
.event-title { font-weight: 600; margin-bottom: 4px; }
.event-category { font-size: 12px; color: #6c757d; }

/* Status Dots */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.live { background-color: var(--success-accent); }
.status-dot.active { background-color: var(--color-accent); }
.status-dot.concept { background-color: var(--warning); }
.status-dot.issue { background-color: var(--error); }

/* Live Pulse Animation - GPU accelerated */
.live-pulse-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}
.live-pulse-container .status-dot { 
    position: relative; 
    z-index: 2; 
}
.pulse-ring {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--success-accent);
    opacity: 0;
    will-change: transform, opacity;
}

/* Header Live Badge */
.header-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(46, 125, 50, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(46, 125, 50, 0.3);
}
.header-live-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badges */
.badge-live { 
    background-color: var(--error-soft); 
    color: var(--error); 
    font-weight: 600; 
}
.badge-status { font-size: 11px; padding: 4px 8px; }

/* Collapse Chart */
.collapse-chart {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 12px;
}

/* Service Rows */
.service-row {
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 0;
}
.service-row:last-child { border-bottom: none; }
.service-title { font-weight: 600; margin-bottom: 4px; }
.service-category { font-size: 12px; color: #6c757d; }

/* Summary Footer */
.summary-footer {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 16px;
}
.summary-item {
    text-align: center;
    border-right: 1px solid #dee2e6;
}
.summary-item:last-child { border-right: none; }
.summary-value { font-size: 20px; font-weight: 700; color: #212529; }
.summary-label { font-size: 12px; color: #6c757d; }

/* Lazy Load Charts - Hidden until loaded */
.chart-lazy {
    min-height: 80px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.chart-lazy.loaded { opacity: 1; }

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

/* Mobile sidebar */
@media (max-width: 991.98px) {
    .sidebar-nav {
        transform: translateX(-100%);
        z-index: 1050;
    }
    .sidebar-nav.show { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    .sidebar-overlay.show { display: block; }
}

@media (min-width: 992px) {
    .mobile-toggle { display: none !important; }
}

/* Event row responsive */
.event-row .row > div {
    padding-top: 4px;
    padding-bottom: 4px;
}

@media (max-width: 767.98px) {
    .event-headers { display: none !important; }
    .event-row .col-status { order: 1; }
    .event-row .col-event { order: 2; flex: 1; }
    .event-row .col-state { order: 3; }
    .event-row .col-stats { order: 4; }
}

@media (max-width: 575.98px) {
    .stat-value { font-size: 22px; }
    .summary-value { font-size: 16px; }
    .summary-label { font-size: 10px; }
    .btn-filter { padding: 4px 8px; font-size: 11px; }
}