/**
 * GuCities - Main Stylesheet v0.9.64
 * Build: 2512041724
 * 
 * LAYOUT:
 * - Video 65% width (left)
 * - Maps 35% width (right)
 * - Split view: 40% 2D (top), 60% 3D (bottom)
 * - Footer 100% width at bottom
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #0f1318;
    --bg-tertiary: #151a21;
    --bg-elevated: #1a2029;
    --bg-hover: #232a35;
    
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    --accent-primary: #38bdf8;
    --accent-secondary: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.3);
    
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --info: #3b82f6;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    
    --header-height: 56px;
    --footer-height: 80px;
    --panel-header-height: 40px;
    --logger-height: 180px;
    --map-panel-width: 35%;  /* v0.9.64: Changed from 50% to 35% */
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    z-index: 100;
}

.header-brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { flex-shrink: 0; }
.brand-logo { width: 32px; height: 32px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-size: 18px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.brand-version { 
    display: flex; 
    align-items: center;
    gap: 8px; 
    font-size: 10px; 
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}
.version-text {
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
}
.build-text {
    color: var(--text-muted);
}

/* Header Info - Project/Coords/Altitude */
.header-info {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 8px 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.info-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.info-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}
.info-value.coords {
    color: var(--accent-primary);
}
.info-separator { 
    width: 1px; 
    height: 32px; 
    background: var(--border-light); 
}

/* Header Action Buttons */
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-user { display: flex; align-items: center; gap: 8px; }
.user-info { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}
.user-name { 
    font-size: 13px; 
    color: var(--text-primary); 
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .user-name { display: none; }
    .header-info { display: none; }
}
.project-actions { display: flex; align-items: center; gap: 4px; }
.action-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}
.action-btn:hover { 
    background: var(--bg-hover); 
    color: var(--text-primary); 
    border-color: var(--accent-primary); 
}
.action-btn .material-icons-round { font-size: 20px; }

.action-btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.suggestion-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--warning);
    color: var(--bg-primary);
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   MAIN CONTENT - OVERLAY LAYOUT
   ============================================ */
.app-main {
    position: relative;
    flex: 1;
    overflow: hidden;
    display: flex;
    margin-bottom: calc(var(--footer-height) + var(--logger-height));
    transition: margin-bottom var(--transition-normal);
}

body.logger-collapsed .app-main { margin-bottom: calc(var(--footer-height) + 36px); }
body.logger-hidden .app-main { margin-bottom: var(--footer-height); }

/* VIDEO PANEL - FULL WIDTH */
.panel-video {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    background: #000;
}

/* Video 360 Panel Header - Always visible */
.panel-video .panel-header {
    position: absolute;
    top: 0;
    left: 0;
    right: var(--map-panel-width);
    height: var(--panel-header-height);
    z-index: 30;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: right var(--transition-normal);
}
.panel-video .panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.panel-video .panel-title .material-icons-round {
    font-size: 18px;
    color: var(--accent-primary);
}

.panel-video .panel-content { flex: 1; position: relative; padding-top: var(--panel-header-height); }

/* MAP PANEL - OVERLAY RIGHT */
.panel-map {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--map-panel-width);
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    transition: width var(--transition-normal);
}

/* Panel Resizer - SLIDER between Video and Map */
.panel-resizer {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    background: var(--bg-tertiary);
    cursor: col-resize;
    z-index: 25;
    /* Position at left edge of map panel */
    right: calc(var(--map-panel-width) - 4px);
    transition: background var(--transition-fast), right var(--transition-normal);
}
.panel-resizer:hover, .panel-resizer.dragging { background: var(--accent-primary); }
.panel-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    background: var(--text-muted);
    border-radius: 2px;
    opacity: 0.5;
}
.panel-resizer:hover::after { opacity: 1; background: white; }
body.resizing { cursor: col-resize !important; user-select: none; }
body.resizing * { cursor: col-resize !important; }

