:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --card: #ffffff;
    --card-bg: #ffffff;
    --text: #1a2332;
    --muted: #64748b;
    --primary: #10b981;
    --primary-dark: #059669;
    --border: #e2e8f0;
    --error: #dc2626;
    --success: #16a34a;
    --warn: #d97706;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --input-bg: #ffffff;
    --surface-muted: #f8fafc;
    --surface-hover: #f1f5f9;
    --header-bg: rgba(255, 255, 255, 0.92);
    --footer-bg: #ffffff;
    --overlay-bg: rgba(15, 23, 42, 0.38);
    --chip-bg: #f8fafc;
    --chip-checked-bg: #d1fae5;
    --btn-secondary-bg: #f1f5f9;
}

[data-theme="dark"] {
    --bg: #0b1120;
    --surface: #1e293b;
    --card: #1a2332;
    --card-bg: #1a2332;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.75);
    --border: #334155;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --input-bg: #0f172a;
    --surface-muted: #1e293b;
    --surface-hover: #334155;
    --header-bg: rgba(15, 23, 42, 0.92);
    --footer-bg: #0f172a;
    --overlay-bg: rgba(0, 0, 0, 0.55);
    --chip-bg: #1e293b;
    --chip-checked-bg: rgba(16, 185, 129, 0.22);
    --btn-secondary-bg: #334155;
    --glass-bg: rgba(15, 23, 42, 0.55);
    --glass-bg-input: rgba(8, 15, 30, 0.65);
    --glass-bg-dropdown: rgba(12, 20, 36, 0.72);
    --glass-bg-cabin: rgba(15, 23, 42, 0.72);
    --glass-bg-alert-error: rgba(127, 29, 29, 0.38);
    --glass-bg-alert-success: rgba(22, 101, 52, 0.38);
    --glass-bg-alert-warn: rgba(120, 53, 15, 0.38);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 12px;
    --glass-blur-input: 8px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    position: relative;
}

body.page-home::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("../images/background.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    opacity: 0.42;
}

body.page-results::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("../images/background.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    opacity: 0.42;
}

body.page-home::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.55) 100%);
    opacity: 1;
}

body.page-results::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--bg);
    opacity: 0.32;
}

[data-theme="dark"] body.page-home::before,
[data-theme="dark"] body.page-results::before {
    background-image: url("../images/background-dark.jpg");
    opacity: 0.55;
}

[data-theme="dark"] body.page-home::after {
    background: linear-gradient(180deg, rgba(11, 17, 32, 0.2) 0%, rgba(11, 17, 32, 0.78) 100%);
}

[data-theme="dark"] body.page-results::after {
    opacity: 0.5;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: none; }

.container {
    width: min(960px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 0;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    gap: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    direction: ltr;
    flex-shrink: 0;
}

.header-search-action {
    flex-shrink: 0;
    margin-inline-start: 0.25rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
    background: transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

button.icon-btn {
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.icon-btn:hover {
    color: var(--primary-dark);
    background: var(--surface-muted);
    border-color: var(--border);
    text-decoration: none;
}

.icon-btn.is-active {
    color: var(--text);
    background: var(--surface-hover);
    border-color: var(--border);
}

.theme-toggle__icon[hidden] {
    display: none !important;
}

.theme-toggle {
    border-color: transparent;
    background: transparent;
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .theme-toggle:hover {
    background: transparent;
    color: #fff;
    border-color: transparent;
}

.header-login-link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    min-height: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.header-user {
    display: inline-flex;
    align-items: center;
    direction: ltr;
}

html[lang="fa"] .header-search-action {
    order: -1;
}

html[lang="fa"] .header-user,
html[lang="fa"] .header-login-link {
    order: 0;
}

.header-user__dashboard {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0.25rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.header-user__dashboard:hover {
    color: var(--primary-dark);
    background: #f8fafc;
    text-decoration: none;
}

.header-user__dashboard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: currentColor;
}

.header-user-name {
    display: inline-flex;
    align-items: center;
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
}

@media (max-width: 420px) {
    .header-user-name {
        display: none;
    }
}

.header-user-menu {
    position: relative;
    flex-shrink: 0;
}

.header-user-menu__toggle {
    display: none;
}

.header-user-menu__menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    inset-inline-end: 0;
    min-width: 10.5rem;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 200;
}

.header-user-menu__menu[hidden] {
    display: none !important;
}

.header-user-menu.is-open .header-user-menu__menu {
    display: block;
}

.header-user-menu__item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    touch-action: manipulation;
}

.header-user-menu__item-icon {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--muted, #64748b);
}

.header-user-menu__item-label {
    flex: 1;
    min-width: 0;
}

.header-user-menu__item:hover .header-user-menu__item-icon {
    color: var(--primary, #047857);
}

.header-user-menu__item:hover {
    background: #f0fdf4;
    color: var(--primary, #047857);
    text-decoration: none;
}

.header-user-menu__item--logout {
    color: var(--muted, #64748b);
}

.header-user-menu__item--logout:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.header-user-menu__item--logout:hover .header-user-menu__item-icon {
    color: #b91c1c;
}

@media (max-width: 768px) {
    .footer-lang .lang-label-full {
        display: none;
    }

    .footer-lang .lang-label-short {
        display: inline;
    }

    .footer-lang .lang-switcher__toggle {
        padding: 0.4rem 0.55rem;
        min-width: 2.75rem;
        justify-content: center;
    }

    .header-search-action {
        order: 1;
    }

    .header-user {
        order: 2;
    }

    .header-user__dashboard {
        display: none;
    }

    .header-user-menu__toggle {
        display: inline-flex;
    }
}

.header-login-link:hover {
    color: var(--primary-dark);
    border-color: var(--primary);
    background: #f8fafc;
    text-decoration: none;
}

body.page-home:not(.has-results) .header-search-action {
    display: none;
}

.bus-results-mount {
    margin-top: 1rem;
}

.search-loading {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: search-loading-fade-in 0.2s ease;
}

.search-loading[hidden] {
    display: none !important;
}

.search-loading__panel {
    width: max-content;
    max-width: calc(100vw - 2rem);
    min-width: 0;
    padding: 2rem 1.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    text-align: center;
}

.search-loading__spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 1.15rem;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: bus-spin 0.85s linear infinite;
    position: relative;
}

.search-loading__spinner::after {
    content: "";
    position: absolute;
    inset: 9px;
    border: 2px solid transparent;
    border-bottom-color: var(--primary-dark);
    border-radius: 50%;
    animation: bus-spin 1.15s linear infinite reverse;
    opacity: 0.8;
}

.search-loading__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.search-loading__text {
    margin: 0;
    font-size: clamp(0.74rem, 2.8vw, 0.9rem);
    color: var(--muted);
    line-height: 1.5;
    white-space: nowrap;
}

@media (max-width: 420px) {
    .search-loading {
        padding: 1rem 0.65rem;
    }

    .search-loading__panel {
        padding: 1.5rem 0.9rem;
    }

    .search-loading__text {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .search-loading__text {
        font-size: 0.74rem;
    }
}

.btn-search.is-busy {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-search.is-busy::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 1.15rem;
    height: 1.15rem;
    margin: -0.575rem 0 0 -0.575rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bus-spin 0.7s linear infinite;
}

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

@keyframes search-loading-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

body.search-in-progress {
    overflow: hidden;
}

body.page-home.has-results .search-panel-head {
    display: none;
}

body.page-home.has-results .search-panel .search-form {
    padding-top: 1rem;
}

.main-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--primary-dark);
}

.user-box { color: var(--muted); font-size: 0.95rem; }

.site-main {
    flex: 1 0 auto;
    padding: 1.25rem 0 1.5rem;
}

.layout-no-footer .site-main {
    padding-bottom: 2rem;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    min-height: 84px;
    box-sizing: border-box;
    border-top: 1px solid var(--border);
    background: var(--footer-bg);
    padding: 1.5rem 0 1.25rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem 1.5rem;
    min-width: 0;
    direction: ltr;
}

html[lang="fa"] .footer-row,
html[dir="rtl"]:not([lang="en"]) .footer-row {
    direction: rtl;
}

.footer-copy {
    grid-column: 1;
    flex-shrink: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    white-space: nowrap;
    direction: inherit;
    unicode-bidi: plaintext;
}

.footer-services {
    grid-column: 2;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: center;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-block: 0.15rem;
}

.footer-services::-webkit-scrollbar {
    height: 4px;
}

.footer-services::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 999px;
}

.footer-services a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.88rem;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.footer-svc-icon {
    flex-shrink: 0;
}

.footer-services a:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    text-decoration: none;
}

.footer-services a.is-current {
    border-color: var(--primary);
    background: #ecfdf5;
    color: var(--primary-dark);
    font-weight: 600;
}

.footer-lang {
    grid-column: 3;
    flex-shrink: 0;
    justify-self: end;
    direction: inherit;
}

.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

.lang-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.lang-switcher__toggle:hover {
    color: var(--primary-dark);
    border-color: var(--primary);
}

.lang-label-short {
    display: none;
}

.lang-switcher__chevron {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.lang-switcher.is-open .lang-switcher__chevron {
    transform: rotate(180deg);
}

.lang-switcher__menu {
    position: absolute;
    bottom: calc(100% + 0.4rem);
    inset-inline-end: 0;
    min-width: 9.5rem;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.1);
    z-index: 200;
}

.lang-switcher__menu[hidden] {
    display: none !important;
}

.lang-switcher.is-open .lang-switcher__menu {
    display: block;
}

.lang-switcher__option {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    text-align: start;
    color: var(--text);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.lang-switcher__option:hover,
.lang-switcher__option.is-selected {
    background: #ecfdf5;
    color: var(--primary-dark);
}

.footer-enamad img {
    width: auto;
    height: auto;
    max-height: 72px;
}

.page-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
}

.page-back:hover {
    text-decoration: underline;
}

.hero-card {
    margin-bottom: 1rem;
    padding: 1.25rem 0;
}

.hero-card h1 {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
}

.hero-card.compact h1 { font-size: 1.35rem; }

.hero-card p { margin: 0; color: var(--muted); }

.search-panel {
    position: relative;
    z-index: 2;
    padding: 0;
    margin-bottom: 1rem;
}

.search-panel-head {
    padding: 1.35rem 1.5rem 0.85rem;
    border-bottom: 1px solid var(--border);
}

.search-panel-head h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

.search-panel-head p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
    max-width: 42ch;
}

.search-panel .search-form {
    padding: 1rem 1.5rem 1.5rem;
    overflow: visible;
}

.search-panel .form-grid {
    gap: clamp(1.35rem, 2.5vh, 1.95rem) 1.15rem;
}

