/* ==========================================================================
   RITU.AI Dashboard — Climate & Disaster Intelligence Digital Twin
   Full-Bleed Map Architecture with Floating Glass Telemetry Controls
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #070c18;
    --bg-dark-secondary: #0f172a;
    
    /* Apple visionOS Frosted Glass Palette (Enhanced Transparency) */
    --bg-glass: rgba(140, 165, 195, 0.25);
    --bg-glass-card: rgba(145, 170, 200, 0.20);
    --bg-glass-hover: rgba(165, 190, 220, 0.38);
    --bg-glass-inset: rgba(115, 140, 170, 0.18);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #475569;

    --accent-cyan: #0284c7;
    --accent-blue: #0369a1;
    --accent-indigo: #4f46e5;
    --accent-emerald: #16a34a;
    --accent-amber: #d97706;
    --accent-orange: #ea580c;
    --accent-red: #dc2626;
    --accent-purple: #9333ea;

    --glass-border: rgba(255, 255, 255, 0.65);
    --glass-border-hover: rgba(2, 132, 199, 0.7);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    --glass-shadow-hover: 0 12px 36px rgba(0, 0, 0, 0.22), inset 0 1px 2px rgba(255, 255, 255, 0.65);

    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-full: 9999px;

    --blur-standard: blur(14px) saturate(170%);
    --blur-heavy: blur(22px) saturate(180%);
}

/* Reset & Base Layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Monospace Utilities */
.weather-val, .score-val, .metric-value, .trend-val, .stat-value, .faq-number, select, input, .w-value, .contact-btn span {
    font-family: var(--font-mono);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(140, 165, 195, 0.15);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* Glassmorphism Panel Utility (visionOS Frosted Glass Material) */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   WHITE TRANSLUCENT GLASS THEME (DEFAULT - LIGHT FROSTED GLASS)
   ========================================================================== */
body.theme-white-glass {
    --bg-glass: rgba(140, 165, 195, 0.24);
    --bg-glass-card: rgba(140, 165, 195, 0.18);
    --bg-glass-hover: rgba(165, 190, 220, 0.35);
    --bg-glass-inset: rgba(115, 140, 170, 0.15);
    --bg-sheet-mobile: rgba(135, 160, 190, 0.28);
    --sheet-handle-color: rgba(255, 255, 255, 0.75);
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --text-muted: #334155;
    --glass-border: rgba(255, 255, 255, 0.68);
    --glass-border-hover: rgba(2, 132, 199, 0.8);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.55);
}

/* Global Hidden Utility Rule */
.hidden,
.landing-screen.hidden,
.loading-overlay.hidden,
.modal.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ==========================================================================
   DARK TRANSLUCENT GLASS THEME (DEEP BLUE-GRAY FROSTED GLASS)
   ========================================================================== */
body.theme-dark-glass {
    --bg-dark: #050811;
    --bg-glass: rgba(20, 32, 50, 0.30);
    --bg-glass-card: rgba(24, 38, 60, 0.25);
    --bg-glass-hover: rgba(35, 52, 80, 0.42);
    --bg-glass-inset: rgba(15, 25, 42, 0.20);
    --bg-sheet-mobile: rgba(20, 32, 50, 0.38);
    --sheet-handle-color: rgba(255, 255, 255, 0.55);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-cyan: #38bdf8;
    --accent-blue: #0284c7;
    --glass-border: rgba(255, 255, 255, 0.32);
    --glass-border-hover: rgba(56, 189, 248, 0.6);
    --glass-shadow: 0 12px 36px rgba(0, 0, 0, 0.38), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    --color-green: #34d399;
    --color-green-bg: rgba(52, 211, 153, 0.22);
    --color-green-border: rgba(52, 211, 153, 0.55);
    --color-green-glow: rgba(52, 211, 153, 0.4);
}

/* Explicit Dark Glass Theme Green High-Contrast Overrides */
body.theme-dark-glass .risk-level-badge {
    color: #34d399 !important;
    background: rgba(52, 211, 153, 0.22) !important;
    border-color: rgba(52, 211, 153, 0.55) !important;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.35) !important;
}

body.theme-dark-glass .live-badge {
    color: #34d399 !important;
    background: rgba(52, 211, 153, 0.22) !important;
    border-color: rgba(52, 211, 153, 0.55) !important;
}

body.theme-dark-glass .live-dot {
    background: #34d399 !important;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.8) !important;
}

/* Full-Bleed Leaflet Map */
.fullscreen-map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background: #020617;
}

/* Dark mode Leaflet tweaks */
.leaflet-container {
    background: #020617 !important;
    font-family: var(--font-body) !important;
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.94) !important;
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--glass-shadow) !important;
}
.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.94) !important;
}

/* Leaflet Bottom-Left Map Controls (Order: Location 📍 -> Zoom + / - -> Scale 100km) */
.leaflet-bottom.leaflet-left {
    bottom: 20px !important;
    left: 36px !important;
    z-index: 999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
}

.leaflet-bottom.leaflet-left .leaflet-control {
    margin: 0 !important;
}

/* Location Button (Compact 38px Square with Apple VisionOS Glass Aesthetic) */
.leaflet-control-locate,
.leaflet-touch .leaflet-control-locate {
    width: 38px !important;
    height: 38px !important;
    background: var(--bg-glass) !important;
    background-color: var(--bg-glass) !important;
    backdrop-filter: var(--blur-standard) !important;
    -webkit-backdrop-filter: var(--blur-standard) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--glass-shadow) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.leaflet-control-locate a,