/* Panel Headers */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--panel-header-height);
    padding: 0 12px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary); flex-shrink: 0; }
.panel-title .material-icons-round { font-size: 18px; color: var(--accent-primary); }

/* Panel Controls - ALWAYS VISIBLE */
.panel-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.panel-controls::-webkit-scrollbar { display: none; }

.panel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.panel-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.panel-btn .material-icons-round { font-size: 18px; }

.control-separator { width: 1px; height: 20px; background: var(--border-color); margin: 0 4px; flex-shrink: 0; }

.view-toggle { display: flex; background: var(--bg-primary); border-radius: var(--radius-sm); padding: 2px; flex-shrink: 0; }
.toggle-btn { padding: 4px 12px; font-size: 12px; font-weight: 500; color: var(--text-muted); background: transparent; border: none; border-radius: 3px; cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; }
.toggle-btn:hover { color: var(--text-secondary); }
.toggle-btn.active { color: var(--text-primary); background: var(--accent-primary); }

.panel-content { flex: 1; position: relative; overflow: hidden; }

/* Video Container */
.video-container { width: 100%; height: 100%; background: #000; position: relative; overflow: hidden; }
.video-container > canvas, .video-container > div:not(.video-placeholder) { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; z-index: 2 !important; }
.video-container .panolens-container { position: absolute !important; top: 0; left: 0; width: 100% !important; height: 100% !important; z-index: 2; }
.video-placeholder { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--bg-primary); color: var(--text-muted); z-index: 1; pointer-events: none; }
.video-container.video-loaded .video-placeholder { opacity: 0; visibility: hidden; }
.placeholder-icon { font-size: 64px; color: var(--text-muted); }
.placeholder-text { font-size: 18px; font-weight: 500; }
.placeholder-hint { font-size: 12px; color: var(--text-muted); }

/* Map Content */
.map-content { display: flex; flex-direction: column; width: 100%; height: 100%; position: relative; }
.map-container { position: relative; overflow: hidden; display: none; }
.map-container.active { display: block; flex: 1; }
.map-2d-container, .map-3d-container { width: 100%; height: 100%; }

/* CRITICAL: Ensure map containers receive mouse events */
#map-2d, #map-3d { 
    width: 100%; 
    height: 100%; 
    pointer-events: auto !important; 
    touch-action: none;
    position: relative;
}

/* Ensure Three.js canvas receives mouse events for rotation */
#map-3d {
    position: relative;
    overflow: hidden;
}
#map-3d canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    pointer-events: auto !important;
    touch-action: none !important;
    cursor: grab;
    position: absolute;
    top: 0;
    left: 0;
}
#map-3d canvas:active {
    cursor: grabbing;
}
.map-3d-container {
    pointer-events: auto !important;
    position: relative;
    overflow: hidden;
}
.map-3d-container.active {
    display: block;
}

/* Split View - v0.9.64: 2D top (40%), 3D bottom (60%) */
.map-content.split-view { flex-direction: column; height: 100%; }
.map-content.split-view .map-2d-container { display: block; flex: 0 0 40%; height: 40%; min-height: 80px; }
.map-content.split-view .map-3d-container { display: block; flex: 0 0 60%; height: 60%; min-height: 80px; }
.map-content.split-view .map-resizer { display: block; }

.map-resizer { display: none; height: 6px; width: 100%; background: var(--bg-tertiary); cursor: row-resize; flex-shrink: 0; }
.map-resizer:hover, .map-resizer.dragging { background: var(--accent-primary); }

/* 3D View Controls - CLICKABLE */
.view-3d-controls { position: absolute; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: auto; }
.view-3d-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer; transition: all var(--transition-fast); pointer-events: auto; }
.view-3d-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent-primary); }
.view-3d-btn:active { transform: scale(0.95); }
.view-3d-btn .material-icons-round { font-size: 20px; }

