﻿/* ============================================
   DJI Mission Planner — Design System
   ============================================ */

:root {
    /* Color Palette — High-contrast tactical dark theme */
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --bg-card: rgba(15, 23, 42, 0.9);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --bg-glass: rgba(2, 6, 23, 0.85);
    
    --border-subtle: rgba(148, 163, 184, 0.1);
    --border-active: rgba(56, 189, 248, 0.35);
    --border-glow: rgba(56, 189, 248, 0.6);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #38bdf8;
    
    --accent-blue: #0ea5e9;
    --accent-blue-dim: rgba(14, 165, 233, 0.15);
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-violet: #8b5cf6;
    
    --gradient-blue: linear-gradient(135deg, #0ea5e9, #38bdf8);
    --gradient-mission: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 50%, #10b981 100%);
    --gradient-3d: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    --gradient-crosshatch: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-poi: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 15px rgba(56, 189, 248, 0.15);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --sidebar-width: 380px;
    --topbar-height: 56px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99, 130, 180, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 130, 180, 0.35); }

/* ============================================
   Top Bar
   ============================================ */
#top-bar {
    height: var(--topbar-height);
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: relative;
    z-index: 100;
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-md);
    gap: 16px;
}

.top-bar-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.logo-area { display: flex; align-items: center; gap: 14px; }

.logo-icon {
    width: 32px; height: 32px;
    background: var(--gradient-blue);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: #020617;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}
.logo-icon svg { width: 20px; height: 20px; }

.logo-area h1 {
    font-size: 18px; font-weight: 800; letter-spacing: -0.02em;
    background: var(--gradient-blue);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.subtitle { display: block; font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: -2px; }

.top-bar-actions { display: flex; align-items: center; gap: 20px; }

.coord-display {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-mono); font-size: 12px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.2);
}
.coord-label { color: var(--text-muted); font-weight: 700; font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; }
.coord-value { color: var(--accent-cyan); min-width: 90px; font-weight: 500; }
.coord-elev {
    color: var(--accent-amber); font-size: 11px; min-width: 60px; font-weight: 600;
    padding-left: 10px; border-left: 1px solid var(--border-subtle);
}

.btn-ghost {
    display: flex; align-items: center; gap: 8px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans); font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-ghost svg { width: 16px; height: 16px; }

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-active);
    color: var(--text-primary);
}

/* Set Home — green accent when set */
#btn-set-home:hover { border-color: var(--accent-emerald); color: var(--accent-emerald); background: rgba(52, 211, 153, 0.08); }
#btn-set-home.home-active {
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    background: rgba(52, 211, 153, 0.1);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.15);
}

/* Clear — red danger state */
#btn-clear-mission:hover {
    border-color: var(--accent-rose); color: var(--accent-rose);
    background: rgba(251, 113, 133, 0.08);
}

/* ============================================
   Main Layout
   ============================================ */
#app-layout { display: flex; height: calc(100vh - var(--topbar-height)); }

/* ============================================
   Sidebar
   ============================================ */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column; gap: 2px;
    position: relative;
}

/* Scroll fade hint at bottom */
#sidebar::after {
    content: '';
    position: sticky;
    bottom: 0; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--bg-secondary));
    pointer-events: none;
    flex-shrink: 0;
}

.panel { 
    padding: 20px; 
    border-bottom: 1px solid var(--border-subtle); 
    transition: var(--transition-normal);
}

.panel:hover {
    background: rgba(255, 255, 255, 0.01);
}

.panel-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 700;
    letter-spacing: -0.01em; color: var(--text-primary); margin-bottom: 4px;
}
.panel-title svg { width: 18px; height: 18px; color: var(--accent-blue); }

.panel-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
}

/* ============================================
   Preset Grid — Mission Selection
   ============================================ */
.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* Preset Category Headers */
.preset-category {
    grid-column: 1 / -1;
}

.preset-category-header {
    display: flex; align-items: center; gap: 8px;
    width: 100%;
    padding: 7px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-sans); font-size: 11px; font-weight: 600;
    cursor: pointer; transition: var(--transition-fast);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.preset-category-header:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}