.leaflet-touch .leaflet-control-locate a,
.leaflet-bar a.leaflet-control-locate-btn {
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-size: 1.25rem !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.leaflet-control-locate a:hover,
.leaflet-touch .leaflet-control-locate a:hover {
    color: var(--accent-cyan) !important;
    background: var(--bg-glass-hover) !important;
    background-color: var(--bg-glass-hover) !important;
    box-shadow: 0 0 16px rgba(2, 132, 199, 0.3) !important;
}

/* Large Compass Rose Overlay */
.standalone-compass-container {
    position: fixed;
    top: 12px; /* Top left corner, same level as KDI */
    left: 16px;
    width: 82px; /* Matches the command strip width */
    height: 82px;
    border-radius: 50%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 6px;
}

.standalone-compass-container:hover {
    transform: scale(1.05);
    background: var(--bg-glass-hover);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 0 12px rgba(2, 132, 199, 0.2);
}

/* Live Location Pulse Marker */
.user-live-pulse-container {
    position: relative;
    width: 24px;
    height: 24px;
}
.user-pulse-dot {
    width: 14px;
    height: 14px;
    background: #0284c7;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    left: 5px;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.9);
    z-index: 2;
}
.user-pulse-ring {
    width: 34px;
    height: 34px;
    border: 2px solid rgba(2, 132, 199, 0.8);
    border-radius: 50%;
    position: absolute;
    top: -5px;
    left: -5px;
    animation: gps-pulse 1.8s ease-out infinite;
    z-index: 1;
}
@keyframes gps-pulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.7); opacity: 0; }
}
.locating-pulse {
    animation: locate-spin 1s linear infinite !important;
}
@keyframes locate-spin {
    0% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.08); }
    100% { opacity: 0.4; transform: scale(0.95); }
}

/* Zoom Controls (+ / -) (Compact 38px Width with visionOS Frosted Glass & Dark Text) */
.leaflet-control-zoom,
.leaflet-touch .leaflet-control-zoom,
.leaflet-bar,
.leaflet-touch .leaflet-bar {
    width: 38px !important;
    background: var(--bg-glass) !important;
    background-color: var(--bg-glass) !important;
    backdrop-filter: var(--blur-standard) !important;
    -webkit-backdrop-filter: var(--blur-standard) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--glass-shadow) !important;
    overflow: hidden !important;
}

.leaflet-control-zoom a,
.leaflet-touch .leaflet-control-zoom a,
.leaflet-bar a,
.leaflet-touch .leaflet-bar a {
    width: 38px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-bottom: 1px solid var(--glass-border) !important;
    background: transparent !important;
    background-color: transparent !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.leaflet-control-zoom a:last-child,
.leaflet-touch .leaflet-control-zoom a:last-child,
.leaflet-bar a:last-child,
.leaflet-touch .leaflet-bar a:last-child {
    border-bottom: none !important;
}

.leaflet-control-zoom a:hover,
.leaflet-touch .leaflet-control-zoom a:hover,
.leaflet-bar a:hover,
.leaflet-touch .leaflet-bar a:hover {
    color: var(--accent-cyan) !important;
    background: var(--bg-glass-hover) !important;
    background-color: var(--bg-glass-hover) !important;
}

/* Scale Bar (100 km) — Bottom */
.leaflet-control-scale {
    margin: 0 !important;
}

.leaflet-control-scale-line {
    background: var(--bg-glass) !important;
    backdrop-filter: var(--blur-standard) !important;
    -webkit-backdrop-filter: var(--blur-standard) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-full) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-mono) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 4px 12px !important;
    box-shadow: var(--glass-shadow) !important;
    text-align: center !important;
}

/* Leaflet Base Layer Control — Positioned DIRECTLY IN QUEUE as 4th button under command strip */
.leaflet-top.leaflet-left {
    top: 380px !important;
    left: 16px !important;
    z-index: 1000 !important;
}

.leaflet-control-layers {
    width: 78px !important;
    height: 60px !important;
    margin: 0 !important;
    background: var(--bg-glass) !important;
    backdrop-filter: var(--blur-standard) !important;
    -webkit-backdrop-filter: var(--blur-standard) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--glass-shadow) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
}

.leaflet-control-layers:hover {
    background: var(--bg-glass-hover) !important;
    border-color: var(--glass-border-hover) !important;
    box-shadow: var(--glass-shadow-hover) !important;
}

.leaflet-control-layers-expanded,
.leaflet-control-layers-expanded:hover {
    width: auto !important;
    height: auto !important;
    padding: 10px 14px !important;
    background: var(--bg-glass) !important;
    backdrop-filter: var(--blur-standard) !important;
    -webkit-backdrop-filter: var(--blur-standard) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--glass-shadow) !important;
    border-radius: var(--radius-md) !important;
}

.leaflet-control-layers-expanded *,
.leaflet-control-layers-expanded label,
.leaflet-control-layers-expanded span,
.leaflet-control-layers-selector + span {
    color: var(--text-primary) !important;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
}

.leaflet-control-layers-toggle {
    width: 38px !important;
    height: 38px !important;
    background-size: 22px 22px !important;
    margin: 0 !important;
}

/* Floating Navigation Header (Top) — Separated Floating Pill Layout (NOT one continuous bar) */
.floating-header {
    position: fixed;
    top: 12px;
    left: 16px;
    right: 16px;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.header-main-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    /* NO background, NO border, NO glass — just a transparent flex container for pills */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.brand-container {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 7px 16px;
    box-shadow: var(--glass-shadow);
}

.brand-logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    flex-shrink: 0;
}

.brand-icon {
    display: none;
}

.header-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.mobile-brand-title {
    display: none;
}

.header-title-wrapper h1 {
    font-family: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
    text-transform: lowercase;
    margin: 0;
    padding: 0;
    line-height: 1.15;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff !important;
    background: linear-gradient(135deg, #15803d, #047857) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    padding: 2.5px 9px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 6px rgba(4, 120, 87, 0.35);
    white-space: nowrap;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff !important;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.9) !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.25); }
    100% { opacity: 0.4; transform: scale(0.9); }
}