/* Layers Panel */
.layers-panel { position: absolute; top: 8px; right: 8px; width: 200px; background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); z-index: 500; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all var(--transition-fast); }
.layers-panel.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.layers-header { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border-color); font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.layers-header .material-icons-round { font-size: 16px; color: var(--accent-primary); }
.layers-list { padding: 8px; }
.layer-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--radius-sm); cursor: pointer; }
.layer-item:hover { background: var(--bg-hover); }
.layer-toggle { width: 16px; height: 16px; accent-color: var(--accent-primary); }
.layer-name { font-size: 12px; color: var(--text-secondary); }

/* Offset Panel */
.offset-panel { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 280px; background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 60; opacity: 0; visibility: hidden; }
.offset-panel.visible { opacity: 1; visibility: visible; }
.offset-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.offset-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-primary); }
.offset-title .material-icons-round { font-size: 20px; color: var(--accent-primary); }
.offset-close { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: transparent; border: none; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; }
.offset-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.offset-content { padding: 16px; }
.offset-field { margin-bottom: 12px; }
.offset-field:last-child { margin-bottom: 0; }
.offset-label { display: block; margin-bottom: 4px; font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.offset-input { width: 100%; height: 36px; padding: 0 12px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.offset-input:focus { outline: none; border-color: var(--accent-primary); }
.offset-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.offset-btn { flex: 1; height: 36px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 12px; font-weight: 500; cursor: pointer; }
.offset-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.offset-btn-primary { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }
.offset-btn-primary:hover { background: var(--accent-secondary); }

/* Progress */
.upload-progress { position: absolute; bottom: 16px; left: 16px; right: 16px; padding: 12px 16px; background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: var(--radius-md); z-index: 40; }
.upload-progress-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--text-secondary); font-size: 12px; }
.upload-progress-header .material-icons-round { font-size: 18px; color: var(--accent-primary); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.progress-bar-container { display: flex; align-items: center; gap: 12px; }
.progress-bar { flex: 1; height: 4px; background: var(--bg-primary); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); border-radius: 2px; }
.progress-text { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); min-width: 36px; text-align: right; }
.model-progress { bottom: auto; top: 16px; }

/* ============================================
   FOOTER - FIXED POSITION
   ============================================ */
.app-footer {
    position: fixed;
    left: 0;
    right: 0;
    height: var(--footer-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 200;
    bottom: var(--logger-height);
    transition: bottom var(--transition-normal);
}
body.logger-collapsed .app-footer { bottom: 36px; }
body.logger-hidden .app-footer { bottom: 0; }

.timeline-container { padding: 8px 16px 0; }
.timeline-track { position: relative; height: 6px; background: var(--bg-primary); border-radius: 3px; cursor: pointer; }
.timeline-progress { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); border-radius: 3px; width: 0%; pointer-events: none; }
.timeline-thumb { position: absolute; top: 50%; left: 0%; width: 14px; height: 14px; background: var(--accent-primary); border: 2px solid white; border-radius: 50%; transform: translate(-50%, -50%); cursor: grab; }
.timeline-thumb:hover { transform: translate(-50%, -50%) scale(1.2); }

.playback-controls { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; flex: 1; }
.control-group { display: flex; align-items: center; gap: 8px; }
.control-group-left { flex: 1; }
.control-group-center { flex: 2; justify-content: center; }
.control-group-right { flex: 1; justify-content: flex-end; }

.ctrl-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: transparent; border: none; border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer; }
.ctrl-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.ctrl-btn.active { color: var(--accent-primary); }
.ctrl-btn .material-icons-round { font-size: 24px; }
.ctrl-btn-play { width: 48px; height: 48px; background: var(--accent-primary); color: white; }
.ctrl-btn-play:hover { background: var(--accent-secondary); color: white; }
.ctrl-btn-play .material-icons-round { font-size: 28px; }

.time-display { display: flex; align-items: center; gap: 4px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-secondary); }
.time-separator { color: var(--text-muted); }

