/* =============================================
   PlanRoute.nl - Mobiel-First CSS
   ============================================= */

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

:root {
    --color-primary: #2d6a4f;
    --color-primary-dark: #1b4332;
    --color-primary-light: #52b788;
    --color-secondary: #40916c;
    --color-success: #40916c;
    --color-danger: #e63946;
    --color-warning: #f4a261;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-text: #212529;
    --color-text-light: #6c757d;
    --color-border: #dee2e6;
    --color-route: #2d6a4f;
    --color-position: #4285f4;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --header-height: 52px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Header */
#app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--header-height) + var(--safe-top));
    padding-top: var(--safe-top);
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 8px;
    padding-right: 8px;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

#header-title {
    display: none;
    font-size: 18px;
    font-weight: 600;
}

.transport-mode-badge {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.transport-mode-badge:hover { background: rgba(255,255,255,0.35); }

.transport-mode-popup {
    position: fixed;
    top: 56px;
    right: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    padding: 6px;
    z-index: 10001;
    min-width: 140px;
}
.transport-mode-popup.hidden { display: none; }
.transport-mode-popup-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
}
.transport-mode-popup-btn:hover { background: var(--color-bg-alt); }
.transport-mode-popup-btn svg { flex-shrink: 0; color: var(--color-text-light); }
.transport-mode-popup-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 10px;
    font-size: 12px;
    color: var(--color-text-light);
    cursor: pointer;
}
.transport-mode-popup-option input { margin: 0; }

.icon-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

.icon-btn.active {
    background: rgba(255,255,255,0.28);
    color: #fff;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.75);
}