.search-panel .form-grid--route,
.search-panel .form-grid--dates {
    margin-bottom: clamp(1.35rem, 2.5vh, 1.95rem);
}

.search-panel .field {
    gap: clamp(0.95rem, 1.35vh, 1.3rem);
}

.search-panel .field--submit .field-label--spacer {
    margin-bottom: clamp(0.95rem, 1.35vh, 1.3rem);
}

.search-panel .search-form .trip-type-row {
    margin-bottom: clamp(1.25rem, 2.2vh, 1.65rem);
}

.home-promo {
    position: relative;
    z-index: 1;
    padding: 1.75rem 1.5rem;
}

.home-promo h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
}

.home-promo-lead {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.75;
    transition: margin-bottom 0.4s ease;
}

.home-promo--compact {
    padding-bottom: 0.4rem;
}

.home-promo--compact .home-promo-lead {
    margin-bottom: 0;
}

.home-promo-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
    overflow: hidden;
    max-height: 6rem;
    opacity: 1;
    transition:
        max-height 0.4s ease,
        opacity 0.4s ease,
        padding-top 0.4s ease,
        border-top-color 0.4s ease;
}

.home-promo-trust--collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    border-top-color: transparent;
    gap: 0;
    pointer-events: none;
    visibility: hidden;
}

.home-promo-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.home-promo-trust-icon {
    flex-shrink: 0;
    color: var(--primary);
}

/* Homepage initial view: fit within viewport on desktop/laptop */
@media (min-width: 721px) {
    html:has(body.page-home:not(.has-results)) {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    body.page-home:not(.has-results) {
        height: 100dvh;
        max-height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    body.page-home:not(.has-results) .site-header {
        flex-shrink: 0;
    }

    body.page-home:not(.has-results) .site-main {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        padding: clamp(0.75rem, 2.5vh, 1.75rem) 0 clamp(0.5rem, 1.5vh, 1rem);
    }

    body.page-home:not(.has-results) .site-main > .container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 0 1 auto;
        min-height: 0;
        gap: clamp(0.4rem, 0.9vh, 0.65rem);
    }

    body.page-home:not(.has-results) .site-footer {
        flex-shrink: 0;
        margin-top: auto;
        padding: 0.95rem 0 0.85rem;
    }

    body.page-home:not(.has-results) .footer-inner {
        gap: 0.6rem;
    }

    body.page-home:not(.has-results) .search-panel.card {
        padding: 0;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    body.page-home:not(.has-results) .home-promo.card {
        margin-bottom: 0;
        flex: 0 0 auto;
        padding: clamp(0.75rem, 1.5vh, 1.15rem) clamp(1.25rem, 2vw, 1.75rem) clamp(0.75rem, 1.5vh, 1.15rem);
        transition: padding 0.4s ease;
    }

    body.page-home:not(.has-results) .home-promo.home-promo--compact {
        padding-top: clamp(0.65rem, 1.25vh, 0.95rem);
        padding-bottom: clamp(0.3rem, 0.55vh, 0.45rem);
    }

    body.page-home:not(.has-results) .home-promo.home-promo--compact .home-promo-lead {
        margin-bottom: 0;
    }

    body.page-home:not(.has-results) .search-panel-head {
        padding: 1.75rem clamp(1.35rem, 2.2vw, 1.85rem) clamp(0.5rem, 1vh, 0.7rem);
    }

    body.page-home:not(.has-results) .search-panel-head h1 {
        margin-bottom: clamp(0.45rem, 0.9vh, 0.65rem);
    }

    body.page-home:not(.has-results) .search-panel .search-form {
        padding: clamp(1rem, 2.2vh, 1.55rem) clamp(1.35rem, 2.2vw, 1.85rem) 2.05rem;
    }

    body.page-home:not(.has-results) .search-panel .search-form .trip-type-row {
        gap: 0.95rem;
        margin-bottom: clamp(1.55rem, 2.85vh, 2.05rem);
    }

    body.page-home:not(.has-results) .search-panel .form-grid {
        gap: clamp(1.75rem, 3.2vh, 2.25rem) clamp(1.1rem, 2.2vw, 1.5rem);
    }

    body.page-home:not(.has-results) .search-panel .form-grid--route {
        margin-bottom: clamp(1.75rem, 3.2vh, 2.25rem);
    }

    body.page-home:not(.has-results) .search-panel .field {
        gap: clamp(1rem, 1.85vh, 1.35rem);
    }

    body.page-home:not(.has-results) .search-panel .field--submit .field-label--spacer {
        margin-bottom: clamp(1rem, 1.85vh, 1.35rem);
    }

    body.page-home:not(.has-results) .home-promo h2 {
        margin-bottom: clamp(0.65rem, 1.3vh, 1rem);
    }

    body.page-home:not(.has-results) .home-promo-lead {
        margin-bottom: clamp(0.85rem, 1.6vh, 1.35rem);
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    body.page-home:not(.has-results) .home-promo-trust {
        padding-top: clamp(0.35rem, 0.8vh, 0.65rem);
    }
}

@media (min-width: 721px) and (max-height: 820px) {
    body.page-home:not(.has-results) .header-inner {
        padding: 0.6rem 0;
    }

    body.page-home:not(.has-results) .site-main {
        padding: 0.5rem 0 0.35rem;
    }

    body.page-home:not(.has-results) .site-main > .container {
        gap: clamp(0.35rem, 0.75vh, 0.55rem);
    }

    body.page-home:not(.has-results) .site-footer {
        padding: 0.75rem 0 0.65rem;
    }

    body.page-home:not(.has-results) .footer-inner {
        gap: 0.45rem;
    }

    body.page-home:not(.has-results) .search-panel-head {
        padding: 1.75rem 1.25rem 0.35rem;
    }

    body.page-home:not(.has-results) .search-panel .search-form {
        padding: 0.85rem 1.25rem 2.05rem;
    }

    body.page-home:not(.has-results) .search-panel .search-form .trip-type-row {
        gap: 0.85rem;
        margin-bottom: clamp(1.3rem, 2.2vh, 1.6rem);
    }

    body.page-home:not(.has-results) .search-panel .form-grid {
        gap: clamp(1.4rem, 2.5vh, 1.75rem) 1.1rem;
    }

    body.page-home:not(.has-results) .search-panel .form-grid--route {
        margin-bottom: clamp(1.4rem, 2.5vh, 1.75rem);
    }

    body.page-home:not(.has-results) .search-panel .field {
        gap: clamp(0.9rem, 1.5vh, 1.15rem);
    }

    body.page-home:not(.has-results) .search-panel .field--submit .field-label--spacer {
        margin-bottom: clamp(0.9rem, 1.5vh, 1.15rem);
    }

    body.page-home:not(.has-results) .home-promo.card {
        padding: 0.65rem 1.15rem 1rem;
    }

    body.page-home:not(.has-results) .home-promo.home-promo--compact {
        padding-top: 0.55rem;
        padding-bottom: 0.3rem;
    }

    body.page-home:not(.has-results) .home-promo h2 {
        margin-bottom: 0.55rem;
        font-size: clamp(1.05rem, 2vw, 1.25rem);
    }

    body.page-home:not(.has-results) .home-promo-lead {
        margin-bottom: 0.65rem;
        font-size: 0.875rem;
        line-height: 1.5;
    }

    body.page-home:not(.has-results) .home-promo-trust {
        max-height: 4.25rem;
        padding-top: 0.25rem;
    }
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.search-panel.card {
    padding: 0;
}

.home-promo.card {
    padding: 1.75rem 1.5rem;
    transition: padding 0.4s ease;
}

.search-form .trip-type-row {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.chip-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    background: var(--chip-bg);
}

.chip-radio:has(input:checked) {
    border-color: var(--primary);
    background: var(--chip-checked-bg);
    color: var(--primary-dark);
}

.chip-radio input { accent-color: var(--primary); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    align-items: end;
}

.form-grid--search {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid--route {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.65rem;
}

.form-grid--meta,
.form-grid--action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.form-grid--dates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.65rem;
}

.form-grid--passengers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0;
}

@media (min-width: 900px) {
    .form-grid--action-row {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(140px, 1.15fr);
        align-items: end;
    }

    .field--submit .btn-search {
        width: 100%;
        min-height: 48px;
        margin-top: 0;
    }
}

.field--submit .field-label--spacer {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.3;
    min-height: 1.15rem;
    margin-bottom: 0.35rem;
    visibility: hidden;
}

.passenger-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.15rem;
    margin: 1rem 0;
}

.field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.35rem;
}

.field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.3;
}

.field input:not([type="hidden"]),
.field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding-block: 0.65rem;
    padding-inline: 1rem 0.85rem;
    font: inherit;
    background-color: var(--input-bg);
    color: var(--text);
}

.field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-inline-end: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1rem;
    background-position: right 0.85rem center;
}

[dir="rtl"] .field select {
    background-position: left 0.85rem center;
}

.field input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.field input:focus,
.field select:focus {
    outline: 2px solid rgba(16, 185, 129, 0.25);
    border-color: var(--primary);
}

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

.field-input-wrap .field-input-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.85rem;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #64748b;
    pointer-events: none;
}

.field-input-wrap input:not([type="hidden"]) {
    padding-inline-start: 2.5rem;
}

.field-input-wrap--stepper .passenger-stepper {
    display: grid;
    grid-template-columns: 2.75rem minmax(2ch, 1fr) 2.75rem;
    align-items: stretch;
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--input-bg);
    padding-inline-start: 2.5rem;
}

.field-input-wrap--stepper .field-input-icon {
    z-index: 1;
}

.field-input-wrap--stepper:focus-within .passenger-stepper {
    outline: 2px solid rgba(16, 185, 129, 0.25);
    border-color: var(--primary);
}

.field-input-wrap--stepper .passenger-stepper input {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0;
    border: none;
    border-radius: 0;
    text-align: center;
    font-weight: 600;
    color: var(--text);
    background: transparent;
}

.field-input-wrap--stepper .passenger-stepper input:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}

.stepper-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    min-height: 46px;
    padding: 0;
    border: none;
    background: var(--surface-muted);
    color: var(--primary-dark);
    font: inherit;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.stepper-btn--decrease {
    grid-column: 1;
    grid-row: 1;
    border-inline-end: 1px solid var(--border);
}

.stepper-btn--increase {
    grid-column: 3;
    grid-row: 1;
    border-inline-start: 1px solid var(--border);
}

.stepper-btn:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.08);
    color: var(--primary);
}

.stepper-btn:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.35);
    outline-offset: -2px;
    z-index: 1;
}

