/* =====================================================
   STATISTICS PAGE - ENHANCED STYLES
   Version: 3.0
   Description: Modern statistics page with GBV Analytics inspired design
   ===================================================== */

/* ===================================================== 
   1. HERO SECTION (Enhanced with GBV Analytics Style)
   ===================================================== */
.page-header-section {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 25%, #1e40af 50%, #1e3a8a 100%);
    padding: 5rem 0 6rem;
    margin: -1.5rem -15px 3rem;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.page-header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(circle at 80% 50%, rgba(96, 165, 250, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
    animation: float-slow 30s ease-in-out infinite;
}

.page-header-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 120px;
    background: #f8fafc;
    clip-path: polygon(0 40%, 100% 0, 100% 100%, 0% 100%);
}

.page-header-section .container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Hero content styling */
.page-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.1);
    animation: slideInUp 0.8s ease-out;
    color: white;
}

.page-description {
    font-size: 1.25rem;
    opacity: 0.95;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
    animation: slideInUp 0.8s ease-out 0.2s backwards;
    color: white;
}

/* Live indicator badge */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: white;
    font-weight: 600;
    animation: pulse-glow 2s ease-in-out infinite;
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.5); }
}

/* ===================================================== 
   2. KEY METRICS CARDS (Enhanced with GBV Style)
   ===================================================== */
.stats-metrics-container {
    margin-top: 2rem;
    position: relative;
    z-index: 10;
    padding: 0 1rem;
    margin-bottom: 3rem;
}

.stats-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto 2rem;
}

