/* ============================================================
   UI/UX PRO MAX - ISRAELI TRAILS DESIGN SYSTEM
   Mobile-First Elite Responsive & Glassmorphism Experience
   ============================================================ */

:root {
    /* Brand & Accents */
    --primary:             #10b981; /* Emerald Green */
    --primary-dark:        #059669;
    --primary-glow:        rgba(16, 185, 129, 0.35);
    --accent-blue:         #3b82f6;
    --accent-blue-glow:    rgba(59, 130, 246, 0.35);
    --gold:                #fbbf24;
    --gold-glow:           rgba(251, 191, 36, 0.4);

    /* Backgrounds & Glass Surfaces */
    --bg-dark:             #0b1320; /* Deep Obsidian Blue */
    --bg-surface:          #111c30;
    --surface-card:        rgba(23, 37, 63, 0.7);
    --surface-hover:       rgba(34, 54, 90, 0.75);
    --surface-active:      rgba(16, 185, 129, 0.16);

    /* Glass Panels & Borders */
    --glass-panel:         rgba(13, 23, 42, 0.92);
    --glass-border:        rgba(255, 255, 255, 0.12);
    --glass-border-subtle: rgba(255, 255, 255, 0.06);
    --glass-border-hover:  rgba(255, 255, 255, 0.24);

    /* Typography */
    --text-primary:        #f8fafc;
    --text-secondary:      #cbd5e1;
    --text-muted:          #94a3b8;
    --text-subtle:         #64748b;

    /* Status Colors */
    --danger:              #ef4444;
    --danger-glow:         rgba(239, 68, 68, 0.35);
    --success:             #10b981;
    --warning:             #f59e0b;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows & Elevation */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.55);
    --shadow-inner: inset 0 1px 1px rgba(255, 255, 255, 0.1);

    /* Layout & Sizing */
    --header-height:       58px;
    --drawer-peek:         58px;
    --sidebar-width:       390px;
    --tap-min:             44px;

    /* Transitions & Motion */
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: all 0.24s var(--ease-out);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: 'Assistant', 'Rubik', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    overscroll-behavior: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-font-smoothing: antialiased;
    height: 100%;
    overflow: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}

/* ============================================================
   APP SHELL
   ============================================================ */
#app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    height: 100vh;
    direction: rtl;
    overflow: hidden;
    background: var(--bg-dark);
    position: relative;
}

/* ============================================================
   HEADER — SLEEK GLASS BAR
   ============================================================ */
header.glass-panel {
    flex-shrink: 0;
    height: var(--header-height);
    padding: 0 var(--space-3);
    display: flex;
    align-items: center;
    background: rgba(11, 19, 32, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 500;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--space-2);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.logo {
    height: 2.1rem;
    width: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s var(--ease-bounce);
}

.logo:active {
    transform: scale(0.95);
}

.header-brand-text {
    min-width: 0;
}

header h1 {
    font-family: 'Rubik', 'Assistant', sans-serif;
    font-size: clamp(0.95rem, 3.8vw, 1.35rem);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(135deg, #ffffff 40%, #a7f3d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    display: none;
    letter-spacing: 0.01em;
}

@media (min-width: 640px) {
    header.glass-panel {
        padding: 0 var(--space-4);
        height: 64px;
    }
    .logo {
        height: 2.4rem;
    }
    .header-subtitle {
        display: block;
    }
}

/* Header Tools & Basemap Selector */
.header-tools {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.header-basemap-list {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-full);
}

.basemap-card {
    flex-shrink: 0;
    padding: 4px 10px;
    height: 32px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.basemap-card .card-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.card-thumb.bg-streets { background-color: #3b82f6; }
.card-thumb.bg-ortho   { background-color: #f59e0b; }

.basemap-card .card-title {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.basemap-card:active {
    transform: scale(0.95);
}

.basemap-card.active {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 10px var(--primary-glow);
}

.basemap-card.active .card-title {
    color: #ffffff;
    font-weight: 700;
}

.basemap-card.active .card-thumb {
    border-color: var(--primary);
    box-shadow: 0 0 6px var(--primary);
}

/* Header Stat Badge (Desktop) */
.header-stat {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 3px 12px;
    min-width: 64px;
    box-shadow: var(--shadow-inner);
}

@media (min-width: 640px) {
    .header-stat {
        display: flex;
    }
}

.header-stat-num {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #6ee7b7;
    line-height: 1;
}

.header-stat-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   MAP CONTAINER & LEAFLET CANVAS
   ============================================================ */
#map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
    touch-action: pan-x pan-y pinch-zoom;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ============================================================
   PERSISTENT TOP TRAIL INFO BAR (MOBILE OPTIMIZED)
   ============================================================ */
.trail-top-bar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    width: min(94%, 720px);
    background: rgba(11, 19, 32, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.2);
    padding: 10px 14px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    opacity: 1;
    pointer-events: auto;
}

.trail-top-bar.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -24px) scale(0.95);
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.top-bar-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.top-bar-badge {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 10px currentColor;
}

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

.top-bar-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.top-bar-subtitle {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.top-bar-chip {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-full);
    padding: 3px 8px;
    white-space: nowrap;
}

.top-bar-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    text-decoration: none;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.top-bar-btn:hover,
.top-bar-btn:active {
    background: var(--primary);
    border-color: #34d399;
    box-shadow: 0 0 12px var(--primary-glow);
}

.top-bar-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.top-bar-close:active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(0.92);
}

@media (max-width: 640px) {
    .trail-top-bar {
        width: calc(100% - 16px);
        top: 8px;
        padding: 8px 10px;
    }
    .top-bar-title {
        font-size: 0.86rem;
    }
    .top-bar-subtitle {
        font-size: 0.7rem;
    }
}

/* ============================================================
   LEAFLET ZOOM CONTROL
   ============================================================ */
.leaflet-control-zoom {
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    box-shadow: var(--shadow-md) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(11, 19, 32, 0.9) !important;
    margin: 10px 0 0 10px !important;
}

.leaflet-control-zoom a {
    background: transparent !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    transition: var(--transition-smooth);
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 1.15rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #34d399 !important;
}

/* ============================================================
   FLOATING ACTION BUTTONS (GPS & POI TOGGLE)
   ============================================================ */
.map-floating-controls {
    position: absolute;
    bottom: calc(var(--drawer-peek) + 14px);
    left: 14px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: bottom 0.35s var(--ease-out);
}

@media (min-width: 1024px) {
    .map-floating-controls {
        bottom: 24px;
        left: 20px;
    }
}

.fab-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(11, 19, 32, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    box-shadow: var(--shadow-md), 0 4px 14px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.24s var(--ease-bounce);
}

.fab-btn:active {
    transform: scale(0.92);
}

.fab-btn:hover {
    background: var(--bg-surface);
    color: #ffffff;
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg), 0 0 16px var(--primary-glow);
}

.fab-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: #34d399;
    box-shadow: 0 0 18px var(--primary-glow), 0 4px 14px rgba(0,0,0,0.4);
}

/* ============================================================
   MOBILE DRAWER BACKDROP
   ============================================================ */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 440;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 1024px) {
    .drawer-backdrop {
        display: none !important;
    }
}