.stepper-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.return-date-field.is-hidden { display: none; }

.date-input-locale {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.persian-date-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    min-height: 46px;
    align-items: stretch;
}

.date-picker {
    position: relative;
    min-width: 0;
}

.date-picker.is-open {
    z-index: 100;
}

.date-picker__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    min-height: 48px;
    padding-block: 0.5rem;
    padding-inline: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg);
    font: inherit;
    color: var(--text);
    cursor: pointer;
    text-align: inherit;
}

.date-picker__trigger::after {
    content: "";
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center / 12px 12px;
}

.date-picker__value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date-picker__trigger:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.25);
    border-color: var(--primary);
}

.date-picker.is-open .date-picker__trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.date-picker__menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 12rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.date-picker.is-open-up .date-picker__menu {
    top: auto;
    bottom: calc(100% + 4px);
}

.date-picker__list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
}

.date-picker__option {
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    color: var(--text);
}

.date-picker__option:hover {
    background: #f8fafc;
}

.date-picker__option.is-selected {
    background: #ecfdf5;
    color: var(--primary-dark);
    font-weight: 600;
}

.autocomplete-wrap { position: relative; }

.autocomplete-wrap:has(.profile-place-clear) input {
    padding-inline-end: 2.75rem;
}

.profile-place-clear {
    position: absolute;
    inset-inline-end: 0.7rem;
    top: calc(100% - 24px);
    transform: translateY(-50%);
    width: 1.8rem;
    height: 1.8rem;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    z-index: 2;
}

.profile-place-clear:hover,
.profile-place-clear:focus-visible {
    color: var(--primary-dark);
    background: #ecfdf5;
    outline: none;
}

.profile-place-clear svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.suggestions {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 4px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-height: 220px;
    overflow: auto;
    display: none;
    z-index: 30;
}

.suggestions.open { display: block; }

.nationality-picker { position: relative; }
.nationality-picker__input { width: 100%; }
.field[data-passenger-id-field][hidden],
.field[data-identity-field][hidden] { display: none !important; }
.nationality-picker__suggestions {
    top: calc(100% + 6px);
    max-height: 260px;
    padding: 0.35rem;
    border-radius: 14px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}
.nationality-picker__suggestions .suggestion-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 0.65rem 0.8rem;
    margin: 0;
    color: var(--text);
    font: inherit;
    text-align: start;
    background: transparent;
    border: 0;
    border-radius: 9px;
}
.nationality-picker__suggestions .suggestion-item + .suggestion-item {
    border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.nationality-picker__suggestions .suggestion-item:hover,
.nationality-picker__suggestions .suggestion-item:focus-visible {
    color: var(--primary-dark);
    background: #ecfdf5;
    outline: 0;
}

.suggestion-item {
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

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

.suggestion-item small { color: var(--muted); display: block; }

/* Scrollable dropdown panels: hide scrollbars, keep wheel/touch scroll */
.date-picker__menu,
.suggestions {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.date-picker__menu::-webkit-scrollbar,
.suggestions::-webkit-scrollbar {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-block { width: 100%; margin-top: 0.5rem; }

@media (min-width: 900px) {
    .form-grid--action-row .btn-block {
        margin-top: 0;
    }
}
.btn-sm { padding: 0.45rem 0.75rem; font-size: 0.9rem; }

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--text);
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: opacity 0.4s ease, transform 0.4s ease, margin-bottom 0.4s ease;
}

.alert--dismissing {
    opacity: 0;
    transform: translateY(-6px);
    margin-bottom: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .alert {
        transition: opacity 0.15s ease;
    }

    .alert--dismissing {
        transform: none;
    }

    .home-promo-trust {
        transition: opacity 0.15s ease;
    }

    .home-promo-trust--collapsed {
        max-height: 0;
    }

    .home-promo.card,
    .home-promo-lead {
        transition-duration: 0.15s;
    }
}

.alert-error { background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-warn { background: #fffbeb; color: var(--warn); border: 1px solid #fde68a; }

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--muted);
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
    justify-content: space-between;
}

.route-pair {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.route-pair__arrow {
    color: var(--muted);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1;
    direction: ltr;
    unicode-bidi: isolate;
}

.offer-route-detail {
    color: var(--muted);
    font-size: 0.92rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.offer-list { display: grid; gap: 0.85rem; }

/* —— Bus ticket result cards —— */
.bus-ticket {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    border-inline-start: 4px solid var(--primary);
}

.bus-ticket--bookable { border-inline-start-color: var(--primary); }
.bus-ticket--insufficient { border-inline-start-color: var(--warn); opacity: 0.95; }
.bus-ticket--sold_out {
    border-inline-start-color: #94a3b8;
    opacity: 0.72;
    filter: grayscale(0.35);
}

.bus-ticket__body {
    flex: 1 1 0;
    padding: 0.85rem 1rem;
    min-width: 0;
}

.bus-ticket__aside {
    display: contents;
}

.bus-ticket__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: nowrap;
}

.bus-ticket__header-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
}

.bus-ticket__logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.bus-ticket__logo--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: #f1f5f9;
}

.bus-ticket__logo--placeholder .bus-flat-icon {
    display: block;
}

.bus-ticket__company {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.bus-ticket__company-name {
    font-weight: 600;
    font-size: 1rem;
}

.bus-ticket__type-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
}

.bus-ticket__type-badge--vip {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.bus-ticket__departure {
    display: flex;
    flex-direction: column;
    align-items: end;
    flex-shrink: 0;
    gap: 0.1rem;
    text-align: end;
}

.bus-ticket__header-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 0.25rem;
    text-align: end;
}

.bus-ticket__route-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.85rem;
}

.bus-ticket__route-row .bus-ticket__route {
    flex: 1 1 auto;
    min-width: 0;
}

[dir="rtl"] .bus-ticket__route-row {
    flex-direction: row-reverse;
}

.bus-ticket__departure--inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    text-align: start;
}

.bus-ticket__departure--inline .bus-ticket__departure-label {
    font-size: 0.72rem;
}

.bus-ticket__departure--inline .bus-ticket__time {
    font-size: 1.35rem;
    text-align: start;
}

.bus-ticket__departure-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.bus-ticket__time {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    direction: ltr;
    unicode-bidi: isolate;
    flex-shrink: 0;
    text-align: end;
    white-space: nowrap;
    line-height: 1.1;
}

.bus-ticket__route {
    font-size: 0.95rem;
}

.bus-ticket__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    font-size: 0.85rem;
    color: var(--muted);
    align-items: center;
}

.bus-ticket__capacity--warning,
.bus-ticket__capacity--insufficient {
    display: inline-block;
    background: #fffbeb;
    color: #b45309;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 6px;
}

.bus-ticket__capacity--sold_out {
    color: #64748b;
    font-weight: 600;
}

.bus-ticket__services {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.35rem;
}

.bus-ticket__services-label {
    font-weight: 600;
    color: var(--muted);
}

.bus-ticket__amenity {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #047857;
}

.bus-ticket__amenity-icon {
    flex-shrink: 0;
}

.bus-ticket__tear {
    width: 0;
    align-self: stretch;
    border-inline-start: 2px dotted #cbd5e1;
    margin: 0.5rem 0;
    flex-shrink: 0;
}

.bus-ticket__price-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.75rem 0.9rem;
    min-width: 108px;
    background: #f8fafc;
}

.bus-ticket__action-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.9rem;
    min-width: 96px;
    background: #f8fafc;
}

.bus-ticket__action-section .btn {
    white-space: nowrap;
}

.bus-ticket__price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.btn-disabled {
    background: #e2e8f0;
    color: #64748b;
    border: 1px solid #cbd5e1;
    cursor: not-allowed;
    opacity: 0.9;
}

.bus-ticket--summary {
    margin-bottom: 1rem;
}