.preset-category-header.active {
    color: var(--text-primary);
}
.cat-color {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.survey-color { background: var(--accent-blue); }
.threeD-color { background: var(--accent-violet); }
.inspect-color { background: var(--accent-emerald); }
.creative-color { background: var(--accent-amber); }
.cat-label { flex: 1; text-align: left; }
.cat-arrow {
    font-size: 10px; transition: transform 0.2s; color: var(--text-muted);
}

/* Preset category items — collapsible container */
.preset-category-items {
    display: contents; /* items flow into the parent grid */
}
.preset-category-items.collapsed {
    display: none;
}

/* Onboarding Overlay */
.onboarding-overlay {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
    pointer-events: none;
    animation: fadeIn 0.8s ease 1s both;
}
.onboarding-card {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: var(--radius-xl);
    padding: 32px 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.onboarding-icon {
    width: 56px; height: 56px; margin: 0 auto 16px;
    background: var(--gradient-blue);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}
.onboarding-icon svg { width: 32px; height: 32px; color: #fff; }
.onboarding-card h3 {
    font-size: 18px; font-weight: 700; color: #fff;
    margin-bottom: 8px;
}
.onboarding-card p {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.6; margin-bottom: 16px;
}
.onboarding-steps {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 12px; font-weight: 600;
}
.ob-step {
    padding: 4px 10px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 20px;
    color: var(--accent-blue);
}
.ob-arrow { color: var(--text-muted); font-size: 14px; }
.onboarding-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

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

.preset-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    text-align: left;
}

/* Category color indicators (left border) */
.preset-btn[data-preset^="ortho_"],
.preset-btn[data-preset="corridor"],
.preset-btn[data-preset="inspect_roof"] { border-left-color: var(--accent-blue); }

.preset-btn[data-preset^="gs_"],
.preset-btn[data-preset="double_helix"],
.preset-btn[data-preset="inspect_tower"],
.preset-btn[data-preset="inspect_mast"] { border-left-color: var(--accent-violet); }

.preset-btn[data-preset^="splat_"],
.preset-btn[data-preset="crosshatch_urban"] { border-left-color: var(--accent-rose); }

.preset-btn[data-preset="panorama_360"],
.preset-btn[data-preset="hyperlapse"],
.preset-btn[data-preset="free_waypoint"] { border-left-color: var(--accent-amber); }

.preset-btn::before {
    content: '';
    position: absolute; inset: 0;
    opacity: 0; transition: var(--transition-normal);
    border-radius: inherit;
    background: var(--gradient-blue);
}

.preset-btn:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}
.preset-btn:hover::before { opacity: 0.05; }

/* Press feedback */
.preset-btn:active {
    transform: scale(0.97);
    transition-duration: 50ms;
}

.preset-btn.active {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
}
.preset-btn.active::before { opacity: 0.08; }
.preset-btn.active .preset-name { color: var(--text-primary); }

/* Preset-specific active colors */
.preset-btn[data-preset^="gs_"].active,
.preset-btn[data-preset="double_helix"].active {
    border-color: var(--accent-violet);
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.2);
}
.preset-btn[data-preset^="gs_"].active::before { background: var(--gradient-3d); }

.preset-btn[data-preset^="splat_"].active,
.preset-btn[data-preset="crosshatch_urban"].active {
    border-color: var(--accent-rose);
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.2);
}

.preset-btn[data-preset="panorama_360"].active,
.preset-btn[data-preset="hyperlapse"].active {
    border-color: var(--accent-amber);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}
.preset-btn[data-preset="poi_inspect"].active::before { background: var(--gradient-poi); }