/* Header Language Selector */
.lang-selector { position: relative; }
.lang-btn { font-size: 20px; line-height: 1; }
.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 1100;
    min-width: 56px;
}
.lang-dropdown.hidden { display: none; }
.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    transition: background 0.15s;
}
.lang-dropdown-item:hover { background: var(--color-bg-alt); }
.lang-dropdown-item.active { background: #d8f3dc; color: var(--color-primary-dark); }
.lang-dropdown-flag { font-size: 18px; }
.lang-dropdown-name { font-size: 12px; letter-spacing: 0.5px; }

/* Auth language bar */
.auth-lang-bar {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 12px;
}
.auth-lang-btn {
    border: none;
    background: var(--color-bg-alt);
    font-size: 18px;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    line-height: 1;
}
.auth-lang-btn:hover { background: #d8f3dc; transform: scale(1.1); }
.auth-lang-btn.active { background: #d8f3dc; outline: 2px solid var(--color-primary); }
.icon-btn:active { background: rgba(255,255,255,0.25); }

/* Kaart */
#map {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

#map.map-click-mode {
    cursor: crosshair !important;
}

#map.map-click-mode .leaflet-container {
    cursor: crosshair !important;
}

/* Sidebar */
.sidebar { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 2000; }
.sidebar.hidden { display: none; }
.sidebar-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.3s; }
.sidebar.visible .sidebar-overlay { opacity: 1; }
.sidebar-content { position: absolute; top: 0; left: 0; bottom: 0; width: 296px; max-width: 85vw; background: var(--color-bg); transform: translateX(-100%); transition: transform 0.3s ease; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.sidebar.visible .sidebar-content { transform: translateX(0); }
.sidebar-header { background: var(--color-primary); color: white; padding: 16px; display: flex; align-items: center; justify-content: space-between; padding-top: calc(16px + var(--safe-top)); }
.sidebar-header h2 { font-size: 20px; font-weight: 600; }

/* ============================================ */
/* HEADER BANNERS — animated header gradients    */
/* ============================================ */
.header-sunset {
    background: linear-gradient(135deg, #ff512f, #f09819, #ff7e5f) !important;
    background-size: 200% 200% !important;
    animation: header-shift 4s ease-in-out infinite !important;
}
.header-aurora {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364, #1a5276, #6dd5fa) !important;
    background-size: 400% 400% !important;
    animation: header-shift 6s ease-in-out infinite !important;
}
.header-ocean {
    background: linear-gradient(135deg, #0072ff, #00c6ff, #0072ff, #00a8ff) !important;
    background-size: 300% 300% !important;
    animation: header-shift 5s ease-in-out infinite !important;
}
.header-forest {
    background: linear-gradient(135deg, #0f380f, #306230, #0f380f, #4a7c4a) !important;
    background-size: 200% 200% !important;
    animation: header-shift 5s ease-in-out infinite !important;
}
.header-neon-night {
    background: linear-gradient(135deg, #1a0033, #4a0072, #1a0033, #6a00ff) !important;
    background-size: 300% 300% !important;
    animation: header-shift 3s ease-in-out infinite !important;
    box-shadow: inset 0 0 30px rgba(106,0,255,0.3) !important;
}
.header-cosmic {
    background: linear-gradient(135deg, #1a0533, #2d1b69, #4a0072, #1a0533, #7b1fa2) !important;
    background-size: 400% 400% !important;
    animation: header-shift 8s ease-in-out infinite !important;
}
.header-golden-glow {
    background: linear-gradient(135deg, #8b6914, #d4a017, #f9d423, #d4a017, #8b6914) !important;
    background-size: 300% 300% !important;
    animation: header-shift 4s ease-in-out infinite !important;
}
.header-rainbow {
    background: linear-gradient(135deg, #ff0000, #ff8800, #ffff00, #00cc00, #0066ff, #9900ff, #ff0000) !important;
    background-size: 500% 500% !important;
    animation: header-shift 3s linear infinite !important;
}
@keyframes header-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================ */
/* MENU BACKGROUNDS — light sidebar bg patterns  */
/* ============================================ */
.bg-clouds .sidebar-content {
    background:
        linear-gradient(180deg, #d6e4f0 0%, #c5d9ed 30%, #e8f0fe 70%, #f0f4ff 100%);
}
.bg-spring .sidebar-content {
    background:
        linear-gradient(180deg, #c8e6c9 0%, #dcedc8 30%, #e8f5e9 60%, #f1f8e9 100%);
}
.bg-beach .sidebar-content {
    background:
        linear-gradient(180deg, #ffe0b2 0%, #ffecb3 20%, #e8e0d8 50%, #e3f2fd 100%);
}
.bg-mist .sidebar-content {
    background:
        linear-gradient(180deg, #d5d5d5 0%, #e0e0e0 30%, #ececec 60%, #f5f5f5 100%);
}
.bg-snow .sidebar-content {
    background:
        linear-gradient(180deg, #c8d8f0 0%, #dae2f0 30%, #e8f0fe 60%, #fafcff 100%);
}
.bg-peach .sidebar-content {
    background:
        linear-gradient(180deg, #f8d5cc 0%, #fce0d8 30%, #fff0eb 60%, #fff5f0 100%);
}
.bg-lavender .sidebar-content {
    background:
        linear-gradient(180deg, #d5c8e8 0%, #e0d5f0 30%, #ede4f8 60%, #faf5ff 100%);
}
.bg-dawn .sidebar-content {
    background:
        linear-gradient(180deg, #fdd9b5 0%, #ffe8cc 25%, #fef3c7 50%, #e2e8f0 80%, #e0ecff 100%);
}
.sidebar-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-divider { height: 1px; background: var(--color-border); margin: 4px 16px; }
.sidebar-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-light, #adb5bd); padding: 6px 16px 2px; }
.sidebar-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: none; border: none; color: var(--color-text); font-size: 15px; cursor: pointer; text-align: left; transition: background 0.2s; text-decoration: none; }
.sidebar-item:hover { background: var(--color-bg-alt); }
.sidebar-item svg { color: var(--color-primary); flex-shrink: 0; }

.sidebar-donate {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.sidebar-donate svg {
    color: #e63946;
}

.sidebar-donate:hover {
    background: #fff0f0;
}
.sidebar-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}
.sidebar-item.locked:hover {
    background: transparent;
}
.locked-label {
    display: block;
    font-size: 10px;
    color: var(--color-text-light);
    font-weight: 400;
    margin-top: 2px;
    line-height: 1.2;
}
.sidebar-section { padding: 12px 16px; }
.sidebar-section h3 { font-size: 13px; text-transform: uppercase; color: var(--color-text-light); margin-bottom: 8px; letter-spacing: 0.5px; }
.sidebar-info { font-size: 13px; color: var(--color-text-light); margin-bottom: 4px; }
.sidebar-body hr { border: none; border-top: 1px solid var(--color-border); margin: 8px 0; }

/* Sidebar User Info */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-alt);
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.sidebar-user:hover {
    background: var(--color-border);
}

/* ============================================ */
/* BANNERS — rectangular frames around sidebar   */
/* ============================================ */
.sidebar-user[class*="banner-"] {
    margin: 8px 8px;
    border-radius: 12px;
    background: var(--color-bg-alt);
}

.sidebar-user[class*="banner-"]::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 16px;
    z-index: -1;
    pointer-events: none;
}

/* GOLD BANNER */
.banner-gold::before {
    background: linear-gradient(135deg, #b8860b, #ffd700, #ffec80, #ffd700, #b8860b);
    background-size: 300% 300%;
    animation: banner-gold-shimmer 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255,215,0,0.4);
}
@keyframes banner-gold-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* SILVER BANNER */
.banner-silver::before {
    background: linear-gradient(135deg, #a0a0a0, #c0c0c0, #e8e8e8, #c0c0c0, #a0a0a0);
    background-size: 200% 200%;
    animation: banner-silver-sheen 3s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(192,192,192,0.3);
}
@keyframes banner-silver-sheen {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* BRONZE BANNER */
.banner-bronze::before {
    background: linear-gradient(135deg, #8b5a2b, #cd7f32, #e8a860, #cd7f32, #8b5a2b);
    box-shadow: 0 0 8px rgba(205,127,50,0.35);
}

/* NEON BANNER */
.banner-neon::before {
    background: linear-gradient(135deg, #ff00ff, #00ffff, #ffff00, #ff0066, #ff00ff);
    background-size: 400% 400%;
    animation: banner-neon-cycle 2s linear infinite;
    box-shadow: 0 0 12px rgba(255,0,255,0.5), 0 0 24px rgba(0,255,255,0.3);
}
@keyframes banner-neon-cycle {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* WOOD BANNER */
.banner-wood::before {
    background: linear-gradient(135deg, #4e342e, #5d4037, #795548, #8d6e63, #795548, #5d4037, #4e342e);
    box-shadow: 0 0 6px rgba(62,39,35,0.3);
}

/* CRYSTAL BANNER */
.banner-crystal::before {
    background: linear-gradient(135deg, #b2ebf2, #80deea, #4dd0e1, #e0f7fa, #4dd0e1, #80deea, #b2ebf2);
    background-size: 300% 300%;
    animation: banner-crystal-sparkle 2.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(77,208,225,0.4), 0 0 20px rgba(128,222,234,0.2);
}
@keyframes banner-crystal-sparkle {
    0%, 100% { background-position: 0% 50%; opacity: 0.95; }
    50% { background-position: 100% 50%; opacity: 1; }
}

/* FLAME BANNER */
.banner-flame::before {
    background: linear-gradient(135deg, #ff0000, #ff4500, #ff6600, #ff8c00, #ff6600, #ff4500, #ff0000);
    background-size: 200% 200%;
    animation: banner-flame-flicker 1.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(255,69,0,0.5), 0 0 24px rgba(255,102,0,0.3);
}
@keyframes banner-flame-flicker {
    0%, 100% { background-position: 0% 50%; transform: scale(1); }
    25% { background-position: 25% 75%; transform: scale(1.01); }
    50% { background-position: 50% 25%; transform: scale(1); }
    75% { background-position: 75% 75%; transform: scale(1.005); }
}

/* DIAMOND BANNER */
.banner-diamond::before {
    background: linear-gradient(135deg, #b0d4ff, #80b8ff, #e0f0ff, #ffffff, #80b8ff, #b0d4ff, #ffd700);
    background-size: 300% 300%;
    animation: banner-diamond-glint 2s ease-in-out infinite;
    box-shadow:
        0 0 8px rgba(128,184,255,0.5),
        0 0 16px rgba(255,255,255,0.4),
        0 0 24px rgba(255,215,0,0.3),
        inset 0 0 8px rgba(255,255,255,0.3);
}
@keyframes banner-diamond-glint {
    0%, 100% { background-position: 0% 50%; }
    33% { background-position: 100% 0%; }
    66% { background-position: 0% 100%; }
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.user-avatar img {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 50%;
    position: relative; z-index: 2;
}

.user-avatar > span {
    position: relative; z-index: 2;
}

/* Frame active: shrink inner image to leave ring gap */
.user-avatar.frame-fire img,
.user-avatar.frame-ice img,
.user-avatar.frame-rainbow img,
.user-avatar.frame-gold img,
.user-avatar.frame-galaxy img,
.user-avatar.frame-lightning img,
.user-avatar.frame-flower img,
.user-avatar.frame-ocean img,
.user-avatar.frame-nature img,
.user-avatar.frame-neon img {
    width: 32px; height: 32px;
}
.user-avatar.frame-fire,
.user-avatar.frame-ice,
.user-avatar.frame-rainbow,
.user-avatar.frame-gold,
.user-avatar.frame-galaxy,
.user-avatar.frame-lightning,
.user-avatar.frame-flower,
.user-avatar.frame-ocean,
.user-avatar.frame-nature,
.user-avatar.frame-neon {
    overflow: visible;
}

/* Letter fallback with frame: also shrink */
.user-avatar.frame-fire > span,
.user-avatar.frame-ice > span,
.user-avatar.frame-rainbow > span,
.user-avatar.frame-gold > span,
.user-avatar.frame-galaxy > span,
.user-avatar.frame-lightning > span,
.user-avatar.frame-flower > span,
.user-avatar.frame-ocean > span,
.user-avatar.frame-nature > span,
.user-avatar.frame-neon > span {
    font-size: 14px;
}

.user-avatar .frame-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* Shared frame spin */
@keyframes frame-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* FIRE */
.frame-fire .frame-ring {
    background: conic-gradient(from 0deg, #ff4500, #ff6600, #ff8c00, #ff4500);
    animation: frame-spin 3s linear infinite;
    box-shadow: 0 0 8px rgba(255,69,0,0.5);
}
@keyframes frame-fire-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(255,69,0,0.5), 0 0 16px rgba(255,102,0,0.3); }
    50% { box-shadow: 0 0 12px rgba(255,69,0,0.8), 0 0 24px rgba(255,140,0,0.5); }
}
.frame-fire .frame-ring { animation: frame-spin 3s linear infinite, frame-fire-glow 2s ease-in-out infinite; }

/* ICE */
.frame-ice .frame-ring {
    background: conic-gradient(from 0deg, #00bfff, #00e5ff, #80f0ff, #00bfff);
    animation: frame-spin 4s linear infinite;
}
@keyframes frame-ice-sparkle {
    0%, 100% { box-shadow: 0 0 8px rgba(0,191,255,0.4); }
    25% { box-shadow: 0 0 12px rgba(0,229,255,0.7), 0 0 20px rgba(128,240,255,0.3); }
    75% { box-shadow: 0 0 14px rgba(0,229,255,0.6), 0 0 18px rgba(128,240,255,0.2); }
}
.frame-ice .frame-ring { animation: frame-spin 4s linear infinite, frame-ice-sparkle 3s ease-in-out infinite; }

/* RAINBOW */
.frame-rainbow .frame-ring {
    background: conic-gradient(from 0deg, #ff0000, #ff9900, #ffff00, #00cc00, #0066ff, #9900ff, #ff0000);
    animation: frame-spin 2s linear infinite;
    box-shadow: 0 0 10px rgba(255,0,0,0.3);
}

/* GOLD */
.frame-gold .frame-ring {
    background: conic-gradient(from 0deg, #b8860b, #ffd700, #ffec80, #ffd700, #b8860b, #ffd700, #ffec80, #ffd700, #b8860b);
    animation: frame-spin 5s linear infinite;
}
@keyframes frame-gold-shimmer {
    0%, 100% { box-shadow: 0 0 10px rgba(255,215,0,0.4); filter: brightness(1); }
    50% { box-shadow: 0 0 16px rgba(255,215,0,0.7), 0 0 24px rgba(255,236,128,0.3); filter: brightness(1.15); }
}
.frame-gold .frame-ring { animation: frame-spin 5s linear infinite, frame-gold-shimmer 2.5s ease-in-out infinite; }

/* GALAXY */
.frame-galaxy .frame-ring {
    background: conic-gradient(from 0deg, #4a0080, #7b1fa2, #e040fb, #00e5ff, #4a0080, #7b1fa2, #e040fb, #00e5ff, #4a0080);
    animation: frame-spin 6s linear infinite;
}
@keyframes frame-galaxy-twinkle {
    0%, 100% { box-shadow: 0 0 12px rgba(124,31,162,0.5); }
    33% { box-shadow: 0 0 16px rgba(224,64,251,0.6), 0 0 24px rgba(0,229,255,0.3); }
    66% { box-shadow: 0 0 14px rgba(74,0,128,0.5), 0 0 20px rgba(224,64,251,0.3); }
}
.frame-galaxy .frame-ring { animation: frame-spin 6s linear infinite, frame-galaxy-twinkle 4s ease-in-out infinite; }

/* LIGHTNING */
.frame-lightning .frame-ring {
    background: conic-gradient(from 0deg, #0044aa, #0066ff, #00ccff, #ffffff, #00ccff, #0066ff, #0044aa);
    animation: frame-spin 2.5s linear infinite;
}
@keyframes frame-lightning-flash {
    0%, 90%, 100% { box-shadow: 0 0 6px rgba(0,102,255,0.4); }
    92% { box-shadow: 0 0 20px rgba(0,204,255,0.9), 0 0 40px rgba(255,255,255,0.5); }
    94% { box-shadow: 0 0 6px rgba(0,102,255,0.4); }
    96% { box-shadow: 0 0 16px rgba(0,204,255,0.8), 0 0 32px rgba(255,255,255,0.4); }
}
.frame-lightning .frame-ring { animation: frame-spin 2.5s linear infinite, frame-lightning-flash 4s step-end infinite; }

/* FLOWER */
.frame-flower .frame-ring {
    background: conic-gradient(from 0deg, #ff69b4, #ff1493, #ffb6c1, #ff69b4, #ff1493, #ffb6c1, #ff69b4);
    animation: frame-spin 8s linear infinite;
    box-shadow: 0 0 8px rgba(255,105,180,0.4);
}
@keyframes frame-flower-bloom {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}
.frame-flower .frame-ring { animation: frame-spin 8s linear infinite, frame-flower-bloom 3s ease-in-out infinite; }

/* OCEAN */
.frame-ocean .frame-ring {
    background: conic-gradient(from 0deg, #003366, #0066cc, #00aaff, #0066cc, #003366);
    animation: frame-spin 4s linear infinite;
}
@keyframes frame-ocean-wave {
    0%, 100% { box-shadow: 0 0 8px rgba(0,102,204,0.4); }
    50% { box-shadow: 0 0 14px rgba(0,170,255,0.6), 0 0 20px rgba(0,51,102,0.3); }
}
.frame-ocean .frame-ring { animation: frame-spin 4s linear infinite, frame-ocean-wave 2s ease-in-out infinite; }

/* NATURE */
.frame-nature .frame-ring {
    background: conic-gradient(from 0deg, #1b5e20, #4caf50, #8bc34a, #4caf50, #1b5e20);
    animation: frame-spin 6s linear infinite;
}
@keyframes frame-nature-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(76,175,80,0.4); }
    50% { box-shadow: 0 0 12px rgba(139,195,74,0.6); }
}
.frame-nature .frame-ring { animation: frame-spin 6s linear infinite, frame-nature-pulse 3s ease-in-out infinite; }

/* NEON */
.frame-neon .frame-ring {
    background: conic-gradient(from 0deg, #ff00ff, #00ffff, #ff0066, #ffff00, #ff00ff);
    animation: frame-spin 2s linear infinite;
}
@keyframes frame-neon-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(255,0,255,0.5), 0 0 16px rgba(0,255,255,0.3); }
    33% { box-shadow: 0 0 12px rgba(0,255,255,0.6), 0 0 20px rgba(255,0,102,0.4); }
    66% { box-shadow: 0 0 10px rgba(255,255,0,0.5), 0 0 18px rgba(255,0,255,0.3); }
}
.frame-neon .frame-ring { animation: frame-spin 2s linear infinite, frame-neon-glow 1.5s ease-in-out infinite; }

.user-info {
    overflow: hidden;
}

.user-info strong {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info small {
    font-size: 12px;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Bottom Panel */
.bottom-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 900;
    transition: transform 0.3s ease;
    max-height: 55vh;
    overflow-y: auto;
    padding-bottom: var(--safe-bottom);
}

.bottom-panel.hidden {
    display: none;
}

.bottom-panel.collapsed {
    transform: translateY(calc(100% - 44px));
}

.panel-handle {
    width: 36px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin: 0 auto;
}

.panel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.panel-toggle-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.panel-toggle-arrow {
    transition: transform 0.3s ease;
    color: var(--color-text-light);
}

.bottom-panel.collapsed .panel-toggle-arrow {
    transform: rotate(180deg);
}

.input-placeholder {
    text-align: center;
    padding: 16px 0;
    color: var(--color-text-light);
    font-size: 14px;
}

.input-placeholder p {
    margin: 0;
}

.panel-content {
    padding: 0 14px 14px;
}

/* Tabs */
.tab-bar {
    display: flex;
    gap: 2px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 12px;
}

.tab {
    flex: 1;
    padding: 8px 4px;
    border: none;
    background: none;
    color: var(--color-text-light);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.tab.active {
    background: white;
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

/* Compactere tabs wanneer de opname-tab aanwezig is (5 tabs) */
.tab-bar:has(.tab-record) .tab {
    font-size: 12px;
    padding: 8px 3px;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.hidden { display: none !important; }

/* Address Search Tab */
.address-search-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.address-search-row {
    display: flex;
    gap: 8px;
}

.address-go-btn {
    flex-shrink: 0;
    padding: 10px 16px;
}

.address-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.address-search-icon {
    position: absolute;
    left: 12px;
    color: var(--color-text-light);
    pointer-events: none;
}

.address-search-input {
    width: 100%;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px 36px 10px 40px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.address-search-input:focus {
    border-color: var(--color-primary);
}

.address-search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.address-suggestions {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-bg-alt);
    transition: background 0.15s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--color-bg-alt);
}

.suggestion-main {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

.suggestion-sub {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 2px;
}

.suggestion-empty {
    color: var(--color-text-light);
    font-style: italic;
    cursor: default;
}

.address-result {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 14px;
}

.address-result-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--color-text);
}

.address-result-coords {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 2px;
}

.address-result-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.address-result-actions .btn-primary,
.address-result-actions .btn-secondary {
    flex: 1;
}

.address-route-mode {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px;
}

.address-route-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 8px 0;
}

.address-route-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.address-use-btn {
    flex: 1;
    padding: 8px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: var(--color-text-light);
}

.address-use-btn.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(45, 106, 79, 0.05);
}

.address-waypoints-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.btn-full {
    width: 100%;
}

/* AI Input */
.ai-input-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.ai-input {
    flex: 1;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    line-height: 1.4;
    min-height: 44px;
    max-height: 100px;
}

.ai-input:focus { border-color: var(--color-primary); }
.ai-input::placeholder { color: var(--color-text-light); }

/* Buttons */
.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
}

.btn-primary:hover { background: var(--color-primary-dark); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { background: var(--color-text-light); cursor: not-allowed; }

.btn-secondary {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-secondary:hover { background: var(--color-border); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-success {
    background: var(--color-success);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.btn-danger {
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 6px 0;
}

.btn-full { width: 100%; justify-content: center; margin-top: 10px; }

/* Waypoints (Handmatige invoer) */
.waypoint-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 8px;
}

.waypoint-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    position: relative;
}

.waypoint-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    color: white;
    border-radius: 50%;
}

.waypoint-icon.start { background: var(--color-success); }
.waypoint-icon.end { background: var(--color-danger); }
.waypoint-icon.via { background: var(--color-text-light); }

.waypoint-input-wrap {
    flex: 1;
    position: relative;
}

.waypoint-input {
    width: 100%;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 32px 10px 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.waypoint-input:focus { border-color: var(--color-primary); }
.waypoint-input::placeholder { color: var(--color-text-light); font-size: 13px; }

.waypoint-remove {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    border-radius: 50%;
}

.waypoint-remove:hover { color: var(--color-danger); background: var(--color-bg-alt); }

/* Waypoint connectie lijn */
.waypoint-list .waypoint-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 29px;
    top: 26px;
    width: 2px;
    height: 8px;
    background: var(--color-border);
}

/* Waypoint suggestions */
.waypoint-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 200;
    max-height: 180px;
    overflow-y: auto;
}

.waypoint-suggestions.hidden { display: none; }

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid var(--color-bg-alt);
    line-height: 1.3;
}

.suggestion-item:hover { background: var(--color-bg-alt); }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item .suggestion-main { font-weight: 500; }
.suggestion-item .suggestion-sub { font-size: 11px; color: var(--color-text-light); margin-top: 2px; }

/* Manual options */
.manual-options {
    display: flex;
    gap: 16px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

/* Features Overlay */
.features-overlay { position: fixed; inset: 0; background: white; z-index: 2000; overflow-y: auto; display: none; }
.features-overlay.show { display: block; }
.features-header { position: sticky; top: 0; background: #2d6a4f; color: white; display: flex; align-items: center; padding: 12px 16px; gap: 12px; z-index: 1; }
.features-header button { background: none; border: none; color: white; font-size: 22px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.features-header button:hover { background: rgba(255,255,255,0.15); }
.features-header h2 { font-size: 17px; font-weight: 600; margin: 0; }
.features-body { padding: 24px 16px 40px; max-width: 420px; margin: 0 auto; }
.feature-card { display: flex; gap: 14px; background: #f8f9fa; border-radius: 12px; padding: 18px 14px; margin-bottom: 12px; align-items: flex-start; }
.feature-card-icon { font-size: 32px; flex-shrink: 0; width: 44px; text-align: center; }
.feature-card-text h3 { font-size: 14px; font-weight: 700; color: #1b4332; margin: 0 0 4px 0; }
.feature-card-text p { font-size: 13px; color: #6c757d; margin: 0; line-height: 1.4; }

/* Map Click Mode */
.map-click-info {
    text-align: center;
    padding: 8px 0;
}

.map-click-info p {
    font-size: 14px;
    margin-bottom: 4px;
}

.map-click-status {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 13px !important;
}

.map-click-waypoints {
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-wp-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.map-wp-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.map-wp-label {
    font-weight: 700;
    font-size: 13px;
    width: 16px;
    flex-shrink: 0;
}

.map-wp-name {
    flex: 1;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-wp-btn {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    cursor: pointer;
    font-size: 8px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    flex-shrink: 0;
    line-height: 1;
}

.map-wp-btn:hover:not(:disabled) {
    background: var(--color-border);
    color: var(--color-text);
}

.map-wp-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.map-wp-remove {
    color: var(--color-danger);
    border-color: transparent;
    font-size: 14px;
}

.map-wp-remove:hover {
    background: #fee;
    color: var(--color-danger) !important;
}

.map-click-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.map-click-actions .btn-primary {
    flex: 1;
}

/* Route Info */
.route-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}

.route-stat { text-align: center; }

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--color-text-light);
    text-transform: uppercase;
}

.route-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* Route Steps */
.route-steps {
    margin-top: 12px;
    border-top: 1px solid var(--color-border);
    padding-top: 12px;
}

.route-steps h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--color-text-light);
}

#steps-list { list-style: none; padding: 0; }

#steps-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-bg-alt);
    font-size: 13px;
    line-height: 1.4;
}

#steps-list li:last-child { border-bottom: none; }

#steps-list li .step-num {
    background: var(--color-primary);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

#steps-list li .step-text { flex: 1; }
#steps-list li .step-street { font-weight: 600; }
#steps-list li .step-distance { color: var(--color-text-light); font-size: 12px; }

/* Navigatie Panel */
.nav-panel {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background: var(--color-primary, #2d6a4f);
    color: white;
    z-index: 1500;
    padding-top: var(--safe-top);
}

.nav-panel.hidden { display: none; }

/* Overlay menu onder navigatiebalk tijdens navigatie */
.nav-panel:not(.hidden) + .leaflet-top.leaflet-right,
.nav-panel:not(.hidden) ~ .leaflet-top.leaflet-right,
#map .leaflet-top.leaflet-right { top: 10px; }
.nav-panel:not(.hidden) ~ #map .leaflet-top.leaflet-right,
body:has(.nav-panel:not(.hidden)) .leaflet-top.leaflet-right { top: 185px !important; }

/* Map padding tijdens navigatie — centreert binnen zichtbaar gebied */
.nav-panel:not(.hidden) ~ #map { padding-top: 140px; box-sizing: border-box; }
.nav-info { padding: 10px 16px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.nav-next { font-size: 14px; font-weight: 700; line-height: 1.3; }
.nav-details { display: flex; gap: 8px; font-size: 13px; opacity: 0.8; }
.nav-elapsed {
    font-size: 12px;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}
.nav-progress { height: 4px; background: rgba(255,255,255,0.3); }
.progress-bar { height: 100%; background: var(--color-primary-light); transition: width 0.5s ease; width: 0%; }
.nav-info-bar {
    display: flex;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.15);
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav-info-bar::-webkit-scrollbar { display: none; }
.info-bar-item { display: flex; gap: 4px; align-items: baseline; white-space: nowrap; flex-shrink: 0; }
.info-bar-value { font-weight: 700; }
.info-bar-label { font-size: 10px; opacity: 0.75; }

/* Navigatie Wind Bar */
.nav-wind-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
}
.nav-wind-bar.hidden { display: none; }
.nav-wind-compass {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #90caf9;
    flex-shrink: 0;
}
.nav-wind-speed {
    font-size: 12px;
    font-weight: 700;
}
.nav-wind-dir-label {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    white-space: nowrap;
}
.nav-wind-temp {
    font-size: 11px;
    margin-left: auto;
    opacity: 0.85;
}
.nav-wind-dir-label.headwind { background: rgba(244,67,54,0.35); }
.nav-wind-dir-label.tailwind { background: rgba(76,175,80,0.35); }
.nav-wind-dir-label.crosswind { background: rgba(255,193,7,0.35); }
.nav-actions { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 8px; }
.nav-speed { font-size: 14px; opacity: 0.8; }
.nav-arrival { font-size: 14px; font-weight: 700; opacity: 0.9; letter-spacing: 0.5px; }
.nav-actions .btn-secondary,
.nav-actions .btn-danger { flex-shrink: 0; }
.nav-actions .btn-secondary svg { display: block; }

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}
.btn-icon:hover { background: rgba(255,255,255,0.2); }
.btn-icon.nav-center-on { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.2); }
.btn-icon.nav-center-off { border-color: rgba(255,255,255,0.25); background: transparent; opacity: 0.5; }
.btn-icon.nav-rotate-on { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.2); }
.btn-icon.nav-rotate-off { border-color: rgba(255,255,255,0.25); background: transparent; opacity: 0.5; }
.btn-icon.nav-speech-on { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.2); }
.btn-icon.nav-speech-off { border-color: rgba(255,255,255,0.25); background: transparent; opacity: 0.5; }

.nav-pause-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(244, 162, 97, 0.25);
    border-top: 1px solid rgba(244, 162, 97, 0.4);
}
.nav-pause-bar.hidden { display: none; }
.nav-pause-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}
.nav-pause-time {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* Ritsamenvatting modal */
.ride-summary-box {
    background: white; border-radius: 16px; padding: 20px;
    max-width: 420px; width: 95%; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.ride-summary-box h3 {
    font-size: 18px; font-weight: 700; color: var(--color-text);
    text-align: center; margin: 0 0 12px;
}
.ride-summary-map {
    width: 100%; height: 200px; border-radius: 10px;
    overflow: hidden; margin-bottom: 14px; background: #e9ecef;
}
.ride-summary-name-input {
    width: 100%; padding: 10px 12px; border: 2px solid var(--color-border);
    border-radius: 8px; font-size: 14px; box-sizing: border-box;
}
.ride-summary-name-input:focus {
    outline: none; border-color: var(--color-primary);
}
.ride-summary-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin-bottom: 16px;
}
.ride-stat {
    background: var(--color-bg-alt, #f8f9fa);
    border-radius: 10px; padding: 12px 10px; text-align: center;
}
.ride-stat-value {
    display: block; font-size: 18px; font-weight: 700;
    color: var(--color-primary, #2d6a4f);
}
.ride-stat-label {
    display: block; font-size: 11px; color: var(--color-text-light, #6c757d);
    margin-top: 2px;
}
.ride-summary-actions {
    display: flex; gap: 8px; justify-content: flex-end;
}
.ride-summary-actions button {
    padding: 10px 20px; border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
}

@media (max-width: 360px) {
    .nav-info-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.nav-segment-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(0,0,0,0.15);
    gap: 12px;
}

.nav-segment-controls.hidden { display: none; }

.nav-segment-controls .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
}

.nav-segment-info {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    flex: 1;
    white-space: nowrap;
}

/* Tour Overlay */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2500;
}

.tour-overlay.hidden { display: none; }

.tour-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.tour-spotlight {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    transition: all 0.4s ease;
    pointer-events: none;
}

.tour-card {
    position: absolute;
    left: 50%;
    bottom: 120px;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 420px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    z-index: 1;
}

.tour-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.tour-content p {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.5;
}

.tour-progress {
    height: 4px;
    background: var(--color-bg-alt);
    border-radius: 2px;
    margin: 16px 0;
    overflow: hidden;
}

.tour-progress-bar {
    height: 100%;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tour-nav {
    display: flex;
    gap: 8px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.loading-overlay.hidden { display: none; }

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
#loading-text { font-size: 14px; color: var(--color-text-light); }

/* Friend Request Banner */
.friend-request-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: calc(12px + var(--safe-top, 0px));
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    animation: bannerSlideIn 0.3s ease;
}

.friend-request-banner-text {
    font-size: 14px;
    font-weight: 600;
}

.friend-request-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.friend-request-banner-link {
    color: white;
    text-decoration: underline;
    font-size: 14px;
    font-weight: 600;
}

.friend-request-banner-link:hover {
    opacity: 0.85;
}

.friend-request-banner-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.8;
}

.friend-request-banner-close:hover {
    opacity: 1;
}

@keyframes bannerSlideIn {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Toast */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--safe-top) + 8px);
    left: 8px;
    right: 8px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--color-text);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 5.5s forwards;
    pointer-events: auto;
    white-space: pre-line;
    max-width: 100%;
}

.toast.success { background: var(--color-success); }
.toast.error { background: var(--color-danger); }
.toast.info { background: var(--color-primary); }
.toast.warning { background: var(--color-warning); color: var(--color-text); }

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

/* Leaflet */
.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow-sm) !important; }
.leaflet-control-zoom a { width: 36px !important; height: 36px !important; line-height: 36px !important; font-size: 18px !important; color: var(--color-text) !important; }

.gps-position-marker {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Desktop */
@media (min-width: 768px) {
    .bottom-panel {
        left: 50%;
        transform: translateX(-50%);
        width: 480px;
        max-width: 90vw;
    }
    .bottom-panel.hidden { transform: translateX(-50%) translateY(100%); }
    .bottom-panel.collapsed { transform: translateX(-50%) translateY(calc(100% - 44px)); }
    #app-header { padding-left: 16px; padding-right: 16px; }
    .panel-content { padding: 0 24px 20px; }
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

/* =============================================
   Routebeheer Panel
   ============================================= */
.routes-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1800;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
}

.routes-panel.hidden { display: none; }

.routes-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    padding-top: calc(8px + var(--safe-top));
    background: var(--color-primary);
    color: white;
    flex-shrink: 0;
}

.routes-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}
.routes-back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    color: white; text-decoration: none; font-weight: 500; font-size: 14px;
    background: rgba(255,255,255,0.15); padding: 8px 12px; border-radius: 8px;
    border: none; cursor: pointer;
}

.routes-count {
    font-size: 13px;
    opacity: 0.8;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 12px;
}

.routes-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.routes-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.routes-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
}

.routes-empty svg { margin-bottom: 16px; }
.routes-empty p { margin-bottom: 8px; font-size: 15px; }
.routes-empty-sub { font-size: 13px !important; }

.routes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.route-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.route-card:active {
    box-shadow: var(--shadow-md);
}

.route-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
}

.route-card-icon {
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.route-card-icon svg {
    width: 18px;
    height: 18px;
}

.route-card-info {
    flex: 1;
    overflow: hidden;
}

.route-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-card-meta {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 2px;
}

.route-card-meta span {
    margin-right: 10px;
}

.route-card-actions {
    display: flex;
    gap: 4px;
    padding: 0 14px 12px;
    border-top: 1px solid var(--color-bg-alt);
    padding-top: 10px;
}

.route-card-actions .btn-sm {
    flex: 1;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg-alt);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.15s;
}

.route-card-actions .btn-sm:hover { background: var(--color-border); }

.route-card-actions .btn-sm.primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.route-card-actions .btn-sm.primary:hover { background: var(--color-primary-dark); }

.route-card-actions .btn-sm.danger {
    color: var(--color-danger);
    border-color: var(--color-danger);
    background: white;
}

.route-card-actions .btn-sm.danger:hover { background: #fff0f0; }

.route-card[draggable="true"] { cursor: grab; }
.route-card[draggable="true"] .route-card-header { cursor: grab; }
.route-card.dragging { opacity: 0.4; border: 2px dashed var(--color-primary); }
.route-card.drag-over { border-top: 3px solid var(--color-primary); }

.poi-card .poi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.poi-card-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.poi-card-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

.poi-card-btn:hover {
    background: var(--color-border);
}

.poi-card-btn.center {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.poi-card-btn.center:hover {
    background: var(--color-primary);
    color: white;
}

.poi-card-btn.edit {
    color: var(--color-text-light);
}

.poi-card-btn.edit:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.poi-card-btn.delete {
    color: var(--color-text-light);
}

.poi-card-btn.delete:hover {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}

/* Rename input */
.route-rename-input {
    width: 100%;
    padding: 6px 8px;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    background: var(--color-bg-alt);
}

/* Route folders */
.route-folder {
    margin-bottom: 4px;
}
.route-folder-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
    user-select: none;
}
.route-folder-header:hover { background: var(--color-border); }
.route-folder-count { font-weight: 400; color: var(--color-text-light); font-size: 13px; }
.route-folder-cards { padding-left: 12px; }
.route-folder.collapsed .route-folder-cards { display: none; }

/* Route visibility badges */
.route-vis-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}
.route-vis-badge.publiek { background: #d4edda; color: #155724; }
.route-vis-badge.vrienden { background: #cce5ff; color: #004085; }
.route-vis-badge.prive { background: #fff3cd; color: #856404; }

/* Route label tag */
.route-label-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    background: #e2e3e5;
    color: #495057;
}

/* Search routes panel */
.search-routes-filters {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}
.search-routes-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.search-routes-input:focus { outline: none; border-color: var(--color-primary); }
/* POI Main Tabs (POI's / Tankstations / Laadpalen) */
.pois-main-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    border-bottom: 2px solid var(--color-bg-alt, #e9ecef);
}
.pois-main-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--color-text-light, #6c757d);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}
.pois-main-tab:hover { color: var(--color-text, #212529); background: var(--color-bg-alt, #f8f9fa); }
.pois-main-tab.active {
    color: var(--color-primary, #2d6a4f);
    border-bottom-color: var(--color-primary, #2d6a4f);
}

/* Station card */
.station-card {
    background: white; border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 10px; overflow: hidden;
}
.station-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; cursor: pointer;
}
.station-card-brand {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: white; flex-shrink: 0;
}
.station-card-info { flex: 1; min-width: 0; }
.station-card-name { font-size: 14px; font-weight: 600; color: var(--color-text, #212529); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-card-meta { font-size: 11px; color: var(--color-text-light, #6c757d); margin-top: 2px; }
.station-card-arrow { font-size: 12px; color: var(--color-text-light, #adb5bd); transition: transform 0.2s; }
.station-card.expanded .station-card-arrow { transform: rotate(180deg); }
.station-card-body { display: none; padding: 0 14px 14px; }
.station-card.expanded .station-card-body { display: block; }
.station-prices-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.station-price-item {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 8px; background: var(--color-bg-alt, #f8f9fa);
    border-radius: 6px;
}
.station-price-label { font-size: 11px; color: var(--color-text-light, #6c757d); width: 55px; flex-shrink: 0; }
.station-price-input {
    width: 100%; padding: 4px 6px; border: 1px solid var(--color-border, #dee2e6);
    border-radius: 4px; font-size: 13px; font-weight: 600;
    color: var(--color-text, #212529); background: white;
}
.station-price-input:focus { border-color: var(--color-primary, #2d6a4f); outline: none; }
.station-price-date { font-size: 9px; color: var(--color-text-light, #adb5bd); grid-column: 1 / -1; }
.station-card-actions {
    display: flex; gap: 6px; padding-top: 8px;
    border-top: 1px solid var(--color-bg-alt, #e9ecef);
}
.station-detail-row { font-size: 12px; color: var(--color-text-light, #6c757d); padding: 3px 0; }
.station-detail-row a { color: var(--color-primary, #2d6a4f); text-decoration: none; }
.station-card-save {
    padding: 6px 14px; border: none; border-radius: 6px;
    background: var(--color-primary, #2d6a4f); color: white;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background 0.2s;
}
.station-card-save:hover { background: #1b4332; }
.station-card-save:disabled { opacity: 0.5; cursor: not-allowed; }

.search-routes-tabs {
    display: flex;
    gap: 8px;
}
.search-tab {
    padding: 6px 14px;
    border: 2px solid var(--color-border);
    border-radius: 20px;
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text);
    transition: all 0.15s;
}
.search-tab.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.search-tab:hover:not(.active) { border-color: var(--color-primary); }

/* Confirm dialog */
.route-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.route-confirm-box {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    max-width: 340px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.route-confirm-box h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--color-text);
}

.route-confirm-box p {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.route-confirm-actions {
    display: flex;
    gap: 10px;
}

.route-confirm-actions button {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}

.route-confirm-cancel {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border) !important;
}

.route-confirm-cancel:hover { background: var(--color-border); }

.route-confirm-delete {
    background: var(--color-danger);
    color: white;
}

.route-confirm-delete:hover { background: #c1121f; }

/* =============================================
   Fietsnetwerk Toggle
   ============================================= */
.network-toggle {
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.network-toggle:has(input:checked) {
    border-color: var(--color-primary);
    background: #e8f5e9;
}

.network-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    margin-right: 8px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.network-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.network-toggle-label svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.ai-options {
    display: flex;
    gap: 8px;
    padding: 6px 0;
}

.ai-options .network-toggle {
    flex: 1;
}

@media (max-width: 480px) {
    .network-toggle-label {
        font-size: 12px;
    }
    .network-toggle-label svg {
        width: 12px;
        height: 12px;
    }
}

.route-network-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #e8f5e9;
    color: var(--color-primary);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.route-network-badge.hidden { display: none; }

.route-network-badge svg {
    flex-shrink: 0;
}

.route-segment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.route-segment-badge.hidden { display: none; }

.route-segment-badge svg {
    flex-shrink: 0;
}

.segment-header {
    background: #e3f2fd;
    color: #1565c0;
    padding: 6px 10px;
    margin: 8px 0 4px 0;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    list-style: none;
}

.segment-header span {
    font-weight: 700;
}

.segment-header small {
    opacity: 0.85;
}

.segment-toggle {
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.segment-toggle:has(input:checked) {
    border-color: var(--color-primary);
    background: #e8f5e9;
}

.segment-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    margin-right: 8px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.segment-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.segment-toggle-label svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.map-click-options {
    display: flex;
    padding: 10px 0;
    margin: 0 4px;
}

@media (max-width: 480px) {
    .segment-toggle-label {
        font-size: 12px;
    }
    .segment-toggle-label svg {
        width: 12px;
        height: 12px;
    }
}

/* =============================================
   Laag Toggle Knoppen
   ============================================= */
.layer-toggles {
    position: fixed;
    bottom: 280px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.layer-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    white-space: nowrap;
    font-family: var(--font-body);
}

.layer-toggle-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.layer-toggle-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.layer-toggle-btn svg {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .layer-toggles {
        bottom: 260px;
        right: 8px;
    }
    .layer-toggle-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    .layer-toggle-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* =============================================
   Instellingen Panel
   ============================================= */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1800;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
}

.settings-panel.hidden { display: none; }

.settings-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    padding-top: calc(8px + var(--safe-top));
    background: var(--color-primary);
    color: white;
    flex-shrink: 0;
}

.settings-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.settings-section {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.settings-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.settings-hint {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 6px;
    line-height: 1.4;
}

.settings-icons {
    display: flex;
    gap: 10px;
}

.icon-option {
    width: 52px;
    height: 52px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-option svg {
    width: 26px;
    height: 26px;
    color: var(--color-text-light);
}

.icon-option:hover {
    border-color: var(--color-primary);
}

.icon-option.active {
    border-color: var(--color-primary);
    background: #e8f5e9;
}

.icon-option.active svg {
    color: var(--color-primary);
}

.settings-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-bg-alt);
}

.settings-color-row:last-child {
    border-bottom: none;
}

.settings-color-row label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

.settings-color-row input[type="color"] {
    width: 40px;
    height: 32px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
    background: white;
}

@media (max-width: 480px) {
    .settings-icons {
        gap: 8px;
    }
    .icon-option {
        width: 46px;
        height: 46px;
    }
    .icon-option svg {
        width: 22px;
        height: 22px;
    }
}

/* =============================================
   Map POIs
   ============================================= */

/* Tag Mode Knop */
.tag-mode-btn {
    position: fixed;
    bottom: 280px;
    left: 10px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    transition: all 0.2s;
}

.tag-mode-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tag-mode-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.3);
}

.tag-mode-btn.hidden {
    display: none;
}

@media (max-width: 480px) {
    .tag-mode-btn {
        bottom: 260px;
        left: 8px;
        width: 44px;
        height: 44px;
    }
}

/* Tag Modal */
.tag-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.tag-modal.hidden {
    display: none;
}

/* Route save modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-overlay.hidden {
    display: none;
}
.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 400px;
    width: calc(100% - 32px);
    box-shadow: var(--shadow-lg);
}
.modal-box h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: var(--color-text);
}
.modal-field {
    margin-bottom: 12px;
}
.modal-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 4px;
}
.modal-field input,
.modal-field select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
}
.modal-field input:focus,
.modal-field select:focus {
    outline: none;
    border-color: var(--color-primary);
}
.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}
.modal-cancel,
.modal-save {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--color-border);
    font-family: inherit;
}
.modal-cancel {
    background: white;
    color: var(--color-text);
}
.modal-cancel:hover { background: var(--color-bg-alt); }
.modal-save {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.modal-save:hover { background: var(--color-primary-dark); }

.tag-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.tag-modal-box {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 380px;
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

.tag-modal-box h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.tag-modal-coords {
    font-size: 12px;
    color: var(--color-text-light);
    margin-bottom: 16px;
    font-family: monospace;
}

.tag-modal-field {
    margin-bottom: 16px;
}

.tag-modal-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.tag-modal-field input[type="text"],
.tag-modal-field input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.tag-modal-field input[type="text"]:focus,
.tag-modal-field input[type="password"]:focus {
    border-color: var(--color-primary);
}

/* Categorie knoppen */
.tag-category-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.tag-cat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.tag-cat-btn:hover {
    border-color: var(--color-primary);
}

.tag-cat-btn.active {
    border-color: var(--color-primary);
    background: #e8f5e9;
    color: var(--color-primary);
}

.tag-cat-btn svg {
    flex-shrink: 0;
}

/* Zichtbaarheid knoppen */
.tag-visibility-options {
    display: flex;
    gap: 8px;
}

.tag-vis-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.tag-vis-btn:hover {
    border-color: var(--color-primary);
}

.tag-vis-btn.active {
    border-color: var(--color-primary);
    background: #e8f5e9;
    color: var(--color-primary);
}

.tag-vis-btn svg {
    flex-shrink: 0;
}

/* Modal acties */
.tag-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.tag-modal-actions .btn-secondary {
    flex: 1;
}

.tag-modal-actions .btn-primary {
    flex: 1;
}

.tag-modal-actions .btn-danger {
    flex: 1;
}

.error-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #856404;
}

/* Tag Marker op kaart */
.tag-marker {
    background: transparent !important;
    border: none !important;
}

.tag-marker-inner {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid white;
    line-height: 1;
}

.tag-marker-inner > * {
    transform: rotate(45deg);
}

/* POI cluster (per categorie) */
.poi-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 52px;
    height: 30px;
    padding: 0 10px;
    border-radius: 15px;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    font-weight: 700;
    font-size: 13px;
    line-height: 30px;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.poi-cluster:hover {
    transform: scale(1.1);
}

.poi-cluster-emoji {
    font-size: 15px;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35));
}

/* Tag Popup */
.tag-popup {
    min-width: 160px;
}

.tag-popup-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.tag-popup-emoji {
    font-size: 18px;
}

.tag-popup-vis {
    margin-left: auto;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.tag-popup-vis.prive {
    background: #fff3cd;
    color: #856404;
}

.tag-popup-vis.publiek {
    background: #d4edda;
    color: #155724;
}

.tag-popup-vis.vrienden {
    background: #cce5ff;
    color: #004085;
}

.tag-popup-note {
    font-size: 13px;
    color: var(--color-text-light);
    margin: 4px 0 8px;
}

.tag-popup-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 2px 0 4px;
}

.tag-popup-address {
    font-size: 12px;
    color: var(--color-text-light);
    margin: 0 0 4px;
    word-break: break-word;
}

.tag-popup-url {
    font-size: 12px;
    margin: 0 0 4px;
    word-break: break-word;
}

.tag-popup-url a {
    color: var(--color-primary);
    text-decoration: none;
}

.tag-popup-url a:hover {
    text-decoration: underline;
}

.tag-popup-actions {
    border-top: 1px solid var(--color-border);
    padding-top: 8px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.tag-popup-navigate {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
}

.tag-popup-navigate:hover {
    background: var(--color-primary-dark, #1b4332);
}

.tag-popup-delete {
    background: none;
    border: none;
    color: var(--color-danger);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}

.tag-popup-delete:hover {
    text-decoration: underline;
}

.tag-popup-votes {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.tag-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 2px solid var(--color-border);
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    transition: all 0.15s;
}

.tag-vote-btn:hover {
    background: var(--color-bg-alt);
}

.tag-vote-btn.tag-vote-up.active {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
}

.tag-vote-btn.tag-vote-down.active {
    border-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.tag-vote-icon {
    font-size: 14px;
}

.tag-vote-count {
    min-width: 12px;
    text-align: center;
}

/* Tag Overlay Toggles in Settings */
.tag-overlays-section .settings-subtitle {
    font-size: 12px;
    color: var(--color-text-light);
    margin-bottom: 12px;
    margin-top: -8px;
}

.tag-overlay-toggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.tag-overlay-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    cursor: pointer;
    transition: all 0.2s;
}

.tag-overlay-toggle:has(input:checked) {
    border-color: var(--color-primary);
    background: #e8f5e9;
}

.tag-overlay-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.tag-overlay-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.tag-overlay-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

/* ========== GAST GEBRUIKER (niet ingelogd) ========== */

body.guest #input-panel {
    display: none;
}

body.guest #btn-tag-mode {
    display: none !important;
}

body.guest #btn-start-navigation {
    display: none;
}

body.guest #nav-panel {
    display: none;
}

body.guest .route-actions {
    display: none;
}

/* Login prompt overlay */
.guest-login-prompt {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
    padding: 20px 28px;
    text-align: center;
    max-width: 360px;
    width: calc(100% - 48px);
    animation: guestPromptSlideUp 0.35s ease-out;
}

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

.guest-login-prompt h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

.guest-login-prompt p {
    margin: 0 0 14px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.guest-login-prompt .guest-login-btn {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.guest-login-prompt .guest-login-btn:hover {
    background: var(--color-primary-dark, #1a5c3a);
}

.guest-login-prompt .guest-register-link {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.guest-login-prompt .guest-register-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.guest-login-prompt .guest-register-link a:hover {
    text-decoration: underline;
}

/* =============================================
   Route Description & Star Rating
   ============================================= */

.route-description {
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.4;
    margin-top: 4px;
    padding: 6px 0;
    border-top: 1px solid var(--color-border);
}

textarea.modal-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

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

/* Stars */
.star-rating { display: inline-flex; align-items: center; gap: 2px; cursor: default; }
.star-rating.clickable { cursor: pointer; }
.star-rating .star { font-size: 18px; color: #ddd; user-select: none; position: relative; display: inline-block; }
.star-rating .star.active { color: #f4a261; }
.star-rating .star.half { color: #ddd; }
.star-rating .star.half::before { content: '\2605'; position: absolute; left: 0; top: 0; width: 50%; overflow: hidden; color: #f4a261; }

.route-rating-section {
    padding: 10px 0;
    border-top: 1px solid var(--color-border);
    margin-top: 8px;
}

.route-rating-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.route-rating-info {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 4px;
}

.rating-count {
    font-size: 12px;
    color: var(--color-text-light);
}
