/* ==========================================================================
   MapPath Studio - Core Design System & Stylesheet
   ========================================================================== */

:root {
    --bg-dark: #0a0b10;
    --bg-panel: rgba(13, 15, 24, 0.72);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-glow-blue: rgba(56, 189, 248, 0.3);
    --border-glow-red: rgba(244, 63, 94, 0.3);
    
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    
    --accent-red: #f43f5e;
    --accent-red-hover: #e11d48;
    --accent-red-glow: rgba(244, 63, 94, 0.4);
    
    --accent-blue: #38bdf8;
    --accent-blue-hover: #0ea5e9;
    --accent-blue-glow: rgba(56, 189, 248, 0.4);
    
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.4);
    
    --glass-blur: 16px;
    --transition-speed: 0.25s;
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Layout Elements */
#map-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

/* Canvas Overlay covering Leaflet Map */
#overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 400; /* Stays above map layers but below UI panels */
    pointer-events: none; /* Let clicks pass through unless tool is active */
}

.overlay-active {
    pointer-events: auto !important;
    cursor: crosshair;
}

/* Premium UI Overlay Wrappers */
.ui-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500; /* Stays fully on top of map and drawings */
    pointer-events: none; /* Let clicks pass to map in gaps */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
}

/* Glassmorphic Panel Layout */
.control-panel {
    width: 380px;
    background: var(--bg-panel);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    pointer-events: auto; /* Re-enable clicks for controls */
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: slideInLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition: border-color var(--transition-speed), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* Logo and Header */
.panel-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.logo-icon {
    color: var(--accent-blue);
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 8px var(--accent-blue-glow));
}

.logo h1 {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo h1 span {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.logo-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.app-logo-img-auth {
    height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
}

/* Search Box and suggestions */
.search-section {
    display: flex;
    flex-direction: column;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2px 8px;
    transition: all var(--transition-speed) ease;
}

.search-box:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px var(--border-glow-blue);
    background: rgba(255, 255, 255, 0.07);
}

.search-icon {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    margin-left: 6px;
    margin-right: 10px;
}

.search-box input {
    flex: 1;
    height: 40px;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-inter);
}

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

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-blue);
}

.icon-btn i {
    width: 16px;
    height: 16px;
}

/* Suggestions Dropdown */
.suggestions-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: rgba(13, 15, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.suggestions-list::-webkit-scrollbar {
    width: 6px;
}

.suggestions-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.suggestions-list li {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s ease;
}

.suggestions-list li:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.suggestions-list li i {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: middle;
    color: var(--accent-blue);
}

.hidden {
    display: none !important;
}

/* Drawing Tools Styling */
.tools-section h2 {
    font-family: var(--font-outfit);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.tool-buttons {
    display: flex;
    gap: 12px;
}

.tool-btn {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-btn i {
    width: 18px;
    height: 18px;
}

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

/* Active Button States */
#tool-pen.active {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(244, 63, 94, 0.07);
    box-shadow: inset 0 0 12px rgba(244, 63, 94, 0.15), 0 0 15px rgba(244, 63, 94, 0.15);
}

#tool-label.active {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.07);
    box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.15), 0 0 15px rgba(56, 189, 248, 0.15);
}

#tool-highlight.active {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.07);
    box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.15), 0 0 15px rgba(56, 189, 248, 0.15);
}

.tool-row-separator {
    height: 12px;
}

.highlight-container {
    position: relative;
    width: 100%;
}

.tool-btn.full-width {
    width: 100%;
    justify-content: space-between;
    padding: 0 16px;
}

.dropdown-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform var(--transition-speed);
}

.tool-btn.active .dropdown-chevron {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

.highlight-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: rgba(13, 15, 24, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1100;
    box-shadow: 0 12px 30px rgba(0,0,0,0.7);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.highlight-dropdown li {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s ease;
}

.highlight-dropdown li:hover {
    background: rgba(56, 189, 248, 0.08);
    color: var(--text-primary);
}

.highlight-dropdown li.selected {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-blue);
    font-weight: 600;
}

.highlight-dropdown li .region-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Actions Section */
.actions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
    position: relative;
    overflow: hidden;
}