.preset-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    position: relative; z-index: 1;
}
.preset-icon svg { width: 28px; height: 28px; transition: var(--transition-normal); }
.preset-btn.active .preset-icon svg { filter: drop-shadow(0 0 4px var(--accent-blue)); }
.preset-btn[data-preset="splat_small"].active .preset-icon svg,
.preset-btn[data-preset="splat_large"].active .preset-icon svg,
.preset-btn[data-preset="splat_tight"].active .preset-icon svg { filter: drop-shadow(0 0 4px var(--accent-violet)); }
.preset-btn[data-preset="facade_scan"].active .preset-icon svg { filter: drop-shadow(0 0 4px #ec4899); }
.preset-btn[data-preset="crosshatch_3d"].active .preset-icon svg,
.preset-btn[data-preset="crosshatch_ultra"].active .preset-icon svg { filter: drop-shadow(0 0 4px var(--accent-amber)); }
.preset-btn[data-preset="corridor"].active .preset-icon svg { filter: drop-shadow(0 0 4px #f97316); }
.preset-btn[data-preset="poi_inspect"].active .preset-icon svg { filter: drop-shadow(0 0 4px var(--accent-emerald)); }

.preset-text { display: flex; flex-direction: column; position: relative; z-index: 1; }
.preset-name { font-size: 11px; font-weight: 600; line-height: 1.3; }
.preset-text small { font-size: 9px; color: var(--text-muted); font-weight: 400; }

.preset-desc-box {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(56, 189, 248, 0.04);
    border: 1px solid rgba(56, 189, 248, 0.08);
    border-radius: var(--radius-sm);
}
.preset-desc-box p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   Draw Controls
   ============================================ */
.draw-controls { display: flex; flex-direction: column; gap: 8px; }

.btn-draw {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--transition-fast); width: 100%;
    position: relative;
}
.btn-draw svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent-blue); }
.btn-draw:hover {
    border-color: var(--accent-blue); color: #fff;
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.12);
}
.btn-draw:active { transform: scale(0.98); }
.btn-draw.active {
    border-color: var(--accent-blue); color: var(--accent-blue);
    background: var(--accent-blue-dim);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
}

/* Keyboard shortcut badges */
.shortcut-key {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    line-height: 1.4;
    opacity: 0.6;
}
.btn-draw:hover .shortcut-key { opacity: 1; }

.draw-hint {
    font-size: 11px; color: var(--text-muted);
    padding: 8px 12px;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: var(--radius-sm);
    display: none;
}
.draw-hint.visible { display: block; }

/* Orbit Radius Slider */
.orbit-radius-control {
    padding: 10px 12px;
    background: rgba(56, 189, 248, 0.04);
    border: 1px solid rgba(56, 189, 248, 0.12);
    border-radius: var(--radius-sm);
    margin-top: 6px;
}
.radius-label {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; color: var(--text-secondary); margin-bottom: 6px;
}
.radius-value {
    font-weight: 700; color: var(--accent-blue);
    font-family: 'JetBrains Mono', monospace; font-size: 13px;
}
.radius-slider {
    width: 100%; height: 4px; -webkit-appearance: none; appearance: none;
    background: var(--surface-3); border-radius: 2px; outline: none;
    cursor: pointer;
}
.radius-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px;
    border-radius: 50%; background: var(--accent-blue);
    border: 2px solid var(--bg-primary); cursor: pointer;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}
.radius-slider::-moz-range-thumb {
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--accent-blue); border: 2px solid var(--bg-primary);
    cursor: pointer;
}
.radius-ticks {
    display: flex; justify-content: space-between;
    font-size: 9px; color: var(--text-muted); margin-top: 4px;
}
.subject-height-hint {
    font-size: 9px; color: var(--text-muted);
    margin-top: 6px; font-style: italic;
    opacity: 0.7;
}