.speed-control { position: relative; }
.speed-btn { display: flex; align-items: center; justify-content: center; min-width: 48px; height: 32px; padding: 0 12px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; font-size: 12px; cursor: pointer; }
.speed-btn:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.speed-menu { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 8px; background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; opacity: 0; visibility: hidden; }
.speed-menu.visible { opacity: 1; visibility: visible; }
.speed-menu button { display: block; width: 100%; padding: 8px 16px; background: transparent; border: none; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; font-size: 12px; cursor: pointer; }
.speed-menu button:hover { background: var(--bg-hover); color: var(--text-primary); }
.speed-menu button.active { background: var(--accent-primary); color: white; }

.volume-control { display: flex; align-items: center; gap: 4px; }
.volume-slider { width: 80px; height: 4px; appearance: none; background: var(--bg-primary); border-radius: 2px; cursor: pointer; }
.volume-slider::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; background: var(--accent-primary); border-radius: 50%; cursor: pointer; }

/* Session Banner */
.session-banner { position: fixed; top: calc(var(--header-height) + 8px); left: 50%; transform: translateX(-50%) translateY(-100px); padding: 12px 16px; background: var(--bg-elevated); border: 1px solid var(--accent-primary); border-radius: var(--radius-md); z-index: 300; opacity: 0; }
.session-banner.visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.session-banner-content { display: flex; align-items: center; gap: 12px; color: var(--text-primary); font-size: 14px; }
.session-banner-content .material-icons-round { color: var(--accent-primary); }
.session-banner-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Button Styles - Used across modals and dialogs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
}
.btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}
.btn .material-icons-round { font-size: 18px; }

.btn-primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.btn-secondary {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--error);
    border-color: var(--error);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
}