.action-btn.primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5), 0 0 10px rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

.action-btn.primary:active {
    transform: translateY(1px);
}

.action-btn i {
    width: 18px;
    height: 18px;
}

/* Status / Tips Bar */
.status-bar {
    align-self: center;
    pointer-events: auto;
    background: rgba(13, 15, 24, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 16px 8px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: border-color var(--transition-speed);
}

.status-bar.pen-active {
    border-color: var(--border-glow-red);
}

.status-bar.label-active {
    border-color: var(--border-glow-blue);
}

#status-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.status-cancel-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.status-cancel-btn:hover {
    background: rgba(255,255,255,0.15);
    color: var(--accent-red);
}

.status-cancel-btn i {
    width: 12px;
    height: 12px;
}

/* Floating Inline Label Dialog */
.label-dialog {
    position: absolute;
    z-index: 1000;
    pointer-events: auto;
    animation: scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dialog-content {
    background: rgba(15, 20, 32, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 20px rgba(56, 189, 248, 0.15);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 280px;
}

.dialog-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.label-dialog input {
    width: 100%;
    height: 40px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--text-primary);
    outline: none;
    font-size: 14px;
    font-family: var(--font-inter);
    transition: all 0.2s;
}

.label-dialog input:focus {
    border-color: var(--accent-blue);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

/* Glowing Color Picker */
.dialog-colors-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0;
}

.colors-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-outfit);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-options-picker {
    display: flex;
    gap: 8px;
}

.color-picker-opt {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--color-hex);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 6px var(--color-hex);
}

.color-picker-opt:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), 0 0 10px var(--color-hex);
}

.color-picker-opt.active {
    border-color: #ffffff;
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 16px var(--color-hex);
}

.dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.dialog-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.dialog-btn.secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
}

.dialog-btn.secondary:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.dialog-btn.danger {
    background: var(--accent-red);
    color: #ffffff;
}

.dialog-btn.danger:hover {
    background: var(--accent-red-hover);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}

.dialog-btn.primary {
    background: var(--accent-blue);
    color: #0b0c10;
}

.dialog-btn.primary:hover {
    background: #7dd3fc;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.dialog-arrow-anchor {
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: rgba(15, 20, 32, 0.94);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    pointer-events: none;
}

/* Fullscreen Export Overlay */
.export-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 10, 16, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.export-box {
    width: 460px;
    background: rgba(20, 24, 38, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 30px rgba(56, 189, 248, 0.1);
    display: flex;
    flex-direction: column;
    gap: 28px;
    text-align: center;
}

.export-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.export-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-blue);
    filter: drop-shadow(0 0 8px var(--accent-blue-glow));
}

.export-icon.animating {
    animation: rotatePulse 2s infinite ease-in-out;
}

.export-header h2 {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.export-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar-track {
    height: 6px;
    width: 100%;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
    transition: width 0.15s ease-out;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
}

#export-status-label {
    color: var(--text-muted);
}

#export-percentage {
    color: var(--accent-blue);
    font-family: var(--font-outfit);
    font-size: 13px;
}

/* Export Preview Container */
.preview-container {
    background: #06070a;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 4px;
    position: relative;
    overflow: hidden;
}

.preview-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    font-family: var(--font-outfit);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 10;
}

#preview-canvas-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#preview-canvas-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.export-footer {
    display: flex;
    justify-content: center;
}

.warning-text {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.warning-text i {
    width: 13px;
    height: 13px;
    color: var(--accent-blue);
}

/* Leaflet Dark Customizations */
.leaflet-container {
    background: #0b0c10 !important;
}

.leaflet-control-zoom {
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    border-radius: 10px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: var(--bg-panel) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.leaflet-control-zoom a:hover {
    background: rgba(255,255,255,0.1) !important;
    color: var(--accent-blue) !important;
}

.leaflet-bar a.leaflet-disabled {
    background: rgba(255,255,255,0.03) !important;
    color: rgba(255,255,255,0.2) !important;
}

.leaflet-control-attribution,
.leaflet-bottom.leaflet-right {
    display: none !important;
}

/* Layouts Manager Styling */
.layouts-section h2 {
    font-family: var(--font-outfit);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.layout-save-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2px 8px;
    transition: all var(--transition-speed) ease;
    margin-bottom: 8px;
}

.layout-save-box:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px var(--border-glow-blue);
    background: rgba(255, 255, 255, 0.07);
}

.layout-save-box input {
    flex: 1;
    height: 40px;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-inter);
}

