/* Main Stylesheet - Drone Map Viewer */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #137fec;
    --background-light: #f6f7f8;
    --background-dark: #0f1115;
    --surface-dark: #181b21;
    --surface-border: #2a2f38;
    --accent-red: #ef4444;
    --accent-blue: #137fec;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--background-dark);
    color: #f1f5f9;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
header {
    height: 64px;
    background: var(--surface-dark);
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: rgba(19, 127, 236, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 500;
    color: #34d399;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Sidebar */
aside.sidebar {
    width: 320px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 500;
    pointer-events: none;
}

.glass-panel {
    background: rgba(24, 27, 33, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    pointer-events: auto;
}

.sidebar-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.section-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Map Area */
#map {
    width: 100%;
    height: 100%;
    background: #111;
}

/* Bottom Panel */
.bottom-panel {
    position: absolute;
    bottom: 24px;
    right: 24px;
    left: 344px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: none;
}

.stats-bar {
    align-self: center;
    display: flex;
    gap: 32px;
    padding: 12px 32px;
    border-radius: 9999px;
    pointer-events: auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    font-family: monospace;
}

.analysis-panel {
    width: 100%;
    pointer-events: auto;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px;
    height: 200px;
}

.chart-container {
    background: rgba(24, 27, 33, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.chart-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
}

.chart-meta {
    font-size: 10px;
    font-family: monospace;
    color: var(--primary);
}

.chart-body {
    flex: 1;
    position: relative;
}

/* Info Tooltip/Popup Style */
.info-card {
    width: 100%;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
}

.info-label {
    color: #94a3b8;
    font-weight: 500;
}

.info-value {
    text-align: right;
    font-family: monospace;
    font-weight: 600;
}

/* Leaflet Customization */
.leaflet-container {
    background: #0f1115 !important;
}

.leaflet-control-layers {
    background: rgba(24, 27, 33, 0.9) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* Responsive */
@media (max-width: 1024px) {
    aside.sidebar {
        width: 100%;
        height: auto;
        bottom: auto;
        position: relative;
    }

    .bottom-panel {
        left: 24px;
        position: relative;
    }

    body {
        overflow-y: auto;
        height: auto;
    }

    #map {
        height: 500px;
    }
}