/* Session banner buttons */
.btn-restore, .btn-dismiss {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}
.btn-restore {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}
.btn-restore:hover {
    background: var(--accent-secondary);
}
.btn-dismiss {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.btn-dismiss:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.btn-restore .material-icons-round,
.btn-dismiss .material-icons-round {
    font-size: 16px;
}
.session-actions { display: flex; gap: 8px; margin-left: 16px; }
.session-btn { padding: 6px 16px; background: transparent; border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px; cursor: pointer; }
.session-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.session-btn-primary { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }
.session-btn-primary:hover { background: var(--accent-secondary); }

/* Logger */
.logger-console { position: fixed; bottom: 0; left: 0; right: 0; height: var(--logger-height); background: var(--bg-primary); border-top: 1px solid var(--border-color); display: flex; flex-direction: column; z-index: 95; transition: height var(--transition-normal); }
.logger-console.collapsed { height: 36px; }
.logger-header { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; height: 36px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.logger-header-left { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.logger-header-left .logger-icon { font-size: 16px; color: var(--accent-primary); }
.logger-header-left .logger-icon.has-error { color: var(--error); }
.logger-header-right { display: flex; align-items: center; gap: 12px; }
.system-monitor { display: flex; align-items: center; gap: 12px; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-muted); }
.monitor-item { display: flex; align-items: center; gap: 4px; padding: 2px 6px; background: var(--bg-primary); border-radius: 3px; }
.logger-toggle { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; background: transparent; border: none; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; }
.logger-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.logger-console.collapsed .logger-toggle .material-icons-round { transform: rotate(180deg); }
.logger-content { flex: 1; overflow-y: auto; padding: 8px 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.6; padding-bottom: 16px; }
.logger-content::-webkit-scrollbar { width: 6px; }
.logger-content::-webkit-scrollbar-track { background: transparent; }
.logger-content::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
.log-entry { display: flex; gap: 8px; padding: 2px 0; }
.log-time { color: var(--text-muted); flex-shrink: 0; }
.log-source { color: var(--accent-primary); flex-shrink: 0; }
.log-message { color: var(--text-secondary); word-break: break-word; }
.log-entry.log-success .log-source { color: var(--success); }
.log-entry.log-warning .log-source { color: var(--warning); }
.log-entry.log-error .log-source { color: var(--error); }
.log-entry.log-info .log-source { color: var(--info); }

/* SUGGESTIONS PANEL - Slides in from right */
.suggestions-panel { 
    position: fixed; 
    top: var(--header-height); 
    right: -320px; 
    width: 320px; 
    height: calc(100vh - var(--header-height)); 
    background: var(--bg-secondary); 
    border-left: 1px solid var(--border-color); 
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5); 
    z-index: 2000;
    display: flex; 
    flex-direction: column; 
    transition: right 0.3s ease;
    visibility: hidden;
    opacity: 0;
}
.suggestions-panel.visible { 
    right: 0 !important;
    visibility: visible;
    opacity: 1;
}
.suggestions-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-size: 14px; font-weight: 500; color: var(--text-primary); }
.suggestions-header .material-icons-round { font-size: 20px; color: var(--warning); }
.suggestions-close { margin-left: auto; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: transparent; border: none; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; }
.suggestions-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.suggestions-content { flex: 1; overflow-y: auto; padding: 12px; }
.suggestion-item { padding: 12px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-md); margin-bottom: 8px; cursor: pointer; }
.suggestion-item:last-child { margin-bottom: 0; }
.suggestion-item:hover { border-color: var(--accent-primary); }
.suggestion-type { display: flex; align-items: center; gap: 4px; font-size: 10px; text-transform: uppercase; margin-bottom: 8px; }
.suggestion-type.missing { color: var(--error); }
.suggestion-type.performance { color: var(--warning); }
.suggestion-type.enhancement { color: var(--info); }
.suggestion-type .material-icons-round { font-size: 14px; }
.suggestion-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.suggestion-title .material-icons-round { font-size: 18px; color: var(--text-secondary); }
.suggestion-description { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.no-suggestions { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; color: var(--text-muted); }
.no-suggestions .material-icons-round { font-size: 48px; margin-bottom: 12px; color: var(--success); }
.no-suggestions p { font-size: 14px; }

/* Toast */
.toast-container { position: fixed; bottom: calc(var(--footer-height) + var(--logger-height) + 16px); right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 400; transition: bottom var(--transition-normal); }
body.logger-collapsed .toast-container { bottom: calc(var(--footer-height) + 36px + 16px); }
body.logger-hidden .toast-container { bottom: calc(var(--footer-height) + 16px); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
.toast .material-icons-round { font-size: 20px; }
.toast-success .material-icons-round { color: var(--success); }
.toast-error .material-icons-round { color: var(--error); }
.toast-warning .material-icons-round { color: var(--warning); }
.toast-info .material-icons-round { color: var(--info); }
.toast-message { font-size: 13px; color: var(--text-primary); }

/* Modals */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; z-index: 600; opacity: 0; visibility: hidden; pointer-events: none; }
.modal.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.modal-content { 
    position: relative; 
    width: 90%; 
    max-width: 480px; 
    max-height: 90vh; 
    background: var(--bg-secondary); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-lg); 
    overflow: hidden; 
    transform: scale(0.95); 
    transition: transform 0.2s ease;
    margin: auto;
}
.modal.visible .modal-content { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; color: var(--text-primary); margin: 0; }
.modal-header h3 .material-icons-round { font-size: 22px; color: var(--accent-primary); }
.modal-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; color: var(--text-primary); }
.modal-title .material-icons-round { font-size: 24px; color: var(--accent-primary); }
.modal-close { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: transparent; border: none; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.modal-body h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 0 0 12px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--border-color); }
.modal-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-secondary); font-size: 14px; font-weight: 500; cursor: pointer; }
.modal-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-btn-primary { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }
.modal-btn-primary:hover { background: var(--accent-secondary); }
.modal-btn-danger { background: var(--error); border-color: var(--error); color: white; }
.modal-btn-danger:hover { background: #dc2626; }

/* Settings Items - for all modals */
.setting-group { margin-bottom: 20px; }
.setting-group:last-child { margin-bottom: 0; }
.setting-group h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 0 0 12px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.setting-item { margin-bottom: 14px; }
.setting-item:last-child { margin-bottom: 0; }
.setting-item label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.setting-item input[type="text"],
.setting-item input[type="number"],
.setting-item input[type="url"] { 
    width: 100%; 
    height: 38px; 
    padding: 0 12px; 
    background: var(--bg-primary); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); 
    color: var(--text-primary); 
    font-size: 13px; 
    font-family: 'JetBrains Mono', monospace;
}
.setting-item input:focus { outline: none; border-color: var(--accent-primary); }
.setting-item input::placeholder { color: var(--text-muted); }
.setting-item select { 
    width: 100%; 
    height: 38px; 
    padding: 0 12px; 
    background: var(--bg-primary); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); 
    color: var(--text-primary); 
    font-size: 13px; 
    cursor: pointer;
}
.setting-item .input-hint { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Checkbox items in settings */
.setting-item label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0;
}
.setting-item input[type="checkbox"] { 
    width: 16px; 
    height: 16px; 
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* GeoServer link in settings */
.geoserver-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition-fast);
}
.geoserver-link:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}
.geoserver-link .material-icons-round {
    font-size: 18px;
}