.layout-save-box input::placeholder {
    color: var(--text-muted);
}

.layouts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 2px;
}

.layouts-list::-webkit-scrollbar {
    width: 4px;
}

.layouts-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.layout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.layout-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.layout-item.active {
    border-color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.1), 0 0 12px rgba(56, 189, 248, 0.15);
}

.active-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px var(--accent-blue);
    vertical-align: middle;
}

.layout-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 70%;
}

.layout-name {
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.layout-actions {
    display: flex;
    gap: 6px;
}

.layout-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.layout-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.layout-action-btn.load:hover {
    color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.layout-action-btn.delete:hover {
    color: var(--accent-red);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.2);
}

.layout-action-btn i {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes rotatePulse {
    0% {
        transform: rotate(0deg) scale(1);
        filter: drop-shadow(0 0 6px var(--accent-blue-glow));
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.6));
    }
    100% {
        transform: rotate(360deg) scale(1);
        filter: drop-shadow(0 0 6px var(--accent-blue-glow));
    }
}

/* ==========================================================================
   User Session Profile (Sidebar Header)
   ========================================================================== */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.user-session-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-login-trigger {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: var(--font-outfit);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.1);
}

.btn-login-trigger:hover {
    background: var(--accent-blue);
    color: var(--bg-dark);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 20px;
    max-width: 160px;
}

.user-profile-badge i {
    width: 13px;
    height: 13px;
    color: var(--accent-blue);
}

.user-email {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.05);
    border: 1px solid rgba(244, 63, 94, 0.15);
    color: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--accent-red);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}

.btn-logout i {
    width: 12px;
    height: 12px;
}

/* ==========================================================================
   Floating Glass Auth Modal
   ========================================================================== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 10, 16, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.auth-box {
    position: relative;
    width: 380px;
    background: rgba(15, 20, 32, 0.76);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 30px rgba(56, 189, 248, 0.08);
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.auth-close-btn i {
    width: 14px;
    height: 14px;
}

.auth-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.auth-header h2 {
    font-family: var(--font-outfit);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.auth-header h2 span {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#auth-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

/* Authentication Tabs */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
}

.auth-tab-btn {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab-btn.active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent-blue);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Auth Form layout */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-tip-msg {
    display: flex;
    gap: 10px;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 12px;
    padding: 10px 14px;
    align-items: flex-start;
    animation: fadeInUp 0.3s;
}

.auth-tip-msg i {
    width: 16px;
    height: 16px;
    color: var(--accent-blue);
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-tip-msg span {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-family: var(--font-outfit);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 16px 0 42px;
    color: var(--text-primary);
    outline: none;
    font-size: 14px;
    font-family: var(--font-inter);
    transition: all 0.2s;
}

.input-wrapper input:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input:focus + .input-icon {
    color: var(--accent-blue);
}

/* Authentication Error Msg */
.auth-error-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(244, 63, 94, 0.06);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    animation: scaleIn 0.25s;
    text-align: left;
}

.auth-error-msg i {
    width: 15px;
    height: 15px;
    color: var(--accent-red);
    flex-shrink: 0;
}

.auth-error-msg span {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-red);
}

/* Auth Submit Button */
.auth-submit-btn {
    width: 100%;
    height: 46px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    color: #ffffff;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-submit-btn:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4), 0 0 10px rgba(56, 189, 248, 0.2);
    transform: translateY(-1px);
}

.auth-submit-btn:active {
    transform: translateY(1px);
}

/* Sidebar Collapse & Expand Styles */
.control-panel.collapsed {
    transform: translateX(-420px);
    opacity: 0;
    pointer-events: none;
}

.btn-collapse-sidebar {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.btn-collapse-sidebar:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-blue);
}

.btn-collapse-sidebar i {
    width: 20px;
    height: 20px;
}