.bus-ticket__title {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.bus-ticket__title-divider,
.bus-ticket__divider {
    border: none;
    border-top: 2px dotted #cbd5e1;
    margin: 0.55rem 0;
}

.bus-ticket__title-divider {
    margin-top: 0;
    margin-bottom: 0.85rem;
}

.bus-ticket__summary-note {
    font-size: 0.9rem;
}

.bus-ticket__summary-note .link-muted {
    margin-inline-start: 0.35rem;
}

.bus-ticket__price-note {
    font-size: 0.82rem;
    text-align: center;
    line-height: 1.35;
}

.offer-card {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.offer-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.offer-route { margin-top: 0.25rem; }

.offer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.offer-side { text-align: left; min-width: 140px; }
.offer-price { font-size: 1.15rem; font-weight: 700; color: var(--primary-dark); }

.leg-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.leg-badge.leg-return { background: #fef3c7; color: #b45309; }

.leg-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
}

.leg-summary:last-of-type { border-bottom: none; }

.total-line {
    margin-top: 0.75rem;
    font-size: 1.05rem;
}

.passenger-block {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.passenger-block legend {
    padding: 0 0.35rem;
    font-weight: 600;
}

.empty-state { text-align: center; }
.empty-state h2 { margin-top: 0; }

.booking-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

html[lang="en"] .booking-head h1 {
    font-size: clamp(1.35rem, 2.1vw, 1.85rem);
    line-height: 1.35;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-error { background: #fee2e2; color: #b91c1c; }
.badge-muted { background: #f1f5f9; color: #475569; }
.badge-info { background: #d1fae5; color: #0369a1; }

.booking-list { display: grid; gap: 0.85rem; }

.booking-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.booking-row h2 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}

.booking-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.payment-total {
    font-size: 1.2rem;
    margin: 1rem 0;
    padding: 0.85rem;
    background: #f8fafc;
    border-radius: 10px;
}

.passenger-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.passenger-list li {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.voucher-json {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 10px;
    overflow: auto;
    font-size: 0.82rem;
    direction: ltr;
    text-align: left;
}

.date-strip {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.85rem;
}

.date-strip-nav {
    flex: 0 0 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.date-strip-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.date-strip-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
    flex: 1;
    min-width: 0;
}

.date-strip-days.is-loading .price {
    opacity: 0.55;
}

.date-strip-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 88px;
    padding: 0.45rem 0.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: var(--text);
}

.date-strip-day .dow {
    font-size: 0.78rem;
    color: var(--muted);
}

.date-strip-day .jalali {
    font-size: 0.92rem;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: isolate;
}

.date-strip-day .price {
    font-size: 0.8rem;
    color: var(--primary-dark);
    font-weight: 700;
    direction: ltr;
    unicode-bidi: isolate;
}

.date-strip-day.is-selected {
    border-color: var(--primary);
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px var(--primary);
}

.date-strip-day.is-unavailable .price {
    color: var(--muted);
    font-weight: 500;
}

.date-strip-day.is-past {
    opacity: 0.45;
    cursor: not-allowed;
}

/* —— Seat map —— */
.page-seats .seat-map-card {
    overflow: hidden;
}

.seats-layout {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "head"
        "map"
        "footer";
}

.seats-layout__info {
    display: contents;
}

.seats-layout__map {
    grid-area: map;
    min-width: 0;
}

/* Info panel: RTL right-align by default (fa) */
html[lang="fa"] .seats-layout__info,
html[dir="rtl"]:not([lang="en"]) .seats-layout__info,
html[lang="fa"] .seat-map-head,
html[dir="rtl"]:not([lang="en"]) .seat-map-head,
html[lang="fa"] .seat-picker-footer,
html[dir="rtl"]:not([lang="en"]) .seat-picker-footer {
    text-align: right;
    direction: rtl;
}

html[lang="en"] .seats-layout__info,
html[lang="en"] .seat-map-head,
html[lang="en"] .seat-picker-footer {
    text-align: left;
    direction: ltr;
}

@media (min-width: 769px) {
    .seats-layout {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
        align-items: stretch;
        gap: 1.5rem 2rem;
    }

    .seats-layout__map {
        grid-column: 1;
        grid-row: 1;
    }

    .seats-layout__info {
        display: flex;
        flex-direction: column;
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        min-height: 100%;
        padding-inline-start: 0.25rem;
        gap: 0;
    }

    html[dir="rtl"] .seats-layout,
    html[lang="fa"] .seats-layout {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }

    html[dir="rtl"] .seats-layout__map,
    html[lang="fa"] .seats-layout__map {
        grid-column: 2;
    }

    html[dir="rtl"] .seats-layout__info,
    html[lang="fa"] .seats-layout__info {
        grid-column: 1;
        padding-inline-start: 0;
        padding-inline-end: 0.25rem;
    }

    .seat-map-head {
        grid-area: unset;
        flex: 1 1 auto;
        margin-bottom: 0;
    }

    .seat-picker-footer {
        grid-area: unset;
        margin-top: auto;
        padding-top: 1.25rem;
    }

    .seats-layout__map .bus-cabin {
        max-width: min(100%, 420px);
        margin-inline: auto;
        margin-bottom: 0;
    }

    .seats-layout__map .seat-rule-error {
        max-width: min(100%, 420px);
        margin-inline: auto;
    }
}

.seat-map-head {
    grid-area: head;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.seat-map-head h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
}

.seat-map-head .muted.small {
    margin: 0;
    line-height: 1.65;
}

.seat-passenger-genders {
    gap: 0.75rem 1rem;
    margin: 0.25rem 0 0.5rem;
}

html[lang="fa"] .seat-passenger-genders .field label,
html[dir="rtl"]:not([lang="en"]) .seat-passenger-genders .field label {
    text-align: right;
}

html[lang="en"] .seat-passenger-genders .field label {
    text-align: left;
}

.seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.seats-layout__map .seat-legend {
    margin-bottom: 0.85rem;
    max-width: min(100%, 420px);
    margin-inline: auto;
}

html[lang="fa"] .seat-legend,
html[dir="rtl"]:not([lang="en"]) .seat-legend {
    justify-content: flex-end;
}

html[lang="en"] .seat-legend {
    justify-content: flex-start;
}

html[lang="en"] .seats-layout__map .seat-legend {
    justify-content: center;
}

.seat-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.seat-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.seat-swatch--available {
    background: #fff;
}

.seat-swatch--selected {
    background: var(--primary);
    border-color: var(--primary);
}

.seat-swatch--occupied {
    background: #e2e8f0;
}

.seat-swatch--occupied-male {
    background: #3b82f6;
    border-color: #2563eb;
}

.seat-swatch--occupied-female {
    background: #ef4444;
    border-color: #dc2626;
}

.bus-cabin {
    max-width: 360px;
    margin: 0 auto 1rem;
    padding: 0.75rem 0.5rem 0.5rem;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 40%, #fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px 16px 12px 12px;
}

.bus-front {
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    padding: 0.3rem 0.75rem;
    margin-bottom: 0.85rem;
    border: 1px dashed #94a3b8;
    border-radius: 999px 999px 4px 4px;
    background: #e2e8f0;
    position: relative;
}

.bus-front::before {
    content: '';
    display: block;
    width: 28px;
    height: 4px;
    background: #94a3b8;
    border-radius: 2px;
    margin: 0 auto 0.25rem;
}

.seat-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.seat-grid--1p2 .seat-row--vip {
    display: grid;
    grid-template-columns: 1fr minmax(1.25rem, 1.75rem) 2fr;
    gap: 0.4rem;
    align-items: center;
}

.seat-group {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
}

.seat-group--left {
    justify-content: flex-end;
}

.seat-group--right {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.seat-aisle {
    min-height: 2.75rem;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 3px,
        #e2e8f0 3px,
        #e2e8f0 6px
    );
    border-radius: 4px;
    opacity: 0.85;
}

.seat-row {
    display: grid;
    gap: 0.45rem;
    justify-content: center;
}

.seat-cell {
    min-height: 2.75rem;
    min-width: 2.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.seat-cell--seat {
    border: 1px solid #94a3b8;
    background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
    color: #0f172a;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    padding: 0.2rem 0.35rem 0.35rem;
    font-family: inherit;
    border-radius: 10px 10px 6px 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    position: relative;
}

.seat-cell--seat::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: #cbd5e1;
    border-radius: 2px;
}

.seat-cell--seat:hover:not(:disabled) {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.seat-cell--seat:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.seat-status--available {
    background: #fff;
}

.seat-status--occupied,
.seat-status--occupied_male,
.seat-status--occupied_female,
.seat-status--blocked {
    cursor: not-allowed;
}

.seat-status--occupied,
.seat-status--blocked {
    background: #e2e8f0;
    background-image: none;
    color: #64748b;
    border-color: #cbd5e1;
}

.seat-cell--seat.seat-status--occupied_male,
.seat-cell--seat[data-seat-gender="male"] {
    background: #3b82f6;
    background-image: none;
    color: #fff;
    border-color: #2563eb;
}

.seat-cell--seat.seat-status--occupied_male::before,
.seat-cell--seat[data-seat-gender="male"]::before {
    background: #93c5fd;
}

.seat-cell--seat.seat-status--occupied_female,
.seat-cell--seat[data-seat-gender="female"] {
    background: #ef4444;
    background-image: none;
    color: #fff;
    border-color: #dc2626;
}

.seat-cell--seat.seat-status--occupied_female::before,
.seat-cell--seat[data-seat-gender="female"]::before {
    background: #fca5a5;
}

.seat-cell--seat .seat-num {
    display: block;
    line-height: 1.2;
    font-size: 0.8rem;
    font-weight: 700;
}

.seat-cell--seat.is-selected,
.seat-status--available.is-selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* A selected seat belongs to the passenger at the same position in the list. */
.seat-cell--seat.is-selected--male {
    background: #3b82f6;
    border-color: #2563eb;
}

.seat-cell--seat.is-selected--female {
    background: #ef4444;
    border-color: #dc2626;
}

.seat-picker-footer {
    grid-area: footer;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.booking-flow-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.booking-flow-actions .btn {
    flex: 1 1 0;
    justify-content: center;
}

.booking-flow-back {
    margin: 0 0 1rem;
}

.seat-counter {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
    width: 100%;
}

html[lang="fa"] .seat-counter,
html[dir="rtl"]:not([lang="en"]) .seat-counter {
    text-align: right;
}

html[lang="en"] .seat-counter {
    text-align: left;
}

.seat-picker-footer .btn {
    width: 100%;
    margin-top: 0;
}

.seat-summary-line {
    margin-top: 0.65rem;
    font-size: 0.95rem;
}

.seat-summary-line .link-muted {
    margin-inline-start: 0.5rem;
    font-size: 0.85rem;
}

.link-muted {
    color: var(--primary);
    text-decoration: none;
}

.link-muted:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .form-grid--search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .form-grid,
    .form-grid--search,
    .form-grid--route,
    .form-grid--meta,
    .form-grid--action-row,
    .form-grid--dates,
    .form-grid--passengers,
    .passenger-row {
        grid-template-columns: 1fr;
    }

    .search-panel-head {
        padding: 1.25rem 1.15rem 0.85rem;
    }

    .search-panel .search-form {
        padding: 1.15rem;
    }

    .site-footer {
        padding: 1rem 0 0.85rem;
    }

    .footer-row {
        gap: 0.65rem;
    }

    .footer-services {
        gap: 0.4rem;
    }

    .footer-services a {
        padding: 0.35rem 0.6rem;
        font-size: 0.82rem;
    }

    .offer-side,
    .booking-row-side {
        width: 100%;
        text-align: right;
        align-items: stretch;
    }

    .bus-ticket {
        flex-wrap: wrap;
    }

    .bus-ticket__aside {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        width: 100%;
    }

    .bus-ticket__aside > .bus-ticket__tear:first-child {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        height: 0;
        border-inline-start: none;
        border-top: 2px dotted #cbd5e1;
        margin: 0;
    }

    .bus-ticket__tear--action {
        display: none;
    }

    .bus-ticket__price-section {
        grid-column: 2;
        grid-row: 2;
        width: auto;
        align-items: flex-end;
        text-align: end;
        min-width: 0;
        padding: 0.85rem 1rem;
    }

    .bus-ticket__action-section {
        grid-column: 1;
        grid-row: 2;
        align-self: center;
        justify-content: flex-start;
        padding: 0.85rem 1rem;
        min-width: 0;
        background: #f8fafc;
    }

    [dir="rtl"] .bus-ticket__price-section {
        grid-column: 1;
        align-items: flex-start;
        text-align: start;
    }

    [dir="rtl"] .bus-ticket__action-section {
        grid-column: 2;
        justify-content: flex-end;
    }

    .bus-ticket__price-note {
        text-align: end;
    }

    [dir="rtl"] .bus-ticket__price-note {
        text-align: start;
    }

    .bus-ticket:not(:has(.bus-ticket__action-section)) .bus-ticket__price-section {
        grid-column: 1 / -1;
        align-items: center;
        text-align: center;
    }

    .bus-ticket:not(:has(.bus-ticket__action-section)) .bus-ticket__price-note {
        text-align: center;
    }

    .bus-ticket__time {
        font-size: 1.2rem;
    }

    .date-strip-days {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .date-strip-day {
        min-width: 0;
        flex: unset;
    }

    .date-strip-days .date-strip-day:nth-child(n + 4) {
        display: none;
    }
}

.preinvoice-card {
    margin-bottom: 1rem;
    padding: 0;
    overflow: hidden;
    border-color: #dbe5ef;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.booking-progress {
    margin: 1rem 0;
    padding: 1rem 1.15rem;
    border: 1px solid #dbe5ef;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc, #f0fdf8);
}

.booking-progress__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.booking-progress__head > div {
    display: grid;
    gap: 0.2rem;
}

.booking-progress__head strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.booking-progress__head span {
    color: #64748b;
    font-size: 0.78rem;
}

.booking-progress__provider-status {
    flex: 0 0 auto;
    padding: 0.35rem 0.6rem;
    color: #047857 !important;
    background: #d1fae5;
    border-radius: 999px;
    font-weight: 700;
}

.booking-progress__steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.booking-progress__step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    min-width: 0;
    text-align: center;
}

.booking-progress__step:not(:last-child)::after {
    position: absolute;
    top: 1rem;
    inset-inline-start: calc(50% + 1rem);
    width: calc(100% - 2rem);
    height: 2px;
    background: #cbd5e1;
    content: '';
}

.booking-progress__marker {
    position: relative;
    z-index: 1;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    color: #64748b;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 800;
}

.booking-progress__copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.booking-progress__copy strong {
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.55;
}

.booking-progress__copy small {
    color: #94a3b8;
    font-size: 0.67rem;
}

.booking-progress__step.is-complete .booking-progress__marker,
.booking-progress__step.is-current .booking-progress__marker {
    color: #fff;
    background: #059669;
    border-color: #059669;
}

.booking-progress__step.is-complete:not(:last-child)::after {
    background: #059669;
}

.booking-progress__step.is-current .booking-progress__marker {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.15);
}

.booking-progress__step.is-complete .booking-progress__copy strong,
.booking-progress__step.is-current .booking-progress__copy strong {
    color: #065f46;
}

.preinvoice-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.4rem 1.5rem;
    background: linear-gradient(135deg, #f0fdf8 0%, #f8fafc 62%, #eff6ff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.preinvoice-card__heading {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.preinvoice-card__heading h1 {
    margin: 0 0 0.25rem;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    color: #0f172a;
}

.preinvoice-card__heading p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.preinvoice-card__icon {
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    display: grid;
    place-items: center;
    color: #047857;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 14px;
}

.preinvoice-card__icon svg,
.preinvoice-meta-card__icon svg,
.preinvoice-section-heading__icon svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.preinvoice-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.8rem;
    font-weight: 800;
}

.preinvoice-status__dot {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.13);
}

.preinvoice-status--expired {
    background: #fee2e2;
    color: #991b1b;
}

.preinvoice-status--expired .preinvoice-status__dot {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.13);
}

.preinvoice-expired-alert {
    margin: 1rem 1.5rem 0;
}

.preinvoice-expired-alert {
    display: grid;
    gap: 0.2rem;
}

.preinvoice-expired-alert strong {
    font-size: 0.9rem;
}

.preinvoice-expired-alert span {
    font-size: 0.8rem;
}

.preinvoice-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 0;
}

.preinvoice-meta-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.preinvoice-meta-card__icon,
.preinvoice-section-heading__icon {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e2e8f0;
    color: #475569;
}

.preinvoice-meta-card > div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.preinvoice-meta-card > div > span:first-child {
    color: #64748b;
    font-size: 0.76rem;
}

.preinvoice-meta-card strong {
    color: #0f172a;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.preinvoice-meta-card--time {
    background: #fffbeb;
    border-color: #fde68a;
}

.preinvoice-meta-card--time .preinvoice-meta-card__icon {
    color: #b45309;
    background: #fef3c7;
}

.preinvoice-meta-card--time.is-expired {
    background: #fef2f2;
    border-color: #fecaca;
}

.preinvoice-countdown {
    display: block;
    width: max-content;
    margin-top: 0.1rem;
    color: #b45309;
    direction: ltr;
    font-size: 0.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.preinvoice-countdown--expired {
    color: #dc2626;
}

.preinvoice-time-limit-note {
    display: block;
    margin-top: 0.1rem;
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.5;
}

.preinvoice-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem 1.5rem 1.25rem;
}

.preinvoice-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.preinvoice-fares:only-child {
    grid-column: 1 / -1;
}

.preinvoice-section-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.preinvoice-section-heading__icon {
    width: 2rem;
    height: 2rem;
    flex-basis: 2rem;
    color: #047857;
    background: #ecfdf5;
}

.preinvoice-section-heading__icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.preinvoice-section-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 0.95rem;
}

.preinvoice-passenger-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.preinvoice-passenger-list li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem;
    border-radius: 11px;
    background: #f8fafc;
}

