:root {
    --bg-color: #0b1120;
    --panel-bg: #151d2e;
    --panel-border: #2a3441;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
}

/* ── Light Theme ── */
[data-theme="light"] {
    --bg-color: #eeeeee; /* Light gray from user image */
    --panel-bg: #fdfdfd;
    --panel-border: #d6d6d6;
    --text-main: #2d3748;
    --text-muted: #718096;
    --accent: #3182ce;
    --danger: #e53e3e;
    --success: #38a169;
    --warning: #dd6b20;
}

/* Smooth transition for theme switch */
body, .sidebar, header, .panel, .panel-header, .sensor-center,
.radar-controls, .radar-timestamp, .llwas-diagram,
.model-scroll-container, .model-table th, .warning-list {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* Light-theme specific overrides */
[data-theme="light"] .compass {
    background: #e2e8f0;
    border-color: #94a3b8;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1), 0 2px 5px rgba(0,0,0,0.1);
}
/* Panah (needle) — warna lebih pekat + drop-shadow tebal */
[data-theme="light"] .pointer-wedge {
    border-top-color: #ea580c;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}
/* Speed & direction text tetap kontras */
[data-theme="light"] .compass-center-text .spd,
[data-theme="light"] .compass-center-text .dir {
    color: #ea580c;
    text-shadow: none;
}
[data-theme="light"] .label { color: #475569; }
[data-theme="light"] .compass-runway-bg svg polygon { fill: #94a3b8; }
[data-theme="light"] .runway-overlay { background: #cbd5e1; border-color: rgba(0,0,0,0.1); box-shadow: none; }
[data-theme="light"] .runway-overlay::before { background: repeating-linear-gradient(to bottom, #475569, #475569 12px, transparent 12px, transparent 24px); }

[data-theme="light"] .sidebar-toggle:hover { background: rgba(0,0,0,0.06); }
[data-theme="light"] .nav-item:hover,
[data-theme="light"] .nav-item.active { background: rgba(2,132,199,0.1); }
[data-theme="light"] .llwas-diagram {
    background: #e2e8f0;
    border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .sensor-center {
    background: rgba(255,255,255,0.85);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .radar-controls {
    background: rgba(255,255,255,0.92);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .radar-timestamp {
    background: rgba(255,255,255,0.92);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] #radar-map { background-color: #e2e8f0; }
[data-theme="light"] .toggle-mode-btn {
    background: rgba(226,232,240,0.9);
    border-color: rgba(0,0,0,0.12);
}
[data-theme="light"] .model-table th { background-color: rgba(226,232,240,0.9); }
[data-theme="light"] .model-table tr:hover { background-color: rgba(2,132,199,0.06); }
[data-theme="light"] .sidebar-overlay { background: rgba(0,0,0,0.35); }
[data-theme="light"] .play-btn { background: #94a3b8; color: #0f172a; }

/* ── Theme Toggle Button ── */
.theme-toggle-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px; border: 1px solid var(--panel-border);
    background: var(--panel-bg);
    color: var(--text-muted);
    cursor: pointer; transition: all 0.2s;
    flex-shrink: 0;
}
.theme-toggle-btn:hover {
    background: rgba(56,189,248,0.1);
    color: var(--accent);
    border-color: var(--accent);
}
[data-theme="light"] .theme-toggle-btn:hover {
    background: rgba(2,132,199,0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    overflow-x: auto; /* Allow horizontal scroll if needed to reach the edges */
    overflow-y: auto;
}

.app-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 240px;
    background-color: var(--panel-bg);
    border-right: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--panel-border);
}

.sidebar.collapsed .sidebar-header {
    padding: 0;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
}

.logo-text {
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.sidebar-nav {
    flex-grow: 1;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-item:hover, .nav-item.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}

.nav-text {
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.sidebar.collapsed .nav-text {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--panel-border);
}

.sidebar.collapsed .sidebar-footer {
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
    transition: opacity 0.2s;
}

.sidebar.collapsed .user-info {
    display: none;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Important for flex child to shrink below content width */
}

/* Top Header */
header {
    background-color: var(--panel-bg);
    border-bottom: 1px solid var(--panel-border);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    flex-shrink: 0;
    z-index: 900;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    z-index: 950;
}

.sidebar-overlay.active {
    display: block;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title img {
    height: 30px;
}

.header-title h1 {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}



.header-actions {
    display: flex;
    gap: 15px;
}

.header-actions div {
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 4px;
    opacity: 0.5;
}

/* Main Layout */
.main-container {
    display: flex;
    flex-wrap: nowrap; /* PAKSA tetap satu baris */
    padding: 15px;
    gap: 15px;
    flex-grow: 1;
    min-height: calc(100vh - 60px);
}

.left-col {
    flex: 1; /* Rasio 1 (25%) */
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.right-col {
    flex: 1; /* Rasio 1 (25%) */
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.center-col {
    flex: 2; /* Rasio 2 (50%) */
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 10px 15px;
    border-bottom: 1px solid var(--panel-border);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.panel-content {
    padding: 15px;
    flex-grow: 1;
}

/* AWOS Panel */
.awos-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.wind-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.wind-info span {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.1rem;
}

.compass {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, #1e293b 0%, #020617 100%);
    border: 8px solid #94a3b8;
    /* Silver ring */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 5px 15px rgba(0, 0, 0, 0.5);
}

.compass-dial {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.compass-ticks {
    position: absolute;
    width: 100%;
    height: 100%;
}

.label {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #cbd5e1;
    padding-top: 5px;
}

.compass-runway-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    opacity: 0.15;
    pointer-events: none;
}

.compass-runway-bg svg {
    width: 75%;
    height: 75%;
}

.runway-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 210px;
    background: #334155;
    transform: translate(-50%, -50%);
    z-index: 1;
    border-left: 1px solid rgba(255,255,255,0.3);
    border-right: 1px solid rgba(255,255,255,0.3);
    pointer-events: none;
    display: flex;
    justify-content: center;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    overflow: hidden;
}

.runway-overlay::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.8),
        rgba(255,255,255,0.8) 12px,
        transparent 12px,
        transparent 24px
    );
}

.runway-label {
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    z-index: 2;
    background: rgba(0,0,0,0.4);
    padding: 2px 4px;
    border-radius: 3px;
}

.runway-label.top { top: 4px; }
.runway-label.bottom { bottom: 4px; transform: rotate(180deg); }

.compass-center-text {
    position: absolute;
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.compass-center-text .spd {
    font-size: 3.3rem;
    font-weight: 800;
    color: #f97316; /* Orange */
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: baseline;
}

.compass-center-text .spd small {
    font-size: 1.5rem;
    margin-left: 2px;
}

.compass-center-text .dir {
    font-size: 2.0rem;
    font-weight: 700;
    color: #f97316;
    margin-top: 2px;
}

.needle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.pointer-wedge {
    position: absolute;
    top: -2px;
    left: calc(50% - 8px);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 14px solid #f97316;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}

.variation-arc {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    mask-image: radial-gradient(circle, transparent 115px, black 116px);
    -webkit-mask-image: radial-gradient(circle, transparent 115px, black 116px);
    z-index: 2;
    opacity: 0.8;
    pointer-events: none;
    background: conic-gradient(from 0deg, rgba(249, 115, 22, 0.4) 0deg, rgba(249, 115, 22, 0.4) var(--diff, 0deg), transparent var(--diff, 0deg));
}

.awos-top {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.awos-top > div:first-child {
    flex: 0 0 260px; /* Compass + mini stats width */
}

/* Wind mini stats below compass */
.wind-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 6px;
    width: 260px;
}

.wind-mini-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 5px 7px;
    text-align: center;
}

.wind-mini-item.headwind {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.06);
}

.wind-mini-item.tailwind {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.06);
}

.wind-mini-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.wind-mini-val {
    font-size: 1.75rem;
    font-weight: 800;
    color: #f97316;
    margin-top: 2px;
    line-height: 1;
}

.wind-mini-item.headwind .wind-mini-val {
    color: var(--success);
}

.wind-mini-item.tailwind .wind-mini-val {
    color: var(--danger);
}

.wind-mini-val sup {
    font-size: 0.65rem;
    font-weight: 500;
    margin-left: 1px;
    vertical-align: super;
}

.awos-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.awos-metrics .val {
    font-size: 2.0rem;
    font-weight: 600;
    color: #f97316;
    margin-top: 1px;
}

.awos-metrics .val sup {
    font-size: 1.0rem;
    font-weight: 500;
    margin-left: 2px;
    vertical-align: super;
}

.status-badge {
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 10px;
    text-align: center;
}

/* LLWAS Center Layout */
.llwas-panel-center {
    margin-top: 10px;
}

.llwas-center-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.llwas-diagram {
    position: relative;
    height: 180px;
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.llwas-info-center {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 6px;
}

.sensor-center {
    position: absolute;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.val-orange {
    color: #f97316;
    font-weight: 700;
    font-size: 0.85rem;
}

.val-orange sup {
    font-size: 0.5rem;
    margin-left: 1px;
}

.llwas-alert-text {
    font-size: 0.75rem;
    line-height: 1.6;
}

.llwas-summary-stats {
    display: flex;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 5px;
}

.stat-mini {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.llwas-runway {
    width: 90%;
    height: 32px;
    background-color: rgba(71, 85, 105, 0.4);
    border-radius: 6px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: white;
}



.runway-mark {
    position: absolute;
    left: 65%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 45%;
    height: 100%;
    border: 2px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    pointer-events: none;
}

.runway-mark::before {
    content: '';
    position: absolute;
    left: 40px;
    right: 40px;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.6) 10px, transparent 10px, transparent 20px);
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

.alert-box {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #b91c1c;
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.sensor {
    position: absolute;
    font-size: 0.6rem;
    color: var(--success);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sensor-top {
    top: 20px;
}

.sensor-bottom {
    bottom: 20px;
}

.llwas-alerts {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Bottom left mini panels */
.bottom-stats {
    display: flex;
    gap: 15px;
    height: 80px;
    margin-top: auto;
}

.bottom-stats .panel {
    flex: 1;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-val {
    font-size: 1.3rem;
    font-weight: 700;
}

.stat-val.active {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.stat-val.active::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
}

/* Radar Panel */
.radar-panel {
    flex: 0 0 480px; /* Increased to match AWOS RWY 10 height */
    position: relative;
}

#radar-map {
    width: 100%;
    height: 100%;
    background-color: #0f172a;
}

.radar-controls {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
}

.play-btn {
    background: #334155;
    border: none;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.65rem;
}

.legend {
    display: flex;
    align-items: center;
    gap: 2px;
}

.legend-color {
    width: 18px;
    height: 5px;
}

.legend-lbl {
    font-size: 0.6rem;
    margin: 0 2px;
}

/* Side Charts */
.charts-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
}

.chart-container-small {
    position: relative;
    height: 120px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 5px;
}

/* Wind Rose Styles */
.wind-rose-container {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.wind-rose-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.legend-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.legend-item span {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Chart Header Styles */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.chart-title svg {
    color: var(--accent);
}

.chart-download {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    color: var(--accent);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chart-download:hover {
    opacity: 1;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: #ef4444; /* default red */
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    transition: all 0.3s ease;
    vertical-align: middle;
}
.status-dot.active {
    background-color: #22c55e; /* green */
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.toggle-mode-btn {
    background: rgba(51, 65, 85, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}
.toggle-mode-btn:hover {
    background: var(--primary);
    color: white;
}

.wind-barb-container {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Media Queries */
/* Proportions maintained by flex percentages */

@media (max-width: 1024px) {
    /* Stack columns vertically on mobile and tablet for better UX */
    .main-container {
        flex-direction: column; 
        overflow-x: hidden;
    }
    
    .left-col, .right-col, .center-col {
        flex: auto;
        width: 100%;
    }

    .mobile-stack {
        flex-direction: column !important;
    }

    .sidebar {
        position: fixed;
        height: 100vh;
        left: 0;
        top: 0;
    }

    .sidebar.collapsed {
        left: -240px; /* Hide completely when collapsed on mobile */
    }

    .sidebar {
        width: 240px;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-content {
        padding-left: 0;
        overflow-y: auto;
    }
    
    .radar-panel {
        flex: none;
        height: 400px;
    }

    .llwas-center-content {
        flex-direction: column;
    }

    .llwas-info-center {
        width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px;
    }

    .header-title h1 {
        font-size: 0.9rem;
    }

    .awos-top {
        flex-direction: column;
    }

    .awos-top > div:first-child {
        flex: 0 0 auto;
        margin: 0 auto;
        align-items: center;
    }

    .awos-metrics {
        grid-template-columns: repeat(2, 1fr);
        text-align: center;
        margin-top: 15px;
        width: 100%;
    }
    
    .radar-controls {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .control-group {
        width: 100%;
        justify-content: space-between;
    }
}
/* Warning Panel Styles */
.warning-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive Chart Rows */
.chart-row-flex {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .chart-row-flex {
        flex-direction: column;
        height: auto !important;
        gap: 20px;
    }
    .chart-row-flex > div {
        flex: none !important;
        width: 100% !important;
        height: 150px !important; /* Give each chart a fixed height on mobile */
    }
}

.warning-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.warning-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1e293b;
    transition: all 0.4s ease;
}

.warning-item.active {
    color: #f1f5f9;
}

.warning-item.active.yellow .dot {
    background: #f59e0b;
    box-shadow: 0 0 12px #f59e0b;
}

.warning-item.active.red .dot {
    background: #ef4444;
    box-shadow: 0 0 12px #ef4444;
    animation: warning-pulse 1.5s infinite;
}

@keyframes warning-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

.radar-timestamp {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Model View Styles */
.model-scroll-container {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-color);
}

.model-table {
    width: max-content;
    border-collapse: collapse;
    font-size: 0.75rem;
    color: var(--text-main);
}

.model-table th, .model-table td {
    padding: 12px 15px;
    text-align: center;
    border-right: 1px solid var(--panel-border);
    border-bottom: 1px solid var(--panel-border);
    min-width: 80px;
}

.model-table th {
    background-color: rgba(30, 41, 59, 0.8);
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 10;
}

.model-table tr:hover {
    background-color: rgba(56, 189, 248, 0.05);
}

.model-table .time-col {
    background-color: rgba(30, 41, 59, 0.5);
    font-weight: 600;
}

.model-table .weather-icon {
    width: 32px;
    height: 32px;
}

.model-table .unit {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: block;
}

.model-table .param-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Custom scrollbar for model view */
.model-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.model-scroll-container::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.model-scroll-container::-webkit-scrollbar-thumb {
    background: var(--panel-border);
    border-radius: 4px;
}

.model-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Leaflet Layer Control Custom Styling */
.leaflet-control-layers {
    background: var(--panel-bg) !important;
    border: 1px solid var(--panel-border) !important;
    color: var(--text-main) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    font-family: 'Inter', sans-serif !important;
    padding: 8px !important;
}

.leaflet-control-layers-expanded {
    min-width: 150px;
}

.leaflet-control-layers label {
    margin-bottom: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.leaflet-control-layers-separator {
    border-top: 1px solid var(--panel-border);
    margin: 8px -8px;
}

[data-theme="light"] .leaflet-control-layers {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}