/* Responsive grid adjustments */
@media (max-width: 1200px) {
    .stats-grid-enhanced {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .stats-grid-enhanced {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.stat-card-enhanced {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.stat-card-enhanced:hover::before {
    transform: translateX(100%);
}

.stat-card-enhanced:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.stat-card-enhanced.danger {
    --metric-color: #dc2626;
    color: var(--metric-color);
}

.stat-card-enhanced.warning {
    --metric-color: #f59e0b;
    color: var(--metric-color);
}

.stat-card-enhanced.info {
    --metric-color: #3b82f6;
    color: var(--metric-color);
}

.stat-card-enhanced.success {
    --metric-color: #10b981;
    color: var(--metric-color);
}

.stat-icon-enhanced {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--metric-color), color-mix(in srgb, var(--metric-color), white 30%));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 25px color-mix(in srgb, var(--metric-color), transparent 60%);
    position: relative;
    overflow: hidden;
}

.stat-icon-enhanced::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
    animation: shine 3s infinite;
}

/* Stat Values */
.stat-value-enhanced {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--metric-color), color-mix(in srgb, var(--metric-color), black 20%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label-enhanced {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.stat-sublabel {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 400;
}





/* ===================================================== 
   3. CHART CARDS (Enhanced with GBV Style)
   ===================================================== */
.card-enhanced {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.chart-card {
    min-height: 400px;
}

.card-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(249,250,251,0.8), transparent);
    padding: 1.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.card-header-enhanced.primary { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.card-header-enhanced.info { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.card-header-enhanced.warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.card-header-enhanced.success { background: linear-gradient(135deg, #10b981, #059669); }
.card-header-enhanced.danger { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.card-header-enhanced.secondary { background: linear-gradient(135deg, #64748b, #475569); }

.card-header-enhanced.primary h3,
.card-header-enhanced.info h3,
.card-header-enhanced.warning h3,
.card-header-enhanced.success h3,
.card-header-enhanced.danger h3,
.card-header-enhanced.secondary h3 {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-actions-enhanced {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.card-title-enhanced {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.card-body-enhanced {
    padding: 2rem;
    background: rgba(248, 250, 252, 0.5);
}

/* Chart containers */
.enhanced-chart {
    position: relative;
    background: rgba(249,250,251,0.5);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.chart-container {
    position: relative;
    min-height: 300px;
    width: 100%;
    display: block;
}

/* Ensure canvas elements have proper dimensions */
.chart-container canvas {
    position: relative;
    z-index: 1;
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    display: block;
}

.enhanced-chart canvas {
    position: relative;
    z-index: 1;
}

/* ===================================================== 
   4. FILTER ENHANCEMENTS (GBV Style)
   ===================================================== */
.filter-card {
    margin-bottom: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.filter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control,
.form-select {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
    outline: none;
}

/* Enhanced button styles */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary.enhanced {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59,130,246,0.3);
}

/* ===================================================== 
   5. ACTION BUTTONS
   ===================================================== */
.btn-group {
    display: flex;
    gap: 0;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 10px;
}

.btn-check {
    display: none;
}

.btn-outline-primary {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: white;
}

.btn-check:checked + .btn-outline-primary {
    background: white;
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-check:checked + .btn-outline-light {
    background: rgba(255,255,255,0.2);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.action-btn {
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn.active,
.action-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

/* ===================================================== 
   6. CHART STYLING FIXES
   ===================================================== */
/* Light mode chart colors */
.enhanced-chart {
    --chart-grid-color: rgba(0, 0, 0, 0.05);
    --chart-text-color: #6b7280;
    --chart-border-color: #e5e7eb;
}

/* Dark mode support */









/* ===================================================== 
   7. RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 1200px) {
    .dashboard-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .stats-grid-enhanced {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .page-header-section {
        padding: 3rem 0;
        min-height: 300px;
    }
    
    .stat-card-enhanced {
        padding: 1.25rem;
    }
    
    .stat-icon-enhanced {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .stat-value-enhanced {
        font-size: 1.75rem;
    }
    
    .stat-label-enhanced {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .stats-grid-enhanced {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .stat-card-enhanced {
        padding: 1rem;
    }
    
    .stat-icon-enhanced {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-value-enhanced {
        font-size: 1.5rem;
    }
    
    .stat-label-enhanced {
        font-size: 0.75rem;
    }
    
    .card-header-enhanced {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ===================================================== 
   8. ANIMATIONS
   ===================================================== */
.stat-card-enhanced {
    animation: slideInUp 0.6s ease-out backwards;
}

.stat-card-enhanced:nth-child(1) { animation-delay: 0.1s; }
.stat-card-enhanced:nth-child(2) { animation-delay: 0.2s; }
.stat-card-enhanced:nth-child(3) { animation-delay: 0.3s; }
.stat-card-enhanced:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.card-enhanced {
    animation: fadeIn 0.8s ease-out backwards;
}

.dashboard-row:nth-child(2) .card-enhanced { animation-delay: 0.2s; }
.dashboard-row:nth-child(3) .card-enhanced { animation-delay: 0.4s; }
.dashboard-row:nth-child(4) .card-enhanced { animation-delay: 0.6s; }

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================================== 
   9. LOADING STATES
   ===================================================== */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
}

.stats-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
}

.stats-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--metric-color, #3b82f6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.chart-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================================== 
   10. SYSTEM OVERVIEW CARD
   ===================================================== */
.system-overview-card {
    margin-bottom: 1rem;
    margin-top: -1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.system-overview-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 30px rgba(102,126,234,0.15);
}

.system-overview-card .card-body-enhanced {
    padding: 2rem;
}

.system-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.system-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
    animation: shine 3s infinite;
}

.system-overview-card:hover .system-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
}

.system-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.system-description {
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 0;
}

/* Dark mode support */



/* ===================================================== 
   11. IMPACT & RESPONSE ANALYSIS STYLES
   ===================================================== */
/* Impact Analysis Tab Content */
.impact-tab-content {
    padding: 1rem;
    animation: fadeIn 0.5s ease-out;
}

/* Impact Metric Cards */
.impact-metric-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.impact-metric-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.impact-metric-card:hover::before {
    opacity: 1;
}

.impact-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.impact-metric-value {
    font-size: 3rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.impact-metric-card:hover .impact-metric-value {
    transform: scale(1.05);
}

.impact-metric-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alert styles for impact tabs */
.impact-tab-content .alert {
    border-radius: 12px;
    border: 1px solid;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.impact-tab-content .alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #60a5fa;
    color: #1e40af;
}

.impact-tab-content .alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fbbf24;
    color: #92400e;
}

.impact-tab-content .alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #4ade80;
    color: #166534;
}

.impact-tab-content .alert h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Chart title h6 elements - make them smaller */
.chart-container + .chart-container h6,
.col-6 h6.text-center,
.col-md-4 h6.text-center,
.col-md-6 h6.text-center,
.col-md-12 h6.text-center {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    margin-bottom: 1rem !important;
}

/* Response Effectiveness Table */
#response-effectiveness-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#response-effectiveness-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

#response-effectiveness-table th {
    font-weight: 700;
    color: #475569;
    padding: 1.25rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
}

#response-effectiveness-table td {
    padding: 1rem;
    color: #64748b;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9375rem;
}

#response-effectiveness-table tbody tr {
    transition: all 0.3s ease;
}

#response-effectiveness-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* Chart styles for impact analysis */
.impact-tab-content .chart-container {
    background: rgba(249,250,251,0.5);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Specialized chart colors for different impact types */
#casualtyComparisonChart {
    --chart-color-1: #dc2626;
    --chart-color-2: #f59e0b;
}

#weaponEscalationChart {
    --chart-color-1: #7c3aed;
    --chart-color-2: #ec4899;
}

#responseTypesChart {
    --chart-color-1: #10b981;
    --chart-color-2: #3b82f6;
    --chart-color-3: #f59e0b;
}

/* Animation for tab switching */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.impact-tab-content {
    animation: slideInFromRight 0.3s ease-out;
}

/* Response Analysis Specific Styles */
.response-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.response-metric {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.response-metric:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

.response-metric-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.response-metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.response-metric-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Escalation Analysis Specific Styles */
.escalation-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to right, #fee2e2, #fecaca);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #dc2626;
}

.escalation-indicator.low {
    background: linear-gradient(to right, #f0fdf4, #dcfce7);
    border-left-color: #10b981;
}

.escalation-indicator.medium {
    background: linear-gradient(to right, #fffbeb, #fef3c7);
    border-left-color: #f59e0b;
}

.escalation-indicator.high {
    background: linear-gradient(to right, #fee2e2, #fecaca);
    border-left-color: #dc2626;
}

.escalation-label {
    font-weight: 600;
    color: #1e293b;
}

.escalation-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: inherit;
}

/* Dark mode support for impact analysis */









/* Loading states for impact analysis */
.impact-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #64748b;
}

.impact-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

/* Responsive design for impact analysis */
@media (max-width: 768px) {
    .impact-metric-card {
        padding: 1.5rem;
    }
    
    .impact-metric-value {
        font-size: 2rem;
    }
    
    #response-effectiveness-table {
        font-size: 0.875rem;
    }
    
    #response-effectiveness-table th,
    #response-effectiveness-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .impact-tab-content .row > div {
        margin-bottom: 1rem;
    }
    
    .impact-metric-value {
        font-size: 1.75rem;
    }
}

/* ===================================================== 
   12. PRINT STYLES
   ===================================================== */
@media print {
    .page-header-section {
        background: none;
        color: black;
        padding: 1rem 0;
    }
    
    .filter-card,
    .btn-group,
    .action-btn {
        display: none;
    }
    
    .card-enhanced {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}