/* Primary Search Bar (Separate Floating Pill) */
.primary-search-bar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 520px;
    min-width: 280px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 4px 6px 4px 14px;
    box-shadow: var(--glass-shadow);
    transition: all 0.25s ease;
}

.primary-search-bar:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.4);
}

.input-group-search {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-icon-inside {
    position: absolute;
    left: 8px;
    color: var(--accent-cyan);
    pointer-events: none;
}

.input-group-search input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px 12px 10px 34px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
}

.input-group-search input::placeholder {
    color: var(--text-muted);
}

/* Analyze Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #020617;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.55);
    background: linear-gradient(135deg, #7dd3fc, var(--accent-cyan));
}

.btn-primary:active {
    transform: translateY(0);
}

/* Action Buttons (Guide, Drawer Toggle, Settings) */
.header-actions {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-btn {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(99, 102, 241, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.84rem;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.guide-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(129, 140, 248, 0.95));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover, .icon-btn.active {
    color: var(--accent-cyan);
    border-color: var(--glass-border-hover);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

/* Floating Sub-Toolbar (Secondary Option Pills) */
.header-sub-toolbar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.toolbar-pill-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 5px 12px;
    box-shadow: var(--glass-shadow);
}

/* Feature Option Buttons: Sea Level & 3D Terrain */
.lbl-short {
    display: none;
}

.lbl-full {
    display: inline;
}

.toolbar-pill-group.feature-pill-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
}

.feature-opt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    height: 30px;
    box-sizing: border-box;
    text-decoration: none;
}

.feature-opt-btn .btn-icon {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-block;
}

.feature-opt-btn.coastal-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
}

.feature-opt-btn.coastal-btn:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
}

.feature-opt-btn.terrain-3d-btn {
    background: linear-gradient(135deg, #15803d, #047857);
    box-shadow: 0 3px 10px rgba(4, 120, 87, 0.35);
}

.feature-opt-btn.terrain-3d-btn:hover {
    background: linear-gradient(135deg, #16a34a, #059669);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(4, 120, 87, 0.5);
}

.feature-opt-btn.terrain-3d-btn.mode-active-3d {
    background: linear-gradient(135deg, #b91c1c, #991b1b) !important;
    box-shadow: 0 3px 12px rgba(185, 28, 28, 0.45) !important;
}

.feature-opt-btn:active {
    transform: scale(0.96);
}

.pill-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.forecast-select {
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.forecast-select option {
    background: #0f172a;
    color: #f8fafc;
}

.forecast-select:hover, .forecast-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.25);
}

/* Custom Frosted Glass Select Dropdowns */
.custom-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.custom-select-wrapper select {
    display: none !important;
}

.custom-select-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 5px 12px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25);
    outline: none;
    user-select: none;
}

.custom-select-trigger:hover,
.custom-select-trigger.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.3);
}

.custom-select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    opacity: 0.8;
}

.custom-select-trigger.active .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: fixed;
    min-width: 130px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 12px rgba(255, 255, 255, 0.15);
    z-index: 999999;
    display: none;
    flex-direction: column;
    gap: 3px;
}

.custom-select-options.open {
    display: flex;
    animation: customSelectFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes customSelectFadeIn {
    from { opacity: 0; transform: translate(-50%, -6px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.custom-select-option {
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.custom-select-option:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-primary);
}

.custom-select-option.selected {
    background: rgba(59, 130, 246, 0.22);
    color: var(--color-primary);
    font-weight: 700;
}

/* Map Layer dropdown styling */
.map-type-dropdown {
    background: var(--bg-glass-inset);
    border-color: var(--glass-border);
    color: var(--text-primary) !important;
    font-weight: 700;
}

.sim-rain-dropdown {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.45);
    color: var(--accent-red);
    font-weight: 700;
}

/* Left Floating Command Strip (Straight Queue Vertical Control Bar - 3 Layer Buttons) */
.floating-strip {
    position: fixed;
    top: 110px;
    left: 16px;
    width: 82px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 10px 8px;
    box-shadow: var(--glass-shadow);
}

.strip-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 3px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.strip-icon {
    font-size: 1.4rem;
}

.strip-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.strip-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
    transform: translateY(-1px);
    box-shadow: var(--glass-shadow-hover);
}

/* Active Layer Selection: Military Green Highlight */
.strip-btn.active {
    background: rgba(75, 107, 54, 0.35) !important;
    border-color: rgba(95, 140, 65, 0.8) !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(75, 107, 54, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

.strip-btn.active .strip-label {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Evacuation Alert Banner (Floating Top-Center) */
.floating-banner {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.88), rgba(185, 28, 28, 0.88));
    backdrop-filter: var(--blur-standard);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    animation: evacPulse 2s infinite alternate;
}

@keyframes evacPulse {
    0% { box-shadow: 0 0 15px rgba(220, 38, 38, 0.4); }
    100% { box-shadow: 0 0 35px rgba(220, 38, 38, 0.85); }
}

/* ==========================================================================
   RIGHT TELEMETRY & RISK SIDEBAR (FULL VIEW FIT - NO TRUNCATION)
   ========================================================================== */
/* Mobile-only elements hidden by default on Desktop */
.sheet-drag-handle,
.sheet-summary-row {
    display: none !important;
}

.floating-drawer {
    position: fixed;
    top: 12px;
    right: 16px;
    bottom: 16px;
    width: 390px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 24px);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    padding-right: 4px;
}



.side-panel.collapsed {
    transform: translateX(calc(100% + 28px));
    opacity: 0;
    pointer-events: none;
}

/* visionOS Frosted Glass Card Containers */
.panel-card {
    background: var(--bg-glass-card);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
    position: relative;
}

.panel-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--glass-shadow-hover);
}