/* Parameter Override Panel */
.param-overrides {
    margin-top: 8px;
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.override-header {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; cursor: pointer;
    font-size: 11px; color: var(--text-secondary);
    background: rgba(56, 189, 248, 0.03);
    transition: background 0.2s;
    user-select: none;
}
.override-header:hover { background: rgba(56, 189, 248, 0.06); }
.override-arrow {
    margin-left: auto; font-size: 10px; transition: transform 0.2s;
}
.override-arrow.open { transform: rotate(90deg); }
.override-sliders {
    padding: 10px 12px;
    display: flex; flex-direction: column; gap: 12px;
    background: rgba(56, 189, 248, 0.02);
}
.override-row {
    display: flex; flex-direction: column; gap: 4px;
}
.override-label {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; color: var(--text-secondary);
}
.override-val {
    font-weight: 700; color: var(--accent-blue);
    font-family: 'JetBrains Mono', monospace; font-size: 12px;
}
.override-meta {
    display: flex; justify-content: space-between; align-items: center;
}
.override-gsd {
    font-size: 10px; color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}
.btn-reset-overrides {
    padding: 5px 10px; font-size: 10px; border: none;
    background: rgba(99, 130, 180, 0.1); color: var(--text-muted);
    border-radius: 4px; cursor: pointer; transition: all 0.2s;
    align-self: flex-start;
}
.btn-reset-overrides:hover {
    background: rgba(99, 130, 180, 0.2); color: var(--text-primary);
}

/* Override Checkboxes (Auto toggles) */
.override-checkbox {
    display: flex; align-items: center; gap: 6px;
    font-size: 10px; color: var(--text-muted);
    cursor: pointer; user-select: none;
    margin-top: 2px;
}
.override-checkbox input[type="checkbox"] {
    width: 14px; height: 14px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}
.override-row.auto-locked .radius-slider {
    opacity: 0.35;
    pointer-events: none;
}
.override-row.auto-locked .override-val {
    color: var(--text-muted);
}

/* Heading Dial */
.heading-control {
    display: flex; align-items: center; gap: 10px;
}
.heading-dial-container {
    flex-shrink: 0;
}
#heading-dial {
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    cursor: crosshair;
}

/* Speed warning colors */
.speed-warning { color: var(--accent-amber) !important; }
.speed-danger { color: var(--accent-rose) !important; }

/* ============================================
   Auto-Computed Parameters Display
   ============================================ */
.auto-params-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auto-param {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    animation: fadeSlideIn 0.3s ease both;
}

.auto-param:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
}

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

.ap-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ap-value {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-blue);
}

.ap-reason {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    padding-top: 4px;
    border-top: 1px solid rgba(99, 130, 180, 0.08);
}

