* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; overflow-x: hidden; }

.dashboard-wrapper {
    background: #0a1929;
    min-height: 100vh;
    padding-top: 60px;
}

.dashboard-main {
    display: flex;
    height: calc(100vh - 60px);
}

.map-section {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.sidebar {
    width: 380px;
    background: #132f4c;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    color: #90caf9;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.section-content {
    padding: 16px 20px;
    color: white;
}

.time-range-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.time-btn {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.time-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.time-btn.active {
    background: #1976d2;
    border-color: #1976d2;
}

.layer-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.layer-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
}

.layer-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 12px;
}

.layer-name {
    flex: 1;
    font-size: 0.9rem;
    color: #e3f2fd;
}

.layer-info {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #4ade80;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

#mapCanvas {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a2332 0%, #0a1929 100%);
}

.map-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.map-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.legend {
    position: absolute;
    bottom: 80px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.info-popup {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    pointer-events: none;
    font-size: 0.85rem;
    max-width: 250px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
    z-index: 1000;
}

.info-popup.visible {
    display: block;
}

.info-popup-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: #90caf9;
}

.info-popup-detail {
    margin: 4px 0;
    opacity: 0.9;
}

.scale-bar {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