.btn-expand-sidebar {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 600;
    pointer-events: auto;
    background: var(--bg-panel);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 18px;
    color: var(--text-primary);
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all var(--transition-speed) ease;
}

.btn-expand-sidebar:hover {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2);
}

.btn-expand-sidebar i {
    width: 18px;
    height: 18px;
    color: var(--accent-blue);
}

/* ==========================================================================
   Responsive / Mobile Styles (width <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .ui-wrapper {
        padding: 12px;
        flex-direction: column;
        justify-content: flex-start;
        gap: 12px;
        height: auto;
        max-height: 100%;
        overflow-y: hidden;
    }

    .control-panel {
        width: 100%;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        padding: 16px;
        gap: 16px;
    }

    .control-panel.collapsed {
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
    }

    .btn-expand-sidebar {
        top: 12px;
        left: 12px;
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 10px;
    }

    .status-bar {
        position: fixed;
        bottom: 12px;
        left: 12px;
        right: 12px;
        width: auto;
        align-self: stretch;
        padding: 8px 12px 8px 16px;
        justify-content: space-between;
        z-index: 1000;
    }

    .label-dialog {
        position: fixed !important;
        width: calc(100% - 24px) !important;
        left: 12px !important;
        top: 20% !important;
        transform: none !important;
        animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .dialog-content {
        width: 100%;
    }

    .dialog-arrow-anchor {
        display: none; /* Hide pointing arrow on mobile to prevent alignment bugs */
    }

    /* Auth modal responsive scales */
    .auth-box {
        width: calc(100% - 24px);
        margin: 12px;
        padding: 24px;
    }

    .export-box {
        width: calc(100% - 24px);
        margin: 12px;
        padding: 20px;
        gap: 20px;
    }

    .leaflet-control-zoom {
        display: none; /* Hide Leaflet zoom keys on mobile to prevent overlapping */
    }
}

/* ==========================================================================
   Logo Dropdown Menu & Chevron Styling
   ========================================================================== */
.logo-menu-container {
    position: relative;
    display: inline-block;
}

.logo#logo-menu-trigger {
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    margin-left: -10px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.logo#logo-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
}

.logo-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform var(--transition-speed);
    margin-top: 4px;
}

.logo#logo-menu-trigger:hover .logo-chevron {
    color: var(--accent-blue);
    transform: translateY(1px);
}

/* Status Indicator Dot */
.logo-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    transition: all var(--transition-speed);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
    margin-top: 4px;
}

.logo-status-dot.active {
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

/* Dropdown styling */
.logo-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 250px;
    background: rgba(13, 15, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 15px rgba(56, 189, 248, 0.1);
    z-index: 1200;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.header-user-icon {
    width: 12px;
    height: 12px;
    color: var(--accent-blue);
}

#dropdown-user-email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
    margin: 4px 0;
}

.dropdown-item {
    background: none;
    border: none;
    outline: none;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-family: var(--font-outfit);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
}

.dropdown-item i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.dropdown-item:hover {
    background: rgba(56, 189, 248, 0.08);
    color: var(--text-primary);
}

.dropdown-item:hover i {
    color: var(--accent-blue);
}

/* ==========================================================================
   Map Footer Links Styling (Clean, bottom right)
   ========================================================================== */
.map-footer {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 450;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-inter);
    background: rgba(10, 11, 16, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s;
}

.map-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.map-footer a:hover {
    color: var(--accent-blue);
    text-shadow: 0 0 6px var(--accent-blue-glow);
}

.footer-separator {
    color: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Floating Glass Info Modal
   ========================================================================== */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 10, 16, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.info-box {
    width: 820px;
    height: 580px;
    background: rgba(20, 24, 38, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    display: flex;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.1);
}

.info-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    z-index: 10;
}

.info-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-red);
    transform: rotate(90deg);
}

.info-close-btn i {
    width: 16px;
    height: 16px;
}

