/* Enhanced Trends Dashboard CSS */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.trends-dashboard {
    width: 100%;
    min-height: 100vh;
    background-color: #f5f6f8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Dashboard Header */
.dashboard-header {
    background-color: #fff;
    border-bottom: 1px solid #e1e4e8;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
}

.time-controls {
    display: flex;
    gap: 0.5rem;
    background-color: #f5f7f9;
    padding: 0.25rem;
    border-radius: 6px;
}

.time-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.time-btn.active {
    background-color: #0052cc;
    color: white;
}

.time-btn:hover:not(.active) {
    background-color: #e9ecef;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.5rem 1rem;
    border: 1px solid #dfe1e6;
    background-color: #fff;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-action:hover {
    background-color: #f8f9fa;
    border-color: #0052cc;
    color: #0052cc;
}

/* KPI Section */
.kpi-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.kpi-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 1.5rem;
    transition: all 0.3s;
}

.kpi-card.interactive {
    cursor: pointer;
}

.kpi-card.interactive:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    background-color: #e3f2fd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #0052cc;
}

.kpi-trend-indicator {
    flex: 1;
    margin-left: 1rem;
}

.kpi-body {
    text-align: center;
    margin: 1rem 0;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.kpi-change {
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.kpi-change.positive {
    color: #28a745;
}

.kpi-change.negative {
    color: #dc3545;
}

.kpi-change.neutral {
    color: #6c757d;
}

.kpi-details {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.detail-item {
    font-size: 0.813rem;
    color: #495057;
}

.kpi-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.last-update {
    font-size: 0.75rem;
    color: #6c757d;
}

.drill-down-btn {
    font-size: 0.875rem;
    color: #0052cc;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.drill-down-btn:hover {
    color: #0047b3;
}

/* AI Trending Topics Section */
.trending-section {
    padding: 2rem;
    background-color: #fff;
    margin: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.section-subtitle {
    color: #6c757d;
    margin: 0;
}

.trending-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.trend-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

.trend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.trend-badge {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.trend-badge.new {
    background-color: #e3f2fd;
    color: #0052cc;
}

.trend-badge.developing {
    background-color: #fff3cd;
    color: #856404;
}

.trend-badge.verified {
    background-color: #d4edda;
    color: #155724;
}

.trend-confidence {
    font-size: 0.813rem;
    color: #6c757d;
}

.trend-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
}

.trend-summary {
    color: #495057;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.trend-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.813rem;
    color: #6c757d;
}

.metric i {
    color: #0052cc;
}

.trend-sources {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.source-tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 3px;
}

.trend-action {
    background-color: #0052cc;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.trend-action:hover {
    background-color: #0047b3;
}

/* Analytics Section */
.analytics-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.chart-container {
    background-color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.chart-container.large {
    grid-column: span 2;
}

/* Chart Canvas Constraints */
.chart-container {
    overflow: hidden;
}

.chart-container canvas {
    max-height: 400px !important;
    width: 100% !important;
}

.chart-container.large canvas {
    max-height: 500px !important;
}

.kpi-trend-indicator {
    width: 120px;
    height: 60px;
    overflow: hidden;
}

.kpi-trend-indicator canvas {
    max-height: 60px !important;
    width: 120px !important;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    position: relative;
}

/* Search Box Styles */
.search-box {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin-right: 1rem;
}

.search-box .form-control {
    width: 300px;
    padding: 0.5rem 1rem;
    border: 1px solid #dfe1e6;
    border-radius: 4px;
    font-size: 0.875rem;
}

.search-box .form-control:focus {
    outline: none;
    border-color: #0052cc;
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.1);
}

.btn-search,
.btn-help {
    padding: 0.5rem 0.75rem;
    background-color: #0052cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-help {
    background-color: #6c757d;
}

.btn-search:hover {
    background-color: #0047b3;
}

.btn-help:hover {
    background-color: #5a6268;
}

/* Search Help Tooltip */
.search-help-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: #fff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 300px;
}

.search-help-tooltip h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #2c3e50;
}

.search-help-tooltip ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-help-tooltip li {
    padding: 0.25rem 0;
    font-size: 0.813rem;
    color: #495057;
}

.search-help-tooltip code {
    background-color: #f5f7f9;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    color: #0052cc;
    font-family: monospace;
}

.chart-toggle {
    display: flex;
    gap: 0.25rem;
    background-color: #f5f7f9;
    padding: 0.25rem;
    border-radius: 4px;
}

.toggle-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 0.813rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.toggle-btn.active {
    background-color: #0052cc;
    color: white;
}

/* Wildfire Dashboard */
.wildfire-dashboard,
.power-dashboard {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.98);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
}

.dashboard-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.btn-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #dfe1e6;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #6c757d;
    transition: all 0.2s;
}

