/* ==========================================================================
   Tactical Radar & Disaster Dashboard Stylesheet
   Koko Huang Disaster Watch · disaster.kokohuang.id
   ========================================================================== */

:root {
    --bg-base: #06090e;
    --bg-surface: #0c121d;
    --bg-card: rgba(16, 24, 38, 0.85);
    --bg-card-hover: rgba(22, 34, 53, 0.95);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(56, 189, 248, 0.25);
    --border-active: rgba(56, 189, 248, 0.7);
    
    --text-main: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-cyan: #38bdf8;
    --accent-blue: #0284c7;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --shadow-tactical: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
    --glow-cyan: 0 0 16px rgba(56, 189, 248, 0.35);
    --glow-red: 0 0 20px rgba(239, 68, 68, 0.5);
}

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 14px;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* --------------------------------------------------------------------------
   Tactical Header
   -------------------------------------------------------------------------- */
.tactical-header {
    height: 58px;
    background: linear-gradient(180deg, rgba(12, 18, 29, 0.98) 0%, rgba(8, 12, 20, 0.95) 100%);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 1000;
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radar-pulse-dot {
    width: 12px;
    height: 12px;
    background-color: var(--accent-red);
    border-radius: 50%;
    box-shadow: var(--glow-red);
    position: relative;
}

.radar-pulse-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid var(--accent-red);
    border-radius: 50%;
    animation: radar-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radar-ping {
    0% { transform: scale(0.8); opacity: 1; }
    80%, 100% { transform: scale(2.2); opacity: 0; }
}

.app-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.badge-live {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.06em;
}

.app-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.header-metrics {
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.chip-label {
    color: var(--text-muted);
}

.chip-value {
    font-weight: 600;
    color: var(--text-main);
}

.text-red { color: var(--accent-red); }
.text-amber { color: var(--accent-amber); }
.text-green { color: var(--accent-green); }

.btn-tactical-refresh {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--border-medium);
    color: var(--accent-cyan);
    padding: 7px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-tactical-refresh:hover {
    background: rgba(56, 189, 248, 0.25);
    box-shadow: var(--glow-cyan);
    transform: rotate(45deg);
}

.btn-header-emergency {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(220, 38, 38, 0.35) 100%);
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #fca5a5;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
    white-space: nowrap;
}

.btn-header-emergency:hover {
    background: rgba(239, 68, 68, 0.45);
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
    transform: scale(0.97);
}

.pulse-red-dot {
    width: 7px;
    height: 7px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: pulseDot 1.5s infinite;
}

/* --------------------------------------------------------------------------
   Workspace Layout (Split Panel & Map)
   -------------------------------------------------------------------------- */
.workspace-layout {
    display: flex;
    flex: 1;
    height: calc(100% - 58px);
    position: relative;
    overflow: hidden;
}

/* Left Telemetry Panel */
.telemetry-panel {
    width: 415px;
    max-width: 440px;
    height: 100%;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 500;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.panel-header-mobile {
    display: none;
    padding: 10px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    cursor: pointer;
}

.panel-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) transparent;
}

.panel-scroll-content::-webkit-scrollbar {
    width: 5px;
}

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

/* --------------------------------------------------------------------------
   Tactical Cards
   -------------------------------------------------------------------------- */
.tactical-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    position: relative;
    backdrop-filter: blur(8px);
    transition: border-color 0.2s ease;
}

.tactical-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.card-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-cyan);
}

.card-sub-info {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.card-instruction {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Volcano Picker Card & Controls */
.header-volcano-dropdown {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

.header-volcano-dropdown option {
    background: #0c121d;
    color: #ffffff;
}

.volcano-picker-card {
    background: linear-gradient(180deg, rgba(16, 24, 38, 0.95) 0%, rgba(12, 18, 29, 0.98) 100%);
    border-color: rgba(56, 189, 248, 0.25);
}

.volcano-status-pill {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 2px 8px;
    border-radius: 4px;
}

.volcano-dropdown-wrap {
    margin-bottom: 8px;
}

.tactical-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 10px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.tactical-select:hover, .tactical-select:focus {
    border-color: var(--accent-cyan);
}

.tactical-select option {
    background: #0c121d;
    color: #ffffff;
}

/* Quick Volcano 1-Tap Pills */
.volcano-quick-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 10px;
    scrollbar-width: none;
}

.volcano-quick-pills::-webkit-scrollbar {
    display: none;
}

.volcano-pill-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.volcano-pill-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--border-medium);
}