/* Modal Navigation Sidebar */
.info-tabs {
    width: 220px;
    background: rgba(10, 12, 19, 0.4);
    border-right: 1px solid var(--border-color);
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-tab-btn {
    background: none;
    border: none;
    outline: none;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.info-tab-btn i {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: color 0.2s;
}

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

.info-tab-btn.active {
    background: rgba(56, 189, 248, 0.08);
    color: var(--accent-blue);
    box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.05);
}

.info-tab-btn.active i {
    color: var(--accent-blue);
}

/* Content Area */
.info-content-wrapper {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.info-content-wrapper::-webkit-scrollbar {
    width: 6px;
}

.info-content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.info-section {
    animation: fadeIn 0.4s ease;
}

.info-section h2 {
    font-family: var(--font-outfit);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.info-section p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.info-section p.lead-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Help guide steps */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.guide-steps .step {
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
}

.guide-steps .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-blue);
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.guide-steps h3 {
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.guide-steps p {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.contact-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    color: var(--text-primary);
    outline: none;
    font-size: 14px;
    font-family: var(--font-inter);
    transition: all 0.2s;
    resize: none;
}

.contact-form textarea:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.contact-submit-btn {
    align-self: flex-start;
    height: 44px;
    padding: 0 24px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    color: #ffffff;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-submit-btn:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4), 0 0 10px rgba(56, 189, 248, 0.2);
    transform: translateY(-1px);
}

.contact-submit-btn i {
    width: 14px;
    height: 14px;
}

.contact-success-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--accent-green);
    font-size: 13px;
    font-weight: 500;
    animation: scaleIn 0.3s;
    margin-top: 16px;
}

.contact-success-msg i {
    width: 18px;
    height: 18px;
}

/* Legal text scroll box */
.scroll-legal {
    max-height: 380px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
}

.scroll-legal::-webkit-scrollbar {
    width: 4px;
}

.scroll-legal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.scroll-legal h3 {
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 8px;
}

.scroll-legal p {
    font-size: 13px;
    line-height: 1.5;
}

.meta-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-style: italic;
}

/* Responsive modal sizing for mobile */
@media (max-width: 768px) {
    .info-box {
        width: calc(100% - 24px);
        height: calc(100vh - 24px);
        margin: 12px;
        flex-direction: column;
    }
    
    .info-tabs {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
        flex-direction: row;
        overflow-x: auto;
        gap: 6px;
    }
    
    .info-tab-btn {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 8px;
        white-space: nowrap;
    }
    
    .info-tab-btn i {
        width: 14px;
        height: 14px;
    }
    
    .info-tab-btn span {
        display: none; /* Hide tab text on mobile, icons only to fit */
    }
    
    .info-tab-btn i + span {
        display: inline; /* If there is text inside, let's keep icons prominent */
    }

    .info-tab-btn span {
        display: inline; /* Keep inline text, horizontal scrolling handles it nicely */
    }

    .info-content-wrapper {
        padding: 24px 16px;
    }
    
    .info-section h2 {
        font-size: 20px;
    }
    
    .scroll-legal {
        max-height: 280px;
    }

    .map-footer {
        display: none; /* Hide legal corner links on mobile to save precious screen space */
    }
}

/* Unified Floating Path Actions Bar */
.floating-path-actions {
    position: absolute;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    pointer-events: auto;
    transition: all var(--transition-speed);
    animation: scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Action Buttons inside Bar */
.floating-path-actions button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
}

.floating-path-actions .action-btn-fix {
    background: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}

.floating-path-actions .action-btn-fix:hover {
    background: var(--accent-blue-hover);
    transform: scale(1.1) translateY(-1px);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.5);
}

.floating-path-actions .action-btn-fix i {
    width: 18px;
    height: 18px;
}

.floating-path-actions .action-btn-delete {
    background: var(--accent-red);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
}

.floating-path-actions .action-btn-delete:hover {
    background: var(--accent-red-hover);
    transform: scale(1.1) translateY(-1px);
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.5);
}

.floating-path-actions .action-btn-delete i {
    width: 18px;
    height: 18px;
}

/* Divider */
.floating-path-actions .action-bar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 6px;
}

/* Vehicle Picker Area */
.floating-path-actions .action-vehicle-picker {
    display: flex;
    gap: 6px;
}

