/* ===== DESIGN TOKENS ===== */
:root {
    --color-primary: #0066ff;
    --color-primary-light: #e8f0fe;
    --color-dark: #1a1a2e;
    --color-dark-light: #16213e;
    --color-bg: #fafbfc;
    --color-bg-admin: #f8f9fa;
    --color-text: #1a1a2e;
    --color-text-muted: #6c757d;
    --color-text-light: #8a9aa8;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-border: #eef2f6;
    --color-gold-start: #b8860b;
    --color-gold-end: #ffd700;
    --color-brand-burgundy: #800020;
    --color-brand-navy: #1a1a6c;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,.12);
    --navbar-height: 64px;
    --transition: 0.2s ease;
}

/* ===== UTILITY CLASSES (вместо инлайн-стилей) ===== */
.fs-11 { font-size: 11px; }
.fs-13 { font-size: 13px; }
.fs-15 { font-size: 15px; }
.fs-16 { font-size: 16px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.c-text { color: var(--color-text); }
.c-muted { color: var(--color-text-muted); }
.c-light { color: var(--color-text-light); }
.c-primary { color: var(--color-primary); }
.bg-subtle { background: var(--color-dark-light); }
.rounded-xl { border-radius: var(--radius-xl); }
.flex-0 { flex-shrink: 0; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.w-48 { width: 48px; height: 48px; }
.transition-all { transition: all 0.12s; }
.cursor-pointer { cursor: pointer; }
.overflow-auto-y { overflow-y: auto; }

/* ===== HOME PAGE ===== */
.filter-block {
    background: #fff; border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: 10px 14px;
    display: flex; align-items: center; gap: 10px;
    transition: all 0.12s; min-height: 48px;
}
.filter-label { font-size: 10px; font-weight: 500; color: var(--color-text-light); text-transform: uppercase; }
.filter-value { font-size: 15px; font-weight: 600; color: var(--color-text); overflow-x: auto; white-space: nowrap; }
.filter-empty { color: #c0c6cc; }

.route-card {
    background: #fff; border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    transition: all 0.12s; overflow: hidden;
}
.route-card-badge { font-size: 10px; font-weight: 500; text-transform: uppercase; color: var(--color-text-light); }
.route-city { font-size: 15px; font-weight: 600; color: var(--color-text); }
.route-time { font-size: 16px; font-weight: 600; color: var(--color-text); flex-shrink: 0; }
.route-timezone { font-size: 10px; color: var(--color-text-light); }
.route-address { font-size: 11px; color: var(--color-text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-price { font-size: 17px; font-weight: 700; color: var(--color-text); }
.route-price-muted { font-size: 11px; color: var(--color-text-light); text-decoration: line-through; }

/* ===== УТИЛИТЫ ДЛЯ ЗАМЕНЫ INLINE-СТИЛЕЙ ===== */
.bg-page { background-color: #fafbfc; }
.bg-dark-gradient { background: linear-gradient(135deg, #1a1a2e, #16213e); }
.bg-white-card { background: #ffffff; border-radius: 12px; border: 1px solid #eef2f6; }
.text-heading { color: #1a1a2e; letter-spacing: -0.3px; }
.text-subtitle { font-size: 14px; color: #8a9aa8; }
.text-muted-sm { font-size: 13px; color: #8a9aa8; }
.text-dark { color: #1a1a2e; }
.fw-semibold { font-weight: 600; }
.fw-medium { font-weight: 500; }
.fs-10 { font-size: 10px; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-15 { font-size: 15px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-24 { font-size: 24px; }
.balance-symbol { font-size: 18px; opacity: 0.7; }
.balance-label { font-size: 12px; opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; }
.balance-amount { font-size: 42px; font-weight: 700; }
.booking-option { border: 2px solid #eef2f6; cursor: pointer; background: #fff; }
.icon-sm { width: 36px; height: 36px; }
.icon-md { width: 48px; height: 48px; }
.w-auto { width: auto; }
.d-inline { display: inline; }
.text-danger-red { color: #dc3545; }
.text-warning-amber { color: #f59e0b; }
.bg-danger-light { background: rgba(220,53,69,0.1); }
.bg-warning-light { background: rgba(245,158,11,0.1); }
.btn-icon-sm { width: 30px; height: 30px; font-size: 12px; cursor: pointer; }
.btn-icon-md { width: 40px; height: 40px; background: #fff; }
.btn-icon-reset { font-size: 12px; color: #b33a3a; cursor: pointer; background: rgba(179,58,58,0.08); }
.btn-icon-swap { font-size: 15px; color: #4a4a5a; cursor: pointer; background: #f0f2f5; }
.dropdown-suggestions { max-height: 300px; overflow-y: auto; border-radius: 12px; border: 1px solid #eef2f6; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.alert-compact { font-size: 13px; }
.filter-input-field { font-weight: 500; color: #1a1a2e; box-shadow: none; }
.balance-card-text { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.7); }
.balance-card-amount { font-size: 18px; font-weight: 700; color: #fff; }
.balance-card-symbol { font-size: 12px; opacity: 0.7; }

/* ===== КАРТОЧКА МАРШРУТА ===== */
.badge-route { font-size: 12px; padding: 5px 16px; gap: 6px; }
.badge-route-sm { font-size: 12px; padding: 4px 14px; gap: 4px; }
.badge-departure { font-size: 11px; padding: 2px 10px; }
.route-time-lg { font-size: 18px; }
.route-city-name { font-size: 16px; }
.route-address-sm { font-size: 10px; font-weight: 400; }
.route-stripe { width: 3px; }
.route-gray-block { padding: 12px 14px; border: 1px solid #e8ecf0; }
.section-pb { padding: 0 0 40px 0; }

.suggestion-box {
    max-height: 300px; overflow-y: auto; border-radius: 12px;
    border: 1px solid var(--color-border); background: #fff;
    box-shadow: var(--shadow-lg); z-index: 1050;
}
.suggestion-item {
    padding: 8px 14px; cursor: pointer; font-size: 14px;
    color: var(--color-text); border-bottom: 1px solid #f0f2f5;
}
.suggestion-item:hover { background: #f6f8fa; }

/* ===== БАЗОВІ СТИЛІ ===== */
* { font-family: var(--font-family); }
html { overflow-x: hidden; }
body { padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--color-bg); overflow-x: hidden; }

/* Админ-панель */
body.admin-page { background: var(--color-bg-admin); }

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT ===== */
@media print {
    .navbar, footer, .no-print { display: none !important; }
    body { background: #fff; padding-top: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0d1117;
        --color-bg-admin: #0d1117;
        --color-text: #c9d1d9;
        --color-text-muted: #8b949e;
        --color-text-light: #6e7681;
        --color-border: #21262d;
        --color-dark: #161b22;
        --color-dark-light: #21262d;
    }
    body { background: var(--color-bg); color: var(--color-text); }
    .card { background: var(--color-dark); border-color: var(--color-border); }
    .card-header { background: var(--color-dark); border-color: var(--color-border); }
    .card-body { background: var(--color-dark); }
    .bg-white { background: var(--color-dark) !important; }
    .bg-light { background: var(--color-dark-light) !important; }
    .text-dark { color: var(--color-text) !important; }
    .text-muted { color: var(--color-text-muted) !important; }
    .text-secondary { color: var(--color-text-muted) !important; }
    .border { border-color: var(--color-border) !important; }
    .navbar-glass { background: rgba(13,17,23,0.85); }
    .form-control, .form-select { background: var(--color-dark-light); color: var(--color-text); border-color: var(--color-border); }
    .form-control:focus, .form-select:focus { background: var(--color-dark); }
    .btn-outline-secondary { color: var(--color-text-muted); border-color: var(--color-border); }
    .modal-content { background: var(--color-dark); }
    footer { background: var(--color-dark) !important; border-color: var(--color-border) !important; }
    .navbar-toggler-icon span { background: var(--color-text); }
}

/* ===== АВТОРИЗАЦИЯ: заполнение viewport без прокрутки ===== */
.auth-fill {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    bottom: env(safe-area-inset-bottom, 0px);
    overflow-y: auto;
}

/* ===== ТЕНИ — равномерные вокруг элемента (без смещения вниз) ===== */
.shadow-sm { box-shadow: 0 0 .5rem rgba(0,0,0,.06) !important; }
.shadow { box-shadow: 0 0 1rem rgba(0,0,0,.08) !important; }
.shadow-lg { box-shadow: 0 0 2rem rgba(0,0,0,.1) !important; }

/* ===== НАВІГАЦІЯ ===== */
.navbar-glass {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: 0;
    height: calc(64px + env(safe-area-inset-top, 0px));
    display: flex;
    align-items: center;
}
.navbar-glass .navbar-brand {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.navbar-glass .navbar-brand svg { flex-shrink: 0; }
.navbar-glass .nav-link {
    font-size: 15px;
    font-weight: 500;
    color: #4a4a5a !important;
    padding: 10px 16px !important;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.navbar-glass .nav-link:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #0066ff !important;
}
.navbar-glass .nav-link i { margin-right: 6px; font-size: 15px; }
.navbar-glass .navbar-toggler {
    border: none;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}
.navbar-glass .navbar-toggler:hover { background: rgba(0, 0, 0, 0.08); }
.navbar-glass .navbar-toggler:focus { box-shadow: none; }
.navbar-glass .navbar-toggler-icon {
    background-image: none;
    width: 28px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.navbar-glass .navbar-toggler-icon::before,
.navbar-glass .navbar-toggler-icon::after,
.navbar-glass .navbar-toggler-icon span {
    content: '';
    display: block;
    height: 2.5px;
    background: #4a4a5a;
    border-radius: 2px;
}
.navbar-glass .navbar-toggler-icon::before { width: 28px; }
.navbar-glass .navbar-toggler-icon span { width: 20px; }
.navbar-glass .navbar-toggler-icon::after { width: 24px; }
.navbar-glass .navbar-collapse { transition: none; }

/* Мобільне меню */
@media (max-width: 991.98px) {
    .navbar-glass .navbar-toggler {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .navbar-glass .navbar-collapse {
        position: fixed;
        top: 76px;
        left: 12px;
        right: 12px;
        z-index: 1050;
        background: #fff;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-radius: 16px;
        padding: 8px;
        border: 1px solid rgba(0, 0, 0, 0.15) !important;
        box-shadow: 0 12px 40px rgba(0,0,0,0.1);
        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }
    .navbar-glass .navbar-nav { gap: 0; }
    .navbar-glass .nav-link {
        padding: 10px 16px !important;
        font-size: 14px;
        border-radius: 10px;
    }
    /* Длинные dropdown-меню: отступы и прокрутка */
    .navbar-glass .dropdown-scroll {
        max-height: 55vh;
        overflow-y: auto;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        margin-top: 6px !important;
        margin-bottom: 6px !important;
    }
    .navbar-glass li.lang-badges-mobile {
        padding: 8px 16px !important;
    }
    .navbar-glass li.lang-badges-mobile .lang-badges-mobile {
        padding: 0 !important;
        justify-content: flex-start !important;
    }
}

/* ===== ПЕРЕМИКАЧ МОВ ===== */
@media (min-width: 992px) {
    .lang-selector-desktop .dropdown-toggle {
        display: flex;
        align-items: center;
        gap: 4px;
        /* Match nav-link size and spacing for visual consistency */
        font-size: 15px;
        font-weight: 500;
        color: #4a4a5a;
        padding: 10px 16px;
        border-radius: 10px;
        border: none;
        background: none;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .lang-selector-desktop .dropdown-toggle:hover {
        background: rgba(0, 0, 0, 0.04);
        color: #0066ff;
    }
    .lang-selector-desktop .dropdown-toggle::after { display: none; }
    .lang-selector-desktop .dropdown-menu {
        min-width: 120px;
        padding: 6px;
        border-radius: 16px;
        border: 1px solid rgba(0, 0, 0, 0.15);
        box-shadow: 0 12px 40px rgba(0,0,0,0.1);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
    }
    .lang-selector-desktop .dropdown-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        /* Keep dropdown items same size as top menu links */
        font-size: 15px;
        font-weight: 500;
        border-radius: 8px;
        color: #4a4a5a;
        transition: all 0.15s ease;
    }
    .lang-selector-desktop .dropdown-item:hover {
        background: rgba(0, 102, 255, 0.06);
        color: #0066ff;
    }
    .lang-selector-desktop .dropdown-item.active {
        background: #0066ff;
        color: #fff;
    }
    .lang-selector-desktop .dropdown-item.active:hover {
        background: #0052cc;
        color: #fff;
    }
}
@media (max-width: 991.98px) {
    .lang-selector-desktop { display: none; }
    .lang-badges-mobile { display: flex !important; }
}
@media (min-width: 992px) {
    .lang-badges-mobile { display: none !important; }
}
.lang-badges-mobile {
    display: flex;
    gap: 4px;
    align-items: center;
}
.lang-badges-mobile .lang-badges-mobile { padding: 0; gap: 4px; }
.lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Slightly larger padding to match nav-link touch target */
    padding: 6px 12px;
    /* Increase font-size to align with main nav items on small screens */
    font-size: 15px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    color: #8a8a9a;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.lang-badge:hover {
    background: rgba(0, 102, 255, 0.06);
    color: #0066ff;
    border-color: rgba(0, 102, 255, 0.15);
}
.lang-badge.active {
    background: #0066ff;
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.25);
}
.lang-divider {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 4px;
}
.lang-dropdown .dropdown-toggle::after { display: none; }

/* ===== ЗАГАЛЬНІ ===== */
@media (max-width: 768px) {
    .container { padding-left: 12px; padding-right: 12px; }
    h1 { font-size: 1.3rem; }
}
@media (max-width: 576px) {
    h1 { font-size: 1.1rem; }
}

/* ===== ПІДКАЗКИ МІСТ ===== */
/* Выпадающие списки городов — Bootstrap Dropdown */
#fromSuggestions.dropdown-menu .city-suggestion-item,
#toSuggestions.dropdown-menu .city-suggestion-item {
    padding: 8px 12px;
    margin: 2px 0;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #1a1a2e;
    transition: background 0.12s ease;
}

#fromSuggestions.dropdown-menu .city-suggestion-item:hover,
#toSuggestions.dropdown-menu .city-suggestion-item:hover,
#fromSuggestions.dropdown-menu .city-suggestion-item.active,
#toSuggestions.dropdown-menu .city-suggestion-item.active {
    background: #f0f4ff;
    color: #0066ff;
}

#fromSuggestions.dropdown-menu .city-suggestion-item .city-suggestion-icon,
#toSuggestions.dropdown-menu .city-suggestion-item .city-suggestion-icon {
    color: #8a9aa8;
    font-size: 14px;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4ff;
    border-radius: 8px;
}

#fromSuggestions.dropdown-menu .city-suggestion-item .city-suggestion-name,
#toSuggestions.dropdown-menu .city-suggestion-item .city-suggestion-name {
    font-weight: 500;
}

#fromSuggestions.dropdown-menu .city-suggestion-empty,
#toSuggestions.dropdown-menu .city-suggestion-empty {
    padding: 20px;
    text-align: center;
    color: #8a9aa8;
    font-size: 13px;
}

#fromSuggestions.dropdown-menu::-webkit-scrollbar,
#toSuggestions.dropdown-menu::-webkit-scrollbar { width: 4px; }
#fromSuggestions.dropdown-menu::-webkit-scrollbar-track,
#toSuggestions.dropdown-menu::-webkit-scrollbar-track { background: transparent; }
#fromSuggestions.dropdown-menu::-webkit-scrollbar-thumb,
#toSuggestions.dropdown-menu::-webkit-scrollbar-thumb { background: #d0d8e0; border-radius: 2px; }
#fromSuggestions.dropdown-menu::-webkit-scrollbar-thumb:hover,
#toSuggestions.dropdown-menu::-webkit-scrollbar-thumb:hover { background: #b8c8d8; }
.filter-wrapper {
    position: relative;
    z-index: 100;
}

.city-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f6f8fa;
}
.city-suggestion-item:first-child { border-radius: 10px 10px 0 0; }
.city-suggestion-item:last-child { border-radius: 0 0 10px 10px; border-bottom: none; }
.city-suggestion-item:hover { background: #f6f8fa; }
.city-suggestion-item.active { background: #eef2ff; }
.city-suggestion-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.city-suggestion-icon i { color: #0066ff; font-size: 14px; }
.city-suggestion-info { flex: 1; min-width: 0; }
.city-suggestion-name { font-size: 14px; font-weight: 500; color: #1a1a2e; line-height: 1.3; }
.city-suggestion-address { font-size: 11px; color: #8a9aa8; margin-top: 2px; line-height: 1.2; }
.city-suggestion-empty { padding: 16px; text-align: center; color: #8a9aa8; font-size: 13px; }
.city-clear-btn:hover {
    background: #fef2f2 !important;
    color: #cf222e !important;
}
.city-clear-btn:active {
    transform: translateY(-50%) scale(0.9) !important;
}
.city-input-wrapper.has-clear input { padding-right: 36px !important; }
.city-input-wrapper:focus-within {
    border-color: #0066ff !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1) !important;
}
.city-suggestions::-webkit-scrollbar { width: 4px; }
.city-suggestions::-webkit-scrollbar-track { background: transparent; }
.city-suggestions::-webkit-scrollbar-thumb { background: #d0d8e0; border-radius: 2px; }

/* ===== АДАПТАЦІЯ ФІЛЬТРА ПІД МОБІЛЬНІ ===== */
@media (max-width: 768px) {
    .filter-wrapper { width: 100%; }
    .filter-wrapper .sticky-top > div {
        box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 -1px 4px rgba(0,0,0,0.04) !important;
        border-radius: 16px;
    }
    .routes-wrapper { width: 100%; margin-top: 1.5rem; }
    .filter-wrapper .container {
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .filter-wrapper .sticky-top > div { border-radius: 16px !important; }
    .filter-wrapper .sticky-top { padding-bottom: 40px !important; }
    .routes-wrapper { margin-top: 0 !important; }
    .routes-wrapper .container {
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .route-card { border-radius: 16px !important; }
    .city-filter-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .city-filter-row > .position-relative {
        min-width: 100% !important;
        flex: none !important;
        width: 100% !important;
    }
    .city-filter-row > .position-relative .city-input-wrapper input { font-size: 16px !important; }
    .city-filter-arrow { display: none !important; }
}

@media (max-width: 576px) {
    .city-filter-row > .position-relative .city-input-wrapper input { font-size: 16px !important; }
}

@media (max-width: 768px) {
    .city-filter-row > div:last-of-type {
        min-width: 100% !important;
        flex: none !important;
        width: 100% !important;
    }
    .city-filter-row > div:last-of-type > div { width: 100% !important; }
    .city-filter-row > div:last-of-type input { font-size: 16px !important; }
}

/* ===== СІРИЙ БОРДЕР ДЛЯ ІНПУТІВ ФІЛЬТРА ===== */
.filter-input-group {
    border: 1px solid #ced4da;
    border-radius: 10px;
    overflow: hidden;
}
.filter-input-group-text {
    border: none !important;
    padding-right: 0 !important;
    position: relative;
    z-index: 1;
}
.filter-input {
    border: none !important;
    padding-left: 4px !important;
}
.filter-input:focus {
    box-shadow: none !important;
}

/* ===== МОБІЛЬНА АДАПТАЦІЯ: на всю ширину ===== */
@media (max-width: 767.98px) {
    body { overflow-x: hidden; padding-left: 0 !important; padding-right: 0 !important; }
    
    /* Внешний контейнер — без отступов */
    .min-vh-100.pb-5 {
        margin: 0 !important;
        border-radius: 0 !important;
    }
    .min-vh-100.pb-5 > .container {
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Фильтр — на всю ширину экрана */
    .filter-wrapper {
        width: 100% !important;
    }
    .filter-wrapper .sticky-top {
        width: 100% !important;
        padding-bottom: 20px !important;
    }
    .filter-wrapper .mx-auto.filter-block {
        max-width: none !important;
        width: 100% !important;
    }
    .filter-wrapper .sticky-top > .bg-white {
        width: 100% !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
    
    /* Маршруты — на всю ширину */
    .routes-wrapper {
        width: 100% !important;
    }
    
    /* Карточки с бордером, тенью и скруглением */
    .routes-wrapper > .mx-auto {
        max-width: none !important;
        width: 100% !important;
    }
    .route-card {
        border-radius: 1rem !important;
    }
}

/* ===== АНІМАЦІЯ КАРТОК ===== */
.route-card {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}
.route-card:nth-child(1) { animation-delay: 0.05s; }
.route-card:nth-child(2) { animation-delay: 0.10s; }
.route-card:nth-child(3) { animation-delay: 0.15s; }
.route-card:nth-child(4) { animation-delay: 0.20s; }
.route-card:nth-child(5) { animation-delay: 0.25s; }
.route-card:nth-child(6) { animation-delay: 0.30s; }

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

/* ===== ПАГІНАЦІЯ ===== */
.page-item.active .page-link {
    background: #0066ff !important;
    color: #ffffff !important;
    border-color: #0066ff !important;
}
.page-item .page-link:hover {
    background: #f0f4ff !important;
    border-color: #0066ff !important;
}
.page-item.active .page-link:hover {
    background: #0052cc !important;
}

/* ===== СКРОЛЛ ПІДКАЗОК ===== */
.city-suggestions::-webkit-scrollbar-thumb:hover { background: #b8c8d8; }

/* ===== ПОЛЯ ВВОДА ГОРОДОВ ===== */
/* Стилі для Bootstrap dropdown з пошуком міст */
#fromSuggestions, #toSuggestions {
    border: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 6px !important;
    max-height: 300px;
    overflow-y: auto;
}

.city-suggestion-item {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.12s ease;
    font-size: 13px;
    color: #1a1a2e;
}

.city-suggestion-item:hover,
.city-suggestion-item.active {
    background: #f0f4ff;
}

.city-suggestion-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f0f4ff;
    color: #1a73e8;
    font-size: 12px;
    flex-shrink: 0;
}

.city-suggestion-info {
    flex: 1;
    min-width: 0;
}

.city-suggestion-name {
    font-weight: 500;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

/* ===== АДАПТАЦІЯ ДЛЯ МОБІЛЬНИХ ===== */
@media (max-width: 767.98px) {
    #fromSuggestions,
    #toSuggestions {
        width: 60% !important;
        min-width: 200px !important;
        left: 0 !important;
        right: auto !important;
    }
}

/* ===== АДМИН-ПАНЕЛЬ: адаптивные таблицы ===== */
.table-responsive-custom { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 768px) {
    body.admin-page .btn-sm { font-size: 0.6rem; padding: 0.15rem 0.4rem; }
    body.admin-page .table td, body.admin-page .table th { padding: 0.4rem 0.3rem; font-size: 0.7rem; }
    body.admin-page .card { margin-bottom: 0.8rem; }
    body.admin-page .container { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 576px) {
    body.admin-page .table td, body.admin-page .table th { padding: 0.2rem 0.2rem; font-size: 0.6rem; }
    body.admin-page .btn-sm { font-size: 0.5rem; padding: 0.1rem 0.3rem; }
    body.admin-page h1 { font-size: 1.2rem; }
}

/* ===== ФИКС: КАРТОЧКИ МАРШРУТОВ НА МОБИЛЬНЫХ ===== */
@media (max-width: 767.98px) {
    .route-card {
        border: 1px solid #dee2e6 !important;
        border-radius: 1rem !important;
        box-shadow: 0 0 .5rem rgba(0,0,0,.06) !important;
    }
}

/* ===== АДМИН: ИКОНКИ-КРУЖКИ (замена inline-стилей) ===== */
.icon-circle-48 {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.icon-circle-48.bg-green { background: rgba(16,185,129,0.1); }
.icon-circle-48.bg-green i { color: #10b981; }
.icon-circle-48.bg-purple { background: rgba(139,92,246,0.1); }
.icon-circle-48.bg-purple i { color: #8b5cf6; }
.icon-circle-48.bg-indigo { background: rgba(111,66,193,0.1); }
.icon-circle-48.bg-indigo i { color: #6f42c1; }
.icon-circle-48.bg-emerald { background: rgba(25,135,84,0.1); }
.icon-circle-48.bg-emerald i { color: #198754; }
.icon-circle-48.bg-blue { background: rgba(13,110,253,0.1); }
.icon-circle-48.bg-blue i { color: #0d6efd; }
.icon-circle-48.bg-danger { background: rgba(220,53,69,0.15); }
.icon-circle-48.bg-danger i { color: #dc3545; }
.icon-circle-48.bg-muted { background: rgba(108,117,125,0.1); }
.icon-circle-48.bg-muted i { color: #6c757d; }

/* ===== БАЛАНС: КНОПКИ-ДЕЙСТВИЯ ===== */
.btn-circle-40 {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0; padding: 0; border: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    font-size: 18px;
    background: #fff;
    cursor: pointer;
}
.btn-circle-40.green { color: #28a745; }
.btn-circle-40.blue { color: #0066ff; }
.btn-circle-40.indigo { color: #6366f1; }
.btn-circle-40.muted { color: #adb5bd; opacity: 0.6; }

/* Баланс: скролл-контейнер */
.currency-scroll {
    display: flex; gap: 8px;
    overflow-x: auto; overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
}

/* ===== FILTER BUTTONS (замена inline-стилей) ===== */
.filter-input-group {
    position: relative;
    border-bottom: 2px solid #e8ecf0;
    transition: border-color 0.2s;
}
.filter-input-group:focus-within { border-color: #0066ff; }

/* ===== MISC UTILS ===== */
.overflow-x-hidden { overflow-x: hidden; }
.scrollbar-none { scrollbar-width: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }

/* ===== КАЛЕНДАРЬ РАСПИСАНИЙ ===== */
.btn-cal-nav { width: 28px; height: 28px; background: #f6f8fa; color: #656d76; }
.cal-title { font-size: 14px; min-width: 110px; text-align: center; flex: 1; }
.bg-cal { background: #f6f8fa; }
.cal-tip { font-size: 11px; color: #656d76; line-height: 1.6; }
.cal-tip-title { font-weight: 600; font-size: 12px; color: #1f2328; margin-bottom: 4px; }
.cal-tip-warn { color: #bf8700; }
.cal-time-input { font-size: 16px; font-weight: 600; }
.cal-section-title { font-size: 13px; }

/* ===== АДМИН: ПОЛЯ ДАННЫХ ===== */
.admin-icon-lg { font-size: 2.5rem; }
.admin-card-border { border-bottom: 1px solid #f0f2f5; }
.admin-field-label { font-size: 10px; font-weight: 500; color: #8c959f; margin-bottom: 2px; }
.admin-field-value { font-size: 13px; font-weight: 600; color: #1f2328; }
.admin-field-value-sm { font-size: 13px; font-weight: 500; color: #1f2328; }
.admin-route-city { font-size: 14px; font-weight: 600; color: #1f2328; word-break: break-word; }
.admin-route-arrow { font-size: 12px; color: #8c959f; padding-left: 2px; }
.admin-route-date { font-size: 13px; font-weight: 600; color: #1f2328; }
.admin-badge-status { font-size: 10px; }
.admin-badge-role { font-size: 11px; font-weight: 500; }
.admin-balance-positive { font-size: 12px; font-weight: 500; color: #198754; }
.admin-balance-neutral { font-size: 12px; font-weight: 500; color: #1f2328; }

/* ===== ФИЛЬТР-ЧИПСЫ ===== */
.filter-chip {
    border-radius: 8px; border: 1px solid #eef2f6; color: #1a1a2e;
    font-size: 14px; background: #ffffff; padding: 6px 14px;
}
.btn-transparent-muted { border: none; background: transparent; color: #8a9aa8; }
.icon-circle-white { width: 48px; height: 48px; background: #fff; border-radius: 50%; }

/* ===== MISC WIDTHS ===== */
.mw-700 { max-width: 700px; }

/* ===== СОГЛАШЕНИЯ (модалка и страницы /terms, /agreements/partner) ===== */
.agr-content { font-size: 14px; }
.agr-content .agr-sec { display: flex; align-items: baseline; gap: 10px; margin-top: 26px; padding-bottom: 10px; border-bottom: 1px solid #eef2f6; }
.agr-content .agr-sec:first-child { margin-top: 0; }
.agr-content .agr-sec-num { flex-shrink: 0; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; background: #0066ff; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.agr-content .agr-sec-title { font-size: 17px; font-weight: 700; color: #1a1a2e; line-height: 1.4; }
.agr-content .agr-item { display: flex; gap: 10px; margin: 12px 0; line-height: 1.65; color: #333a4d; }
.agr-content .agr-item-num { flex-shrink: 0; color: #0066ff; font-weight: 600; min-width: 34px; }
.agr-content .agr-p { margin: 12px 0; line-height: 1.7; color: #333a4d; }
.agr-content .agr-gap { height: 6px; }

/* ===== BAUZEIT: чипы работ, контакты, вкладки ===== */
.chip {
    display: inline-flex; align-items: center;
    padding: 3px 10px; background: #f0f3f6; border: 1px solid #e4e9ee;
    border-radius: 999px; font-size: 12px; color: #24292f; white-space: nowrap;
}
.chip-blue { background: #e8f1ff; border-color: #cfe2ff; color: #0b5ed7; }
.badge-price {
    background: #0066ff; color: #fff; font-weight: 600; white-space: nowrap;
}
.contact-box { background: #f2f4f7; border: 1px solid #e4e9ee; }
.nav-pills .nav-link { color: #57606a; font-weight: 500; border-radius: 10px; }
.nav-pills .nav-link.active { background: #0066ff; }
.order-desc {
    font-size: 13px; color: #4a4a5a; white-space: pre-line;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