.preinvoice-passenger-index {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #047857;
    background: #d1fae5;
    font-size: 0.8rem;
    font-weight: 800;
}

.preinvoice-passenger-list li > div {
    display: grid;
    gap: 0.15rem;
}

.preinvoice-passenger-list strong {
    color: #0f172a;
    font-size: 0.92rem;
}

.preinvoice-passenger-list li > div > span {
    color: #64748b;
    font-size: 0.78rem;
}

.preinvoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.preinvoice-table td {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}

.preinvoice-table tr:last-child td {
    border-bottom: 0;
}

.preinvoice-table td:last-child {
    text-align: end;
    font-weight: 600;
}

.preinvoice-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin: 0;
    padding: 1.2rem 1.5rem;
    border-top: 1px solid #a7f3d0;
    background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
}

.preinvoice-total > div {
    display: grid;
    gap: 0.2rem;
}

.preinvoice-total span {
    color: #064e3b;
    font-size: 1rem;
    font-weight: 800;
}

.preinvoice-total small {
    color: #047857;
    font-size: 0.75rem;
}

.preinvoice-total strong {
    color: #047857;
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    white-space: nowrap;
}

.preinvoice-fare-single {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    color: #475569;
}

.preinvoice-fare-single strong {
    color: #0f172a;
    white-space: nowrap;
}

.payment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 1.1rem 1.25rem;
    border-color: #dbe5ef;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.payment-actions .btn {
    flex: 0 0 auto;
    min-width: 190px;
    min-height: 52px;
    margin: 0;
    border-radius: 12px;
    font-weight: 800;
}

.payment-actions__content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.payment-actions__content > div {
    display: grid;
    gap: 0.25rem;
}

.payment-actions__content strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.payment-actions__content p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.8;
}

.payment-actions__icon {
    width: 2.7rem;
    height: 2.7rem;
    flex: 0 0 2.7rem;
    display: grid;
    place-items: center;
    color: #047857;
    background: #d1fae5;
    border-radius: 12px;
}

.payment-actions__icon svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.payment-actions--method {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.payment-actions--method .payment-actions__content {
    grid-column: 1 / -1;
}

form.payment-actions:not(.payment-actions--method) {
    display: grid;
    grid-template-columns: 1fr;
}

form.payment-actions:not(.payment-actions--method) .btn {
    width: 100%;
}

.payment-method-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.payment-method-picker__option {
    position: relative;
    flex: 1 1 190px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 62px;
    padding: 0.7rem 0.8rem;
    cursor: pointer;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #f8fafc;
}

.payment-method-picker__option:has(input:checked) {
    border-color: #34d399;
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.16);
}

.payment-method-picker__option.is-disabled {
    cursor: not-allowed;
    opacity: .55;
}

.payment-method-picker__option.is-disabled:hover {
    background: #f8fafc;
}

.payment-method-picker__option input {
    width: 1rem;
    height: 1rem;
    accent-color: #059669;
}

.payment-method-picker__option span {
    display: grid;
    gap: 0.12rem;
}

.payment-method-picker__option strong {
    color: #0f172a;
    font-size: 0.85rem;
}

.payment-method-picker__option small {
    color: #64748b;
    font-size: 0.72rem;
}

.payment-method-picker__balance {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    color: #047857 !important;
    font-weight: 700;
}

.payment-method-picker__balance bdi {
    white-space: nowrap;
}

.payment-actions--expired .payment-actions__icon {
    color: #b91c1c;
    background: #fee2e2;
}

@media (max-width: 760px) {
    .booking-progress {
        overflow-x: auto;
    }

    .booking-progress__head {
        align-items: stretch;
        flex-direction: column;
    }

    .booking-progress__provider-status {
        align-self: flex-start;
    }

    .booking-progress__steps {
        min-width: 590px;
    }

    .preinvoice-card__header {
        align-items: flex-start;
        padding: 1.1rem;
    }

    .preinvoice-card__heading p {
        font-size: 0.8rem;
    }

    .preinvoice-status {
        padding: 0.35rem 0.55rem;
        font-size: 0.7rem;
    }

    .preinvoice-meta-grid,
    .preinvoice-content-grid {
        grid-template-columns: 1fr;
        padding-inline: 1rem;
    }

    .preinvoice-total {
        align-items: flex-end;
        padding-inline: 1rem;
    }

    .payment-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .payment-actions .btn {
        width: 100%;
    }

    .payment-actions--method {
        display: grid;
        grid-template-columns: 1fr;
    }

    .payment-actions--method .payment-method-picker,
    .payment-actions--method .btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .preinvoice-card__icon {
        width: 2.5rem;
        height: 2.5rem;
        flex-basis: 2.5rem;
        border-radius: 11px;
    }

    .preinvoice-card__header {
        flex-direction: column;
    }

    .preinvoice-total {
        display: grid;
    }
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-mobile-display {
    margin: 0 0 1rem;
    font-weight: 600;
    text-align: center;
    color: var(--text);
}

.auth-inline-form {
    margin: 0;
}

.auth-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--primary-dark);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    column-gap: 1.5rem;
    row-gap: 0.85rem;
    align-items: start;
    margin-top: 0.5rem;
}

.dashboard-sidebar {
    position: sticky;
    top: 1rem;
    grid-column: 1;
    grid-row: 1;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 0.5rem;
}

.dashboard-nav__link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    color: var(--text, #1e293b);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.15s, color 0.15s;
}

.dashboard-nav__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: var(--muted, #64748b);
    transition: color 0.15s;
}

.dashboard-nav__icon svg {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
}

.dashboard-nav__label {
    min-width: 0;
}