.floating-path-actions .action-vehicle-picker .vehicle-opt {
    background: transparent;
    font-size: 22px; /* Made emojis significantly larger and more detailed/3D! */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.floating-path-actions .action-vehicle-picker .vehicle-opt:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.2) translateY(-2px);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.floating-path-actions .action-vehicle-picker .vehicle-opt.active {
    background: rgba(56, 189, 248, 0.3);
    border: 2px solid var(--accent-blue);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5), inset 0 1px 2px rgba(255,255,255,0.25);
    transform: scale(1.15);
    filter: drop-shadow(0 4px 6px rgba(56, 189, 248, 0.3));
}

/* Sticky Email Confirmation Warning Banner */
.confirm-email-bar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(251, 146, 60, 0.35); /* Vibrant Orange border */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 10px rgba(251, 146, 60, 0.15);
    pointer-events: auto;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: auto;
    max-width: 90%;
}

.confirm-email-bar .warning-bar-text {
    font-size: 13px;
    font-weight: 500;
    color: #fbd58c;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirm-email-bar .warning-bar-icon {
    color: #fb923c;
    width: 16px;
    height: 16px;
}

.confirm-email-bar .btn-resend-confirm {
    background: linear-gradient(135deg, #fb923c, #f43f5e);
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-outfit);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(251, 146, 60, 0.25);
    white-space: nowrap;
}

.confirm-email-bar .btn-resend-confirm:hover {
    box-shadow: 0 6px 14px rgba(251, 146, 60, 0.4);
    transform: translateY(-1px);
}

/* Google Sign-in & Divider Styles */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider:not(:empty)::before {
    margin-right: .5em;
}

.auth-divider:not(:empty)::after {
    margin-left: .5em;
}

.google-signin-btn-container {
    width: 100%;
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

/* Forgot & Back to Login link styles */
.forgot-pwd-link-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.forgot-pwd-link {
    font-size: 12px;
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-pwd-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.back-link-container {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.back-to-login-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.back-to-login-link:hover {
    color: var(--text-primary);
}

/* Recovery Panels Styling */
.auth-panel h3.panel-title {
    font-family: var(--font-outfit);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: left;
}

.auth-panel p.panel-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: left;
}

.auth-forgot-status-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
    color: var(--accent-green);
    font-size: 13px;
    text-align: left;
    margin-bottom: 16px;
}

.auth-forgot-status-msg i.success-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Account Settings Panel Styling */
.account-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.account-card-title {
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-card-title i {
    width: 18px;
    height: 18px;
    color: var(--accent-blue);
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.info-val {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Account forms */
.account-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-divider-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 24px 0;
}

.account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-outfit);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
    white-space: nowrap;
    width: fit-content;
}

.account-btn.primary {
    background: linear-gradient(135deg, var(--accent-blue), #0284c7);
    color: #0a0b10;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.account-btn.primary:hover {
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
    transform: translateY(-1px);
}

.account-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.account-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.account-btn.danger {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #f43f5e;
}

.account-btn.danger:hover {
    background: rgba(244, 63, 94, 0.25);
    transform: translateY(-1px);
}

.account-btn.outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.account-btn.outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.05);
}

/* Subscription Details */
.subscription-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sub-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 18px;
    border-radius: 8px;
}

.sub-status-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-plan-name {
    font-size: 14px;
    color: var(--text-primary);
}

.sub-plan-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.sub-status-badge {
    font-family: var(--font-outfit);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
}

.sub-status-badge.inactive {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.sub-status-badge.active {
    background: rgba(74, 222, 128, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.section-subtitle {
    font-family: var(--font-outfit);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tiers-grid-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.tier-card-placeholder {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    transition: all 0.2s;
}

.tier-card-placeholder.active {
    border-color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.03);
}

.tier-card-placeholder h5 {
    font-family: var(--font-outfit);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.tier-card-placeholder .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 6px;
}

.tier-card-placeholder .feature {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
}

.payment-methods-placeholder {
    margin-bottom: 16px;
}

.card-placeholder {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.card-placeholder i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.subscription-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* ==========================================================================
   Export Settings Panel Styles
   ========================================================================== */
.settings-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.settings-select:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
}

.settings-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

.settings-file-input {
    width: 100%;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 5px;
}

.settings-help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}