/* Open Project Modal */
.recent-projects { margin-bottom: 20px; }
.open-file-section { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 12px; 
    padding: 24px; 
    background: var(--bg-tertiary); 
    border: 2px dashed var(--border-color); 
    border-radius: var(--radius-md); 
    text-align: center;
}
.open-file-section .material-icons-round { font-size: 36px; color: var(--text-muted); }
.open-file-section p { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* Save Project Modal */
.save-includes { margin-top: 16px; }
.save-option { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 10px 12px; 
    background: var(--bg-tertiary); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); 
    margin-bottom: 8px; 
    cursor: pointer;
    transition: all var(--transition-fast);
}
.save-option:last-child { margin-bottom: 0; }
.save-option:hover { border-color: var(--accent-primary); background: var(--bg-hover); }
.save-option input[type="checkbox"] { 
    width: 16px; 
    height: 16px; 
    accent-color: var(--accent-primary);
    cursor: pointer;
}
.save-option .material-icons-round { font-size: 20px; color: var(--accent-primary); }
.save-option span:last-child { font-size: 13px; color: var(--text-primary); }

/* v0.10.60: Files Summary */
.files-summary { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.file-item { 
    display: grid; 
    grid-template-columns: 24px 24px 100px 1fr auto; 
    align-items: center; 
    gap: 10px; 
    padding: 10px 12px; 
    background: var(--bg-tertiary); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.file-item.loaded { border-color: var(--success); background: rgba(16, 185, 129, 0.1); }
.file-item.missing { border-color: var(--warning); background: rgba(245, 158, 11, 0.05); }
.file-item.current { border-color: var(--accent-primary); background: rgba(79, 140, 255, 0.1); }
.file-item .file-status { font-size: 18px; color: var(--text-muted); }
.file-item.loaded .file-status { color: var(--success); }
.file-item.missing .file-status { color: var(--warning); }
.file-item .file-icon { font-size: 20px; color: var(--accent-primary); }
.file-item .file-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; }
.file-item .file-name { font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .file-size { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.files-hint { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; background: rgba(79, 140, 255, 0.1); border-radius: var(--radius-md); font-size: 12px; color: var(--text-secondary); }
.files-hint .material-icons-round { font-size: 16px; color: var(--accent-primary); flex-shrink: 0; margin-top: 1px; }

/* Modal medium size */
.modal-content.modal-medium { max-width: 500px; }

/* Project files modal */
.project-files-info { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.project-files-progress { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 16px; padding: 12px; background: var(--bg-tertiary); border-radius: var(--radius-md); font-size: 13px; color: var(--text-secondary); }
.project-files-progress span { font-weight: 600; color: var(--accent-primary); }

/* Form Elements */
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.form-input { width: 100%; height: 40px; padding: 0 12px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: 14px; }
.form-input:focus { outline: none; border-color: var(--accent-primary); }
.form-input::placeholder { color: var(--text-muted); }
.form-select { width: 100%; height: 40px; padding: 0 12px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: 14px; cursor: pointer; }
.form-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-checkbox input { width: 18px; height: 18px; accent-color: var(--accent-primary); }
.form-checkbox span { font-size: 14px; color: var(--text-secondary); }

/* Loading Overlay */
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg-primary); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; z-index: 1000; }
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loader-container { position: relative; width: 80px; height: 80px; }
.loader-ring { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border: 3px solid transparent; border-radius: 50%; animation: spin 1.5s linear infinite; }
.loader-ring:nth-child(1) { border-top-color: var(--accent-primary); }
.loader-ring:nth-child(2) { transform: scale(0.8); border-right-color: var(--accent-secondary); animation-delay: -0.5s; animation-direction: reverse; }
.loader-ring:nth-child(3) { transform: scale(0.6); border-bottom-color: var(--accent-primary); animation-delay: -1s; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loader-text { text-align: center; }
.loader-title { font-size: 24px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.loader-status { font-size: 13px; color: var(--text-muted); }
.loading-progress-container { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 200px; }
.loading-progress-bar { width: 100%; height: 4px; background: var(--bg-secondary); border-radius: 2px; overflow: hidden; }
.loading-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); }
.loading-progress-text { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); }

/* Project List */
.projects-list { display: flex; flex-direction: column; gap: 8px; }
.project-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-md); cursor: pointer; }
.project-item:hover { border-color: var(--accent-primary); background: var(--bg-hover); }
.project-item .material-icons-round { font-size: 24px; color: var(--accent-primary); }
.project-item-info { flex: 1; }
.project-item-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.project-item-date { font-size: 11px; color: var(--text-muted); }
.no-projects { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; color: var(--text-muted); }
.no-projects .material-icons-round { font-size: 48px; margin-bottom: 12px; }