.ap-empty {
    padding: 24px 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

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

/* Stagger animation for auto-params */
.auto-param:nth-child(1) { animation-delay: 0ms; }
.auto-param:nth-child(2) { animation-delay: 40ms; }
.auto-param:nth-child(3) { animation-delay: 80ms; }
.auto-param:nth-child(4) { animation-delay: 120ms; }
.auto-param:nth-child(5) { animation-delay: 160ms; }
.auto-param:nth-child(6) { animation-delay: 200ms; }
.auto-param:nth-child(7) { animation-delay: 240ms; }
.auto-param:nth-child(8) { animation-delay: 280ms; }
.auto-param:nth-child(9) { animation-delay: 320ms; }

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.stat-card {
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex; flex-direction: column; gap: 4px;
    animation: fadeSlideIn 0.3s ease both;
    transition: var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card:nth-child(1) { animation-delay: 0ms; }
.stat-card:nth-child(2) { animation-delay: 40ms; }
.stat-card:nth-child(3) { animation-delay: 80ms; }
.stat-card:nth-child(4) { animation-delay: 120ms; }
.stat-card:nth-child(5) { animation-delay: 160ms; }
.stat-card:nth-child(6) { animation-delay: 200ms; }
.stat-card:nth-child(7) { animation-delay: 240ms; }
.stat-card:nth-child(8) { animation-delay: 280ms; }

.stat-label {
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.stat-value {
    font-family: var(--font-mono); font-size: 15px; font-weight: 800; color: var(--accent-cyan);
    letter-spacing: -0.01em;
}

.battery-warning {
    margin-top: 10px; padding: 10px 12px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-sm);
    font-size: 11px; color: var(--accent-amber); line-height: 1.5;
}

/* Battery Progress Bar */
.battery-bar-container {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.battery-bar-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
}
.battery-bar-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.battery-bar-pct {
    font-family: var(--font-mono); font-size: 14px; font-weight: 700;
    color: var(--accent-cyan);
}
.battery-bar-track {
    height: 8px; background: rgba(255,255,255,0.06);
    border-radius: 4px; overflow: hidden;
}
.battery-bar-fill {
    height: 100%; border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4,0,0.2,1), background 0.3s;
}
.battery-bar-fill.battery-green { background: linear-gradient(90deg, #34d399, #10b981); }
.battery-bar-fill.battery-yellow { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.battery-bar-fill.battery-red { background: linear-gradient(90deg, #fb7185, #ef4444); }
.battery-bar-info {
    margin-top: 5px; font-size: 10px; color: var(--text-muted);
    font-family: var(--font-mono);
}

/* RTH Toggle */
.rth-toggle {
    display: flex; align-items: center; gap: 8px;
    margin-top: 8px; cursor: pointer;
    user-select: none;
}
.rth-toggle input { display: none; }
.rth-toggle-slider {
    position: relative; width: 32px; height: 18px;
    background: rgba(255,255,255,0.1);
    border-radius: 9px; transition: background 0.25s;
    flex-shrink: 0;
}
.rth-toggle-slider::after {
    content: ''; position: absolute;
    top: 3px; left: 3px;
    width: 12px; height: 12px;
    background: var(--text-muted); border-radius: 50%;
    transition: transform 0.25s, background 0.25s;
}
.rth-toggle input:checked + .rth-toggle-slider {
    background: rgba(56, 189, 248, 0.25);
}
.rth-toggle input:checked + .rth-toggle-slider::after {
    transform: translateX(14px);
    background: var(--accent-blue);
}
.rth-toggle-text {
    font-size: 11px; color: var(--text-muted);
    transition: color 0.25s;
}
.rth-toggle input:checked ~ .rth-toggle-text {
    color: var(--accent-blue);
}

/* ============================================
   Saved Missions Panel
   ============================================ */
.btn-save-mission {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; width: 100%;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(52, 211, 153, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-blue);
    font-family: var(--font-sans); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--transition-normal);
    margin-bottom: 10px;
}
.btn-save-mission svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-save-mission:not(:disabled):hover {
    border-color: var(--accent-blue); color: #fff;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(52, 211, 153, 0.18));
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}
.btn-save-mission:disabled { opacity: 0.35; cursor: not-allowed; }

.saved-missions-list { display: flex; flex-direction: column; gap: 6px; }

.saved-empty {
    padding: 20px 12px; text-align: center;
    font-size: 12px; color: var(--text-muted); font-style: italic;
}

.saved-mission-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition-fast);
    animation: fadeSlideIn 0.25s ease both;
}
.saved-mission-item:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
}

.saved-mission-info { flex: 1; min-width: 0; }
.saved-mission-name {
    font-size: 12px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.saved-mission-meta {
    font-size: 10px; color: var(--text-muted);
    display: flex; gap: 8px; margin-top: 2px;
}
.saved-mission-meta span { display: flex; align-items: center; gap: 3px; }

.saved-mission-delete {
    width: 28px; height: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted); cursor: pointer;
    transition: var(--transition-fast);
    font-size: 14px;
}
.saved-mission-delete:hover {
    border-color: var(--accent-rose); color: var(--accent-rose);
    background: rgba(251, 113, 133, 0.08);
}

/* ============================================
   Export
   ============================================ */
/* Flight Settings (Resolution Mode) */
.flight-settings-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.flight-setting {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.flight-setting .pm-select,
.flight-setting input[type="text"] {
    font-size: 11px;
    padding: 5px 8px;
}
.flight-setting input[type="text"] {
    background: var(--bg-input, var(--bg-secondary));
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
}
.flight-setting input[type="text"]::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}
.condition-hint {
    font-size: 9px;
    color: var(--text-muted);
    font-style: italic;
    padding: 0 2px;
    line-height: 1.3;
}

.export-grid { display: flex; flex-direction: column; gap: 8px; }

.btn-export {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-sans); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--transition-normal); width: 100%;
}
.btn-export svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-export:not(:disabled):hover {
    border-color: var(--accent-emerald); color: var(--accent-emerald);
    background: rgba(52, 211, 153, 0.08);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.1);
}
.btn-export:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-export-primary {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(167, 139, 250, 0.12));
    border-color: var(--accent-sky);
    color: var(--accent-sky);
}
.btn-export-primary:not(:disabled):hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(167, 139, 250, 0.22)) !important;
    border-color: var(--accent-sky) !important;
    color: #fff !important;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.25) !important;
}
.export-hint {
    font-size: 11px; color: var(--text-muted); text-align: center;
    margin-top: -2px; padding: 0 4px;
}
.export-secondary {
    display: inline; font-size: 11px; color: var(--text-muted);
    text-decoration: none; text-align: center; padding: 6px 0;
    transition: var(--transition-normal); cursor: pointer;
}
.export-secondary:hover { color: var(--accent-sky); text-decoration: underline; }