.dashboard-nav__link:hover {
    background: #f0fdf4;
    color: var(--primary, #047857);
}

.dashboard-nav__link:hover .dashboard-nav__icon {
    color: var(--primary, #047857);
}

.dashboard-nav__link.is-active {
    background: #ecfdf5;
    color: var(--primary, #047857);
    font-weight: 600;
}

.dashboard-nav__link.is-active .dashboard-nav__icon {
    color: var(--primary, #047857);
}

.dashboard-nav__link--logout {
    margin-top: 0.35rem;
    border-top: 1px solid var(--border, #e2e8f0);
    padding-top: 0.85rem;
    color: var(--muted, #64748b);
    font-weight: 500;
}

.dashboard-nav__link--logout:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.dashboard-nav__link--logout:hover .dashboard-nav__icon {
    color: #b91c1c;
}

.dashboard-content {
    min-width: 0;
}

.dashboard-content .dashboard-section:first-child,
.dashboard-content .dashboard-hero:first-child,
.dashboard-content .breadcrumb:first-child {
    margin-top: 0;
}

.dashboard-content h1 {
    margin: 0;
    font-size: 1.25rem;
}

@media (min-width: 769px) {
    .page-dashboard .dashboard-content {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .page-dashboard .dashboard-sidebar {
        grid-column: 1;
        grid-row: 1;
    }

    .page-dashboard .dashboard-content > .alert,
    .page-dashboard .dashboard-content > .breadcrumb,
    .page-dashboard .dashboard-content > .dashboard-section {
        margin-top: 0;
        margin-bottom: 0;
    }

    /* Keep sidebar top aligned with the first card, below section title or breadcrumb */
    .page-dashboard .dashboard-shell:has(.dashboard-content > .dashboard-section:first-child > .dashboard-section__head) .dashboard-sidebar,
    .page-dashboard .dashboard-shell:has(.dashboard-content > .alert + .dashboard-section > .dashboard-section__head) .dashboard-sidebar {
        padding-top: calc(0.85rem + 1.15rem * 1.35);
    }

    .page-dashboard .dashboard-shell:has(.dashboard-content > .breadcrumb):not(:has(.dashboard-content > .alert)) .dashboard-sidebar {
        padding-top: calc(1rem * 1.35);
    }

    .page-dashboard .dashboard-shell:has(.dashboard-content > .alert):has(.dashboard-content > .dashboard-section:first-child > .dashboard-section__head) .dashboard-sidebar,
    .page-dashboard .dashboard-shell:has(.dashboard-content > .alert):has(.dashboard-content > .alert + .dashboard-section > .dashboard-section__head) .dashboard-sidebar {
        padding-top: calc(0.85rem + 0.85rem + 1em + 1.25rem + 0.85rem + 1.15rem * 1.35);
    }

    .page-dashboard .dashboard-shell:has(.dashboard-content > .alert):has(.dashboard-content > .breadcrumb) .dashboard-sidebar {
        padding-top: calc(0.85rem + 0.85rem + 1em + 1.25rem + 1rem * 1.35);
    }
}

@media (max-width: 768px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-sidebar {
        position: static;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .dashboard-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        gap: 0.35rem;
        padding: 0.4rem;
    }

    .dashboard-nav::-webkit-scrollbar {
        height: 4px;
    }

    .dashboard-nav::-webkit-scrollbar-thumb {
        background: rgba(100, 116, 139, 0.35);
        border-radius: 999px;
    }

    .dashboard-nav__link {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .dashboard-nav__link--mobile-hidden {
        display: none;
    }

    .dashboard-nav__link--logout {
        margin-top: 0;
        border-top: none;
        padding-top: 0.5rem;
        color: #b91c1c;
    }

    .dashboard-nav__link--logout .dashboard-nav__icon {
        color: #b91c1c;
    }
}

.dashboard-hero__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-greeting {
    margin: 0.35rem 0 0;
    font-size: 1rem;
}

.dashboard-section {
    margin-top: 1.5rem;
}

.dashboard-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.dashboard-section__head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.dashboard-profile-form {
    margin-top: 0;
}

.dashboard-profile-form__submit-row {
    margin-top: 0.85rem;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .dashboard-profile-form__submit-row {
        grid-template-columns: minmax(0, 1fr) minmax(160px, 1.15fr);
    }

    .dashboard-profile-form__submit-row .field--submit {
        grid-column: 2;
    }

    .dashboard-profile-form__submit-row .field--submit .btn {
        width: 100%;
        min-height: 48px;
        margin-top: 0;
    }
}

.booking-row h3 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}

.amenity-tag { display: inline-block; background: #ecfdf5; color: #047857; font-size: 0.75rem; padding: 0.1rem 0.4rem; border-radius: 6px; }

.preinvoice-card--expired {
    border-color: #fecaca;
}

.wallet-balance-card {
    text-align: center;
}

.wallet-balance-card.compact {
    text-align: start;
}

.wallet-balance-card--dashboard {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: start;
    padding: 0;
}

.wallet-balance-card__main,
.wallet-balance-card__hiholiday {
    flex: 1;
    min-width: 0;
    padding: 1.25rem;
}

.wallet-balance-card__divider {
    border-top: 1px dashed var(--border, #e2e8f0);
    margin: 0;
}

.wallet-balance-card__action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
}

.wallet-balance-card--dashboard .wallet-balance-amount {
    margin: 0.25rem 0 0;
}

.wallet-balance-card--dashboard .wallet-balance-amount--unavailable {
    font-size: 0.875rem;
    font-weight: 500;
}

@media (min-width: 769px) {
    .wallet-balance-card--dashboard {
        flex-direction: row;
        align-items: stretch;
    }

    .wallet-balance-card__main,
    .wallet-balance-card__hiholiday {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .wallet-balance-card__divider {
        border-top: none;
        border-inline-start: 1px dashed var(--border, #e2e8f0);
        align-self: stretch;
        flex-shrink: 0;
        width: 0;
    }

    .wallet-balance-card__action {
        flex-shrink: 0;
        padding-inline: 1.5rem;
    }
}

.wallet-balance-amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0 0.75rem;
}

.wallet-topup-form .form-grid--action-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    align-items: end;
}

@media (min-width: 900px) {
    .wallet-topup-form .form-grid--action-row {
        grid-template-columns: minmax(0, 1fr) minmax(140px, 1.15fr);
    }

    .wallet-topup-form .field--submit .btn {
        width: 100%;
        min-height: 48px;
        margin-top: 0;
    }
}

@media (max-width: 720px) {
    .wallet-topup-form .form-grid--action-row {
        grid-template-columns: 1fr;
    }
}

.wallet-history-snippet {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wallet-history-snippet li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    border-top: 1px solid var(--border, #e2e8f0);
    font-size: 0.9rem;
}

.wallet-history-table .text-success {
    color: #047857;
}

.wallet-history-table .text-danger {
    color: #b91c1c;
}

.wallet-transactions__cards {
    display: none;
}

.wallet-transactions__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wallet-history-table {
    width: 100%;
    min-width: 28rem;
}

.wallet-history-table th {
    padding: 0.55rem 0.75rem;
    text-align: start;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    border-bottom: 1px solid var(--border, #e2e8f0);
    white-space: nowrap;
}

.wallet-history-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
    vertical-align: top;
}

.wallet-history-table tbody tr:last-child td {
    border-bottom: none;
}

.datetime {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
    white-space: nowrap;
    direction: ltr;
    unicode-bidi: isolate;
}

/* RTL pages: reverse flex so time stays at reading-start (right), date after */
[dir="rtl"] .datetime {
    flex-direction: row-reverse;
}

.datetime__time {
    font-weight: 600;
    color: var(--text, #1e293b);
}

.datetime__sep {
    flex-shrink: 0;
    opacity: 0.7;
    font-weight: 400;
    color: var(--muted, #64748b);
    padding-inline: 0.2em;
}

.datetime__date {
    font-weight: 400;
    color: var(--muted, #64748b);
}

@media (max-width: 480px) {
    .datetime,
    [dir="rtl"] .datetime {
        flex-direction: column;
        align-items: flex-start;
        white-space: normal;
        gap: 0.1rem;
    }

    .datetime__sep {
        display: none;
    }

    .datetime__date {
        font-size: 0.875em;
    }
}

.wallet-tx-card {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.wallet-tx-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wallet-tx-card:first-child {
    padding-top: 0;
}

.wallet-tx-card__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.2rem 0;
}

.wallet-tx-card__row--amount {
    margin-top: 0.15rem;
}

.wallet-tx-card__label {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted, #64748b);
}

.wallet-tx-card__value {
    text-align: end;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text, #1e293b);
    word-break: break-word;
}

.wallet-tx-card__row--amount .wallet-tx-card__value {
    font-weight: 700;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .wallet-transactions__cards {
        display: block;
    }

    .wallet-transactions__table-wrap {
        display: none;
    }
}

.bus-page-progress {
    position: fixed;
    top: 0;
    inset-inline: 0;
    height: 3px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bus-page-progress.is-active {
    opacity: 1;
}

.bus-page-progress__bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary, #10b981), #3b82f6);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
    transition: width 0.25s ease;
}

.bus-page-progress.is-active .bus-page-progress__bar {
    width: 72%;
    animation: bus-page-progress-indeterminate 1.4s ease-in-out infinite;
}

@keyframes bus-page-progress-indeterminate {
    0% { width: 8%; margin-inline-start: 0; }
    50% { width: 55%; margin-inline-start: 22%; }
    100% { width: 8%; margin-inline-start: 92%; }
}

body.bus-page-enter {
    animation: bus-page-enter 0.22s ease;
}

@keyframes bus-page-enter {
    from { opacity: 0.92; }
    to { opacity: 1; }
}

.payment-summary h1 {
    margin-top: 0;
    font-size: 1.2rem;
}

.cancel-preview {
    margin-bottom: 1rem;
}

.btn-danger {
    background: #b91c1c;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #991b1b;
}

.admin-section .card {
    border-color: #c7d2fe;
}

.field--full {
    grid-column: 1 / -1;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-row input {
    width: auto;
    margin: 0;
}

.save-passenger-row {
    padding-top: 0.25rem;
}

.saved-passenger-picker {
    margin-bottom: 0.5rem;
}

.form-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dashboard-section__subhead {
    margin: 1.25rem 0 0.75rem;
}

.dashboard-section__subhead h2 {
    margin: 0;
    font-size: 1.05rem;
}

.dashboard-section__subhead--spaced {
    margin-top: 1.75rem;
}

.bus-modal {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: bus-modal-fade-in 0.2s ease;
}

.bus-modal[hidden] {
    display: none !important;
}

.bus-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bus-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    margin: 0;
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: var(--shadow);
}

/* The birth-date picker lives inside the editable-passenger modal.  Let its
   option panel escape the scroll container only while it is open. */
.bus-modal__dialog:has(.date-picker.is-open) {
    overflow: visible;
}

.bus-modal .date-picker.is-open {
    z-index: 220;
}

.bus-modal .date-picker.is-open .date-picker__menu {
    z-index: 221;
}

.bus-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bus-modal__header h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
}

.bus-modal__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: -0.35rem -0.35rem 0 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.bus-modal__close:hover {
    color: var(--text);
    border-color: #cbd5e1;
    background: #f8fafc;
}

.bus-modal__body {
    margin: 0;
}

.saved-passenger-form--modal,
.saved-passenger-form:not(.card) {
    margin-top: 0;
}

body.bus-modal-open {
    overflow: hidden;
}

@keyframes bus-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 480px) {
    .bus-modal {
        padding: 0.75rem;
        align-items: flex-end;
    }

    .bus-modal__dialog {
        max-height: calc(100dvh - 1.5rem);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}

.saved-passengers-section.card {
    margin-bottom: 0;
}

.saved-passengers-empty {
    margin: 0;
}

.saved-passengers-list .saved-passengers__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.saved-passengers-list .saved-passengers__cards {
    display: none;
}

.saved-passengers-table {
    width: 100%;
    min-width: 36rem;
}

.saved-passengers-table th {
    padding: 0.55rem 0.75rem;
    text-align: start;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    border-bottom: 1px solid var(--border, #e2e8f0);
    white-space: nowrap;
}

.saved-passengers-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
    vertical-align: middle;
}

.saved-passengers-table tbody tr:last-child td {
    border-bottom: none;
}

.saved-passengers-table tbody tr:hover td {
    background: #f8fafc;
}

.saved-passenger-card {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #fff;
}

.saved-passenger-card:last-child {
    margin-bottom: 0;
}

.saved-passenger-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.saved-passenger-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.saved-passenger-card__row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.saved-passenger-card__label {
    color: var(--muted, #64748b);
}

.saved-passengers-table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    white-space: nowrap;
}

.inline-form {
    display: inline;
}

.btn-danger-outline {
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-danger-outline:hover {
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 767px) {
    .saved-passengers-list .saved-passengers__table-wrap {
        display: none;
    }

    .saved-passengers-list .saved-passengers__cards {
        display: block;
    }
}

/* —— Dark theme component overrides —— */
[data-theme="dark"] a:not(.btn-primary):not(.btn-secondary):not(.btn-danger-outline):not(.chip-radio) {
    color: #fff;
}

[data-theme="dark"] a:not(.btn-primary):not(.btn-secondary):not(.btn-danger-outline):not(.chip-radio):hover {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .brand,
[data-theme="dark"] .brand:hover,
[data-theme="dark"] .header-login-link,
[data-theme="dark"] .header-user__dashboard,
[data-theme="dark"] .header-user-name,
[data-theme="dark"] .header-user-name:hover,
[data-theme="dark"] .icon-btn,
[data-theme="dark"] .icon-btn:hover,
[data-theme="dark"] .icon-btn.is-active,
[data-theme="dark"] .main-nav a,
[data-theme="dark"] .main-nav a:hover,
[data-theme="dark"] .main-nav a.active,
[data-theme="dark"] .page-back,
[data-theme="dark"] .page-back:hover,
[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .route-pair__arrow,
[data-theme="dark"] .offer-route-detail,
[data-theme="dark"] .site-footer,
[data-theme="dark"] .footer-brand a,
[data-theme="dark"] .footer-brand a:hover,
[data-theme="dark"] .footer-services a,
[data-theme="dark"] .footer-services a:hover,
[data-theme="dark"] .footer-services a.is-current,
[data-theme="dark"] .lang-switcher__toggle,
[data-theme="dark"] .lang-switcher__option,
[data-theme="dark"] .header-user-menu__item,
[data-theme="dark"] .header-user-menu__item-icon,
[data-theme="dark"] .dashboard-nav__link,
[data-theme="dark"] .dashboard-nav__link:hover,
[data-theme="dark"] .dashboard-nav__link.is-active,
[data-theme="dark"] .dashboard-nav__icon,
[data-theme="dark"] .dashboard-nav__link.is-active .dashboard-nav__icon,
[data-theme="dark"] .btn-link,
[data-theme="dark"] .btn-link:hover,
[data-theme="dark"] .offer-price,
[data-theme="dark"] .bus-ticket__price,
[data-theme="dark"] .preinvoice-total strong,
[data-theme="dark"] .wallet-balance-amount,
[data-theme="dark"] .hero-card p,
[data-theme="dark"] .search-panel-head p,
[data-theme="dark"] .home-promo-lead,
[data-theme="dark"] .chip-radio,
[data-theme="dark"] .field label,
[data-theme="dark"] .field-hint,
[data-theme="dark"] .user-box {
    color: #fff;
}

[data-theme="dark"] .muted,
[data-theme="dark"] .small.muted,
[data-theme="dark"] .seat-map-head .muted.small,
[data-theme="dark"] .bus-ticket__type-badge,
[data-theme="dark"] .dashboard-nav__link--logout,
[data-theme="dark"] .footer-copy,
[data-theme="dark"] .home-promo-trust-item {
    color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .home-promo-trust-icon {
    color: #fff;
}

[data-theme="dark"] .header-user__dashboard:hover,
[data-theme="dark"] .header-login-link:hover {
    background: var(--surface-muted);
    color: #fff;
}

[data-theme="dark"] .header-user-menu__menu,
[data-theme="dark"] .lang-switcher__menu {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .header-user-menu__item:hover {
    background: rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .header-user-menu__item--logout:hover {
    background: rgba(220, 38, 38, 0.12);
}

[data-theme="dark"] .lang-switcher__toggle {
    border-color: var(--glass-border, var(--border));
}

[data-theme="dark"] .lang-switcher__option:hover,
[data-theme="dark"] .lang-switcher__option.is-selected {
    background: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .footer-services a.is-current {
    background: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .search-loading {
    background: var(--overlay-bg);
}

[data-theme="dark"] .search-loading__panel {
    border-color: var(--glass-border, var(--border));
}

[data-theme="dark"] .search-loading__spinner {
    border-color: var(--border);
    border-top-color: var(--primary);
}

[data-theme="dark"] .chip-radio:has(input:checked) {
    background: var(--chip-checked-bg);
}

[data-theme="dark"] .field input:not([type="hidden"]),
[data-theme="dark"] .field select,
[data-theme="dark"] .date-picker__trigger,
[data-theme="dark"] .field-input-wrap--stepper .passenger-stepper,
[data-theme="dark"] .date-strip-nav,
[data-theme="dark"] .date-strip-day {
    color: var(--text);
}

[data-theme="dark"] .passenger-stepper input {
    color: #fff;
    -webkit-text-fill-color: #fff;
}


[data-theme="dark"] .date-picker__option:hover,
[data-theme="dark"] .suggestion-item:hover,
[data-theme="dark"] .suggestion-item.active {
    background: rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .date-picker__option.is-selected {
    background: rgba(16, 185, 129, 0.18);
}

[data-theme="dark"] .btn-secondary {
    color: var(--text);
}

[data-theme="dark"] .alert-error {
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

[data-theme="dark"] .alert-success {
    border-color: rgba(74, 222, 128, 0.35);
    color: #86efac;
}

[data-theme="dark"] .alert-warn {
    border-color: rgba(251, 191, 36, 0.35);
    color: #fcd34d;
}

[data-theme="dark"] .bus-ticket__logo {
    background: var(--surface);
}

[data-theme="dark"] .bus-ticket__logo--placeholder {
    background: var(--surface-muted);
}

[data-theme="dark"] .bus-ticket__type-badge {
    background: var(--surface-hover);
    color: var(--muted);
}


[data-theme="dark"] .bus-ticket__capacity--warning,
[data-theme="dark"] .bus-ticket__capacity--insufficient {
    background: rgba(217, 119, 6, 0.15);
    color: #fcd34d;
}

[data-theme="dark"] .btn-disabled {
    background: var(--surface-hover);
    border-color: var(--border);
    color: var(--muted);
}

[data-theme="dark"] .dashboard-nav__link:hover,
[data-theme="dark"] .dashboard-nav__link.is-active {
    background: rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .dashboard-nav__link--logout:hover {
    background: rgba(220, 38, 38, 0.12);
}


[data-theme="dark"] .badge-success {
    background: rgba(22, 163, 74, 0.18);
    color: #86efac;
}

[data-theme="dark"] .badge-warn {
    background: rgba(217, 119, 6, 0.18);
    color: #fcd34d;
}

[data-theme="dark"] .badge-error {
    background: rgba(220, 38, 38, 0.18);
    color: #fca5a5;
}

[data-theme="dark"] .badge-muted {
    background: var(--surface-hover);
    color: var(--muted);
}

[data-theme="dark"] .badge-info {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}

[data-theme="dark"] .amenity-tag {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

[data-theme="dark"] .preinvoice-card {
    border-color: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .payment-method-picker__option {
    background: rgba(15, 23, 42, 0.48);
    border-color: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .payment-method-picker__option:has(input:checked) {
    background: rgba(6, 78, 59, 0.35);
    border-color: rgba(52, 211, 153, 0.4);
}

[data-theme="dark"] .payment-method-picker__option.is-disabled:hover {
    background: rgba(15, 23, 42, 0.48);
}

[data-theme="dark"] .payment-method-picker__option strong {
    color: #f8fafc;
}

[data-theme="dark"] .payment-method-picker__option small {
    color: #94a3b8;
}

[data-theme="dark"] .booking-progress {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(6, 78, 59, 0.28));
    border-color: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .booking-progress__head strong,
[data-theme="dark"] .booking-progress__step.is-complete .booking-progress__copy strong,
[data-theme="dark"] .booking-progress__step.is-current .booking-progress__copy strong {
    color: #f8fafc;
}

[data-theme="dark"] .booking-progress__head span,
[data-theme="dark"] .booking-progress__copy strong,
[data-theme="dark"] .booking-progress__copy small {
    color: #94a3b8;
}

[data-theme="dark"] .booking-progress__provider-status {
    color: #86efac !important;
    background: rgba(16, 185, 129, 0.16);
}

[data-theme="dark"] .booking-progress__marker {
    color: #94a3b8;
    background: #1e293b;
    border-color: #475569;
}

[data-theme="dark"] .booking-progress__step:not(:last-child)::after {
    background: #475569;
}

[data-theme="dark"] .preinvoice-card__header {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.28), rgba(15, 23, 42, 0.7) 62%, rgba(30, 58, 138, 0.18));
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="dark"] .preinvoice-card__heading h1,
[data-theme="dark"] .preinvoice-meta-card strong,
[data-theme="dark"] .preinvoice-section-heading h2,
[data-theme="dark"] .preinvoice-passenger-list strong,
[data-theme="dark"] .preinvoice-fare-single strong,
[data-theme="dark"] .payment-actions__content strong {
    color: #f8fafc;
}

[data-theme="dark"] .preinvoice-card__heading p,
[data-theme="dark"] .preinvoice-meta-card > div > span:first-child,
[data-theme="dark"] .preinvoice-passenger-list li > div > span,
[data-theme="dark"] .preinvoice-fare-single,
[data-theme="dark"] .payment-actions__content p {
    color: #94a3b8;
}

[data-theme="dark"] .preinvoice-time-limit-note {
    color: #94a3b8;
}

[data-theme="dark"] .preinvoice-card__icon,
[data-theme="dark"] .preinvoice-section-heading__icon,
[data-theme="dark"] .payment-actions__icon {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(52, 211, 153, 0.25);
}

[data-theme="dark"] .preinvoice-status {
    color: #86efac;
    background: rgba(22, 163, 74, 0.18);
}

[data-theme="dark"] .preinvoice-status--expired {
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.18);
}

[data-theme="dark"] .preinvoice-meta-card,
[data-theme="dark"] .preinvoice-panel,
[data-theme="dark"] .preinvoice-passenger-list li {
    background: rgba(15, 23, 42, 0.48);
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .preinvoice-meta-card__icon {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.14);
}

[data-theme="dark"] .preinvoice-meta-card--time {
    background: rgba(146, 64, 14, 0.18);
    border-color: rgba(251, 191, 36, 0.24);
}

[data-theme="dark"] .preinvoice-meta-card--time .preinvoice-meta-card__icon {
    color: #fcd34d;
    background: rgba(217, 119, 6, 0.18);
}

[data-theme="dark"] .preinvoice-meta-card--time.is-expired {
    background: rgba(220, 38, 38, 0.13);
    border-color: rgba(248, 113, 113, 0.3);
}

[data-theme="dark"] .preinvoice-passenger-index {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.16);
}

[data-theme="dark"] .preinvoice-table td {
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .preinvoice-total {
    background: linear-gradient(90deg, rgba(6, 78, 59, 0.72), rgba(6, 95, 70, 0.4));
    border-color: rgba(52, 211, 153, 0.25);
}

[data-theme="dark"] .preinvoice-total span,
[data-theme="dark"] .preinvoice-card .preinvoice-total strong {
    color: #a7f3d0;
}

[data-theme="dark"] .preinvoice-total small {
    color: #6ee7b7;
}

[data-theme="dark"] .preinvoice-card--expired {
    border-color: rgba(248, 113, 113, 0.35);
}

[data-theme="dark"] .payment-actions--expired .payment-actions__icon {
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.18);
}

[data-theme="dark"] .bus-modal__backdrop {
    background: var(--overlay-bg);
}

[data-theme="dark"] .bus-modal__close {
    border-color: var(--glass-border, var(--border));
}

[data-theme="dark"] .bus-modal__close:hover {
    background: var(--surface-muted);
}

[data-theme="dark"] .saved-passengers-table tbody tr:hover td {
    background: var(--surface-muted);
}

[data-theme="dark"] .bus-cabin {
    border-color: var(--glass-border, var(--border));
}

[data-theme="dark"] .bus-front {
    background: var(--surface-hover);
    border-color: #64748b;
}

[data-theme="dark"] .seat-aisle {
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 3px,
        #334155 3px,
        #334155 6px
    );
}

[data-theme="dark"] .seat-cell--seat {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-muted) 100%);
    color: var(--text);
    border-color: #64748b;
}

[data-theme="dark"] .seat-swatch--available,
[data-theme="dark"] .seat-status--available {
    background: var(--surface);
}

[data-theme="dark"] .seat-status--occupied,
[data-theme="dark"] .seat-status--blocked {
    background: var(--surface-hover);
    color: var(--muted);
}

/* —— Dark theme glassmorphism —— */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    [data-theme="dark"] .site-header {
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        background: var(--glass-bg);
        border-bottom-color: var(--glass-border);
    }

    [data-theme="dark"] .site-footer {
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        background: var(--glass-bg);
        border-top-color: var(--glass-border);
    }

    [data-theme="dark"] .card,
    [data-theme="dark"] .search-panel,
    [data-theme="dark"] .home-promo,
    [data-theme="dark"] .bus-ticket,
    [data-theme="dark"] .seat-map-card,
    [data-theme="dark"] .bus-modal__dialog,
    [data-theme="dark"] .dashboard-nav,
    [data-theme="dark"] .search-loading__panel,
    [data-theme="dark"] .payment-total,
    [data-theme="dark"] .saved-passenger-card,
    [data-theme="dark"] .preinvoice-card {
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        background: var(--glass-bg);
        border-color: var(--glass-border);
    }

    [data-theme="dark"] .bus-ticket__price-section,
    [data-theme="dark"] .bus-ticket__action-section {
        backdrop-filter: blur(var(--glass-blur-input));
        -webkit-backdrop-filter: blur(var(--glass-blur-input));
        background: rgba(12, 20, 36, 0.45);
    }

    [data-theme="dark"] .header-user-menu__menu,
    [data-theme="dark"] .lang-switcher__menu,
    [data-theme="dark"] .date-picker__menu,
    [data-theme="dark"] .suggestions {
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        background: var(--glass-bg-dropdown);
        border: 1px solid var(--glass-border);
    }

    [data-theme="dark"] .field input:not([type="hidden"]),
    [data-theme="dark"] .field select,
    [data-theme="dark"] .date-picker__trigger,
    [data-theme="dark"] .field-input-wrap--stepper .passenger-stepper,
    [data-theme="dark"] .date-strip-nav,
    [data-theme="dark"] .date-strip-day,
    [data-theme="dark"] .chip-radio,
    [data-theme="dark"] .lang-switcher__toggle,
    [data-theme="dark"] .btn-secondary,
    [data-theme="dark"] .stepper-btn,
    [data-theme="dark"] .bus-modal__close,
    [data-theme="dark"] .footer-services a {
        backdrop-filter: blur(var(--glass-blur-input));
        -webkit-backdrop-filter: blur(var(--glass-blur-input));
        background: var(--glass-bg-input);
        border-color: var(--glass-border);
    }

    [data-theme="dark"] .chip-radio:has(input:checked) {
        background: var(--chip-checked-bg);
    }

    [data-theme="dark"] .date-strip-day.is-selected {
        background: rgba(16, 185, 129, 0.22);
        border-color: rgba(16, 185, 129, 0.45);
    }

    [data-theme="dark"] .alert-error {
        backdrop-filter: blur(var(--glass-blur-input));
        -webkit-backdrop-filter: blur(var(--glass-blur-input));
        background: var(--glass-bg-alert-error);
        border-color: rgba(248, 113, 113, 0.35);
    }

    [data-theme="dark"] .alert-success {
        backdrop-filter: blur(var(--glass-blur-input));
        -webkit-backdrop-filter: blur(var(--glass-blur-input));
        background: var(--glass-bg-alert-success);
        border-color: rgba(74, 222, 128, 0.35);
    }

    [data-theme="dark"] .alert-warn {
        backdrop-filter: blur(var(--glass-blur-input));
        -webkit-backdrop-filter: blur(var(--glass-blur-input));
        background: var(--glass-bg-alert-warn);
        border-color: rgba(251, 191, 36, 0.35);
    }

    [data-theme="dark"] .bus-cabin {
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        background: var(--glass-bg-cabin);
        border-color: var(--glass-border);
    }

    [data-theme="dark"] .bus-front {
        backdrop-filter: blur(var(--glass-blur-input));
        -webkit-backdrop-filter: blur(var(--glass-blur-input));
        background: rgba(30, 41, 59, 0.55);
        border-color: rgba(255, 255, 255, 0.12);
    }

    [data-theme="dark"] .seat-cell--seat {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        background: rgba(30, 41, 59, 0.7);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    [data-theme="dark"] .site-header {
        background: rgba(15, 23, 42, 0.92);
    }

    [data-theme="dark"] .site-footer,
    [data-theme="dark"] .card,
    [data-theme="dark"] .search-panel,
    [data-theme="dark"] .home-promo,
    [data-theme="dark"] .bus-ticket,
    [data-theme="dark"] .seat-map-card,
    [data-theme="dark"] .bus-modal__dialog,
    [data-theme="dark"] .dashboard-nav,
    [data-theme="dark"] .search-loading__panel,
    [data-theme="dark"] .payment-total,
    [data-theme="dark"] .saved-passenger-card,
    [data-theme="dark"] .preinvoice-card {
        background: var(--card);
    }

    [data-theme="dark"] .bus-ticket__price-section,
    [data-theme="dark"] .bus-ticket__action-section {
        background: var(--surface-muted);
    }

    [data-theme="dark"] .header-user-menu__menu,
    [data-theme="dark"] .lang-switcher__menu,
    [data-theme="dark"] .date-picker__menu,
    [data-theme="dark"] .suggestions {
        background: var(--surface);
    }

    [data-theme="dark"] .field input:not([type="hidden"]),
    [data-theme="dark"] .field select,
    [data-theme="dark"] .date-picker__trigger,
    [data-theme="dark"] .field-input-wrap--stepper .passenger-stepper,
    [data-theme="dark"] .date-strip-nav,
    [data-theme="dark"] .date-strip-day,
    [data-theme="dark"] .chip-radio,
    [data-theme="dark"] .lang-switcher__toggle,
    [data-theme="dark"] .btn-secondary,
    [data-theme="dark"] .stepper-btn,
    [data-theme="dark"] .bus-modal__close,
    [data-theme="dark"] .footer-services a {
        background: var(--input-bg);
    }

    [data-theme="dark"] .chip-radio:has(input:checked) {
        background: var(--chip-checked-bg);
    }

    [data-theme="dark"] .alert-error {
        background: rgba(220, 38, 38, 0.12);
    }

    [data-theme="dark"] .alert-success {
        background: rgba(22, 163, 74, 0.12);
    }

    [data-theme="dark"] .alert-warn {
        background: rgba(217, 119, 6, 0.12);
    }

    [data-theme="dark"] .bus-cabin {
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 40%, #0b1120 100%);
    }
}

/* Shared travel-footer responsive contract. */
@media (max-width: 768px) {
    .site-footer { min-height: 0; padding: 1rem 0; }
    .footer-row { display: flex; flex-direction: column; align-items: center; gap: .75rem; text-align: center; }
    .footer-services { width: 100%; justify-content: flex-start; }
    .footer-copy, .footer-lang { justify-self: auto; }
}