/* Save Progress */
.save-progress { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.save-progress-bar { width: 100%; height: 4px; background: var(--bg-primary); border-radius: 2px; overflow: hidden; }
.save-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); }
.save-progress-text { text-align: center; margin-top: 8px; font-size: 12px; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1200px) {
    .header-info { display: none; }
    :root { --map-panel-width: 55%; }
}
@media (max-width: 900px) {
    :root { --map-panel-width: 100%; }
    .panel-video { position: relative; height: 40vh; min-height: 200px; }
    .panel-video .panel-header { right: 0; }
    .panel-map { position: relative; width: 100%; height: 60vh; border-left: none; border-top: 1px solid var(--border-color); }
    .panel-resizer { display: none; }
    .app-main { flex-direction: column; }
}
@media (max-width: 600px) {
    .brand-version, .project-actions { display: none; }
    .view-toggle, .volume-slider, .system-monitor { display: none; }
    .suggestions-panel { width: 100%; }
    .panel-controls { flex-wrap: nowrap; overflow-x: auto; }
}

/* =========================================================
   MEASUREMENT TOOLS - v0.9.62
   ========================================================= */

/* Measurement Toolbar */
.measure-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
}

.measure-btn.active {
    background: var(--accent-primary) !important;
    color: white !important;
    border-color: var(--accent-primary) !important;
}

/* Measurements Panel */
.measurements-panel {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 280px;
    max-height: 300px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 600;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.measurements-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.measurements-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.measurements-title {
    flex: 1;
}

.measurements-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.measurements-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.measurements-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    max-height: 200px;
}

