/* =========================================
   SHARED STYLES
   ========================================= */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.preload {
    transition: none !important;
}

.lang-btn {
    text-decoration: none;
    font-size: 1.2rem;
    margin-left: 8px;
    filter: grayscale(100%);
    transition: 0.3s;
}

.lang-btn:hover,
.lang-btn.active {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.unit-badge {
    font-size: 0.9em;
    margin-right: 4px;
    margin-bottom: 4px;
}

.pos-tag {
    font-family: monospace;
    font-weight: bold;
    background: #eee;
    padding: 2px 5px;
    border-radius: 4px;
    margin-right: 5px;
}

/* Tijdlijn styling (CSS Grid Table) */
.route-grid {
    display: flex;
    /* Fallback */
    display: grid;
    grid-template-columns: 40px 55px 1fr;
    /* Line | Time | Station */
    gap: 0 10px;
    /* Row gap 0 (fix gaps), Column gap 10px */
    margin-bottom: 0;
    /* NO GAP between rows for continuous line */
    padding-bottom: 0;
}

.rt-time {
    text-align: right;
    font-family: monospace;
    color: var(--bs-body-color);
    font-size: 1rem;
    padding-top: 1px;
    padding-bottom: 6px;
    /* Moved spacing here */
    font-weight: 400;
    display: flex;
    /* Enable flex for centering child if needed */
    justify-content: flex-end;
    /* Default right align */
}

/* Center the red pipe specifically */
.rt-time .text-danger {
    width: 100%;
    text-align: center;
    display: block;
}

.rt-line {
    position: relative;
    display: flex;
    justify-content: center;
}

.rt-stat {
    padding-left: 0;
    padding-bottom: 6px;
    /* Moved spacing here */
    font-weight: 500;
    white-space: normal;
    /* Allow wrapping */
    overflow: visible;
    text-overflow: clip;
}

/* Timeline Dot & Line */
.rt-dot {
    width: 12px;
    height: 12px;
    background-color: #007bff;
    /* Always blue for consistency */
    border-radius: 50%;
    position: absolute;
    top: 7px;
    z-index: 2;
}

.rt-line-connector {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--bs-border-color);
    transform: translateX(-50%);
    z-index: 1;
}

/* Top half hidden for first item */
.route-grid:first-child .rt-line-connector {
    top: 7px;
}

/* Bottom half hidden for last item */
.route-grid:last-child .rt-line-connector {
    bottom: auto;
    height: 7px;
}

/* Modern UI Route Container override */
.modern-route-container {
    border-left: 4px solid #007bff !important;
    padding-left: 0 !important;
    border-radius: 4px;
    background-color: var(--bs-body-bg);
}

/* =========================================
   MODERN UI (Material Design 3 Inspired)
   ========================================= */