.panel-card h2 {
    font-size: 0.98rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 8px;
    letter-spacing: -0.01em;
}

/* Hero Risk Gauges Card */
.risk-gauges-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.gauge-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.gauge-group:hover {
    background: var(--bg-glass-hover);
    border-color: var(--glass-border-hover);
}

.gauge-group h3 {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.gauge-container {
    position: relative;
    width: 82px;
    height: 82px;
}

.risk-gauge {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(15, 23, 42, 0.28);
    stroke-width: 10;
}

.gauge-fill {
    fill: none;
    stroke: #047857 !important;
    stroke-width: 11;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 0.8s ease, stroke 0.4s ease;
    stroke-linecap: round;
    filter: drop-shadow(0 0 3px rgba(4, 120, 87, 0.5));
}

.gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.percent {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.risk-level-badge {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #15803d, #047857) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(4, 120, 87, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.confidence-meter {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    margin-top: 4px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.confidence-meter strong, .confidence-meter .conf-val {
    color: #1e3a8a !important;
    font-weight: 800;
}

/* Weather Telemetry Grid & Items */
.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.weather-item:hover {
    border-color: var(--glass-border-hover);
    background: var(--bg-glass-hover);
}

.w-icon {
    font-size: 1.35rem;
}

.w-info {
    display: flex;
    flex-direction: column;
}

.w-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.w-value {
    font-size: 0.88rem;
    font-weight: 800;
    color: #1e3a8a !important;
}

.weather-desc {
    font-size: 0.78rem;
    color: #1e3a8a !important;
    font-weight: 800;
    font-style: italic;
    text-align: center;
    background: var(--bg-glass-inset);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

/* Tabbed Analytics System */
.analytics-card {
    display: flex;
    flex-direction: column;
}

.tab-bar {
    display: flex;
    gap: 4px;
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 3px;
    margin-bottom: 10px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
    background: var(--bg-glass-hover);
    color: var(--accent-cyan);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border-hover);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.dams-list, .alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.dam-card, .alert-card {
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.dam-card:hover, .alert-card:hover {
    border-color: var(--glass-border-hover);
    background: var(--bg-glass-hover);
}

.dam-header, .alert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.dam-name, .alert-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.dam-level-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 6px;
}

.dam-level-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.contact-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.contact-btn span {
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: 0.85rem;
}

.contact-btn:hover {
    border-color: var(--glass-border-hover);
    background: var(--bg-glass-hover);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

.loading-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    padding: 12px;
}

/* Landing / Monsoon Safety Guide Overlay (Ultra-Professional Sleek Glass Aesthetic) */
.landing-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(4, 8, 18, 0.82);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.landing-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.landing-container {
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(11, 17, 32, 0.94));
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.25);
    color: #f8fafc;
}

.landing-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 22px;
}

.badge-pill {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.25);
    letter-spacing: 0.02em;
}

.landing-title h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.landing-title p {
    font-size: 0.95rem;
    color: #cbd5e1;
    font-weight: 400;
}