/* ============================================================
   SIDEBAR & DRAWER (MOBILE BOTTOM SHEET & DESKTOP GRID)
   ============================================================ */
aside#sidebar {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    height: 80vh;
    height: 80dvh;
    max-height: calc(100dvh - var(--header-height));
    transform: translateY(calc(100% - var(--drawer-peek)));
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(11, 19, 32, 0.94);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-top: 1px solid var(--glass-border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 450;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.65);
    overflow: hidden;
}

aside#sidebar.open {
    transform: translateY(0);
}

/* Drawer handle button for mobile */
.drawer-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: var(--drawer-peek);
    padding: 6px var(--space-4);
    cursor: pointer;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    flex-shrink: 0;
    outline: none;
}

.drawer-handle-bar {
    width: 42px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
    transition: background 0.2s, transform 0.2s;
}

.drawer-handle:active .drawer-handle-bar,
aside#sidebar.open .drawer-handle-bar {
    background: var(--primary);
    transform: scaleX(1.15);
}

.drawer-handle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.drawer-handle-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.drawer-count-badge {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    padding: 2px 8px;
}

.drawer-chevron {
    color: var(--text-muted);
    transition: transform 0.35s var(--ease-out);
}

aside#sidebar.open .drawer-chevron {
    transform: rotate(180deg);
}

.drawer-content {
    flex: 1;
    padding: 0 var(--space-4) var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

/* Desktop Sidebar Layout */
@media (min-width: 1024px) {
    #app {
        display: grid;
        grid-template-columns: var(--sidebar-width) 1fr;
        grid-template-rows: var(--header-height) 1fr;
        grid-template-areas:
            "header  header"
            "sidebar map";
    }

    header.glass-panel {
        grid-area: header;
    }

    #map-container {
        grid-area: map;
    }

    aside#sidebar {
        grid-area: sidebar;
        position: static;
        height: calc(100vh - var(--header-height));
        max-height: calc(100vh - var(--header-height));
        transform: none !important;
        border-top: none;
        border-inline-start: 1px solid var(--glass-border);
        border-radius: 0;
        box-shadow: none;
        background: rgba(11, 19, 32, 0.88);
        overflow: hidden;
    }

    .drawer-handle {
        display: none;
    }

    .drawer-content {
        padding: var(--space-4);
    }
}

/* ============================================================
   CONTROLS, SEARCH & FILTERS
   ============================================================ */
.control-group {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.control-group h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6ee7b7;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Search Input */
.search-input {
    width: 100%;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0 var(--space-4);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition-smooth);
}

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

.search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ─── Filter Section Labels ─── */
.filter-section-header {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-top: 2px;
}

/* Region Filter Pills */
.region-filter-group {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.region-filter-group::-webkit-scrollbar {
    display: none;
}

.region-pill {
    flex: 1;
    min-width: fit-content;
    padding: 6px 12px;
    height: 36px;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--surface-card);
    color: var(--text-muted);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.region-pill:active {
    transform: scale(0.95);
}

.region-pill.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-color: #34d399;
    box-shadow: 0 3px 12px var(--primary-glow);
}

/* Color / Trail Type Filter Pills */
.color-filter-group {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.color-filter-group::-webkit-scrollbar {
    display: none;
}

.color-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    height: 34px;
    font-size: 0.74rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--surface-card);
    color: var(--text-muted);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    flex-shrink: 0;
}

.color-pill-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.color-pill:active {
    transform: scale(0.95);
}

.color-pill.active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ============================================================
   ROUTE LIST (CARDS)
   ============================================================ */
.route-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 2px;
    padding-bottom: var(--space-4);
    min-height: 0;
}

.route-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 12px 14px;
    min-height: 50px;
    background: var(--surface-card);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.route-item:active {
    transform: scale(0.98);
    background: var(--surface-hover);
}

.route-item:hover {
    background: var(--surface-hover);
    border-color: var(--glass-border-hover);
    transform: translateX(-3px);
}

.route-item.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
}

.route-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    flex: 1;
}

.route-color-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: var(--space-6) 0;
}

/* ============================================================
   LOADER OVERLAY
   ============================================================ */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.5s var(--ease-out);
}

.loader-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(16, 185, 129, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

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

.loader-overlay p {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    margin-top: var(--space-4);
}