[data-ui-mode="modern"] {
    --md-bg: #FAF9F6;
    --md-surface: #FFFFFF;
    --md-surface-variant: #E9ECEF;
    /* Slightly darker for better contrast */
    --md-text: #191c1c;
    --md-primary: #0060a9;
    --md-border-radius: 16px;
    --md-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-ui-mode="modern"][data-bs-theme="dark"] {
    --md-bg: #0F0F0F;
    /* Slightly darker */
    --md-surface: #181818;
    /* Darker than 1E1E1E */
    --md-surface-variant: #252525;
    /* Darker than 2C2C2C */
    --md-text: #E1E2E1;
    --md-primary: #ede5c0;
    /* User requested color (Beige/Gold) */
    --md-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Dark Mode Badge Overrides */
[data-ui-mode="modern"][data-bs-theme="dark"] .unit-badge,
[data-ui-mode="modern"][data-bs-theme="dark"] .mobile-unit-badge {
    background-color: #2b2b2b !important;
    border-color: #404040 !important;
    color: #e0e0e0 !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .unit-badge a,
[data-ui-mode="modern"][data-bs-theme="dark"] .mobile-unit-badge a {
    color: #ede5c0 !important;
    /* Gold/Beige for links */
}

/* Dark Mode Button Overrides (Match Badges) */
[data-ui-mode="modern"][data-bs-theme="dark"] .btn-primary {
    background-color: #2b2b2b !important;
    border-color: #404040 !important;
    color: #ede5c0 !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .btn-primary:hover {
    background-color: #353535 !important;
    border-color: #ede5c0 !important;
}

/* Dark Mode Profile & Compare Overrides */
[data-ui-mode="modern"][data-bs-theme="dark"] .btn-outline-primary {
    background-color: #2b2b2b !important;
    border-color: #404040 !important;
    color: #ede5c0 !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #353535 !important;
    border-color: #ede5c0 !important;
    color: #ede5c0 !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .btn-outline-danger {
    background-color: #2b2b2b !important;
    border-color: #404040 !important;
    color: #ff6b6b !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .card-header.bg-primary {
    background-color: #2b2b2b !important;
    color: #ede5c0 !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .card-footer.bg-white {
    background-color: transparent !important;
    color: #E1E2E1 !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .form-control,
[data-ui-mode="modern"][data-bs-theme="dark"] .form-select {
    background-color: #333333 !important;
    /* Lighter than #252525 Surface */
    border-color: #4a4a4a !important;
    color: #E1E2E1 !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .form-control:focus,
[data-ui-mode="modern"][data-bs-theme="dark"] .form-select:focus {
    background-color: #3b3b3b !important;
    border-color: #ede5c0 !important;
    /* Gold accent on focus */
    box-shadow: 0 0 0 0.25rem rgba(237, 229, 192, 0.25) !important;
}

/* Dark Mode Light Background Override (Fixes white bands) */
[data-ui-mode="modern"][data-bs-theme="dark"] .bg-light {
    background-color: #2b2b2b !important;
    color: #e1e2e1 !important;
    border-color: #404040 !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .text-dark {
    color: #e1e2e1 !important;
}

[data-ui-mode="modern"] body {
    background-color: var(--md-bg);
    color: var(--md-text);
    font-family: 'Outfit', sans-serif;
}

[data-ui-mode="modern"] .navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: none !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .navbar {
    background: rgba(30, 30, 30, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-ui-mode="modern"][data-bs-theme="dark"] .form-control,
[data-ui-mode="modern"][data-bs-theme="dark"] .form-select {
    background-color: #333333 !important;
    /* Lighter than #252525 Surface */
    border-color: #4a4a4a !important;
    color: #E1E2E1 !important;
}

[data-ui-mode="modern"][data-bs-theme="dark"] .form-control:focus,
[data-ui-mode="modern"][data-bs-theme="dark"] .form-select:focus {
    background-color: #3b3b3b !important;
    border-color: #ede5c0 !important;
    /* Gold accent on focus */
    box-shadow: 0 0 0 0.25rem rgba(237, 229, 192, 0.25) !important;
}

[data-ui-mode="modern"] .navbar-brand {
    color: var(--md-text) !important;
    font-weight: 700;
    letter-spacing: -0.5px;
}

[data-ui-mode="modern"] .card {
    border: none;
    border-radius: var(--md-border-radius);
    box-shadow: var(--md-shadow);
    background: var(--md-surface);
    transition: transform 0.2s;
    margin-bottom: 1.5rem;
}

[data-ui-mode="modern"] .card-header {
    background: transparent;
    border-bottom: 1px solid var(--md-surface-variant);
    font-weight: 600;
    padding: 1.25rem;
}

[data-ui-mode="modern"] .btn {
    border-radius: 50px;
    /* Pill shape */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.3px;
}

[data-ui-mode="modern"] .btn-primary {
    background-color: var(--md-primary);
    border-color: var(--md-primary);
}

[data-ui-mode="modern"] .form-control,
[data-ui-mode="modern"] .form-select {
    border-radius: 12px;
    background-color: var(--md-surface-variant);
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
}

[data-ui-mode="modern"] .form-control:focus {
    background-color: var(--md-surface);
    box-shadow: 0 0 0 4px rgba(0, 96, 169, 0.15);
}

/* Modern Table Styles */
[data-ui-mode="modern"] .table {
    border-collapse: separate;
    border-spacing: 0;
}

[data-ui-mode="modern"] .table thead th {
    border: none;
    font-weight: 700;
    /* Bold headers like legacy */
    font-size: 0.9rem;
    /* Larger font */
    color: var(--bs-body-color);
    /* Darker text */
    padding: 1rem;
    background: transparent;
}

[data-ui-mode="modern"] .table tbody tr {
    transition: background 0.2s, transform 0.1s;
}

[data-ui-mode="modern"] .table tbody tr:hover {
    background-color: var(--md-surface-variant) !important;
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 10;
    position: relative;
}

[data-ui-mode="modern"] .table td {
    border: none;
    padding: 1rem;
    vertical-align: top;
    /* Align to top for better multi-line layout */
    border-bottom: 1px solid var(--md-surface-variant);
}

[data-ui-mode="modern"] .badge {
    border-radius: 8px;
    padding: 0.5em 0.8em;
    font-weight: 500;
}

/* =========================================
   LEGACY UI RESTORATION
   ========================================= */
[data-ui-mode="legacy"] body {
    background-color: #f8f9fa;
}

[data-ui-mode="legacy"] .navbar {
    background-color: #212529 !important;
}

[data-ui-mode="legacy"] .train-row:hover {
    background-color: #f8f9fa;
}

[data-ui-mode="legacy"] .table tr {
    box-shadow: none !important;
    transform: none !important;
}

/* =========================================
   MOBILE OPTIMIZATIONS (ALL MODES)
   ========================================= */
@media (max-width: 768px) {
    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        background: var(--bs-card-bg);
        border: 1px solid var(--bs-border-color);
        border-radius: 12px;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        position: relative;
        padding-bottom: 0;
        overflow: hidden;
    }

    .table td {
        border: none;
        padding: 4px 15px;
    }

    /* Modern UI Mobile Specifics */
    [data-ui-mode="modern"] .table tr {
        border: none;
        background: var(--md-surface);
        box-shadow: var(--md-shadow);
    }

    .td-train {
        padding-top: 15px !important;
        display: inline-block !important;
        width: auto !important;
    }

    .td-route .dest-text {
        font-size: 1.1rem;
        font-weight: bold;
        display: inline-block;
        margin-left: 8px;
    }

    .td-time {
        position: absolute;
        top: 12px;
        right: 10px;
        text-align: right;
        width: auto !important;
        padding: 0 !important;
    }

    .td-time small {
        display: block !important;
        margin-top: 0;
    }

    .td-route {
        padding-bottom: 0 !important;
    }

    .td-route small {
        display: block;
        margin-top: 2px;
    }

    .td-status {
        margin-bottom: 10px;
    }

    /* Kotje Mobile */
    .td-comp {
        background-color: rgba(0, 0, 0, 0.03);
        border-top: 1px solid var(--bs-border-color) !important;
        padding: 10px !important;
        width: 100% !important;
        /* Allow wrapping instead of scroll */
        white-space: normal;
        overflow-x: visible;
    }

    [data-ui-mode="modern"] .td-comp {
        background-color: var(--md-surface-variant);
    }

    .comp-inner-mobile {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        /* Wrap units */
        gap: 8px;
    }

    .mobile-unit-badge {
        min-width: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 6px;
    }
}

/* =========================================
   AUTOCOMPLETE SUGGESTIONS
   ========================================= */
.suggestion-wrapper {
    position: relative;
    width: 100%;
}

.station-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
    max-height: 350px;
    overflow-y: auto;
    display: none;
    transform-origin: top center;
    padding: 8px;
}

.station-suggestions.show {
    display: block;
    animation: premiumPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes premiumPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.suggestion-item {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1c1e;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.suggestion-item:last-child {
    margin-bottom: 0;
}

/* Icon for station suggestions */
.suggestion-item::before {
    content: "\F1C5"; /* bi-building */
    font-family: "bootstrap-icons";
    margin-right: 12px;
    font-size: 1.1rem;
    color: var(--md-primary, #0060a9);
    opacity: 0.6;
    transition: all 0.2s ease;
}

/* Specific icons for different search types */
#suggest-train .suggestion-item::before,
#suggest-unit .suggestion-item::before,
#sub-material-suggestions .suggestion-item::before { content: "\F598"; } /* bi-train-front */
#suggest-type .suggestion-item::before { content: "\F598"; } /* bi-train-front for material types too */
#suggest-station .suggestion-item::before,
#sub-station-suggestions .suggestion-item::before { content: "\F1C5"; } /* bi-building */

/* Inline train-type chip in autocomplete */
.suggestion-type-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 18px;
    padding: 0 5px;
    background: var(--md-primary, #0060a9);
    color: #fff;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-right: 6px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.suggestion-item:hover .suggestion-type-chip,
.suggestion-item.active .suggestion-type-chip {
    background: rgba(255,255,255,0.25);
}

[data-bs-theme="dark"] .suggestion-type-chip {
    background: rgba(237, 229, 192, 0.2);
    color: #ede5c0;
}

[data-bs-theme="dark"] .suggestion-item:hover .suggestion-type-chip,
[data-bs-theme="dark"] .suggestion-item.active .suggestion-type-chip {
    background: rgba(0, 0, 0, 0.15);
    color: #1a1c1e;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: var(--md-primary, #0060a9);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 96, 169, 0.25);
    padding-left: 18px;
}

.suggestion-item:hover::before,
.suggestion-item.active::before {
    color: #ffffff;
    opacity: 1;
    transform: scale(1.1);
}

.suggestion-item .match-highlight {
    font-weight: 800;
    color: var(--md-primary, #0060a9);
    background: rgba(0, 96, 169, 0.1);
    padding: 0 2px;
    border-radius: 4px;
}

.suggestion-item:hover .match-highlight,
.suggestion-item.active .match-highlight {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

/* Dark mode premium enhancements */
[data-bs-theme="dark"] .station-suggestions {
    background: rgba(30, 31, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

[data-bs-theme="dark"] .suggestion-item {
    color: #e2e2e6;
}

[data-bs-theme="dark"] .suggestion-item:hover,
[data-bs-theme="dark"] .suggestion-item.active {
    background-color: #ede5c0; /* Gold/Beige tint */
    color: #1a1c1e;
    box-shadow: 0 4px 15px rgba(237, 229, 192, 0.3);
}

[data-bs-theme="dark"] .suggestion-item::before {
    color: #ede5c0;
}

[data-bs-theme="dark"] .suggestion-item:hover::before,
[data-bs-theme="dark"] .suggestion-item.active::before {
    color: #1a1c1e;
}

[data-bs-theme="dark"] .suggestion-item .match-highlight {
    color: #ede5c0;
    background: rgba(237, 229, 192, 0.15);
}

[data-bs-theme="dark"] .suggestion-item:hover .match-highlight,
[data-bs-theme="dark"] .suggestion-item.active .match-highlight {
    color: #1a1c1e;
    background: rgba(0, 0, 0, 0.1);
}

/* ──────── Composition Bar ──────── */
.composition-bar {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
}

.comp-rail-wrapper {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 8px;
}

.comp-rail {
    display: flex !important;
    gap: 6px !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    min-height: unset !important;
    padding: 4px 0;
}

/* ── Badge-pill unit block ── */
.unit-block {
    flex-shrink: 0;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #1c1c1e;
    border: 1px solid #3a3a3c;
    font-size: 0.78rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    cursor: default;
    transition: border-color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    position: relative;
}

.unit-block:hover {
    border-color: #636366;
    box-shadow: 0 0 0 2px rgba(100, 100, 255, 0.12);
}

/* Image mode: show images above, badge below */
.unit-block.img-mode {
    flex-direction: column !important;
    align-items: center !important;
    background: transparent;
    border: none;
    padding: 0;
    gap: 2px;
}

.unit-block.img-mode .unit-img-area {
    display: flex !important;
    align-items: flex-end !important;
    height: 110px;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.unit-block.img-mode img {
    display: block;
    max-height: 110px;
    width: auto;
    object-position: bottom;
}

.unit-block.img-mode .unit-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 5px;
    background: #1c1c1e;
    border: 1px solid #3a3a3c;
    font-size: 0.72rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    white-space: nowrap;
}

.unit-badge {
    display: contents;
    /* inside badge-mode, items flow directly */
}

.unit-type {
    font-weight: 700;
    color: #e5e5ea;
    letter-spacing: -0.01em;
}

.unit-number {
    font-weight: 400;
    color: #aeaeb2;
}

.unit-number a {
    color: #aeaeb2;
    text-decoration: none;
}

.unit-number a:hover {
    color: #fff;
    text-decoration: underline;
}

.unit-icons {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 0.68rem;
    color: #8e8e93;
    margin-left: 1px;
}

/* Light theme overrides */
[data-bs-theme="light"] .unit-block {
    background: #f2f2f7;
    border-color: #c6c6c8;
}

[data-bs-theme="light"] .unit-type {
    color: #1c1c1e;
}

[data-bs-theme="light"] .unit-number {
    color: #636366;
}

[data-bs-theme="light"] .unit-number a {
    color: #636366;
}

[data-bs-theme="light"] .unit-icons {
    color: #636366;
}

[data-bs-theme="light"] .unit-block.img-mode .unit-badge {
    background: #f2f2f7;
    border-color: #c6c6c8;
}

/* ── Replacement bus link button & panel ─────────────────────────────────── */
.btn-bus-link {
    border: 1px solid rgba(243, 156, 18, 0.5);
    background: rgba(243, 156, 18, 0.08);
    color: #d4890a;
    border-radius: 4px;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s;
}
.btn-bus-link:hover,
.btn-bus-link:focus {
    background: rgba(243, 156, 18, 0.18);
    border-color: rgba(243, 156, 18, 0.8);
    color: #b8750a;
}
[data-bs-theme="light"] .btn-bus-link { color: #a0620a; }

.bus-link-panel {
    background: rgba(243, 156, 18, 0.05);
    border: 1px solid rgba(243, 156, 18, 0.25);
    border-radius: 0.375rem;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bus-link-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.bus-card-type {
    font-weight: 700;
    font-size: 0.95rem;
    color: #d4890a;
    letter-spacing: 0.01em;
}
[data-bs-theme="light"] .bus-card-type { color: #a0620a; }

.bus-card-station {
    font-size: 0.78rem;
    color: var(--bs-secondary-color, #6c757d);
}

.bus-card-divider {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--bs-secondary-color, #6c757d);
    text-transform: uppercase;
    margin: 0.1rem 0;
}

.bus-comp-badge {
    /* Zelfde formaat als een unit-badge (Bootstrap badge bg-light text-dark border) */
    display: inline-block;
    font-size: 0.9em;
    font-weight: 700;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    border: 1px solid rgba(243, 156, 18, 0.45);
    background: rgba(243, 156, 18, 0.12);
    color: #d4890a;
    letter-spacing: 0.02em;
}
[data-bs-theme="light"] .bus-comp-badge { color: #a0620a; }
/* ── End replacement bus styles ──────────────────────────────────────────── */

/* ── Navbar logo + wordmark ─────────────────────────────────────────────── */
.navbar-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.treinfo-wordmark {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.treinfo-name {
    color: var(--bs-body-color);
    font-weight: 700;
}

/* Sub-nav balk (tabs per service) */
.treinfo-subnav {
    /* Neutraal — zelfde als de pagina-achtergrond, zodat de pill-container "zweeft" */
    background: var(--bs-body-bg, #f8f9fa);
    border-bottom: 1px solid var(--treinfo-border, rgba(0,0,0,0.07));
    padding: 8px 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Tabs IN de navbar (mx-auto centreert tussen brand en rechter-knoppen) */
.navbar-nav-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
    flex-wrap: nowrap;
    padding: 2px 0;
    list-style: none;  /* geen bolletjes */
}

.navbar-nav-tabs li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.navbar-nav-tabs .nav-link {
    color: var(--treinfo-text-muted, #6c757d);
    font-weight: 500;
    font-size: 0.82rem;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.navbar-nav-tabs .nav-link:hover {
    background: rgba(0, 96, 169, 0.08);
    color: var(--treinfo-blue, #0060a9);
}

.navbar-nav-tabs .nav-link.active {
    background: var(--treinfo-blue, #0060a9);
    color: #fff !important;
}

[data-bs-theme="dark"] .navbar-nav-tabs .nav-link:hover {
    background: rgba(255,255,255,0.08);
}

@media (max-width: 991px) {
    /* Op mobiel worden tabs verticaal in het hamburger-menu */
    .navbar-nav-tabs {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 4px 0;
        gap: 2px;
        border-top: 1px solid var(--treinfo-border, rgba(0,0,0,0.08));
        margin: 4px 0 0 0;
    }
    .navbar-nav-tabs .nav-link {
        width: 100%;
        padding: 10px 12px;
    }
}
/* ── End navbar styles ───────────────────────────────────────────────────── */