.lang-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-landing-x {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border-radius: var(--radius-full);
    width: 34px !important;
    height: 34px !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-landing-x:hover {
    background: rgba(239, 68, 68, 0.8) !important;
    border-color: rgba(239, 68, 68, 1) !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
}

.lang-label {
    font-size: 0.82rem;
    color: #cbd5e1;
    font-weight: 600;
}

.lang-toggle-btn {
    display: flex;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    padding: 3px;
}

.lang-opt {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-opt.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.45);
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-card {
    display: flex;
    gap: 18px;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

.faq-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(47, 63, 90, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

.faq-number {
    font-size: 1.3rem;
    font-weight: 800;
    color: #38bdf8;
    font-family: var(--font-mono);
    min-width: 28px;
}

.faq-q {
    font-size: 1.02rem;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.faq-a {
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.6;
    font-weight: 400;
}

.landing-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

.cta-btn {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 28px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
    cursor: pointer;
    transition: all 0.25s ease;
}

/* Modals & Loaders */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(7, 12, 24, 0.75);
    backdrop-filter: var(--blur-heavy);
    -webkit-backdrop-filter: var(--blur-heavy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(2, 132, 199, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(7, 12, 24, 0.75);
    backdrop-filter: var(--blur-heavy);
    -webkit-backdrop-filter: var(--blur-heavy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.modal-body input {
    width: 100%;
    background: var(--bg-glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: var(--text-primary);
    margin-bottom: 8px;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-glass);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: var(--glass-shadow);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   WINDY.COM / WEATHEREX AI FLOATING HORIZONTAL LEGEND (MAP-MATCHED COLOR RAMP)
   ========================================================================== */
.info.legend.windy-legend {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1000 !important;
    background: var(--bg-glass) !important;
    backdrop-filter: var(--blur-standard) !important;
    -webkit-backdrop-filter: var(--blur-standard) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-full) !important;
    padding: 10px 24px !important;
    color: var(--text-primary) !important;
    box-shadow: var(--glass-shadow) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 440px !important;
    margin: 0 !important;
    pointer-events: auto !important;
}

.legend-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
}

.legend-title {
    color: var(--text-primary) !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.legend-unit {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.legend-gradient-bar {
    width: 100%;
    height: 9px;
    border-radius: var(--radius-full);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Exact QGIS RGBA Ramps from tif_to_png.py */
.risk-gradient, .terrain-gradient {
    /* Class 1 #2ecc71 (Green) -> Class 2 #a8e06c (Lime) -> Class 3 #f1c40f (Yellow) -> Class 4 #e67e22 (Orange) -> Class 5 #e74c3c (Crimson) */
    background: linear-gradient(90deg, #2ecc71 0%, #a8e06c 25%, #f1c40f 50%, #e67e22 75%, #e74c3c 100%);
}

.silt-gradient {
    /* Class 1 #f1c40f (Gold) -> Class 2 #e67e22 (Orange) -> Class 3 #c0392b (Mud Crimson) */
    background: linear-gradient(90deg, #f1c40f 0%, #e67e22 50%, #c0392b 100%);
}

.legend-ticks {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Compact Smartphone View Adjustments (Small & Ultra-Dense Fit) */
/* Compact Mobile Layout — Bottom Sheet & Ultra-Dense Header Architecture */
/* Compact Mobile Layout — Non-Overlapping Header, Centered Legend & Bottom Sheet Architecture */
@media (max-width: 900px) {
    /* 1. Ultra-Compact Single-Row Header */
    .floating-header {
        top: 6px;
        left: 6px;
        right: 6px;
        gap: 4px;
        width: calc(100vw - 12px);
    }

    .header-main-bar {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        align-items: center;
        justify-content: space-between;
    }

    .brand-container {
        padding: 4px 6px;
        border-radius: var(--radius-full);
        gap: 4px;
        flex-shrink: 0;
    }

    .brand-logo-img {
        width: 22px;
        height: 22px;
        object-fit: contain;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
        flex-shrink: 0;
    }

    .brand-icon {
        display: none !important;
    }

    .desktop-brand-title {
        display: none !important;
    }

    .mobile-brand-title {
        display: inline-block !important;
        font-family: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: 0.88rem;
        font-weight: 700;
        letter-spacing: -0.03em;
        color: #ffffff;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
        white-space: nowrap;
        text-transform: lowercase;
    }

    .live-badge {
        display: none !important; /* Hide badge on mobile to save space */
    }

    .primary-search-bar {
        flex: 1;
        min-width: 100px;
        padding: 2px 4px 2px 6px;
        border-radius: var(--radius-full);
    }

    .input-group-search input {
        padding: 4px 4px 4px 18px;
        font-size: 0.68rem;
    }

    .search-icon-inside {
        width: 11px;
        height: 11px;
        left: 4px;
    }

    .btn-label-text {
        display: none !important; /* Hide text on mobile button */
    }

    /* Icon-Only Analyze Button on Mobile */
    .btn-primary.analyze-btn {
        padding: 4px 6px;
        font-size: 0;
        min-width: 26px;
        height: 26px;
        border-radius: var(--radius-full);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .btn-primary.analyze-btn svg {
        width: 13px;
        height: 13px;
        margin: 0;
    }

    .header-actions {
        gap: 2px;
        flex-shrink: 0;
    }

    .icon-btn {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    #drawer-toggle-btn {
        display: inline-flex !important;
    }

    /* 2. Swipeable Horizontal Sub-Toolbar Dropdowns */
    .header-sub-toolbar {
        padding: 2px 4px;
        gap: 3px;
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        border-radius: var(--radius-full);
        scrollbar-width: none;
    }

    .header-sub-toolbar::-webkit-scrollbar {
        display: none;
    }

    .toolbar-pill-group {
        font-size: 0.6rem;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 2px;
    }

    .pill-label {
        display: none !important; /* Hide "Map Layer:", "Predict:", "Rain Scenario:" text on mobile so all 3 dropdowns fit side-by-side */
    }

    .forecast-select {
        flex: 1;
        width: 100%;
        min-width: 0;
        padding: 2px 1px 2px 4px;
        font-size: 0.6rem;
        font-weight: 600;
        border-radius: var(--radius-full);
        text-align: center;
        text-overflow: ellipsis;
    }

    .custom-select-trigger {
        padding: 3px 6px;
        font-size: 0.65rem;
        gap: 2px;
    }

    .custom-select-options {
        min-width: 105px;
        padding: 4px;
    }

    .custom-select-option {
        padding: 6px 8px;
        font-size: 0.68rem;
    }

    .lbl-full {
        display: none !important;
    }

    .lbl-short {
        display: inline !important;
    }

    .toolbar-pill-group.feature-pill-group {
        padding: 2px 4px !important;
        gap: 4px !important;
        flex: 0 0 auto !important;
        justify-content: center !important;
        min-width: 0 !important;
    }

    .feature-opt-btn {
        padding: 3px 8px !important;
        font-size: 0.64rem !important;
        gap: 3px !important;
        height: 24px !important;
        border-radius: var(--radius-full) !important;
        flex: 0 0 auto !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }

    .feature-opt-btn .btn-icon {
        font-size: 0.78rem !important;
    }

    /* 3. Command Strip (Hidden on Mobile to Prevent Legend Overlap) */
    .floating-strip {
        display: none !important;
    }

    /* 4. Bottom Telemetry Sheet (Full View Swipeable Drawer) */
    .floating-drawer {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 85vh;
        border-radius: 18px 18px 0 0;
        padding: 4px 12px 16px 12px;
        gap: 8px;
        background: var(--bg-sheet-mobile, rgba(135, 160, 190, 0.40)) !important; /* High-translucency frosted glass matching top option pills */
        backdrop-filter: var(--blur-standard) !important;
        -webkit-backdrop-filter: var(--blur-standard) !important;
        border: 1px solid var(--glass-border) !important;
        color: var(--text-primary) !important;
        box-shadow: var(--glass-shadow);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1100 !important; /* Higher than legend */
        overflow-y: auto;
        transform: translateY(calc(100% - 44px)); /* Default peek state: 44px visible at bottom edge */
    }

    .floating-drawer.sheet-peek {
        transform: translateY(calc(100% - 44px)) !important;
    }

    .floating-drawer.sheet-half {
        transform: translateY(calc(100% - 48vh)) !important;
    }

    .floating-drawer.sheet-full {
        transform: translateY(0) !important;
    }

    .sheet-drag-handle {
        display: block !important;
        width: 38px;
        height: 4px;
        background: var(--sheet-handle-color, rgba(100, 116, 139, 0.5)) !important;
        border-radius: 9999px;
        margin: 2px auto 4px auto;
        cursor: pointer;
        flex-shrink: 0;
    }

    .sheet-summary-row {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 2px 4px 4px 4px;
        height: 30px;
        cursor: pointer;
        user-select: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        margin-bottom: 2px;
    }

    .summary-peek-left {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.75rem;
        color: var(--text-primary);
    }

    .summary-peek-right {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.68rem;
        color: var(--accent-cyan);
        font-weight: 600;
    }

    .panel-card {
        padding: 8px 10px;
        border-radius: 12px;
    }

    .panel-card h2 {
        font-size: 0.78rem;
        margin-bottom: 6px;
    }

    .risk-gauges-wrapper {
        gap: 6px;
    }

    .gauge-group {
        padding: 6px 4px;
    }

    .gauge-group h3 {
        font-size: 0.62rem;
        margin-bottom: 2px;
    }

    .gauge-container {
        width: 48px;
        height: 48px;
    }

    .gauge-center {
        font-size: 0.72rem;
    }

    .gauge-center .percent {
        font-size: 0.52rem;
    }

    .risk-level-badge {
        font-size: 0.58rem;
        font-weight: 800;
        padding: 3px 8px;
        margin-top: 2px;
        color: #ffffff !important;
        background: linear-gradient(135deg, #15803d, #047857) !important;
        border: 1px solid rgba(255, 255, 255, 0.45) !important;
        box-shadow: 0 2px 6px rgba(4, 120, 87, 0.4);
    }

    .confidence-meter {
        padding: 4px 8px;
        font-size: 0.68rem;
        margin-top: 4px;
    }

    /* Weather Telemetry Grid & Dam Cards */
    .weather-grid {
        gap: 4px;
    }

    .weather-item {
        padding: 5px 6px;
        border-radius: 8px;
        gap: 4px;
    }

    .w-icon {
        font-size: 1rem;
    }

    .w-label {
        font-size: 0.6rem;
    }

    .w-value {
        font-size: 0.72rem;
    }

    .tab-bar {
        padding: 2px;
    }

    .tab-btn {
        font-size: 0.65rem;
        padding: 3px 2px;
    }

    .dams-list, .alerts-list {
        max-height: 120px;
    }

    .dam-card, .alert-card {
        padding: 5px 6px;
        border-radius: 6px;
    }

    .dam-name, .alert-title {
        font-size: 0.72rem;
    }

    .contacts-grid {
        gap: 4px;
    }

    .contact-btn {
        padding: 5px 6px;
        font-size: 0.68rem;
    }

    /* 5. Leaflet Controls & Floating Map Legend */
    .evacuation-banner {
        top: 6px;
        padding: 4px 10px;
        font-size: 0.7rem;
        max-width: calc(100vw - 12px);
    }

    /* Base Map Layers Switcher Button (Small 32px Pill Positioned Under Top Trial Option) */
    .leaflet-control-layers {
        position: fixed !important;
        top: 84px !important;
        right: 14px !important;
        left: auto !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: var(--radius-full) !important;
        margin: 0 !important;
        padding: 0 !important;
        background: var(--bg-glass) !important;
        backdrop-filter: var(--blur-standard) !important;
        -webkit-backdrop-filter: var(--blur-standard) !important;
        border: 1px solid var(--glass-border) !important;
        box-shadow: var(--glass-shadow) !important;
        z-index: 1000 !important;
    }

    .leaflet-control-layers-toggle {
        width: 20px !important;
        height: 20px !important;
        background-size: 16px 16px !important;
        margin: 0 auto !important;
    }

    .leaflet-control-layers-expanded,
    .leaflet-control-layers-expanded:hover {
        position: fixed !important;
        top: 84px !important;
        right: 14px !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        padding: 8px 12px !important;
        font-size: 0.7rem !important;
        border-radius: var(--radius-md) !important;
        background: var(--bg-glass) !important;
        backdrop-filter: var(--blur-standard) !important;
        -webkit-backdrop-filter: var(--blur-standard) !important;
        color: var(--text-primary) !important;
        border: 1px solid var(--glass-border) !important;
        box-shadow: var(--glass-shadow) !important;
    }

    .leaflet-control-layers-expanded *,
    .leaflet-control-layers-expanded label,
    .leaflet-control-layers-expanded span,
    .leaflet-control-layers-selector + span {
        color: var(--text-primary) !important;
        font-size: 0.7rem !important;
        font-weight: 600 !important;
    }

    /* Hide Leaflet text attribution on mobile to avoid bleed behind peek bar */
    .leaflet-control-attribution {
        display: none !important;
    }

    /* Leaflet Left Controls Stack (Location, Zoom, & Scale Pill Positioned at Bottom Left Well Above Legend) */
    .leaflet-bottom.leaflet-left {
        bottom: 165px !important;
        left: 14px !important;
        gap: 8px !important;
        z-index: 1000 !important;
    }

    /* Circular Location Button matching mobile reference */
    .leaflet-control-locate,
    .leaflet-touch .leaflet-control-locate {
        width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
    }

    .leaflet-control-locate a,
    .leaflet-touch .leaflet-control-locate a,
    .leaflet-bar a.leaflet-control-locate-btn {
        width: 38px !important;
        height: 38px !important;
        line-height: 38px !important;
        font-size: 1.15rem !important;
        border-radius: 50% !important;
    }

    /* Rounded Capsule Zoom (+ / -) Control matching mobile reference */
    .leaflet-control-zoom,
    .leaflet-touch .leaflet-control-zoom {
        width: 38px !important;
        border-radius: 19px !important;
    }

    .leaflet-control-zoom a,
    .leaflet-touch .leaflet-control-zoom a {
        width: 38px !important;
        height: 32px !important;
        line-height: 32px !important;
    }

    /* Standalone Compass: Positioned cleanly beneath sub-toolbar at top left */
    .standalone-compass-container {
        top: 88px !important;
        bottom: auto !important;
        left: 14px !important;
        width: 58px !important;
        height: 58px !important;
        padding: 4px !important;
        border-radius: 50% !important;
        box-shadow: var(--glass-shadow) !important;
        z-index: 1000 !important;
    }

    .standalone-compass-container:active {
        transform: scale(0.94) !important;
    }

    .leaflet-control-scale-line {
        background: var(--bg-glass) !important;
        backdrop-filter: blur(12px) !important;
        border: 1px solid var(--glass-border) !important;
        color: var(--text-primary) !important;
        padding: 2px 6px !important;
        font-size: 0.62rem !important;
        border-radius: var(--radius-full) !important;
    }

    /* Map Legend Floating Centered Above Bottom Sheet Peek Bar */
    .info.legend.windy-legend {
        position: fixed !important;
        bottom: 54px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: calc(100vw - 16px) !important;
        max-width: 380px !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 4px 10px !important;
        font-size: 0.65rem !important;
    }

    /* 5. Mobile Landing / Monsoon Safety Guide Overlay (Compact & Scroll-Free Overflow Fix) */
    .landing-screen {
        padding: 8px !important;
    }

    .landing-container {
        padding: 16px 14px !important;
        gap: 14px !important;
        max-height: 94vh !important;
        border-radius: 18px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .landing-header {
        flex-direction: column !important;
        gap: 10px !important;
        padding-bottom: 12px !important;
    }

    .badge-pill {
        font-size: 0.65rem !important;
        padding: 3px 10px !important;
        margin-bottom: 4px !important;
    }

    .landing-title h1 {
        font-size: 1.12rem !important;
        line-height: 1.25 !important;
        margin-bottom: 4px !important;
    }

    .landing-title p {
        font-size: 0.76rem !important;
        line-height: 1.35 !important;
        color: #cbd5e1 !important;
    }

    .lang-switch-container {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }

    .lang-label {
        font-size: 0.72rem !important;
    }

    .lang-toggle-btn {
        padding: 2px !important;
    }

    .lang-opt {
        padding: 4px 10px !important;
        font-size: 0.72rem !important;
    }

    .close-landing-x {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.85rem !important;
    }

    .faq-grid {
        gap: 10px !important;
    }

    .faq-card {
        gap: 10px !important;
        padding: 12px !important;
        border-radius: 12px !important;
    }

    .faq-number {
        font-size: 0.9rem !important;
        min-width: 20px !important;
    }

    .faq-q {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
        margin-bottom: 4px !important;
    }

    .faq-a {
        font-size: 0.76rem !important;
        line-height: 1.4 !important;
    }

    .landing-footer {
        padding-top: 4px !important;
    }

    .landing-footer .cta-btn {
        width: 100% !important;
        padding: 10px 16px !important;
        font-size: 0.82rem !important;
        text-align: center !important;
    }
}

/* ==========================================================================
   Coastal Sea Level & Surge Monitor — All-India & Kerala Cross-Section
   Tactical Ocean Telemetry Console (Identical Dark Glass in Both Themes)
   ========================================================================== */

#tab-coastal,
.coastal-container {
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --bg-dark: #050811;
    --bg-glass-card: rgba(18, 28, 48, 0.72);
    --bg-glass-hover: rgba(30, 48, 80, 0.85);
    --bg-glass-inset: rgba(12, 20, 36, 0.78);
    --glass-border: rgba(255, 255, 255, 0.16);
    --glass-border-hover: rgba(56, 189, 248, 0.6);
    --accent-cyan: #38bdf8;
    --accent-blue: #0284c7;
    color: #f8fafc;
}

/* Light Mode Wrapper: Keeps the Sea Level Monitor in its signature sleek dark glass */
body.theme-white-glass #tab-coastal {
    background: rgba(8, 15, 29, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: var(--radius-md);
    padding: 10px 10px 12px 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

body.theme-white-glass .tab-btn[data-tab="tab-coastal"].active,
body.theme-white-glass #btn-tab-coastal.active {
    background: rgba(14, 25, 45, 0.9);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.coastal-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
    color: #f8fafc;
}

.coastal-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.coastal-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(12, 20, 36, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    flex: 1;
}

.coastal-pin-icon {
    font-size: 1.1rem;
}

.coastal-station-select {
    width: 100%;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    outline: none;
}

.coastal-station-select option {
    background: #0f172a;
    color: #f8fafc;
}

.coastal-controls {
    display: flex;
    gap: 6px;
}

.coastal-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(18, 28, 48, 0.72);
    color: #f8fafc;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.coastal-btn-icon:hover {
    background: rgba(30, 48, 80, 0.85);
    transform: scale(1.05);
}

/* Legend Pills */
.coastal-legend-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 600;
}

.legend-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    padding: 3px 9px;
    color: #cbd5e1;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-sea { background: #38bdf8; box-shadow: 0 0 6px #38bdf880; }
.dot-barrier { background: #ea580c; box-shadow: 0 0 6px #ea580c80; }
.dot-basin { background: #10b981; box-shadow: 0 0 6px #10b98180; }

/* Interactive Cross-Section Diagram */
.coastal-diagram-wrapper {
    position: relative;
    width: 100%;
    background: #080f1d;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

#coastal-cross-section-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 540 / 270;
}

/* Key Metrics Bar */
.coastal-metrics-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    background: rgba(8, 15, 29, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    text-align: center;
}

.c-metric-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.c-metric-lbl {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.c-metric-val {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

.c-metric-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
}

.status-badge-val {
    color: #f59e0b;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Breakdown Card */
.coastal-breakdown-card {
    background: rgba(18, 28, 48, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coastal-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 5px;
}

.breakdown-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    font-weight: 700;
    color: #cbd5e1;
}

.live-stream-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 2px 7px;
    border-radius: 9999px;
    letter-spacing: 0.04em;
}

.live-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.b-item {
    background: rgba(12, 20, 36, 0.78);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
}

.b-lbl {
    color: #94a3b8;
    font-weight: 500;
}

.b-val {
    color: #f8fafc;
    font-family: var(--font-mono);
    font-weight: 700;
}

.coastal-station-desc {
    font-size: 0.72rem;
    line-height: 1.4;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 6px;
}

/* AI 24h Prediction Card & Horizon Chart */
.coastal-prediction-card {
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: rgba(14, 23, 40, 0.82);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.coastal-prediction-card.station-loading {
    opacity: 0.72;
    border-color: rgba(56, 189, 248, 0.5);
}

.ai-forecast-badge {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.32);
    font-size: 0.65rem;
    padding: 1px 6px;
    letter-spacing: 0.03em;
}

.ai-pulse-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
    animation: livePulse 2s infinite ease-in-out;
}

.coastal-forecast-chart-container {
    background: rgba(8, 14, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 5px;
    padding: 2px 4px;
    margin: 2px 0;
    position: relative;
    height: 65px;
}

.coastal-forecast-chart {
    width: 100%;
    height: 65px;
    display: block;
    cursor: crosshair;
}

/* All-India Ticker Section */
.coastal-all-india-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
}

.all-india-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    font-weight: 700;
    color: #cbd5e1;
}

.all-india-count {
    font-size: 0.7rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 2px 7px;
    border-radius: 9999px;
    font-weight: 600;
}

.all-india-ticker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    max-height: 190px;
    overflow-y: auto;
    padding-right: 2px;
}

.ticker-card {
    background: rgba(12, 20, 36, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticker-card:hover {
    background: rgba(30, 48, 80, 0.85);
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.5);
}

.ticker-card.active {
    border-color: #38bdf8;
    background: rgba(2, 132, 199, 0.25);
}

.ticker-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 700;
    color: #f8fafc;
}

.ticker-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.ticker-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #94a3b8;
}

.ticker-val {
    font-family: var(--font-mono);
    font-weight: 700;
    color: #f8fafc;
}

.ticker-loading {
    font-size: 0.75rem;
    color: #94a3b8;
    grid-column: span 2;
    text-align: center;
    padding: 10px 0;
}

/* Responsive Sea Level & 3D Terrain adjustments for mobile & tablet screens */
@media (max-width: 600px) {
    .coastal-container {
        gap: 8px;
    }

    .coastal-header-row {
        gap: 6px;
    }

    .coastal-selector-wrapper {
        padding: 3px 8px;
    }

    .coastal-station-select {
        font-size: 0.8rem;
    }

    .coastal-legend-bar {
        gap: 4px;
        font-size: 0.68rem;
    }

    .legend-pill {
        padding: 2px 7px;
    }

    .coastal-metrics-bar {
        padding: 8px 6px;
        gap: 4px;
    }

    .c-metric-lbl {
        font-size: 0.60rem;
    }

    .c-metric-val {
        font-size: 0.95rem;
    }

    .c-metric-sub {
        font-size: 0.58rem;
    }

    .coastal-breakdown-card {
        padding: 8px 8px;
        gap: 6px;
    }

    .breakdown-title {
        font-size: 0.72rem;
    }

    .b-item {
        padding: 4px 6px;
        font-size: 0.68rem;
    }

    .b-lbl {
        font-size: 0.62rem;
    }

    .b-val {
        font-size: 0.68rem;
    }

    .coastal-meta-row {
        font-size: 0.62rem;
    }

    .coastal-station-desc {
        font-size: 0.66rem;
    }

    .all-india-header {
        font-size: 0.72rem;
    }

    .all-india-ticker {
        gap: 4px;
        max-height: 160px;
    }

    .ticker-card {
        padding: 5px 6px;
    }

    .ticker-card-top {
        font-size: 0.68rem;
    }

    .ticker-badge {
        font-size: 0.58rem;
        padding: 1px 4px;
    }

    .ticker-card-bottom {
        font-size: 0.62rem;
    }
}

@media (max-width: 480px) {
    .toolbar-pill-group.feature-pill-group {
        padding: 2px 3px !important;
        gap: 2px !important;
        flex: 0 0 auto !important;
    }

    .feature-opt-btn {
        padding: 2px 6px !important;
        font-size: 0.58rem !important;
        height: 22px !important;
        gap: 2px !important;
        flex: 0 0 auto !important;
    }

    .feature-opt-btn .btn-icon {
        font-size: 0.70rem !important;
    }

    .coastal-metrics-bar {
        padding: 6px 4px;
        gap: 3px;
    }

    .c-metric-lbl {
        font-size: 0.56rem;
    }

    .c-metric-val {
        font-size: 0.88rem;
    }

    .c-metric-sub {
        font-size: 0.54rem;
    }

    .leaflet-bottom.leaflet-left {
        bottom: 160px !important;
        left: 12px !important;
        gap: 7px !important;
    }

    .standalone-compass-container {
        top: 86px !important;
        bottom: auto !important;
        left: 12px !important;
        width: 56px !important;
        height: 56px !important;
        padding: 3px !important;
    }
}