.btn-close:hover {
    background-color: #f8f9fa;
    color: #dc3545;
}

.wildfire-stats,
.power-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card h4 {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.prep-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.level-number {
    font-size: 3rem;
    font-weight: 700;
}

.level-label {
    font-size: 1.5rem;
    font-weight: 600;
}

.level-4 {
    color: #ff9800;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 1rem;
    color: #dc3545;
    font-weight: 600;
}

.fire-breakdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.resource-list {
    text-align: left;
}

.resource-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.resource-item:last-child {
    border-bottom: none;
}

.wildfire-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Wildfire Dashboard iframe Integration */
/* Enterprise Navigation Styles */
.app-navigation {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: normal;
}

.nav-back {
    color: #58a6ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-back:hover {
    color: #79c0ff;
    text-decoration: none;
}

.nav-separator {
    margin: 0 12px;
    color: #6e7681;
}

.nav-current {
    color: #e6edf3;
    font-weight: 600;
}

/* Dashboard Integration */
.wildfire-dashboard-wrapper {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0d1117;
    z-index: 100;
    overflow: hidden;
}

.wildfire-dashboard-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #0d1117;
}

/* Ensure proper stacking when dashboard is shown */
.trends-dashboard {
    position: relative;
}

/* Enhanced Power Dashboard Styles */
.power-dashboard {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f6f8;
    z-index: 100;
    overflow: auto;
}

.power-dashboard-enhanced {
    min-height: 100%;
    padding: 30px;
    max-width: 1800px;
    margin: 0 auto;
}

/* Loading State */
.power-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #6b7280;
}

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

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

/* Error State */
.power-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.power-error i {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}

.power-error h3 {
    color: #111827;
    margin-bottom: 8px;
}

.power-error p {
    color: #6b7280;
    margin-bottom: 24px;
}