.volcano-pill-btn.active {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.v-pill-icon {
    font-size: 0.9rem;
}

.v-pill-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
}

.v-pill-lvl {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}

.level-awas {
    background: rgba(239, 68, 68, 0.25);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.level-siaga {
    background: rgba(249, 115, 22, 0.25);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.4);
}

.level-waspada {
    background: rgba(245, 158, 11, 0.25);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.level-normal {
    background: rgba(16, 185, 129, 0.25);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Volcano Meta Strip */
.volcano-meta-strip {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}

.vmeta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vmeta-label {
    font-size: 0.62rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.vmeta-val {
    font-size: 0.72rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Telemetry Grid */
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 12px;
}

.telemetry-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 9px 8px;
}

.highlight-ash-box {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

.highlight-ash-box .compass-arrow {
    color: #ef4444;
}

.hud-sub {
    font-size: 0.64rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
    font-weight: 500;
}

.box-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.box-value-group {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.compass-arrow {
    display: inline-block;
    font-size: 1.1rem;
    color: var(--accent-cyan);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.box-value {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
}

.box-unit {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.box-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.wind-altitude-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Ash Vector Summary */
.ash-vector-summary {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid var(--accent-red);
    padding: 10px 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.vector-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 4px;
}

.vector-headline {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.vector-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

/* Altitude Selector */
.altitude-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.btn-alt-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 6px;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all 0.2s ease;
}

.btn-alt-tab:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: var(--border-medium);
}

.btn-alt-tab.active {
    background: rgba(56, 189, 248, 0.18);
    border-color: var(--accent-cyan);
    box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.2);
}

.btn-alt-tab .alt-val {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
}

.btn-alt-tab .alt-sub {
    font-size: 0.62rem;
    color: var(--text-muted);
}

.btn-alt-tab.active .alt-sub {
    color: var(--accent-cyan);
}

/* Timeline Controls */
.timeline-card {
    background: linear-gradient(180deg, rgba(16, 24, 38, 0.9) 0%, rgba(12, 18, 29, 0.95) 100%);
}

.timeline-step-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.timeline-slider-wrap {
    margin: 8px 0;
}

#forecast-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#forecast-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    cursor: pointer;
    border: 2px solid #ffffff;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.timeline-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-playback {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-playback:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--border-medium);
}

.timeline-timestamp-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* City Impact List */
.city-impact-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.city-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s ease;
}

.city-item.threat-critical {
    border-color: rgba(239, 68, 68, 0.7);
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.city-item.threat-approaching {
    border-color: rgba(249, 115, 22, 0.6);
    background: rgba(249, 115, 22, 0.14);
}

.city-item.threat-high {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

.city-item.threat-medium {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

.status-critical {
    color: #ef4444;
    font-weight: 700;
}

.status-approaching {
    color: #f97316;
    font-weight: 700;
}

.city-info-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.city-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.city-dist-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
}

.city-status-col {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.city-eta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
}

.city-status-text {
    font-size: 0.65rem;
    font-weight: 600;
}

.status-in-path {
    color: var(--accent-red);
}

.status-caution {
    color: var(--accent-amber);
}

.status-clear {
    color: var(--accent-green);
}

/* --------------------------------------------------------------------------
   Volcanic Ash Thickness & Ground Deposit Scale Card
   -------------------------------------------------------------------------- */
.thickness-card {
    background: linear-gradient(180deg, rgba(20, 26, 38, 0.92) 0%, rgba(12, 18, 29, 0.96) 100%);
    border: 1px solid var(--border-medium);
}

.thickness-pill-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 7px;
    border-radius: 4px;
}

.thickness-intro {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.35;
    margin: 6px 0 12px 0;
}

.thickness-levels-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.thickness-level-row {
    display: flex;
    gap: 10px;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.thickness-level-row:hover {
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.04);
}

.t-badge-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 4px 6px;
    border-radius: 6px;
    flex-shrink: 0;
    text-align: center;
}

.t-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

.t-mm {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 900;
    margin-top: 2px;
}

.t-info-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.t-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
}

.t-impact {
    font-size: 0.68rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.t-action {
    font-size: 0.67rem;
    color: #cbd5e1;
    line-height: 1.3;
    margin-top: 2px;
}

/* Level Color Themes */
.level-trace {
    border-color: rgba(234, 179, 8, 0.3);
}
.level-trace .t-badge-col {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #facc15;
}

.level-light {
    border-color: rgba(249, 115, 22, 0.35);
}
.level-light .t-badge-col {
    background: rgba(249, 115, 22, 0.18);
    border: 1px solid rgba(249, 115, 22, 0.45);
    color: #fb923c;
}

.level-moderate {
    border-color: rgba(239, 68, 68, 0.4);
}
.level-moderate .t-badge-col {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.level-heavy {
    border-color: rgba(168, 85, 247, 0.45);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
}
.level-heavy .t-badge-col {
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid #ef4444;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.air-quality-ref-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}

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

.ref-label {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.ref-val {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-amber);
}

/* City Item Thickness Badge */
.city-thickness-badge {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.city-thickness-badge.thick-critical {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.city-thickness-badge.thick-moderate {
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: #fdba74;
}

.city-thickness-badge.thick-light {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #fef08a;
}

.city-thickness-badge.thick-trace {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
}

.btn-jump-thickness {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-cyan);
    text-decoration: none;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 7px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-jump-thickness:hover {
    background: var(--accent-cyan);
    color: #0b1120;
}

/* --------------------------------------------------------------------------
   Emergency Contacts & Hotline Card
   -------------------------------------------------------------------------- */
.emergency-card {
    background: linear-gradient(180deg, rgba(30, 16, 23, 0.85) 0%, rgba(12, 18, 29, 0.95) 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.08);
    position: relative;
    overflow: hidden;
}

.emergency-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444);
}

.emergency-title-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.emergency-pulse-badge {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    animation: pulseEmergencyBadge 2s infinite ease-in-out;
}

@keyframes pulseEmergencyBadge {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
    50% { opacity: 0.75; box-shadow: 0 0 16px rgba(239, 68, 68, 0.6); }
}

.emergency-tollfree-pill {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.emergency-card-desc {
    font-size: 0.73rem;
    color: var(--text-secondary);
    line-height: 1.35;
    margin: 8px 0 10px 0;
}

/* Hero Universal Emergency 112 Banner */
.emergency-hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.28) 0%, rgba(185, 28, 28, 0.12) 100%);
    border: 2px solid #ef4444;
    border-radius: 10px;
    padding: 12px 14px;
    text-decoration: none;
    margin-bottom: 12px;
    box-shadow: 0 4px 18px rgba(239, 68, 68, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.emergency-hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
    transform: rotate(25deg);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.emergency-hero-banner:hover {
    transform: translateY(-2px);
    border-color: #f87171;
    box-shadow: 0 8px 26px rgba(239, 68, 68, 0.45);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.36) 0%, rgba(185, 28, 28, 0.18) 100%);
}

.emergency-hero-banner:hover::after {
    transform: rotate(25deg) translate(30%, 30%);
}

.hero-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.hero-num-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.hero-icon {
    font-size: 1.55rem;
    animation: heroIconPulse 1.8s infinite ease-in-out;
}

@keyframes heroIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.hero-number {
    font-family: var(--font-mono);
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 0 16px rgba(239, 68, 68, 0.85);
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hero-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
    line-height: 1.25;
}

.hero-sub {
    font-size: 0.68rem;
    color: #fca5a5;
    line-height: 1.3;
}

.hero-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    padding: 9px 13px;
    border-radius: 7px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.55);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.emergency-hero-banner:hover .hero-call-btn {
    background: #dc2626;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.8);
    transform: scale(1.04);
}

/* Detailed Service Hotlines List */
.emergency-services-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.emergency-service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.emergency-service-row:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.svc-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.svc-num {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    width: 38px;
    flex-shrink: 0;
    text-align: center;
}

.svc-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.svc-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.2;
}

