:root {
    color-scheme: dark;
    --primary: #ff4d4d;
    --primary-glow: rgba(255, 77, 77, 0.4);
    --bg: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: #a0a0a5;
    --glass-blur: 15px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

main.container {
    padding-top: 1.25rem;
    padding-bottom: 4rem;
}

/* Background Blobs - Optimized for low GPU/RAM usage */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
    /* Removed heavy filter: blur(80px) */
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 77, 77, 0.4) 0%, rgba(255, 77, 77, 0) 70%);
    top: -150px;
    right: -150px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(77, 121, 255, 0.4) 0%, rgba(77, 121, 255, 0) 70%);
    bottom: -100px;
    left: -100px;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 219, 77, 0.25) 0%, rgba(255, 219, 77, 0) 70%);
    top: 30%;
    left: 10%;
}

/* Header */
header {
    padding: 1.5rem 0 0;
    border-bottom: 1px solid var(--card-border);
    /* backdrop-filter: blur(var(--glass-blur)); Removed for GPU Performance */
    background: #0a0a0c;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Row 1 */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Meta chips on the right */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.meta-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 2rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.meta-chip svg {
    opacity: 0.55;
    flex-shrink: 0;
}

/* Row 2 — controls bar */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--card-border);
}


.pulse {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    position: relative;
}

.pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    border-radius: 50%;
    will-change: transform, opacity;
    animation: pulse 2s infinite ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Connection Status */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

#connection-status {
    transition: all 0.3s ease;
}

#connection-status.status-online {
    color: #4dff91;
    background: rgba(77, 255, 145, 0.1);
    border-color: rgba(77, 255, 145, 0.3);
}

#connection-status.status-online .status-dot {
    background: #4dff91;
    box-shadow: 0 0 8px rgba(77, 255, 145, 0.6);
}

#connection-status.status-offline {
    color: #ffdb4d;
    background: rgba(255, 219, 77, 0.1);
    border-color: rgba(255, 219, 77, 0.3);
}

#connection-status.status-offline .status-dot {
    background: #ffdb4d;
    box-shadow: 0 0 8px rgba(255, 219, 77, 0.6);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--card-border);
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.1);
}

.search-box svg {
    color: var(--text-muted);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    width: 200px;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.5rem;
    padding-left: 0.8rem;
}

#history-date {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text);
    outline: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

#history-date:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-glow);
}

.live-indicator-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.live-indicator-btn::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
}

.live-indicator-btn.active {
    background: rgba(255, 77, 77, 0.15);
    color: #ff7676;
}

.live-indicator-btn.active::before {
    background: #ff4d4d;
    box-shadow: 0 0 10px #ff4d4d;
}

.separator {
    margin: 0 0.5rem;
    opacity: 0.3;
}

/* Last Incident Timer */
.last-incident-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.3s;
}

.last-incident-widget svg {
    opacity: 0.6;
    flex-shrink: 0;
}

.last-incident-widget.fresh {
    color: #4dff91;
    animation: freshPulse 2s ease-out forwards;
}

@keyframes freshPulse {
    0% {
        color: #4dff91;
    }

    100% {
        color: var(--text-muted);
    }
}

#stats-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

#stats-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

#stats-toggle-btn.active {
    background: var(--accent-light);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.3);
}

/* Base icon btn style */
.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover,
.icon-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.hidden {
    display: none !important;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 0;
    margin-bottom: 2.5rem;
    animation: fadeIn 0.5s ease;
}

/* Compare Banner */
.compare-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 1.2rem 2rem;
    margin-bottom: 2rem;
    /* backdrop-filter: blur(var(--glass-blur)); Removed for GPU Performance */
    background: #141419;
    animation: fadeIn 0.5s ease;
    flex-wrap: wrap;
}

.compare-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 90px;
}

.cmp-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.cmp-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.compare-sep {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.4;
    padding: 0 0.5rem;
}

.compare-trend .cmp-value {
    font-size: 1.2rem;
}

.trend-up {
    color: #ff6b6b;
}

.trend-down {
    color: #4dff91;
}

.trend-same {
    color: var(--text-muted);
}

.compare-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
}

.breakdown-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 2rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.breakdown-pill .pill-count {
    font-weight: 700;
    color: var(--text);
}

.breakdown-pill .pill-trend {
    font-size: 0.7rem;
}

.stats-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    /* backdrop-filter: blur(var(--glass-blur)); Removed for GPU Performance */
    background: #141419;
}

.stats-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-card.full-width {
    grid-column: 1 / -1;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    /* backdrop-filter: blur(var(--glass-blur)); Removed for GPU Performance */
    background: #141419;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.card-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.type-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
}

.type-Požár {
    background: rgba(255, 77, 77, 0.2);
    color: #ff7676;
    border: 1px solid rgba(255, 77, 77, 0.3);
}

.district-badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

#active-filters-bar {
    background: rgba(77, 121, 255, 0.2);
    color: #7697ff;
    border: 1px solid rgba(77, 121, 255, 0.3);
}

.type-Nehoda {
    background: rgba(77, 121, 255, 0.2);
    color: #7697ff;
    border: 1px solid rgba(77, 121, 255, 0.3);
}

.type-Pomoc {
    background: rgba(255, 219, 77, 0.2);
    color: #ffdb76;
    border: 1px solid rgba(255, 219, 77, 0.3);
}

.time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    gap: 0.8rem;
}

.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.8rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-align: center;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #ff6666;
}

.btn-secondary {
    background: rgba(77, 121, 255, 0.15);
    color: #7697ff;
}

.btn-secondary:hover {
    background: rgba(77, 121, 255, 0.25);
}