.btn-retry {
    padding: 10px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-retry:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Summary Section */
.power-summary-section {
    margin-bottom: 30px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 20px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

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

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.summary-card.critical .card-icon {
    background: #fee2e2;
    color: #dc2626;
}

.summary-card.severe .card-icon {
    background: #fed7aa;
    color: #ea580c;
}

.summary-card.warning .card-icon {
    background: #fef3c7;
    color: #d97706;
}

.summary-card.info .card-icon {
    background: #dbeafe;
    color: #2563eb;
}

.card-content h3 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.card-content p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

/* Trend Indicators */
.trend-indicators {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.trend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.trend-item i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.trend-item.increasing {
    color: #dc2626;
}

.trend-item.increasing i {
    background: #fee2e2;
    color: #dc2626;
}

.trend-item.stable {
    color: #6b7280;
}

.trend-item.stable i {
    background: #f3f4f6;
    color: #6b7280;
}

.trend-item.decreasing {
    color: #059669;
}

.trend-item.decreasing i {
    background: #d1fae5;
    color: #059669;
}

/* Main Dashboard Grid */
.power-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
    margin-bottom: 30px;
}

.power-left-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.power-right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Map Container */
.power-map-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.map-controls {
    display: flex;
    gap: 8px;
}

.map-control-btn {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 0.813rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.map-control-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.outage-map-enhanced {
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* Timeline Container */
.power-timeline-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.metric-select {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 0.813rem;
    cursor: pointer;
}

#powerTimelineChart {
    height: 200px !important;
}

/* Regions List */
.affected-regions-container,
.utilities-container,
.events-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.regions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.region-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.region-card:hover {
    background: white;
    border-color: #d1d5db;
    transform: translateX(4px);
}

.region-card.critical {
    border-left: 4px solid #dc2626;
}

.region-card.severe {
    border-left: 4px solid #f59e0b;
}

.region-rank {
    width: 32px;
    height: 32px;
    background: #1f2937;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.region-info {
    flex: 1;
}

.region-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.region-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.region-trend {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.region-trend.increasing {
    background: #fee2e2;
    color: #dc2626;
}

.region-trend.decreasing {
    background: #d1fae5;
    color: #059669;
}

.region-trend.stable {
    background: #f3f4f6;
    color: #6b7280;
}

.region-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.region-stats .stat {
    font-size: 0.813rem;
}

.stat-label {
    color: #6b7280;
    margin-right: 4px;
}

.stat-value {
    color: #111827;
    font-weight: 600;
}

.region-districts {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.districts-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.district-chip {
    padding: 2px 8px;
    background: #e5e7eb;
    color: #374151;
    border-radius: 4px;
    font-size: 0.75rem;
}

.more-districts {
    color: #3b82f6;
    font-size: 0.75rem;
    font-weight: 500;
}

.region-action {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
}

.region-action:hover {
    color: #111827;
}

/* Utilities List */
.utilities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.utility-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #f3f4f6;
}

.utility-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.utility-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.utility-affected {
    color: #6b7280;
    font-size: 0.813rem;
}

.utility-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.utility-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.3s ease;
}

/* Events List */
.event-count {
    padding: 4px 12px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-card {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.event-card.critical {
    background: #fee2e2;
    border-color: #fecaca;
}

.event-card.severe {
    background: #fed7aa;
    border-color: #fbbf24;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.event-location {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.event-severity {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-card.critical .event-severity {
    color: #991b1b;
}

.event-card.severe .event-severity {
    color: #92400e;
}

.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.813rem;
    color: #374151;
}

.detail-item i {
    color: #6b7280;
    width: 14px;
}

/* Power Footer */
.power-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.update-info,
.data-source {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.813rem;
}

.btn-export {
    padding: 6px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 0.813rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-export:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Map Popup Styles */
.power-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
}

.power-popup-content {
    padding: 16px;
}

.power-popup-content h4 {
    margin: 0 0 12px 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.popup-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popup-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.popup-stat .label {
    color: #6b7280;
}

.popup-stat .value {
    font-weight: 600;
    color: #111827;
}

.popup-stat .trend-up {
    color: #dc2626;
}

.popup-stat .trend-down {
    color: #059669;
}

.popup-providers {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.popup-providers h5 {
    margin: 0 0 8px 0;
    font-size: 0.813rem;
    color: #374151;
    font-weight: 600;
}

.provider-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.813rem;
    padding: 4px 0;
}

.provider-item span {
    color: #6b7280;
}

.provider-item strong {
    color: #111827;
}

.district-popup {
    padding: 12px;
}

.district-popup h5 {
    margin: 0 0 4px 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.district-popup p {
    margin: 4px 0;
    font-size: 0.813rem;
    color: #6b7280;
}

/* Scrollbar Styling */
.regions-list::-webkit-scrollbar,
.events-list::-webkit-scrollbar {
    width: 6px;
}

.regions-list::-webkit-scrollbar-track,
.events-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.regions-list::-webkit-scrollbar-thumb,
.events-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.regions-list::-webkit-scrollbar-thumb:hover,
.events-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .power-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .power-right-column {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .kpi-section {
        grid-template-columns: 1fr;
    }
    
    .trending-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-section {
        grid-template-columns: 1fr;
    }
    
    .chart-container.large {
        grid-column: span 1;
    }
    
    .power-dashboard-enhanced {
        padding: 16px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .power-right-column {
        grid-template-columns: 1fr;
    }
}

/* Loading Animations */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* Heatmap Styles */
#geoHeatmap {
    height: 400px;
    position: relative;
}

.heatmap-legend {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: rgba(255,255,255,0.9);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Utility Classes */
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-success { color: #28a745; }
.text-info { color: #17a2b8; }

/* Search Summary */
.search-summary {
    background-color: #e3f2fd;
    border-left: 4px solid #0052cc;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-content code {
    background-color: rgba(0, 82, 204, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    color: #0052cc;
    font-family: monospace;
}

.btn-clear-search {
    background-color: #fff;
    border: 1px solid #0052cc;
    color: #0052cc;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.813rem;
    transition: all 0.2s;
}

.btn-clear-search:hover {
    background-color: #0052cc;
    color: white;
}

/* Strategic Team Section */
.strategic-team-section {
    padding: 2rem;
    background-color: #fff;
    margin: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.strategic-team-section .section-header {
    margin-bottom: 2rem;
}

.strategic-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.strategic-controls .form-select {
    width: auto;
    padding: 0.5rem 1rem;
    border: 1px solid #dfe1e6;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.875rem;
}

.strategic-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

.event-card.high-impact {
    border-color: #dc3545;
}

.event-card.medium-impact {
    border-color: #ffc107;
}

.event-card.low-impact {
    border-color: #28a745;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.event-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
}

.event-type {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.event-type.political {
    background-color: #e3f2fd;
    color: #0052cc;
}

.event-type.labor {
    background-color: #fff3cd;
    color: #856404;
}

.event-type.cultural {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.event-type.social {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.event-type.sports {
    background-color: #fce4ec;
    color: #c2185b;
}

.impact-level {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.impact-level.high {
    background-color: #ffebee;
    color: #c62828;
}

.impact-level.medium {
    background-color: #fff3cd;
    color: #856404;
}

.impact-level.low {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.event-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding: 1rem 1rem 0.5rem 1rem;
}

.event-details {
    padding: 0 1rem 1rem 1rem;
}

.event-summary {
    color: #495057;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.event-info {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.info-item i {
    width: 16px;
    color: #0052cc;
}

.operational-impact {
    background-color: #fff;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.operational-impact h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
}

.operational-impact ul {
    margin: 0;
    padding-left: 1.5rem;
}

.operational-impact li {
    color: #495057;
    font-size: 0.813rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-action.primary {
    background-color: #1f2937;
    color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-action.primary:hover {
    background-color: #111827;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-action.secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-action.secondary:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

/* Additional Chart Constraints */
#geoHeatmap {
    max-height: 400px !important;
}

/* Wildfire and Power Dashboard Charts */
.wildfire-dashboard canvas,
.power-dashboard canvas {
    max-height: 350px !important;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .chart-container canvas {
        max-height: 350px !important;
    }
    
    .chart-container.large canvas {
        max-height: 450px !important;
    }
}

@media (max-width: 1200px) {
    .analytics-section {
        grid-template-columns: 1fr;
    }
    
    .chart-container.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .chart-container canvas {
        max-height: 300px !important;
    }
    
    .kpi-section {
        grid-template-columns: 1fr;
    }
}

/* Active Incidents Dashboard Styles */
.incidents-dashboard {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f6f8;
    z-index: 1000;
    overflow: auto;
}

.incidents-dashboard-content {
    padding: 30px;
    max-width: 1800px;
    margin: 0 auto;
}

.incidents-summary {
    margin-bottom: 30px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: inherit;
}

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

.stat-card.low::before {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.stat-card.medium::before {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.stat-card.high::before {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.stat-card.total::before {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.stat-card h3 {
    font-size: 2.75rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #111827;
    letter-spacing: -0.02em;
}

.stat-card p {
    color: #6b7280;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.incidents-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.incidents-filters {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    height: fit-content;
    position: sticky;
    top: 30px;
}

.incidents-filters h3 {
    margin: 0 0 16px 0;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-btn {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

.filter-btn.active {
    background: #1f2937;
    color: white;
    border-color: #1f2937;
    font-weight: 600;
}

.copy-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.btn-copy-titles,
.btn-copy-all {
    width: 100%;
    padding: 10px 16px;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.btn-copy-titles {
    background: #10b981;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-copy-titles:hover {
    background: #059669;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-copy-all {
    background: #3b82f6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-copy-all:hover {
    background: #2563eb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.copy-status {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    text-align: center;
    font-weight: 500;
}

.copy-status.success {
    color: #28a745;
}

.copy-status.error {
    color: #dc3545;
}

.incidents-list {
    background: transparent;
    max-height: none;
    overflow-y: visible;
}

.incident-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.incident-item:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.incident-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 12px 0 0 12px;
}

.incident-item.wildfire::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.incident-item.demonstrations-civil-unrest::before,
.incident-item.planned-events::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.incident-item.violence-crime::before {
    background: linear-gradient(180deg, #6b7280 0%, #4b5563 100%);
}

.incident-item.severe-weather::before {
    background: linear-gradient(180deg, #06b6d4 0%, #0891b2 100%);
}

.incident-item.other::before {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

/* Urgency indicators */
.incident-item.urgency-high {
    background: linear-gradient(to right, rgba(239, 68, 68, 0.02) 0%, white 100%);
}

.incident-item.urgency-medium {
    background: linear-gradient(to right, rgba(245, 158, 11, 0.02) 0%, white 100%);
}

.incident-item.urgency-low {
    background: white;
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.incident-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.incident-category {
    background: #f3f4f6;
    color: #374151;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.incident-subcategory {
    background: #f9fafb;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
}

.incident-urgency {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.urgency-critical {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.urgency-high {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.urgency-medium {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.urgency-low {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.incident-time {
    color: #6b7280;
    font-size: 0.813rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.incident-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.incident-message {
    color: #4b5563;
    margin: 0 0 16px 0;
    line-height: 1.6;
    font-size: 0.875rem;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

/* Custom scrollbar for incident messages */
.incident-message::-webkit-scrollbar {
    width: 6px;
}

.incident-message::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.incident-message::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.incident-message::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.incident-message p {
    margin: 0 0 10px 0;
}

.incident-message p:last-child {
    margin-bottom: 0;
}

.incident-message a {
    color: #007bff;
    text-decoration: underline;
}

.incident-message hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid #e9ecef;
}

.incident-message ul,
.incident-message ol {
    margin: 10px 0;
    padding-left: 20px;
}

.incident-message li {
    margin: 5px 0;
}

.incident-locations {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

.incident-locations i {
    color: #3b82f6;
}

.incident-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.813rem;
    color: #6b7280;
}

.metadata-item i {
    color: #9ca3af;
    width: 14px;
}

.incident-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-incident-action {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.btn-incident-action:hover {
    background: #1f2937;
    color: white;
    border-color: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.incidents-analytics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.incidents-analytics .chart-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.incidents-analytics .chart-container h3 {
    margin: 0 0 20px 0;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.incidents-analytics canvas {
    max-height: 300px !important;
}

/* Alert styles for no data */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert i {
    font-size: 1.2rem;
}

/* Modal Styles for Threat Details */
.threat-detail-modal,
.threat-map-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
    z-index: 10001;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    z-index: 10002;
    border: 1px solid #e5e7eb;
}

.modal-content.map-modal {
    max-width: 1000px;
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-close {
    background: white;
    border: 1px solid #e5e7eb;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
    background: white;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f9fafb;
    border-radius: 0 0 16px 16px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h3 {
    font-size: 0.875rem;
    color: #111827;
    margin: 0 0 16px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

.detail-item strong {
    color: #374151;
    margin-right: 8px;
    font-weight: 600;
}

.detail-item code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
    color: #dc3545;
}

.threat-message {
    background: #f9fafb;
    padding: 16px 20px;
    border-radius: 8px;
    line-height: 1.6;
    border: 1px solid #f3f4f6;
    color: #4b5563;
    font-size: 0.875rem;
}

.locations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-item {
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.875rem;
    border: 1px solid #f3f4f6;
    color: #4b5563;
}

/* Responsive adjustments for incidents dashboard */
@media (max-width: 1200px) {
    .incidents-content {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .incidents-list {
        max-height: 400px;
    }
}