/* ============================================
   Post-Mission Estimate Panel
   ============================================ */
.post-mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.pm-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    animation: fadeSlideIn 0.3s ease both;
}
.pm-card:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
}


.pm-icon { font-size: 20px; flex-shrink: 0; }

.pm-data { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pm-value {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-cyan);
    overflow: hidden;
    text-overflow: ellipsis;
}
.pm-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Format selector */
.pm-format-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.pm-fmt-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}
.pm-select {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 12px;
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
}
.pm-select:hover, .pm-select:focus { border-color: var(--border-active); }
.pm-select option { background: var(--bg-secondary); color: var(--text-primary); }


/* Stagger animation for post-mission cards */
.pm-card:nth-child(1) { animation-delay: 0ms; }
.pm-card:nth-child(2) { animation-delay: 50ms; }
.pm-card:nth-child(3) { animation-delay: 100ms; }
.pm-card:nth-child(4) { animation-delay: 150ms; }

/* ============================================
   Map Container
   ============================================ */
#map-container { flex: 1; position: relative; }
#map { width: 100%; height: 100%; }

/* Style Switcher */
.style-switcher {
    display: flex; gap: 3px; padding: 3px;
    background: rgba(10, 14, 23, 0.5);
    border: 1px solid var(--border-subtle); border-radius: 8px;
    flex-shrink: 0;
}
.style-btn {
    width: 30px; height: 30px; border: 2px solid transparent;
    border-radius: 6px; background: rgba(255,255,255,0.06);
    font-size: 14px; cursor: pointer; transition: var(--transition-normal);
    display: flex; align-items: center; justify-content: center;
}
.style-btn:hover { background: rgba(255,255,255,0.12); transform: scale(1.1); }
.style-btn.active { border-color: var(--accent-sky); background: rgba(56,189,248,0.15); }

/* Custom style URL input */
.style-switcher { flex-wrap: wrap; max-width: 260px; }
.custom-style-input {
    width: 100%; display: flex; gap: 4px; margin-top: 2px;
}
.custom-style-input input {
    flex: 1; padding: 4px 8px; font-size: 10px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border-subtle);
    border-radius: 6px; color: var(--text-primary); outline: none;
    font-family: 'JetBrains Mono', monospace;
}
.custom-style-input input::placeholder { color: var(--text-muted); }
.custom-style-input input:focus { border-color: var(--accent-blue); }
.btn-apply-style {
    padding: 4px 8px; font-size: 10px; font-weight: 600;
    background: rgba(56, 189, 248, 0.15); border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 6px; color: var(--accent-blue); cursor: pointer;
    transition: var(--transition-normal); white-space: nowrap;
}
.btn-apply-style:hover { background: rgba(56, 189, 248, 0.25); }

.map-instruction {
    position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 10; pointer-events: none;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.instruction-badge {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    font-size: 13px; font-weight: 500; color: var(--text-primary);
}

.instruction-icon {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-blue);
    animation: pulse-icon 2s ease-in-out infinite;
}
@keyframes pulse-icon { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.instruction-icon svg { width: 18px; height: 18px; }

.coord-sep {
    width: 1px; height: 16px;
    background: var(--border-subtle);
    margin: 0 4px;
}
.coord-stat {
    display: flex; align-items: center; gap: 5px;
    font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--text-primary);
}
.coord-stat svg { width: 13px; height: 13px; color: var(--accent-blue); flex-shrink: 0; }

.drawing-cursor { cursor: crosshair !important; }

/* ============================================
   Custom MapTiler popup
   ============================================ */