.no-measurements {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--text-muted);
    text-align: center;
}

.no-measurements .material-icons-round {
    font-size: 32px;
    opacity: 0.5;
    margin-bottom: 8px;
}

.no-measurements p {
    margin: 0 0 4px 0;
    font-size: 13px;
}

.no-measurements small {
    font-size: 11px;
    opacity: 0.7;
}

.measurement-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    transition: all var(--transition-fast);
}

.measurement-item:hover {
    background: var(--bg-hover);
}

.measurement-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.measurement-icon {
    font-size: 18px;
    color: var(--accent-primary);
}

.measurement-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.measurement-type {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.measurement-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.measurement-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    opacity: 0;
}

.measurement-item:hover .measurement-delete {
    opacity: 1;
}

.measurement-delete:hover {
    background: var(--status-error);
    color: white;
}

.measurement-delete .material-icons-round {
    font-size: 16px;
}

.measurements-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
}

.measurements-footer .btn {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Coordinates Display - v0.9.64: Moved to bottom-left of 2D map */
.coords-display {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: auto;
    background: rgba(10, 14, 20, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    z-index: 450;
    display: flex;
    gap: 12px;
}

.coords-row {
    display: flex;
    gap: 4px;
}

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

.coords-value {
    color: var(--accent-primary);
    min-width: 80px;
}

/* =========================================================
   LEAFLET CONTROLS - Dark Theme - v0.9.64
   ========================================================= */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-md) !important;
}

.leaflet-control-zoom a,
.leaflet-control-zoom a:hover {
    background: var(--bg-elevated) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

.leaflet-control-zoom a:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border-color: var(--accent-primary) !important;
}

.leaflet-control-zoom a:first-child {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
}

.leaflet-control-zoom a:last-child {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
    border-top: none !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    text-indent: 0 !important;
}

/* Leaflet Attribution */
.leaflet-control-attribution {
    background: rgba(10, 14, 20, 0.8) !important;
    color: var(--text-muted) !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: var(--radius-sm) 0 0 0 !important;
}

.leaflet-control-attribution a {
    color: var(--accent-primary) !important;
}

/* Leaflet Popup (if used) */
.leaflet-popup-content-wrapper {
    background: var(--bg-elevated) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-tip {
    background: var(--bg-elevated) !important;
}

/* Measurement Labels on Map - v0.9.62 high contrast */
.measurement-label {
    background: #1565C0;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid #0d47a1;
}

.area-label {
    background: transparent !important;
    border: none !important;
}

.area-label .measurement-label {
    background: #1565C0;
    color: #ffffff;
    border: 2px solid #0d47a1;
}

/* Leaflet PolylineMeasure Customization - high contrast */
.leaflet-control-polylineMeasure {
    display: none !important;
}

.measure-result-tooltip,
.polyline-measure-tooltip {
    background: #1565C0 !important;
    border: 2px solid #0d47a1 !important;
    color: #ffffff !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4) !important;
}

/* PolylineMeasure specific tooltips */
.polyline-measure-tooltip-end,
.polyline-measure-tooltip-total {
    background: #0d47a1 !important;
    border: 2px solid #1565C0 !important;
    color: #ffffff !important;
}

/* Utility */
.hidden { display: none !important; }
.visible { display: block !important; }
.flex { display: flex !important; }
@media print { .app-header, .app-footer, .logger-console, .suggestions-panel { display: none !important; } .app-main { margin-bottom: 0; } }

/* =====================================================
   v0.10.5 - Project Save Modal Styles
   ===================================================== */

.modal-body textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.author-info .author-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.author-info .author-display .material-icons-round {
    font-size: 18px;
    color: var(--accent-primary);
}

.author-info .author-id {
    color: var(--text-tertiary);
    font-size: 11px;
    margin-left: auto;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
}

.btn-outline .material-icons-round {
    font-size: 18px;
}

/* Modal footer with 3 buttons */
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