/* Loading helper */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 0;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Map Tooltip */
.map-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 280px;
    height: 200px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    /* backdrop-filter: blur(20px); Removed for GPU Performance */
    background: rgba(20, 20, 25, 0.95);
    border-radius: 1.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.map-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.map-tooltip iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--card-border);
}

.btn-primary {
    position: relative;
}

/* Refresh Progress Bar */
.refresh-progress-container {
    height: 5px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    position: absolute;
    bottom: 1px;
    left: 0;
    overflow: hidden;
}

.refresh-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--primary);
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
    /* transition: transform 1s linear; Removed to stop 60 FPS continuous repaints causing high Desktop GPU usage */
    transition: transform 0.2s ease-out;
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: row;
        gap: 0.2rem;
        align-items: center;
        justify-content: space-between;
        padding-right: 0.2rem;
    }
    .header-top h1 {
        font-size: 1rem;
    }

    .header-actions {
        flex-wrap: nowrap;
        gap: 0.2rem;
    }

    .meta-chip span:not(.status-dot) {
        font-size: 0.75rem;
    }

    .meta-chip#last-update-chip {
        padding: 0.3rem 0.6rem;
    }

    .meta-chip#connection-status span:not(.status-dot) {
        display: none;
    }
    
    .meta-chip#connection-status {
        padding: 0;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        min-width: 28px;
        justify-content: center;
    }
    
    .meta-chip svg {
        margin: 0;
        transform: scale(0.9);
    }
    
    .meta-chip#last-update-chip svg {
        margin-right: 0.2rem;
    }

    .icon-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        padding: 0;
    }
    .icon-btn svg {
        transform: scale(0.9);
    }

    .header-controls {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }
    
    .search-box {
        flex: 2;
        min-width: 120px;
    }

    .search-box input {
        width: 100%;
        font-size: 0.8rem;
    }
    
    .date-selector, .location-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
    
    #live-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .filters-container {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    .filters-container::-webkit-scrollbar {
        display: none;
    }

    .filter-pill, .distance-select {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .custom-multi-select {
        flex-shrink: 0;
        min-width: unset;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-card.full-width {
        grid-column: 1;
    }
}

/* Location and Distance */
.location-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.location-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.location-btn.active {
    background: rgba(77, 121, 255, 0.15);
    border-color: #4d79ff;
    color: #7697ff;
}

.location-btn.active svg {
    color: #4d79ff;
}

.distance-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--card-border);
}

.distance-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.distance-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.distance-select option {
    background: var(--bg);
    color: var(--text);
}

/* Latest Incident Highlight */
.latest-incident-card {
    grid-column: 1 / -1; /* Make it span the entire row visually */
    border: 2px solid rgba(255, 77, 77, 0.8) !important;
    background: linear-gradient(145deg, rgba(255, 77, 77, 0.15), rgba(20, 20, 25, 0.95)) !important;
    box-shadow: 0 0 25px rgba(255, 77, 77, 0.25);
    transform: scale(1.02);
    margin-bottom: 1rem;
    animation: pulse-border 3s infinite ease-in-out;
}

.latest-incident-card:hover {
    transform: scale(1.03);
    box-shadow: 0 0 35px rgba(255, 77, 77, 0.4);
    background: linear-gradient(145deg, rgba(255, 77, 77, 0.25), rgba(20, 20, 25, 0.95)) !important;
}

.latest-badge {
    background: #ff4d4d;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
    margin-left: auto; /* Push to the right side of the header */
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

@keyframes pulse-border {
    0% { border-color: rgba(255, 77, 77, 0.4); }
    50% { border-color: rgba(255, 77, 77, 1); }
    100% { border-color: rgba(255, 77, 77, 0.4); }
}

/* Custom HTML Stats */
.html-stats-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.5rem;
}

.type-stat-row {
    display: grid;
    grid-template-columns: 80px 1fr 40px;
    align-items: center;
    gap: 1rem;
}

.type-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: right;
}

.type-stat-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.type-stat-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.3, 1);
    background: var(--primary);
}

.type-stat-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-align: left;
}

/* Impacts Grid */
.impact-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 0.5rem;
}

.impact-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.2s;
}

.impact-box:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.06);
}

.impact-box .impact-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.impact-box .impact-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.val-ok { color: #6bff80; }
.val-warn { color: #ffdb76; }
.val-alert { color: #ff6b6b; }
.val-money { color: #4d9eff; }

/* Vehicle Stats */
.vehicle-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.8rem;
    padding-top: 0.5rem;
}

.vehicle-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 0.8rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.2s;
    gap: 0.8rem;
}

.vehicle-stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.vehicle-stat-item .v-type {
    color: var(--text-muted);
    font-weight: 500;
}

.vehicle-stat-item .v-count {
    color: var(--text);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Custom Multi Select */
.custom-multi-select {
    position: relative;
    user-select: none;
    outline: none;
}

.multi-select-header {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 0.6rem 1.2rem;
    padding-right: 2.2rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    height: 100%;
}

.multi-select-header:hover, .custom-multi-select:focus .multi-select-header, .custom-multi-select.open .multi-select-header {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.multi-select-header svg {
    position: absolute;
    right: 1rem;
    transition: transform 0.2s;
}

.custom-multi-select.open .multi-select-header svg {
    transform: rotate(180deg);
}

.multi-select-options {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 220px;
    background: #1a1a20;
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 0.5rem 0;
    z-index: 100;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.multi-select-options.hidden {
    display: none;
}

.multi-option {
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.multi-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.multi-option input[type="checkbox"] {
    accent-color: var(--primary);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}