.maplibregl-popup-content {
    background: rgba(10, 14, 23, 0.92) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid var(--border-active) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    padding: 12px 16px !important;
    font-family: var(--font-sans) !important;
    font-size: 12px !important;
    box-shadow: var(--shadow-lg) !important;
    min-width: 260px !important;
}
.maplibregl-popup-tip { border-top-color: rgba(10, 14, 23, 0.92) !important; }
.maplibregl-popup-close-button { color: var(--text-muted) !important; font-size: 18px !important; }

.waypoint-popup-title { font-weight: 700; color: var(--accent-blue); margin-bottom: 4px; }
.waypoint-popup-row { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; align-items: center; }
.waypoint-popup-row .wp-label { color: var(--text-muted); }
.waypoint-popup-row .wp-value { color: var(--accent-cyan); font-family: var(--font-mono); font-weight: 500; }
.waypoint-popup-divider { border-top: 1px solid rgba(255,255,255,0.1); margin: 6px 0 4px; }
.wp-action-select {
    background: #1a1f2e; border: 1px solid rgba(255,255,255,0.2);
    color: #e2e8f0; border-radius: 4px; padding: 3px 6px;
    font-size: 11px; cursor: pointer; outline: none; max-width: 140px;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 6px center;
    padding-right: 20px;
}
.wp-action-select:focus { border-color: var(--accent-blue); }
.wp-action-select option {
    background: #1a1f2e; color: #e2e8f0;
    padding: 4px 8px; font-size: 12px;
}
.wp-hover-time-row {
    display: flex; align-items: center; gap: 6px; padding: 3px 0;
    font-size: 11px; color: var(--text-muted);
}
.wp-hover-input {
    width: 48px; padding: 2px 4px; background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15); border-radius: 4px;
    color: var(--text-primary); font-size: 11px; text-align: center;
}
.wp-edit-row {
    display: flex; align-items: center; gap: 6px; padding: 2px 0;
}
.wp-edit-row .wp-label { min-width: 48px; font-size: 11px; color: var(--text-muted); }
.wp-slider {
    flex: 1; height: 4px; -webkit-appearance: none; appearance: none;
    background: rgba(255,255,255,0.12); border-radius: 2px; outline: none;
    cursor: pointer;
}
.wp-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 12px; height: 12px;
    border-radius: 50%; background: #22d3ee; cursor: pointer;
    border: 2px solid #0a0e17;
}
.wp-slider::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%;
    background: #22d3ee; cursor: pointer; border: 2px solid #0a0e17;
}
.wp-slider-val {
    min-width: 52px; text-align: right; font-size: 13px;
    font-family: var(--font-mono); color: #22d3ee; font-weight: 700;
    white-space: nowrap;
}