.svc-desc {
    font-size: 0.67rem;
    color: var(--text-secondary);
    line-height: 1.25;
}

.svc-call-btn {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 5px;
    flex-shrink: 0;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* Row Specific Themes */
.row-bnpb {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.03) 100%);
    border-color: rgba(245, 158, 11, 0.35);
}
.row-bnpb .svc-num { color: #fbbf24; text-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
.row-bnpb .svc-call-btn {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}
.row-bnpb:hover { border-color: #f59e0b; }
.row-bnpb:hover .svc-call-btn {
    background: #f59e0b;
    color: #0b1120;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.row-basarnas {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(14, 165, 233, 0.03) 100%);
    border-color: rgba(56, 189, 248, 0.35);
}
.row-basarnas .svc-num { color: #38bdf8; text-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
.row-basarnas .svc-call-btn {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}
.row-basarnas:hover { border-color: #38bdf8; }
.row-basarnas:hover .svc-call-btn {
    background: #38bdf8;
    color: #0b1120;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.row-kemenkes {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.03) 100%);
    border-color: rgba(16, 185, 129, 0.35);
}
.row-kemenkes .svc-num { color: #34d399; text-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.row-kemenkes .svc-call-btn {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.row-kemenkes:hover { border-color: #10b981; }
.row-kemenkes:hover .svc-call-btn {
    background: #10b981;
    color: #0b1120;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.row-polri {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(147, 51, 234, 0.03) 100%);
    border-color: rgba(168, 85, 247, 0.35);
}
.row-polri .svc-num { color: #c084fc; text-shadow: 0 0 10px rgba(168, 85, 247, 0.4); }
.row-polri .svc-call-btn {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
    color: #c084fc;
}
.row-polri:hover { border-color: #a855f7; }
.row-polri:hover .svc-call-btn {
    background: #a855f7;
    color: #0b1120;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.row-damkar {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(234, 88, 12, 0.03) 100%);
    border-color: rgba(249, 115, 22, 0.35);
}
.row-damkar .svc-num { color: #fb923c; text-shadow: 0 0 10px rgba(249, 115, 22, 0.4); }
.row-damkar .svc-call-btn {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.4);
    color: #fb923c;
}
.row-damkar:hover { border-color: #f97316; }
.row-damkar:hover .svc-call-btn {
    background: #f97316;
    color: #0b1120;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.6);
}

/* Local Section */
.emergency-local-section {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 12px;
}

.local-sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.local-sec-badge {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.local-sec-volcano {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--accent-amber);
}

.local-contacts-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.local-contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.local-contact-row:last-child {
    border-bottom: none;
}

.local-row-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.l-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    flex-shrink: 0;
}

.badge-pga {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.badge-pvmbg {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.badge-bmkg {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
    color: #c084fc;
}

.l-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.l-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.l-sub {
    font-size: 0.64rem;
    color: var(--text-muted);
}

.local-phone-link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent-cyan);
    text-decoration: none;
    white-space: nowrap;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.local-phone-link:hover {
    background: var(--accent-cyan);
    color: #0b1120;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.emergency-footnote {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.emergency-footnote strong {
    color: #34d399;
}

/* Card Flash Animation on Jump */
@keyframes emergencyHighlight {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.9); border-color: #ef4444; transform: scale(1); }
    30% { box-shadow: 0 0 35px 8px rgba(239, 68, 68, 0.65); border-color: #fca5a5; transform: scale(1.02); }
    100% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.4); transform: scale(1); }
}

.card-highlight-pulse {
    animation: emergencyHighlight 1.6s ease-out;
}

/* --------------------------------------------------------------------------
   Dedicated Emergency Modal (Fast 1-Tap Access for Mobile & Desktop)
   -------------------------------------------------------------------------- */
.emergency-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 8, 16, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.emergency-modal-overlay.is-active {
    display: flex;
    opacity: 1;
}

.emergency-modal-dialog {
    background: linear-gradient(180deg, #181d28 0%, #0d131f 100%);
    border: 2px solid #ef4444;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 32px rgba(239, 68, 68, 0.35);
    overflow: hidden;
    transform: scale(0.94);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.emergency-modal-overlay.is-active .emergency-modal-dialog {
    transform: scale(1);
}

.modal-emergency-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.16);
    border-bottom: 1px solid rgba(239, 68, 68, 0.35);
    flex-shrink: 0;
}

.modal-emergency-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.modal-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: modalDotPulse 1.5s infinite;
    flex-shrink: 0;
}

@keyframes modalDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.modal-emergency-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.3px;
    line-height: 1.25;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.btn-close-modal:hover, .btn-close-modal:active {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.modal-emergency-body {
    padding: 14px 16px 20px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Health Advisory */
.advisory-card {
    background: rgba(16, 24, 38, 0.6);
}

.advisory-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.advisory-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.advisory-list strong {
    color: var(--text-main);
}

.adv-icon {
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* Panel Footer */
.panel-footer {
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.panel-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.panel-footer a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Map Viewport & HUD Overlays
   -------------------------------------------------------------------------- */
.map-viewport-wrapper {
    flex: 1;
    position: relative;
    height: 100%;
}

.radar-map {
    width: 100%;
    height: 100%;
    background-color: #06090e;
}

/* Quick HUD Overlay */
.map-quick-hud {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    pointer-events: none;
}

.hud-item {
    background: rgba(12, 18, 29, 0.85);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-tactical);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: auto;
}

.hud-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.hud-val {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 24px;
    right: 16px;
    z-index: 1000;
    background: rgba(12, 18, 29, 0.88);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.72rem;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-header {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 2px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.legend-box.plume-core-color {
    width: 14px;
    height: 10px;
    background: rgba(239, 68, 68, 0.6);
    border: 1.5px solid #ef4444;
}

.legend-box.plume-extended-color {
    width: 14px;
    height: 10px;
    background: rgba(239, 68, 68, 0.16);
    border: 1px dashed #ef4444;
}

.legend-line.plume-centerline-color {
    width: 14px;
    height: 2px;
    background: #fef08a;
    box-shadow: 0 0 4px #fef08a;
}

.legend-box.plume-color {
    width: 14px;
    height: 10px;
    background: rgba(239, 68, 68, 0.4);
    border: 1px dashed #ef4444;
}

.legend-circle.volcano-color {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 6px #ef4444;
}

.legend-line.ring-color {
    width: 14px;
    height: 2px;
    background: rgba(56, 189, 248, 0.5);
}

.legend-dot.city-color {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
}

/* --------------------------------------------------------------------------
   Custom Leaflet Marker Styles
   -------------------------------------------------------------------------- */
.volcano-marker-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.volcano-marker-icon {
    font-size: 1.4rem;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8));
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.volcano-pulse-ring {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 2px solid var(--accent-red);
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

.city-custom-marker {
    background: rgba(12, 18, 29, 0.85);
    border: 1px solid var(--border-medium);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Range Ring Tooltip */
.range-ring-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: rgba(56, 189, 248, 0.8) !important;
    font-family: var(--font-mono) !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
}

/* --------------------------------------------------------------------------
   Responsive Layout (Mobile & Tablet)
   -------------------------------------------------------------------------- */
/* Floating Action Buttons Group (Emergency Call + Recenter) */
.map-floating-actions {
    position: absolute;
    bottom: 30px;
    left: 16px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    align-items: center;
}

.map-floating-btn {
    background: rgba(12, 18, 29, 0.9);
    border: 1px solid var(--border-medium);
    color: #ffffff;
    border-radius: var(--radius-sm);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-tactical);
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.btn-floating-recenter:hover, .btn-floating-recenter:active {
    background: rgba(56, 189, 248, 0.25);
    border-color: var(--accent-cyan);
    transform: scale(0.96);
}

.btn-floating-emergency {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(12, 18, 29, 0.9) 100%);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fca5a5;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.3);
}

.btn-floating-emergency:hover, .btn-floating-emergency:active {
    background: rgba(239, 68, 68, 0.5);
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    transform: scale(0.96);
}

@media (max-width: 860px) {
    .workspace-layout {
        position: relative;
        flex-direction: column;
        height: calc(100% - 58px);
    }

    /* Map occupies 100% full screen background on mobile */
    .map-viewport-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    /* Interactive Bottom Sheet Drawer */
    .telemetry-panel {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 78px; /* Peek state */
        background: rgba(12, 18, 29, 0.96);
        border-top: 1px solid var(--border-medium);
        border-radius: 18px 18px 0 0;
        z-index: 1100;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(16px);
        transition: height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        overflow: hidden;
    }

    .telemetry-panel.is-expanded {
        height: 82vh; /* Expanded state */
    }

    /* Grab Handle Bar & Peek Header */
    .panel-header-mobile {
        display: flex;
        flex-direction: column;
        padding: 6px 14px 10px 14px;
        background: transparent;
        border-bottom: 1px solid var(--border-subtle);
        cursor: pointer;
        user-select: none;
        touch-action: pan-y;
        position: relative;
    }

    .sheet-handle-bar {
        width: 38px;
        height: 4px;
        background: rgba(255, 255, 255, 0.35);
        border-radius: 2px;
        margin: 2px auto 8px auto;
    }

    .sheet-peek-main {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
    }

    .sheet-peek-info {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
        flex: 1;
    }

    .peek-volcano-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .peek-v-name {
        font-weight: 700;
        font-size: 0.9rem;
        color: #ffffff;
    }

    .peek-v-badge {
        font-family: var(--font-mono);
        font-size: 0.62rem;
        font-weight: 700;
        background: rgba(239, 68, 68, 0.2);
        color: var(--accent-red);
        border: 1px solid rgba(239, 68, 68, 0.4);
        padding: 1px 6px;
        border-radius: 4px;
    }

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

    .peek-threat-text {
        color: var(--accent-amber);
        font-weight: 600;
    }

    .peek-dot {
        color: var(--text-muted);
    }

    .sheet-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .btn-peek-emergency {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: #ffffff;
        font-size: 0.7rem;
        font-weight: 800;
        padding: 6px 10px;
        border-radius: 6px;
        border: 1px solid #f87171;
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
        cursor: pointer;
        letter-spacing: 0.3px;
        animation: peekEmergencyPulse 2s infinite ease-in-out;
        white-space: nowrap;
    }

    @keyframes peekEmergencyPulse {
        0%, 100% { box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
        50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.85); }
    }

    .btn-toggle-panel {
        position: static;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid var(--border-subtle);
        color: #ffffff;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }

    .telemetry-panel.is-expanded .btn-toggle-panel {
        transform: rotate(180deg);
    }

    /* Scrollable Sheet Body */
    .panel-scroll-content {
        height: calc(82vh - 78px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px 14px 40px 14px;
    }

    /* Floating Actions above the bottom sheet */
    .map-floating-actions {
        bottom: 92px;
        left: 10px;
        gap: 6px;
    }

    .map-floating-btn {
        padding: 7px 11px;
        font-size: 0.72rem;
    }

    /* Reposition HUD & Legend on mobile */
    .map-quick-hud {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    .hud-item {
        padding: 6px 8px;
    }

    .hud-val {
        font-size: 0.85rem;
    }

    .map-legend {
        bottom: 92px;
        right: 12px;
        padding: 6px 8px;
        font-size: 0.65rem;
    }

    /* Enlarge Touch Targets */
    .btn-alt-tab {
        min-height: 48px;
    }

    .timeline-scrubber {
        height: 12px;
    }

    .timeline-scrubber::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
    }

    .timeline-scrubber::-moz-range-thumb {
        width: 26px;
        height: 26px;
    }

    .volcano-pill-btn {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .tactical-header {
        padding: 0 10px;
    }

    .app-title {
        font-size: 0.88rem;
    }

    .app-subtitle {
        display: none;
    }

    .metric-chip.volcano-chip {
        padding: 3px 6px;
    }

    .header-volcano-dropdown {
        font-size: 0.7rem;
        max-width: 105px;
    }

    .btn-header-emergency {
        padding: 5px 8px;
        font-size: 0.65rem;
    }

    .emergency-hero-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .hero-call-btn {
        justify-content: center;
        width: 100%;
        padding: 10px;
        font-size: 0.84rem;
    }

    .emergency-service-row {
        padding: 8px 10px;
    }

    .svc-num {
        font-size: 1.25rem;
        width: 34px;
    }

    .svc-name {
        font-size: 0.74rem;
    }

    .svc-call-btn {
        padding: 5px 8px;
        font-size: 0.66rem;
    }

    .hide-mobile {
        display: none !important;
    }

    .map-legend {
        display: none;
    }
}

/* Leaflet Dark Tactical Overrides */
.leaflet-control-layers {
    background: rgba(12, 18, 29, 0.92) !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: var(--radius-sm) !important;
    color: #f1f5f9 !important;
    box-shadow: var(--shadow-tactical) !important;
    font-family: var(--font-sans) !important;
    font-size: 0.75rem !important;
}

.leaflet-control-layers-expanded {
    padding: 8px 12px !important;
}

.leaflet-control-layers-toggle {
    background-color: rgba(12, 18, 29, 0.9) !important;
    border-radius: var(--radius-sm) !important;
}

.leaflet-bar a {
    background-color: rgba(12, 18, 29, 0.9) !important;
    color: #38bdf8 !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

.leaflet-bar a:hover {
    background-color: rgba(56, 189, 248, 0.2) !important;
    color: #ffffff !important;
}

