* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

:root {
    --fbn-orange: #ff6b35;
    --fbn-orange-light: #ff8c42;
    --fbn-orange-dark: #e55a2b;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 280px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1a202c 0%, #2d3748 100%);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    display: none; /* Hidden by default until authenticated */
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    height: 50px;
    width: auto;
    margin-bottom: 0.75rem;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 1rem;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.sidebar-link.active {
    background: rgba(255, 107, 53, 0.15);
    color: white;
    border-left-color: var(--fbn-orange);
}

.link-icon {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.link-text {
    font-size: 1rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fbn-orange), var(--fbn-orange-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.95);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.user-role svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.logout-btn {
    width: 100%;
    background: var(--fbn-orange);
    color: white;
    border: none;
    padding: 0.85rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.logout-btn:hover {
    background: var(--fbn-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.logout-icon {
    font-size: 1.2rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f8f9fa;
    display: none; /* Hidden by default until authenticated */
}

.content-wrapper {
    padding: 2rem;
    max-width: 1400px;
    width: 100%;
    display: none; /* Hidden by default until authenticated */
}

.page-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Stats Grid */
.stats-section {
    margin-bottom: 2rem;
}

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

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: var(--fbn-orange);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.stat-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 2.5;
}

.incidents-icon {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
}

.pending-icon {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.resolved-icon {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.cards-icon {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-change {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-change.positive {
    background: #d1fae5;
    color: #059669;
}

.stat-change.warning {
    background: #fef3c7;
    color: #d97706;
}

.stat-change.neutral {
    background: #e0e7ff;
    color: #4f46e5;
}

/* Filters Section */
.filters-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

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

.filters-header h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    font-weight: 700;
}

.filters-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:hover {
    border-color: var(--fbn-orange);
}

.filter-select:focus {
    outline: none;
    border-color: var(--fbn-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.btn-primary {
    background: var(--fbn-orange);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.btn-primary:hover {
    background: var(--fbn-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Incidents Grid */
.incidents-section {
    margin-bottom: 3rem;
}

.incidents-grid {
    display: grid;
    gap: 1.5rem;
}

.incident-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.incident-card:hover {
    transform: translateX(5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.incident-card.severity-critical {
    border-left-color: #dc2626;
}

.incident-card.severity-high {
    border-left-color: #ea580c;
}

.incident-card.severity-moderate {
    border-left-color: #f59e0b;
}

.incident-card.severity-low {
    border-left-color: #84cc16;
}

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

.incident-info {
    flex: 1;
}

.incident-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.incident-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.meta-item svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.btn-action svg,
.btn-primary svg {
    flex-shrink: 0;
    vertical-align: middle;
}

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

.incident-description {
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.incident-location {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.location-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.location-coords {
    font-size: 0.85rem;
    color: var(--text-light);
    font-family: 'Courier New', monospace;
}

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

.incident-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.badge-status.pending {
    background: #fef3c7;
    color: #d97706;
}

.badge-status.resolved {
    background: #d1fae5;
    color: #059669;
}

.badge-severity {
    background: #fee2e2;
    color: #dc2626;
}

.badge-type {
    background: #e0e7ff;
    color: #4f46e5;
}

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

.btn-action {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view {
    background: #e0e7ff;
    color: #4f46e5;
}

.btn-view:hover {
    background: #c7d2fe;
}

.btn-resolve {
    background: #d1fae5;
    color: #059669;
}

.btn-resolve:hover {
    background: #a7f3d0;
}

.btn-progress {
    background: #dbeafe;
    color: #1e40af;
}

.btn-progress:hover {
    background: #bfdbfe;
}

.btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state-text {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .sidebar-header {
        padding: 1.5rem 1rem;
    }
    
    .sidebar-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 70px;
    }
    
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .sidebar-header {
        padding: 1.5rem 0.5rem;
        text-align: center;
    }
    
    .sidebar-logo {
        height: 35px;
        margin: 0 auto 0.5rem;
    }
    
    .sidebar-title {
        display: none;
    }
    
    .sidebar-link {
        padding: 1rem 0.5rem;
        flex-direction: column;
        gap: 0.25rem;
        border-left: none;
        border-right: 3px solid transparent;
    }
    
    .sidebar-link.active {
        border-right-color: var(--fbn-orange);
    }
    
    .link-text {
        font-size: 0.7rem;
    }
    
    .link-icon {
        font-size: 1.25rem;
    }
    
    .user-profile {
        flex-direction: column;
        text-align: center;
        padding: 0.5rem;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .user-info {
        display: none;
    }
    
    .logout-text {
        display: none;
    }
    
    .logout-btn {
        padding: 0.75rem;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .content-wrapper {
        padding: 1.5rem 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .filters-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-controls {
        width: 100%;
    }

    .filter-select,
    .btn-primary {
        flex: 1;
        min-width: 0;
    }

    .incident-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   ANALYTICS SECTION STYLES
   =========================== */

.analytics-section {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Analytics Header with Filters */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.analytics-header .page-title {
    margin: 0;
}

/* Time Range Filters */
.time-range-filters {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.time-filter-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.time-filter-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.time-filter-btn.active {
    background: linear-gradient(135deg, var(--fbn-orange), var(--fbn-orange-dark));
    color: white;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.time-filter-btn:active {
    transform: scale(0.98);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-card.full-width {
    grid-column: span 2;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.chart-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
}

.refresh-btn {
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: #f5f5f5;
    border-color: var(--fbn-orange);
}

.refresh-btn i {
    width: 16px;
    height: 16px;
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-card.full-width .chart-container {
    height: 350px;
}

/* Hotspots Table */
.hotspots-table {
    width: 100%;
    border-collapse: collapse;
}

.hotspots-table th {
    background: #f5f5f5;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #666;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hotspots-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.hotspots-table tr:hover {
    background: #f9f9f9;
}

.rank-badge {
    background: linear-gradient(135deg, var(--fbn-orange), var(--fbn-orange-dark));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
}

.location-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.location-address {
    font-size: 0.875rem;
    color: #666;
}

.severe-count {
    color: #f44336;
    font-weight: 600;
}

.recent-count {
    color: #ff9800;
    font-weight: 600;
}

.view-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--fbn-orange);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.view-map-btn:hover {
    background: var(--fbn-orange-dark);
    transform: translateY(-2px);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card.full-width {
        grid-column: span 1;
    }
    
    .analytics-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .time-range-filters {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .analytics-section {
        padding: 1rem;
    }
    
    .analytics-header {
        margin-bottom: 1rem;
    }
    
    .analytics-header .page-title {
        font-size: 1.5rem;
    }
    
    .time-range-filters {
        padding: 0.375rem;
        gap: 0.375rem;
    }
    
    .time-filter-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
        flex-shrink: 0;
    }
    
    .chart-card {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .chart-header h3 {
        font-size: 1rem;
    }
    
    .chart-container {
        height: 220px;
    }
    
    .chart-card.full-width .chart-container {
        height: 250px;
    }
    
    /* Performance metrics - stack on mobile */
    .analytics-section .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    /* Hotspots table - mobile optimized */
    .hotspots-table {
        font-size: 0.8125rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .hotspots-table thead,
    .hotspots-table tbody,
    .hotspots-table tr {
        display: block;
    }
    
    .hotspots-table th {
        display: none;
    }
    
    .hotspots-table tr {
        margin-bottom: 1rem;
        background: #f9f9f9;
        border-radius: 8px;
        padding: 0.75rem;
    }
    
    .hotspots-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
    }
    
    .hotspots-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        text-transform: uppercase;
        font-size: 0.75rem;
    }
    
    .view-map-btn {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .analytics-header .page-title {
        font-size: 1.25rem;
    }
    
    .time-filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .charts-grid {
        gap: 1rem;
    }
}

/* ===========================
   AI INSIGHTS SECTION STYLES
   =========================== */

.ai-insights-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* AI Stat Card */
.ai-stat-card,
.ai-urgent-card,
.ai-keywords-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.ai-stat-card:hover,
.ai-urgent-card:hover,
.ai-keywords-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: var(--fbn-orange);
}

.ai-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.ai-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.ai-badge {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.urgent-badge {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
    padding: 0.5rem 0.85rem;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Metrics */
.ai-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ai-metric {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Urgent Incidents List */
.urgent-incidents-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.urgent-incident-item {
    background: linear-gradient(135deg, #fef2f2, #fff);
    border-left: 4px solid #ef4444;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.urgent-incident-item:hover {
    background: #fef2f2;
    transform: translateX(5px);
}

.urgent-incident-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.urgent-incident-id {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.urgency-score {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.urgent-incident-location {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.urgent-incident-type {
    font-size: 0.85rem;
    color: var(--text-light);
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #f3f4f6;
    border-radius: 6px;
}

/* Keywords Cloud */
.keywords-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: 150px;
    align-items: flex-start;
}

.keyword-tag {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4f46e5;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.keyword-tag:hover {
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
    transform: scale(1.05);
}

.keyword-count {
    background: rgba(79, 70, 229, 0.2);
    color: #4f46e5;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.loading-small {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.95rem;
    font-style: italic;
}

.empty-ai-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.empty-ai-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* Responsive AI Insights */
@media (max-width: 1024px) {
    .ai-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .ai-stat-card,
    .ai-urgent-card,
    .ai-keywords-card {
        padding: 1.25rem;
    }
    
    .ai-metrics {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .urgent-incidents-list {
        max-height: 250px;
    }
}