.wp-set-start-btn {
    width: 100%; padding: 6px 0; margin-top: 2px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 5px;
    color: var(--accent-emerald);
    font-family: var(--font-sans); font-size: 11px; font-weight: 600;
    cursor: pointer; transition: var(--transition-fast);
    letter-spacing: 0.02em;
}
.wp-set-start-btn:hover {
    background: rgba(52, 211, 153, 0.2);
    border-color: var(--accent-emerald);
    color: #fff;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

.wp-start-end-row {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.wp-start-end-row .wp-set-start-btn,
.wp-start-end-row .wp-set-end-btn {
    flex: 1;
    padding: 6px 0;
    margin-top: 0;
    border-radius: 5px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    letter-spacing: 0.02em;
    text-align: center;
}

.wp-set-end-btn {
    background: rgba(99, 130, 180, 0.1);
    border: 1px solid rgba(99, 130, 180, 0.3);
    color: var(--text-secondary);
}
.wp-set-end-btn:hover {
    background: rgba(99, 130, 180, 0.2);
    border-color: var(--text-secondary);
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 130, 180, 0.2);
}

/* ============================================
   Elevation Profile
   ============================================ */
.elevation-profile {
    margin-top: 12px; padding: 10px 12px;
    background: rgba(255,255,255,0.03); border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.elevation-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.elevation-title { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.elevation-legend { display: flex; gap: 12px; font-size: 10px; color: var(--text-muted); }
.legend-item { display: flex; align-items: center; gap: 4px; }
.legend-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.legend-dot.terrain { background: #a78b6e; }
.legend-dot.drone { background: #22d3ee; }
#elevation-canvas {
    width: 100%; height: 120px; border-radius: 6px;
    background: rgba(0,0,0,0.2);
}
.elevation-info {
    margin-top: 6px; font-size: 10px; color: var(--text-muted);
    display: flex; justify-content: space-between;
}

/* ============================================
   Import Boundary
   ============================================ */
.import-divider {
    display: flex; align-items: center; gap: 10px;
    margin: 2px 0; color: var(--text-muted); font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.08em;
}
.import-divider::before, .import-divider::after {
    content: ''; flex: 1; height: 1px;
    background: var(--border-subtle);
}
.btn-import {
    border-style: dashed !important;
    color: var(--text-muted) !important;
}
.btn-import:hover {
    border-color: var(--accent-emerald) !important;
    color: var(--accent-emerald) !important;
    background: rgba(52, 211, 153, 0.06) !important;
}

/* ============================================
   Flight Simulation Controls
   ============================================ */
.sim-controls {
    position: absolute;
    bottom: 50px;
    right: 16px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.sim-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(10, 14, 23, 0.88);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.sim-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}
.sim-btn svg { width: 14px; height: 14px; }
.sim-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: var(--accent-blue-dim);
}
.sim-play { border-color: var(--accent-emerald); color: var(--accent-emerald); }
.sim-play:hover {
    background: rgba(52, 211, 153, 0.15);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.3);
}

.sim-speed-select {
    padding: 4px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 11px; font-weight: 600;
    cursor: pointer; outline: none;
}
.sim-speed-select option { background: var(--bg-secondary); }

.sim-progress {
    width: 100px; height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}
.sim-progress-bar {
    height: 100%;
    background: var(--gradient-blue);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.sim-wp-counter {
    font-family: var(--font-mono);
    font-size: 11px; font-weight: 500;
    color: var(--text-muted);
    min-width: 50px; text-align: right;
}

/* Sim HUD */
.sim-hud {
    display: flex;
    gap: 12px;
    padding: 6px 14px;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}
.sim-hud-item { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.sim-hud-label { font-size: 8px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.sim-hud-val { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent-cyan); }

/* ============================================
   Drop Overlay
   ============================================ */
.drop-overlay {
    position: absolute; inset: 0; z-index: 50;
    background: rgba(56, 189, 248, 0.08);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    border: 3px dashed var(--accent-blue);
    border-radius: var(--radius-md);
    pointer-events: none;
}
.drop-message {
    padding: 20px 40px;
    background: rgba(10, 14, 23, 0.9);
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-lg);
    font-size: 16px; font-weight: 600;
    color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.panel { animation: fadeIn 0.4s ease; }

@keyframes dronePulse {
    0%, 100% { r: 8; opacity: 0.9; }
    50% { r: 12; opacity: 0.5; }
}

/* ============================================
   Geocoding Search Box
   ============================================ */
#geocode-box {
    position: relative;
    width: 280px;
    flex-shrink: 1;
    min-width: 160px;
}
#geocode-input {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: rgba(10, 14, 23, 0.5);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
#geocode-input:focus { border-color: var(--accent-primary); }
#geocode-input::placeholder { color: var(--text-muted); }
#geocode-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    border-radius: 8px;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    max-height: 260px;
    overflow-y: auto;
    display: none;
    z-index: 200;
}
#geocode-results.visible { display: block; }
.geocode-item {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.geocode-item:hover { background: rgba(56, 189, 248, 0.12); color: var(--text-primary); }
.geocode-item:last-child { border-bottom: none; }
.geocode-item small { display: block; color: var(--text-muted); font-size: 0.7rem; margin-top: 2px; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) { :root { --sidebar-width: 320px; } }
@media (max-width: 700px) {
    #app-layout { flex-direction: column; }
    #sidebar { width: 100%; min-width: 100%; max-height: 45vh; border-right: none; border-bottom: 1px solid var(--border-subtle); }
    .coord-display { display: none; }
    .sim-controls { right: 8px; bottom: 40px; }
}
