:root {
    --tr-primary: var(--c-primary, #ed007f);
    --tr-primary-hover: #c9006b;
    --tr-primary-light: #fdf2f7;
    --tr-text-dark: #1f2937;
    --tr-text-muted: #6b7280;
    --tr-border: #e5e7eb;
    --tr-bg-light: #f9fafb;
    --tr-white: #ffffff;
    --tr-seat-avail: #ffffff;
    --tr-seat-avail-border: #9ca3af;
    --tr-seat-selected: #ed007f;
    --tr-seat-booked: #e5e7eb;
    --tr-seat-booked-text: #9ca3af;
    --tr-radius-sm: 6px;
    --tr-radius-md: 10px;
    --tr-radius-lg: 16px;
    --tr-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --tr-shadow-md: 0 4px 14px rgba(0,0,0,0.08);
}

.st-page {
    font-family: inherit;
    background-color: #f3f4f6;
    color: var(--tr-text-dark);
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Fix: template #vnt-container có overflow:hidden phá position:sticky */
#vnt-wrapper, #vnt-container, #vnt-content {
    overflow: visible !important;
}

/* ─── 1. Header Tiêu Đề (Chuẩn search-flights) ───────────────── */
.sf-header {
    background: #ffffff;
    padding: 16px 0 0;
}
.sf-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    min-height: 32px;
}
.sf-back-link {
    position: absolute;
    left: 16px;
    top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}
.sf-back-link:hover {
    color: var(--tr-primary);
}
.sf-title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: rgb(27, 68, 142);
    line-height: 1.2;
}

/* ─── 2. Edit Panel & Compact Summary (Sticky freeze chống giật chuẩn search-flights) ─────────────────── */
.sf-edit-panel {
    display: block;
    position: sticky;
    top: 100px;
    z-index: 50;
    background: transparent;
    padding: 0;
    margin: 0;
    max-width: none;
}
@media (max-width: 767px) {
    .sf-edit-panel {
        top: 50px;
    }
}

/* Compact summary - hiển thị khi cuộn trang dính sticky */
.sf-edit-compact {
    display: none;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    padding: 10px 18px;
    font-size: 14px;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}
.sf-edit-panel.is-stuck .sf-edit-form,
.sf-edit-panel.is-stuck .sf-edit-desktop { display: none !important; }
.sf-edit-panel.is-stuck .sf-edit-compact { display: flex !important; }

@media (min-width: 769px) {
    .sf-edit-desktop {
        display: block !important;
    }
    .sf-edit-mobile {
        display: none !important;
    }
    .sf-edit-compact .sf-cmp-body,
    .sf-edit-compact .sf-cmp-meta,
    .sf-edit-compact .sf-cmp-pt {
        display: contents !important;
    }
}

.sf-cmp-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(237, 0, 127, 0.08);
    color: var(--tr-primary);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.sf-cmp-route {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sf-cmp-route b {
    color: var(--tr-primary);
    font-weight: 700;
}
.sf-cmp-arrow {
    color: var(--tr-primary);
    font-weight: 700;
}
.sf-cmp-sep {
    color: #d0d0d0;
}
.sf-cmp-date, .sf-cmp-pax {
    color: #444;
}
.sf-cmp-edit {
    margin-left: auto;
    color: var(--tr-primary);
    font-size: 14px;
}

/* Desktop: wrapper divs transparent, mob-only elements hidden */
.sf-mob-airports { display: contents; }
.sf-mob-dates-wrap { display: contents; }
.sf-mob-pax-row, .sf-mob-pc { display: none; }
.sf-mob-sheet-hdr { display: none !important; }

/* Form Container */
.sf-edit-form {
    display: block;
    background: #ffffff;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    padding: 16px 22px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.sf-edit-form.sf-edit-form-sync,
.sf-edit-form:has(.local-search-box),
.sf-edit-form:has(.vmb-search-wrap) {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
}

.sf-edit-form.sf-edit-form-sync .local-search-box,
.sf-edit-form .vmb-search-wrap .local-search-box {
    box-shadow: 0 4px 16px rgba(0,0,0,.08) !important;
    border-radius: 12px !important;
}

/* Radios + Pax Pill row */
.sf-trip-radios {
    display: flex;
    gap: 16px;
    font-size: 13px;
    align-items: center;
    padding-bottom: 12px;
    flex-wrap: wrap;
}
.sf-trip-radios > label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
}
.sf-trip-radios input[type=radio] {
    accent-color: var(--tr-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}
.sf-trip-radios .sf-pax-wrap.sf-pax-top {
    margin-left: auto;
    flex: 0 0 auto;
    position: relative;
}
.sf-pax-pill {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tr-text-dark);
    transition: all 0.15s ease;
}
.sf-pax-pill:hover, .sf-pax-pill[aria-expanded="true"] {
    border-color: var(--tr-primary);
    box-shadow: 0 0 0 3px rgba(237,0,127,0.1);
}
.sf-pax-pill i.fa-user {
    color: var(--tr-primary);
}
.sf-pax-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 290px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 14px;
    z-index: 1000;
    display: none;
}
.sf-pax-dropdown.is-open {
    display: block;
}
.sf-pax-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
}
.sf-pax-row:last-of-type {
    border-bottom: 0;
    padding-bottom: 12px;
}
.sf-pax-info strong {
    display: block;
    font-size: 13px;
    color: #1e293b;
    font-weight: 700;
}
.sf-pax-info small {
    font-size: 11px;
    color: #64748b;
}
.sf-pax-ctrl {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sf-pax-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--tr-primary);
    background: #fff;
    color: var(--tr-primary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.sf-pax-btn:hover:not(:disabled) {
    background: var(--tr-primary);
    color: #fff;
}
.sf-pax-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.sf-pax-count {
    min-width: 18px;
    text-align: center;
    font-weight: 800;
    font-size: 14px;
    color: #0f172a;
}
.sf-pax-done {
    width: 100%;
    margin-top: 8px;
    background: var(--tr-primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 9px 0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}
.sf-pax-done:hover {
    background: var(--tr-primary-hover);
}

.sf-pricecal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tr-primary);
    text-decoration: none;
    padding: 6px 14px;
    height: 36px;
    box-sizing: border-box;
    border: 1.5px solid var(--tr-primary);
    border-radius: 8px;
    transition: all 0.15s ease;
    background: #fff;
}
.sf-pricecal-btn:hover {
    background: var(--tr-primary);
    color: #fff;
}

/* Edit Form Row (Ga đi - Đảo - Ga đến - Ngày đi - Ngày về - Submit) */
.sf-edit-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.sf-ef {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 170px;
    position: relative;
}
.sf-ef label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.sf-ef-inner {
    position: relative;
    display: flex;
    align-items: center;
}
.sf-ef-icon {
    position: absolute;
    left: 12px;
    color: var(--tr-primary);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}
.sf-ef select, .sf-ef input {
    height: 44px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 12px 0 34px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tr-text-dark);
    box-sizing: border-box;
    width: 100%;
    outline: none;
    transition: border-color 0.15s ease;
    background: #fff;
}
.sf-ef select:focus, .sf-ef input:focus {
    border-color: var(--tr-primary);
    box-shadow: 0 0 0 3px rgba(237,0,127,0.1);
}
/* Typeahead styles cho stSelectFrom & stSelectTo (Đồng bộ local-search-box) */
.sf-ef.ls-typeahead {
    position: relative;
}
.sf-ef.ls-typeahead .ls-typeahead-text {
    cursor: text;
}
.sf-ef.ls-typeahead.open .ls-typeahead-text {
    border-color: var(--tr-primary);
    box-shadow: 0 0 0 3px rgba(237,0,127,0.1);
}
.sf-ef.ls-typeahead .ls-typeahead-dd {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 320px;
    max-width: calc(100vw - 32px);
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.15);
    z-index: 1000;
    padding: 6px 0;
    border: 1px solid #e2e8f0;
}
.sf-ef.ls-typeahead.open .ls-typeahead-dd {
    display: block;
}
.sf-ef.ls-typeahead .ls-typeahead-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    transition: background .12s;
    border-bottom: 1px solid #f8fafc;
    gap: 10px;
}
.sf-ef.ls-typeahead .ls-typeahead-item:last-child {
    border-bottom: none;
}
.sf-ef.ls-typeahead .ls-typeahead-item:hover,
.sf-ef.ls-typeahead .ls-typeahead-item.selected {
    background: #fdf2f8;
}
.sf-ef.ls-typeahead .ls-typeahead-item .ls-ta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.sf-ef.ls-typeahead .ls-typeahead-item .ls-ta-city {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sf-ef.ls-typeahead .ls-typeahead-item .ls-ta-code,
.ls-typeahead-item .ls-ta-code {
    font-size: 12px;
    font-weight: 700;
    color: #1e40af;
    min-width: 36px;
    text-align: right;
    margin-left: auto;
    flex-shrink: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
}
.sf-ef.ls-typeahead .ls-typeahead-item.disabled {
    opacity: 0.5;
    background: #f8fafc !important;
    cursor: not-allowed !important;
    pointer-events: none;
}
.sf-ef.ls-typeahead .ls-typeahead-item.disabled .ls-ta-city {
    color: #94a3b8;
    text-decoration: line-through;
}
.sf-ef.ls-typeahead .ls-typeahead-item.disabled .ls-ta-code,
.ls-typeahead-item.disabled .ls-ta-code {
    background: transparent;
    color: #94a3b8;
}
.ls-ta-badge-disabled {
    font-size: 11px;
    font-weight: 500;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    white-space: nowrap;
}
.sf-ef.ls-typeahead .ls-typeahead-empty {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.sf-ef-date input {
    padding-left: 12px;
}
.sf-swap-btn {
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
    align-self: flex-end;
    border: 1.5px solid var(--tr-primary);
    background: #fff;
    border-radius: 50%;
    color: var(--tr-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.3s ease, background 0.15s, color 0.15s;
    box-shadow: 0 2px 6px rgba(237,0,127,0.15);
    flex-shrink: 0;
}
.sf-swap-btn:hover {
    background: var(--tr-primary);
    color: #fff;
    transform: rotate(180deg);
}
.sf-edit-submit {
    height: 44px;
    background: var(--tr-primary);
    color: #ffffff;
    border: none;
    padding: 0 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.2s ease;
    flex-shrink: 0;
    margin-bottom: 0;
}
.sf-edit-submit:hover {
    background: var(--tr-primary-hover);
}

/* ─── Main Content Layout ─────────────────────────── */
.st-container {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 16px 40px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

/* ─── Left Sidebar Filter ─────────────────────────── */
.st-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.st-filter-header-card {
    background: #ffffff;
    border-radius: var(--tr-radius-md);
    padding: 14px 18px;
    border: 1px solid var(--tr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.st-f-title {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.st-f-title i {
    color: var(--tr-primary);
}
.st-btn-reset-filter {
    background: none;
    border: none;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.st-btn-reset-filter:hover {
    background: #f1f5f9;
    color: var(--tr-primary);
}

.st-filter-card {
    background: #ffffff;
    border-radius: var(--tr-radius-md);
    padding: 16px 18px;
    border: 1px solid var(--tr-border);
    box-shadow: var(--tr-shadow-sm);
}
.st-filter-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--tr-text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.st-filter-title i {
    color: #94a3b8;
    font-size: 13px;
}
.st-filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.st-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #4b5563;
    user-select: none;
}
.st-filter-item input[type="checkbox"] {
    accent-color: var(--tr-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Slider Ngân Sách */
.st-price-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.st-price-slider-wrap input[type="range"] {
    accent-color: var(--tr-primary);
    width: 100%;
    cursor: pointer;
}
.st-price-val-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--tr-text-muted);
}
.st-price-val-display b {
    color: var(--tr-primary);
    font-size: 13px;
}

/* ─── Right Train Trips List ──────────────────────── */
.st-train-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.st-list-loading {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--tr-text-dark);
    border-radius: var(--tr-radius-md);
    min-height: 200px;
}
.st-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--tr-primary);
    border-radius: 50%;
    animation: stSpin 0.7s linear infinite;
}
@keyframes stSpin {
    to { transform: rotate(360deg); }
}

.st-list-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 12px 18px;
    border-radius: var(--tr-radius-sm);
    border: 1px solid var(--tr-border);
    font-size: 14px;
}
.st-sort-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--tr-text-muted);
}
.st-sort-select {
    padding: 6px 12px;
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--tr-text-dark);
    outline: none;
    background: #ffffff;
}

/* ─── Train Trip Card (Bố trí dạng chuyến tàu) ────── */
.st-train-trip-card {
    background: #ffffff;
    border-radius: var(--tr-radius-md);
    border: 1px solid var(--tr-border);
    box-shadow: var(--tr-shadow-sm);
    overflow: hidden;
    transition: all 0.2s ease;
}
.st-train-trip-card:hover {
    border-color: rgba(237, 0, 127, 0.4);
    box-shadow: var(--tr-shadow-md);
    transform: translateY(-2px);
}

/* ─── Trạng thái Chuyến Tàu Vô Hiệu Hóa / Hết Chỗ (Disabled / Sold-out) ─── */
.st-train-trip-card.is-disabled,
.st-train-trip-card.is-soldout,
.st-train-trip-card.disabled {
    opacity: 0.65;
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: none;
    cursor: not-allowed;
}
.st-train-trip-card.is-disabled:hover,
.st-train-trip-card.is-soldout:hover,
.st-train-trip-card.disabled:hover {
    border-color: #e2e8f0;
    box-shadow: none;
    transform: none;
}
.st-train-trip-card.is-disabled .st-trip-main,
.st-train-trip-card.is-soldout .st-trip-main,
.st-train-trip-card.disabled .st-trip-main {
    cursor: not-allowed;
    background-color: transparent;
}
.st-train-trip-card.is-disabled .st-trip-main:hover,
.st-train-trip-card.is-soldout .st-trip-main:hover,
.st-train-trip-card.disabled .st-trip-main:hover {
    background-color: transparent;
}
.st-train-trip-card.is-disabled .st-train-code-lg,
.st-train-trip-card.is-soldout .st-train-code-lg,
.st-train-trip-card.disabled .st-train-code-lg {
    color: #64748b;
}
.st-train-trip-card.is-disabled .st-partner-logo-img,
.st-train-trip-card.is-soldout .st-partner-logo-img,
.st-train-trip-card.disabled .st-partner-logo-img {
    filter: grayscale(0.7);
    opacity: 0.7;
}
.st-train-trip-card.is-disabled .st-trip-price-val,
.st-train-trip-card.is-soldout .st-trip-price-val,
.st-train-trip-card.disabled .st-trip-price-val {
    color: #94a3b8;
}

.st-trip-main {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.st-trip-main:hover {
    background-color: #fafbfd;
}

/* Logo đối tác ĐSVN */
.st-trip-partner-col {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 90px;
}
.st-partner-logo-img {
    max-width: 95px;
    max-height: 38px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Trip Badge */
.st-trip-badge-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 130px;
}
.st-trip-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.st-train-code-lg {
    background: #1B448E;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: var(--tr-radius-sm);
    display: inline-block;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
}
.st-trip-cars-count {
    font-size: 11px;
    color: var(--tr-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.st-trip-typename {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tr-text-dark);
    line-height: 1.35;
}
.st-btn-view-stops {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1.5px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    line-height: 1.2;
    flex-shrink: 0;
}
.st-btn-view-stops:hover {
    background: #ffffff;
    color: var(--tr-primary);
    border-color: var(--tr-primary);
}
.st-btn-view-stops-mobile {
    display: none !important;
}

/* Trip Time Block */
.st-trip-time-col {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: center;
}
.st-time-point {
    text-align: center;
}
.st-time-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--tr-text-dark);
}
.st-time-station {
    font-size: 13px;
    font-weight: 600;
    color: var(--tr-text-muted);
}
.sf-c-line.st-duration-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 140px;
}
.sf-c-dur.st-duration-txt {
    font-size: 12px;
    color: #000000;
    font-weight: 600;
}
.sf-c-bar.st-duration-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--tr-primary) 0%, #cbd5e1 100%);
    position: relative;
    border-radius: 2px;
}
.sf-c-bar.st-duration-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tr-primary);
}
.sf-c-bar.st-duration-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--tr-primary);
    background: #fff;
    box-sizing: border-box;
}
.sf-c-stops.st-duration-direct {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

/* Trip Action & Price */
.st-trip-action-col {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 130px;
}
.st-trip-price-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.st-price-label {
    font-size: 11px;
    color: var(--tr-text-muted);
}
.st-trip-price-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--tr-primary);
}
.st-trip-avail-tag {
    font-size: 11px;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
    white-space: nowrap;
}
.st-trip-avail-tag.is-warning,
.st-trip-avail-tag.warning {
    color: #d97706;
    background: #fffbeb;
    border-color: #fde68a;
}
.st-trip-avail-tag.is-error,
.st-trip-avail-tag.error {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.st-unpriced-badge {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.st-trip-btns-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.st-btn-select-train {
    background: var(--tr-primary);
    color: #ffffff;
    border: none;
    padding: 7px 16px;
    border-radius: var(--tr-radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.15s ease;
}
.st-btn-select-train:hover {
    background: var(--tr-primary-hover);
    transform: translateY(-1px);
}

.st-btn-view-stops {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 7px 12px;
    border-radius: var(--tr-radius-sm);
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.st-btn-view-stops:hover {
    background: #ffffff;
    color: var(--tr-primary);
    border-color: var(--tr-primary);
}

/* ─── 4. Modal Lộ Trình Ga Dừng Đỗ ────────────────── */
.st-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 15px;
}
.st-modal-overlay.active {
    display: flex;
}
.st-modal-box {
    background: #ffffff;
    border-radius: var(--tr-radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
}
.st-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--tr-border);
    padding-bottom: 12px;
}
.st-modal-header h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.st-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #6b7280;
}
.st-stops-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 24px;
}
.st-stops-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #cbd5e1;
}
.st-timeline-step {
    position: relative;
}
.st-tl-dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--tr-primary);
    box-sizing: border-box;
}
.st-tl-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--tr-text-dark);
}
.st-tl-sub {
    font-size: 11px;
    color: var(--tr-text-muted);
}

/* ─── 5. Pop-up Lịch Giá Tháng Modal ──────────────── */
.st-cal-modal-box {
    max-width: 650px;
}
.st-cal-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #f8fafc;
    border-radius: var(--tr-radius-sm);
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}
.st-cal-route-text {
    font-size: 14px;
    color: var(--tr-text-dark);
}
.st-cal-month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}
.st-cal-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: var(--tr-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s ease;
}
.st-cal-nav-btn:hover:not(:disabled) {
    background: var(--tr-primary);
    color: #ffffff;
    border-color: var(--tr-primary);
}
.st-cal-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.st-cal-month-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--tr-text-dark);
    min-width: 120px;
    text-align: center;
}

.st-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
}

.st-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.st-cal-cell {
    border: 1.5px solid #e2e8f0;
    border-radius: var(--tr-radius-sm);
    padding: 8px 4px;
    text-align: center;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    user-select: none;
    box-sizing: border-box;
}
.st-cal-cell:hover:not(.is-past):not(.is-empty) {
    border-color: var(--tr-primary);
    background: #fff5f9;
    box-shadow: 0 2px 8px rgba(237, 0, 127, 0.15);
}
.st-cal-cell.is-empty {
    border-color: transparent;
    background: transparent;
    cursor: default;
}
.st-cal-cell.is-past {
    opacity: 0.35;
    background: #f8fafc;
    cursor: not-allowed;
}
.st-cal-cell.is-active {
    background: var(--tr-primary) !important;
    border-color: var(--tr-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(237, 0, 127, 0.25);
}
.st-cal-cell .cal-num {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 2px;
}
.st-cal-cell .cal-price {
    font-size: 10px;
    font-weight: 700;
    color: var(--tr-primary);
}
.st-cal-cell.is-active .cal-price {
    color: #ffffff;
}
.st-cal-cell.is-lowest {
    border-color: #10b981;
    background: #ecfdf5;
}
.st-cal-cell.is-lowest .cal-price {
    color: #059669;
    font-weight: 800;
}
.st-cal-cell.is-lowest.is-active {
    background: var(--tr-primary) !important;
    border-color: var(--tr-primary) !important;
}
.st-cal-cell.is-lowest.is-active .cal-price {
    color: #ffffff;
}
.st-cal-cell.is-soldout .cal-price {
    color: #94a3b8;
    font-weight: 500;
}
.st-cal-cell.is-unfetched .cal-price {
    color: #64748b;
    font-weight: 400;
}

.st-cal-legend {
    display: flex;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
}
.st-legend-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
}
.st-legend-badge.best-price {
    background: #10b981;
}
.st-legend-badge.active-day {
    background: var(--tr-primary);
}

@media (max-width: 1024px) {
    .st-container {
        grid-template-columns: 1fr;
    }
    .st-sidebar {
        display: none;
    }
    .st-trip-main {
        flex-direction: column;
        align-items: flex-start;
    }
    .st-trip-time-col {
        width: 100%;
        justify-content: space-between;
    }
    .st-trip-action-col {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ─── Responsive Toàn Diện Cho Tablet & Mobile (<= 768px) Chuẩn Vé Máy Bay ─── */
@media (max-width: 768px) {
    /* Cleanup header mobile giống 100% search-flights: ẩn title, back-link static không đè chữ */
    .sf-title {
        display: none;
    }
    .sf-header {
        padding: 8px 0 4px;
    }
    .sf-header-inner {
        position: static;
        padding: 0 16px;
        min-height: auto;
    }
    .sf-back-link {
        position: static;
        left: auto;
        top: auto;
        padding: 0 16px;
        font-size: 14px;
    }

    .st-container {
        padding: 0 10px 30px;
        margin-top: 12px;
    }

    /* ═══ ĐỒNG BỘ 100% #sfEditPanel TÌM KIẾM VÉ TÀU VỚI VÉ MÁY BAY & VÉ XE TRÊN MOBILE ═══ */
    .sf-edit-panel {
        display: block !important;
        position: sticky !important;
        top: 50px !important;
        z-index: 60 !important;
        padding: 7px 10px !important;
        background: #fff !important;
        border: none !important;
        margin: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .sf-header {
        display: none !important;
    }

    /* Thẻ tóm tắt hành trình gọn gàng trên mobile (.sf-edit-compact) */
    .sf-edit-panel .sf-edit-compact {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 7px 8px !important;
        border: 1px solid #eceef1 !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,.05) !important;
        font-size: 12px !important;
        color: #5f6368 !important;
        background: #fff !important;
        cursor: pointer !important;
        box-sizing: border-box !important;
        width: 100% !important;
        margin: 0 !important;
    }
    .sf-edit-panel .sf-edit-compact:active {
        background: #fdf7fa !important;
    }
    .sf-edit-panel .sf-cmp-num {
        display: none !important;
    }
    .sf-edit-panel .sf-cmp-ic {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
        background: #fdeef7 !important;
        color: var(--tr-primary, #ed007f) !important;
        font-size: 15px !important;
    }
    .sf-edit-panel .sf-cmp-body {
        display: flex !important;
        flex-direction: column !important;
        gap: 1px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .sf-edit-panel .sf-cmp-body > .sf-cmp-sep {
        display: none !important;
    }
    .sf-edit-panel .sf-cmp-route {
        display: flex !important;
        align-items: baseline !important;
        gap: 4px !important;
        min-width: 0 !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.4 !important;
        color: #1a1a1a !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .sf-edit-panel .sf-cmp-route b {
        color: #1a1a1a !important;
        font-weight: 700 !important;
    }
    .sf-edit-panel .sf-cmp-arrow {
        color: var(--tr-primary, #ed007f) !important;
        font-weight: 700 !important;
        margin: 0 2px !important;
    }
    .sf-edit-panel .sf-cmp-meta {
        display: flex !important;
        align-items: center !important;
        gap: 7px !important;
        min-width: 0 !important;
        line-height: 1.4 !important;
        white-space: nowrap !important;
        font-size: 12px !important;
        color: #5f6368 !important;
    }
    .sf-edit-panel .sf-cmp-date {
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .sf-edit-panel .sf-cmp-sep {
        color: #d0d0d0 !important;
    }
    .sf-edit-panel .sf-cmp-pax {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex: 0 0 auto !important;
    }
    .sf-edit-panel .sf-cmp-edit {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: auto !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        background: #fdeef7 !important;
        color: var(--tr-primary, #ed007f) !important;
        flex-shrink: 0 !important;
    }

    /* Form mặc định ẩn trên mobile (chỉ hiện compact info-bar) */
    .sf-edit-desktop {
        display: none !important;
    }
    .sf-edit-panel:not(.mob-exp) .sf-edit-mobile,
    .sf-edit-panel:not(.mob-exp) .sf-edit-form {
        display: none !important;
    }
    .sf-edit-panel:not(.mob-exp) .sf-mob-sheet-hdr {
        display: none !important;
    }
    .sf-edit-panel.mob-exp .sf-edit-mobile {
        display: block !important;
    }

    /* Backdrop khi mở modal bottom-sheet */
    .sf-edit-backdrop {
        display: none;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(17,24,39,.5) !important;
        z-index: 998 !important;
        backdrop-filter: blur(3px) !important;
        -webkit-backdrop-filter: blur(3px) !important;
    }
    .sf-edit-backdrop.mob-open {
        display: block !important;
    }

    /* Bottom sheet khi mở (.mob-exp) giống 100% Vé Máy Bay & Vé Xe */
    .sf-edit-panel.mob-exp {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 88vh !important;
        max-height: 88dvh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 20px 20px 0 0 !important;
        z-index: 999 !important;
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: 0 -8px 30px rgba(0,0,0,.2) !important;
        animation: sfSheetUp .26s ease-out !important;
        display: flex !important;
        flex-direction: column !important;
    }
    /* Đảm bảo Calendar popup và backdrop luôn hiển thị đè lên trên sfEditPanel */
    #lsFlightCalendar {
        z-index: 300050 !important;
    }
    .lsfc-backdrop {
        z-index: 300040 !important;
    }
    @keyframes sfSheetUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    .sf-edit-panel.mob-exp .sf-edit-compact {
        display: none !important;
    }

    .sf-edit-panel.mob-exp .sf-mob-sheet-hdr {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        flex-direction: column !important;
        padding: 10px 16px 0 !important;
        background: #fff !important;
        border-bottom: 1px solid #f0f0f0 !important;
        flex-shrink: 0 !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-drag {
        display: block !important;
        width: 40px !important;
        height: 4px !important;
        background: #e0e0e0 !important;
        border-radius: 2px !important;
        margin-bottom: 10px !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-title {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #222 !important;
        padding-bottom: 10px !important;
        width: 100% !important;
        text-align: center !important;
        border: none !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-close {
        position: absolute !important;
        top: 10px !important;
        right: 14px !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        color: #888 !important;
        padding: 4px !important;
        line-height: 0 !important;
    }

    .sf-edit-panel.mob-exp .sf-edit-form {
        display: block !important;
        padding: 12px 14px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
        box-shadow: none !important;
        border: none !important;
        background: #fff !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 !important;
    }
    /* Về mobile thì không cần Lịch & giá */
    .sf-pricecal-btn,
    .st-summary-pricecal-btn,
    #sfPriceCalBtn {
        display: none !important;
    }

    /* ─── Tabs Một chiều/Khứ hồi → pill bo tròn, căn giữa giống search-flights ─── */
    .sf-edit-panel.mob-exp .sf-trip-radios {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        border-bottom: 0 !important;
        padding: 0 0 14px !important;
        font-size: 0 !important;
    }
    .sf-edit-panel.mob-exp .sf-trip-radios > label {
        display: inline-flex !important;
        vertical-align: middle !important;
        margin: 0 4px !important;
        padding: 9px 24px !important;
        border-radius: 999px !important;
        background: #f1f3f5 !important;
        color: #666 !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        cursor: pointer !important;
    }
    .sf-edit-panel.mob-exp .sf-trip-radios > label input[type=radio] {
        display: none !important;
    }
    .sf-edit-panel.mob-exp .sf-trip-radios > label:has(input:checked) {
        background: linear-gradient(135deg, #ec4899, #ed007f) !important;
        color: #fff !important;
        box-shadow: 0 4px 12px rgba(214, 36, 140, .3) !important;
    }
    .sf-edit-panel.mob-exp .sf-trip-radios .sf-pax-wrap.sf-pax-top {
        display: block !important;
        position: static !important;
    }
    .sf-edit-panel.mob-exp .sf-trip-radios .sf-pax-wrap.sf-pax-top .sf-pax-pill {
        display: none !important;
    }

    /* ─── From/To → 1 card ngang: Từ (trái) ⇄ Đến (phải) ─── */
    .sf-edit-panel.mob-exp .sf-mob-airports {
        display: flex !important;
        align-items: center !important;
        border: 1px solid #e6e8eb !important;
        border-radius: 14px !important;
        padding: 12px 14px !important;
        position: relative !important;
        background: #fff !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef#sfEfFrom,
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef#sfEfTo {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        position: static !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef label {
        display: none !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1px !important;
        padding: 0 !important;
        border-bottom: 0 !important;
        cursor: pointer !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef#sfEfTo .sf-ef-inner {
        align-items: flex-end !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef-icon {
        display: none !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef-code {
        order: 1 !important;
        font-size: 23px !important;
        font-weight: 800 !important;
        color: #1a1a1a !important;
        display: block !important;
        line-height: 1.2 !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef-city {
        order: 2 !important;
        flex: none !important;
        font-size: 12.5px !important;
        font-weight: 500 !important;
        color: #8a9098 !important;
        max-width: 100% !important;
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef-inner > input {
        display: none !important;
        order: 1 !important;
        font-size: 16px !important;
        width: 100% !important;
        border: none !important;
        padding: 0 !important;
        height: auto !important;
        background: transparent !important;
        color: var(--tr-primary, #ed007f) !important;
        font-weight: 700 !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef.sf-editing .sf-ef-code,
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef.sf-editing .sf-ef-city {
        display: none !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-ef.sf-editing .sf-ef-inner > input {
        display: block !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-swap-btn {
        position: static !important;
        transform: none !important;
        flex: 0 0 auto !important;
        align-self: center !important;
        margin: 0 10px !important;
        width: 42px !important;
        height: 42px !important;
        background: #fff !important;
        border: 1px solid #e6e8eb !important;
        color: var(--tr-primary, #ed007f) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,.12) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .sf-swap-btn.swapping {
        transform: rotate(180deg) !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-airports .ls-typeahead-dd {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        top: calc(100% + 8px) !important;
        z-index: 100090 !important;
    }

    /* ─── Ngày: card có viền + nhãn Ngày đi / Ngày về ─── */
    .sf-edit-panel.mob-exp .sf-mob-dates-wrap {
        display: flex !important;
        align-items: center !important;
        border: 1px solid #e6e8eb !important;
        border-radius: 14px !important;
        padding: 10px 14px !important;
        margin-top: 12px !important;
        gap: 10px !important;
        background: #fff !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-dates-wrap .sf-ef-icon-cal {
        display: none !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-dates-wrap .sf-ef {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        cursor: pointer !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-dates-wrap .sf-ef label {
        display: block !important;
        font-size: 12px !important;
        color: #888 !important;
        font-weight: 600 !important;
        margin-bottom: 2px !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-dates-wrap .sf-ef input {
        border: none !important;
        padding: 0 !important;
        height: auto !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #1a1a1a !important;
        background: transparent !important;
        box-shadow: none !important;
        width: 100% !important;
        cursor: pointer !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-dates-sep {
        display: none !important;
    }

    /* ─── Số khách: Card ngang giống search-flights ─── */
    .sf-edit-panel.mob-exp .sf-mob-pc {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin-top: 12px !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-pc .sf-mob-pc-card {
        display: block !important;
        border: 1px solid #e6e8eb !important;
        border-radius: 14px !important;
        padding: 10px 14px !important;
        background: #fff !important;
        cursor: pointer !important;
        min-width: 0 !important;
        margin: 0 !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-pc .sf-mob-pc-lbl {
        display: block !important;
        font-size: 12px !important;
        color: #888 !important;
        margin-bottom: 2px !important;
        font-weight: 600 !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-pc .sf-mob-pc-val {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #1a1a1a !important;
        min-width: 0 !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-pc .sf-mob-pc-val .sf-ef-icon {
        position: static !important;
        display: inline-flex !important;
        flex-shrink: 0 !important;
        line-height: 0 !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-pc .sf-mob-pax-total {
        display: inline-block !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #1a1a1a !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-pc .sf-mob-pax-icons {
        display: none !important;
    }
    .sf-edit-panel.mob-exp .sf-mob-pc .sf-mob-pc-caret {
        margin-left: auto !important;
        color: #999 !important;
        font-size: 13px !important;
    }

    /* ─── Backdrop chọn số khách trên mobile ─── */
    .st-pax-backdrop {
        display: none;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 200040 !important;
        backdrop-filter: blur(2px) !important;
        -webkit-backdrop-filter: blur(2px) !important;
    }
    .st-pax-backdrop.is-open {
        display: block !important;
    }

    /* ─── Popup chọn hành khách trên mobile (Bottom-sheet modal) ─── */
    .sf-edit-panel.mob-exp .sf-pax-dropdown {
        display: none !important;
    }
    .sf-edit-panel.mob-exp .sf-pax-dropdown.mob-modal-open,
    .sf-edit-panel.mob-exp .sf-pax-dropdown.is-open,
    #stPaxDropdown.mob-modal-open,
    #stPaxDropdown.is-open {
        display: block !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25) !important;
        z-index: 200050 !important;
        background: #fff !important;
        padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
        box-sizing: border-box !important;
        animation: sfSheetUp .24s ease-out !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
    .sf-edit-panel.mob-exp .sf-pax-dropdown.mob-modal-open::before,
    .sf-edit-panel.mob-exp .sf-pax-dropdown.is-open::before,
    #stPaxDropdown.mob-modal-open::before,
    #stPaxDropdown.is-open::before {
        content: '';
        display: block;
        width: 42px;
        height: 4px;
        border-radius: 2px;
        background: #e2e8f0;
        margin: 0 auto 14px;
    }
    .sf-edit-panel.mob-exp .sf-pax-dropdown .sf-pax-row {
        padding: 12px 0 !important;
    }
    .sf-edit-panel.mob-exp .sf-pax-dropdown .sf-pax-done {
        height: 46px !important;
        font-size: 15px !important;
        border-radius: 12px !important;
        margin-top: 14px !important;
        background: var(--tr-primary, #ed007f) !important;
    }

    /* ─── Edit row & nút Tìm kiếm submit ─── */
    .sf-edit-panel.mob-exp .sf-edit-row {
        align-items: stretch !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    .sf-edit-panel.mob-exp .sf-edit-submit {
        width: 100% !important;
        margin-top: 16px !important;
        height: 48px !important;
        font-size: 16px !important;
        border-radius: 14px !important;
        justify-content: center !important;
        background: var(--tr-primary, #ed007f) !important;
        color: #fff !important;
        font-weight: 700 !important;
        box-shadow: 0 4px 14px rgba(237, 0, 127, 0.3) !important;
    }

    /* ─── Thanh Mobile Actions (Bộ lọc + Sắp xếp) ─── */
    .sf-mobile-actions {
        position: sticky;
        top: var(--sf-mact-top, 90px);
        z-index: 40;
        background: #fff;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        display: flex;
        box-shadow: 0 2px 10px rgba(0,0,0,.06);
    }
    .sf-mobile-actions button {
        flex: 1;
        min-width: 0;
        padding: 12px 10px;
        background: none;
        border: none;
        font-size: 14px;
        font-weight: 400;   /* chữ thường, không đậm (client 07/10/2026 — trước là 700) */
        color: #333;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-family: inherit;
    }
    .sf-mobile-actions button + button {
        border-left: 1px solid #eee;
    }
    .sf-mobile-actions button:active {
        background: #fdf0f7;
    }
    .sf-mobile-actions i {
        color: var(--tr-primary);
        flex-shrink: 0;
    }
    .sf-mact-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .sf-mact-caret {
        font-size: 11px;
        color: #888;
    }

    /* ─── Bottom Sheet Cho Sidebar & Sắp xếp ─── */
    .st-sidebar.sf-sidebar,
    .sf-sort-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: -100%;
        top: auto;
        width: 100%;
        max-width: 100%;
        max-height: 82vh;
        background: #fff;
        z-index: 1000;
        box-shadow: 0 -8px 32px rgba(0,0,0,.18);
        border-radius: 18px 18px 0 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        transition: bottom .28s ease;
        overflow: hidden;
    }
    .st-sidebar.sf-sidebar.is-open,
    .sf-sort-sheet.is-open {
        bottom: 0;
    }
    .sf-sheet-header {
        position: relative;
        padding: 8px 16px 12px;
        border-bottom: 1px solid #f0f0f0;
        flex-shrink: 0;
    }
    .sf-sheet-handle {
        width: 40px;
        height: 4px;
        background: #d0d0d0;
        border-radius: 2px;
        margin: 0 auto 10px;
    }
    .sf-sheet-title {
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        color: #1a1a1a;
    }
    .sf-sheet-footer {
        flex-shrink: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #f0f0f0;
        display: flex;
        gap: 12px;
        align-items: center;
        background: #fff;
    }
    .sf-sheet-reset {
        background: transparent;
        border: 0;
        color: #1a1a1a;
        font-size: 14px;
        font-weight: 600;
        padding: 12px 18px;
        cursor: pointer;
        font-family: inherit;
    }
    .sf-sheet-confirm {
        flex: 1;
        background: var(--tr-primary);
        color: #fff;
        border: 0;
        border-radius: 999px;
        padding: 13px 18px;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        font-family: inherit;
    }
    .sf-sort-options {
        list-style: none;
        padding: 0;
        margin: 0;
        overflow-y: auto;
    }
    .sf-sort-opt {
        padding: 14px 18px;
        font-size: 14px;
        font-weight: 500;
        color: #1a1a1a;
        cursor: pointer;
        border-bottom: 1px solid #f0f0f0;
    }
    .sf-sort-opt.is-selected {
        color: var(--tr-primary);
        font-weight: 700;
    }
    .st-filter-header-card {
        display: none;
    }
    .st-filter-card {
        border: none;
        border-bottom: 1px solid #f1f5f9;
        border-radius: 0;
        box-shadow: none;
        padding: 14px 18px;
    }

    /* Ẩn thanh summary sort trên desktop khi ở mobile */
    .st-list-summary-bar .st-sort-box {
        display: none;
    }
    .st-list-summary-bar {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* ─── Card Chuyến Tàu Trên Mobile (Layout chuẩn search-flights không bị tràn/rớt dòng) ─── */
    .st-train-trip-card {
        margin-bottom: 12px;
        border-radius: 14px;
        border: 1px solid #e8e8e8;
        box-shadow: 0 4px 14px rgba(0,0,0,0.06);
        background: #fff;
        overflow: hidden;
    }
    .st-trip-main {
        position: relative;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "partner partner"
            "badge times"
            "price price";
        row-gap: 8px;
        padding: 12px 14px;
        align-items: center;
    }
    .st-trip-partner-col {
        grid-area: partner;
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        padding-right: 95px; /* Tránh đè lên tag còn chỗ ở góc trên bên phải */
        min-width: 0;
    }
    .st-partner-logo-img {
        max-width: 85px;
        max-height: 28px;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }
    .st-trip-badge-col {
        grid-area: badge;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2px;
        min-width: 0;
        padding-right: 8px;
        border-bottom: none;
        padding-bottom: 0;
    }
    .st-trip-code-row {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: wrap;
    }
    .st-train-code-lg {
        font-size: 11.5px;
        font-weight: 800;
        padding: 2px 6px;
        border-radius: 5px;
        line-height: 1.2;
    }
    .st-trip-typename {
        font-size: 11px;
        font-weight: 700;
        color: #1e293b;
        line-height: 1.2;
    }
    .st-trip-cars-count {
        font-size: 10px;
        color: #94a3b8;
        display: inline-flex !important;
        align-items: center;
        gap: 3px;
    }
    .st-btn-view-stops-desktop {
        display: none !important;
    }
    .st-btn-view-stops-mobile {
        display: inline-flex !important;
        padding: 4px 9px;
        font-size: 10.5px;
        font-weight: 600;
        border-radius: 6px;
        background: #f8fafc;
        border: 1px solid #cbd5e1;
        color: #475569;
        margin-top: 0;
    }

    /* Khối giờ xuất phát - thanh thời gian - giờ đến */
    .st-trip-time-col {
        grid-area: times;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        min-width: 0;
        width: 100%;
        padding: 0;
    }
    .st-time-point {
        text-align: center;
        flex: 0 0 auto;
    }
    .st-time-val {
        font-size: 16px;
        font-weight: 800;
        line-height: 1.1;
        color: #1a1a1a;
    }
    .st-time-station {
        display: block !important;
        font-size: 10.5px;
        color: #888;
        font-weight: 500;
        margin-top: 2px;
    }
    .st-trip-time-col .sf-c-line {
        flex: 1 1 auto;
        min-width: 45px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    .st-trip-time-col .sf-c-dur {
        font-size: 11px;
        font-weight: 600;
        color: #000;
        white-space: nowrap;
    }
    .st-trip-time-col .sf-c-stops {
        font-size: 10px;
        color: #64748b;
        font-weight: 600;
        white-space: nowrap;
    }

    /* Cột Còn chỗ (avail) & Cột Giá + Nút Chọn (price) */
    .st-trip-action-col {
        grid-area: price;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px 10px;
        min-width: 0;
        width: 100%;
        padding-top: 6px;
        border-top: 1px dashed #f1f5f9;
    }
    .st-trip-avail-tag {
        position: absolute;
        top: 12px;
        right: 14px;
        font-size: 10.5px;
        font-weight: 700;
        color: #10b981;
        background: #ecfdf5;
        border: 1px solid #d1fae5;
        padding: 3px 7px;
        border-radius: 6px;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }
    .st-trip-avail-tag i {
        display: inline-block;
        font-size: 9.5px;
    }
    .st-trip-avail-tag.is-warning,
    .st-trip-avail-tag.warning {
        color: #d97706;
        background: #fffbeb;
        border-color: #fde68a;
    }
    .st-trip-avail-tag.is-error,
    .st-trip-avail-tag.error {
        color: #dc2626;
        background: #fef2f2;
        border-color: #fecaca;
    }

    .st-trip-price-wrap {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
        text-align: right;
        margin-left: auto;
    }
    .st-price-label {
        font-size: 10px;
        color: #888;
        display: block !important;
        line-height: 1;
        margin-bottom: 2px;
    }
    .st-trip-price-val {
        font-size: 16.5px;
        font-weight: 800;
        color: var(--tr-primary);
        line-height: 1.1;
        white-space: nowrap;
    }
    .st-trip-price-wrap {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .st-price-label {
        white-space: nowrap;
    }
    .st-train-trip-card.is-selected::after {
        top: -10px;
        left: 14px;
        right: auto;
        font-size: 10.5px;
        padding: 2px 8px;
        z-index: 10;
    }
    .st-trip-action-col .st-btn-view-stops {
        flex: 0 1 auto;
        min-width: 0;
        white-space: nowrap;
    }
    .st-trip-btns-group {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
    .st-btn-view-stops {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 8px;
    }
}

@media (min-width: 769px) {
    .sf-mobile-actions,
    .sf-sort-sheet,
    .sf-mob-sheet-hdr,
    .sf-edit-backdrop,
    .st-sidebar > .sf-sheet-header,
    .st-sidebar > .sf-sheet-footer {
        display: none !important;
    }

    .sf-edit-panel {
        position: sticky;
        top: 100px;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        max-height: none !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        animation: none !important;
    }
    .sf-edit-panel:not(.is-stuck) .sf-edit-form {
        display: block !important;
        max-width: 1200px;
        margin: 0 auto;
    }
    .sf-edit-panel:not(.is-stuck) .sf-edit-compact {
        display: none !important;
    }
    .sf-edit-panel.is-stuck .sf-edit-form {
        display: none !important;
    }
    .sf-edit-panel.is-stuck .sf-edit-compact {
        display: flex !important;
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TRAIN SEARCH LOADER (.stsl-*)
   Màn hình chờ tìm kiếm chuyến tàu - Phong cách Klook + Du Lịch Việt
   ═══════════════════════════════════════════════════════════════════════════ */
.stsl {
    --stsl-pk:    var(--tr-primary, #ed007f);
    --stsl-pk-lt: #fce7f3;
    --stsl-dark:  #1e293b;

    position: fixed;
    inset: 0;
    z-index: 99995;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .6);
    opacity: 0;
    visibility: hidden;
    transition: opacity .26s ease, visibility .26s ease;
}
.stsl.open {
    opacity: 1;
    visibility: visible;
}

@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
    .stsl {
        background: rgba(15, 23, 42, .45);
        -webkit-backdrop-filter: blur(10px) saturate(120%);
        backdrop-filter: blur(10px) saturate(120%);
    }
}

.stsl-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    padding: 24px 28px 24px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .7);
    background: #ffffff;
    box-shadow:
        0 40px 90px -28px rgba(237, 0, 127, .35),
        0 12px 28px -12px rgba(15, 23, 42, .25);
    text-align: center;
    transform: translateY(18px) scale(.94);
    opacity: 0;
    transition: transform .38s cubic-bezier(.2, .9, .25, 1), opacity .28s ease;
}
.stsl.open .stsl-card {
    transform: none;
    opacity: 1;
}

@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
    .stsl-card {
        background: rgba(255, 255, 255, .92);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        backdrop-filter: blur(24px) saturate(180%);
    }
}

/* Animation hình tàu hỏa */
.stsl-img-wrap {
    width: 100%;
    max-width: 280px;
    height: 140px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stsl-gif {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Chặng tàu */
.stsl-route {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    margin-top: 4px;
}
.stsl-port {
    min-width: 0;
    flex: 0 1 auto;
}
.stsl-port-to {
    text-align: right;
}
.stsl-code {
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.5px;
    color: #0f172a;
}
.stsl-city {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cung ray tàu nét đứt */
.stsl-arc {
    position: relative;
    flex: 1 1 auto;
    min-width: 60px;
    height: 36px;
    margin-top: -10px;
}
.stsl-arc svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}
.stsl-arc-track {
    fill: none;
    stroke: rgba(15, 23, 42, .1);
    stroke-width: 1.5;
}
.stsl-arc-run {
    fill: none;
    stroke: var(--stsl-pk);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 2 8;
    animation: stslDashRun .85s linear infinite;
}
@keyframes stslDashRun {
    to { stroke-dashoffset: -10; }
}
.stsl-arc-dot {
    stroke: none;
}
.stsl-arc-dot-a {
    fill: var(--stsl-pk);
}
.stsl-arc-dot-b {
    fill: #0f172a;
}

.stsl-arc-train {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
    color: var(--stsl-pk);
    animation: stslTrainBounce 1.8s ease-in-out infinite;
}
@keyframes stslTrainBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -60%) scale(1.08); }
}

/* Meta tóm tắt */
.stsl-meta {
    margin: 16px 0 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #64748b;
}
.stsl-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 8px;
    border-radius: 50%;
    vertical-align: 3px;
    background: #94a3b8;
}

/* Thông điệp & Thanh tiến trình */
.stsl-msg {
    margin: 16px 0 14px;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -.1px;
    color: #0f172a;
}
.stsl-bar {
    height: 5px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .08);
    overflow: hidden;
}
.stsl-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--stsl-pk);
    transition: width .25s ease;
}

@media (max-width: 768px) {
    .stsl-card {
        max-width: 330px;
        padding: 20px 20px 20px;
        border-radius: 20px;
    }
    .stsl-img-wrap {
        max-width: 240px;
        height: 120px;
        margin-bottom: 8px;
    }
    .stsl-code {
        font-size: 24px;
    }
    .stsl-city {
        font-size: 10px;
        margin-top: 4px;
    }
    .stsl-arc {
        min-width: 44px;
        height: 30px;
        margin-top: -8px;
    }
    .stsl-meta {
        margin-top: 14px;
        font-size: 11.5px;
    }
    .stsl-msg {
        margin: 14px 0 12px;
        font-size: 13.5px;
    }
}

/* ─── 8. Round-Trip Navigation Tabs & Sticky Selection Bar ───────────────── */
.st-roundtrip-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.st-rt-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}
.st-rt-tab:hover {
    border-color: #cbd5e1;
}
.st-rt-tab.is-active {
    border-color: var(--tr-primary);
    background: #fff8fc;
    box-shadow: 0 4px 12px rgba(237, 0, 127, 0.08);
}
.st-rt-tab-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    margin-bottom: 6px;
}
.st-rt-tab.is-active .st-rt-tab-badge {
    background: var(--tr-primary);
    color: #ffffff;
}
.st-rt-tab-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.st-rt-tab-sub {
    font-size: 12px;
    color: #64748b;
}
.st-rt-tab-status {
    font-weight: 600;
}
.st-rt-tab-status.is-selected {
    color: #059669;
}

/* Floating green checkmark indicator for selected roundtrip cards (Zero layout shift) */
.st-train-trip-card.is-selected {
    position: relative;
    border-color: var(--tr-primary) !important;
    background: #fff8fc !important;
    box-shadow: 0 4px 16px rgba(237, 0, 127, 0.12) !important;
    overflow: visible !important;
    z-index: 5;
}
.st-train-trip-card.is-selected::after {
    content: '✓  Đã chọn';
    font-weight: 700;
    text-transform: none !important;
    position: absolute;
    top: -11px;
    right: 20px;
    background: #059669;
    color: #ffffff;
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
    z-index: 10;
    pointer-events: none;
    line-height: 1.3;
}

/* Sticky bottom bar for Round-trip selection */
.st-roundtrip-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    border-top: 1px solid #e2e8f0;
    padding: 10px 16px;
}
.st-rtb-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.st-rtb-trips {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}
.st-rtb-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.st-rtb-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.st-rtb-tag.return {
    background: #fdf2f7;
    color: var(--tr-primary);
}
.st-rtb-desc {
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}
.st-rtb-desc b {
    color: var(--tr-primary);
}
.st-rtb-sep {
    color: #94a3b8;
    font-size: 13px;
}
.st-rtb-action {
    display: flex;
    align-items: center;
    gap: 16px;
}
.st-rtb-price-box {
    text-align: right;
}
.st-rtb-price-label {
    display: block;
    font-size: 11px;
    color: #64748b;
}
.st-rtb-price-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--tr-primary);
}
.st-rtb-btn-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tr-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.st-rtb-btn-next:hover:not(:disabled) {
    background: var(--tr-primary-hover);
}
.st-rtb-btn-next:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .st-roundtrip-tabs {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .st-rt-tab {
        padding: 8px 10px;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    .st-rt-tab-title {
        font-size: 12px;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        width: 100%;
    }
    .st-rt-tab-sub {
        font-size: 11px;
        color: #64748b;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        width: 100%;
    }
    .st-roundtrip-bar {
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    .st-rtb-inner {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .st-rtb-trips {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .st-rtb-item {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .st-rtb-tag {
        flex-shrink: 0;
    }
    .st-rtb-desc {
        font-size: 12px;
        color: #334155;
        font-weight: 600;
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .st-rtb-sep {
        display: none;
    }
    .st-rtb-action {
        justify-content: space-between;
        width: 100%;
        min-width: 0;
    }
    .st-rtb-btn-next {
        flex: 1;
        justify-content: center;
        padding: 10px 16px;
    }
}

/* ─── Khứ Hồi: Lọc & Cảnh Báo Chuyến Chiều Về Không Kịp Giờ ─── */
.st-train-trip-card.is-infeasible {
    opacity: 0.55;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}
.st-train-trip-card.is-infeasible .st-trip-main {
    cursor: not-allowed;
}
.st-train-trip-card.is-infeasible .st-trip-price-val {
    color: #94a3b8;
}
.st-infeasible-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 6px;
    width: fit-content;
}
.st-infeasible-badge i {
    color: #ef4444;
}

/* Banner lọc thời gian chuyến về */
.st-time-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 4px;
}
.st-time-filter-banner.st-tfb-hint {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.st-time-filter-banner.st-tfb-hint .st-tfb-info i {
    color: #16a34a;
}
.st-time-filter-banner .st-tfb-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.st-time-filter-banner .st-tfb-info i {
    color: #d97706;
    font-size: 16px;
    flex-shrink: 0;
}
.st-time-filter-banner .st-tfb-toggle-btn {
    background: #ffffff;
    border: 1px solid #f59e0b;
    color: #b45309;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.st-time-filter-banner.st-tfb-hint .st-tfb-toggle-btn {
    background: var(--c-primary, #ed007f);
    border-color: var(--c-primary, #ed007f);
    color: #ffffff;
}
.st-time-filter-banner .st-tfb-toggle-btn:hover {
    background: #fef3c7;
}
.st-time-filter-banner.st-tfb-hint .st-tfb-toggle-btn:hover {
    background: #d60072;
}

/* Card thông báo khi 100% chuyến về không kịp giờ */
.st-all-infeasible-card {
    background: #ffffff;
    border: 1px dashed #f59e0b;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    margin: 8px 0;
}
.st-aic-icon {
    font-size: 40px;
    color: #f59e0b;
    margin-bottom: 12px;
}
.st-aic-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}
.st-aic-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    max-width: 580px;
    margin: 0 auto 18px;
}
.st-aic-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.st-aic-btn-changedate {
    background: var(--c-primary, #ed007f);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.st-aic-btn-changedate:hover {
    background: #d60072;
}
.st-aic-btn-back {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.st-aic-btn-back:hover {
    background: #e2e8f0;
}

@media (max-width: 768px) {
    .st-time-filter-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }
    .st-time-filter-banner .st-tfb-toggle-btn {
        width: 100%;
        text-align: center;
    }
    .st-all-infeasible-card {
        padding: 24px 14px;
    }
    .st-aic-actions {
        flex-direction: column;
        width: 100%;
    }
    .st-aic-btn-changedate,
    .st-aic-btn-back {
        width: 100%;
        justify-content: center;
    }
}

/* ─── 24. Banner Lỗi / Không có kết quả / Trùng Ga đi & Ga đến ─── */
.st-error-banner {
    text-align: center;
    padding: 48px 20px;
    background: #ffffff;
    border-radius: 12px;
    margin-top: 10px;
}
.st-same-station-banner {
    border: 1px dashed #f59e0b;
    background: #fffdf5;
}
.st-api-error-banner {
    border: 1px dashed #f59e0b;
}
.st-no-result-banner {
    border: 1px dashed #cbd5e1;
}
.st-banner-icon {
    font-size: 42px;
    margin-bottom: 14px;
    display: inline-block;
}
.st-icon-warning,
.st-icon-api-error {
    color: #f59e0b;
}
.st-icon-no-result {
    color: #94a3b8;
    font-size: 40px;
}
.st-banner-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}
.st-banner-desc {
    font-size: 14px;
    color: #64748b;
    max-width: 540px;
    margin: 0 auto 20px;
    line-height: 1.6;
}
.st-btn-retry,
.st-btn-change-station {
    background: var(--c-primary, #ed007f) !important;
    background-color: var(--c-primary, #ed007f) !important;
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    padding: 11px 32px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(237, 0, 127, 0.28) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}
.st-btn-retry:hover,
.st-btn-change-station:hover {
    background: #d80073 !important;
    background-color: #d80073 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(237, 0, 127, 0.38) !important;
}
.st-btn-retry:active,
.st-btn-change-station:active {
    transform: translateY(0);
}

/* ═══ MODAL CHỌN GA TÀU TOÀN MÀN HÌNH TRÊN MOBILE (.sf-apfs - ĐỒNG BỘ 100% SEARCH-FLIGHTS) ═══ */
.hdp-modal.sf-apfs {
    position: fixed !important;
    inset: 0 !important;
    z-index: 200050 !important;
    background: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    height: var(--hdp-vh, 100dvh) !important;
    max-height: 100dvh !important;
}
.hdp-modal.sf-apfs[hidden] {
    display: none !important;
}
.sf-apfs .hdp-m-clear[hidden] {
    display: none !important;
}
.sf-apfs .hdp-m-search::placeholder {
    color: #94a3b8 !important;
}
.hdp-m-head {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #f1f3f4 !important;
}
.hdp-m-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #202124 !important;
    cursor: pointer !important;
    padding: 0 !important;
}
.hdp-m-close:active {
    background: #f1f3f4 !important;
}
.hdp-m-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #202124 !important;
}
.hdp-m-searchwrap {
    flex: 0 0 auto !important;
    position: relative !important;
    padding: 10px 16px !important;
}
.hdp-m-search {
    width: 100% !important;
    height: 46px !important;
    padding: 0 42px 0 14px !important;
    border: 2px solid var(--c-primary, #ed007f) !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-family: inherit !important;
    color: #202124 !important;
    outline: none !important;
    box-sizing: border-box !important;
}
.hdp-m-clear {
    position: absolute !important;
    right: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #5f6368 !important;
    cursor: pointer !important;
    padding: 0 !important;
}
.hdp-m-clear:active {
    background: #e8eaed !important;
}
body.hdp-lock {
    overflow: hidden !important;
}
.sf-apsheet-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 8px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    flex: 1 1 auto !important;
}
.sf-apsheet-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 13px 12px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.sf-apsheet-item:active {
    background: #fdf2f8 !important;
}
.sf-apsheet-item.is-disabled {
    opacity: 0.45 !important;
    pointer-events: none !important;
    background: #f8fafc !important;
}
.sf-apsheet-code {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--tr-primary, #ed007f) !important;
    background: #fdeef7 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    min-width: 44px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}
.sf-apsheet-txt {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    flex: 1 !important;
}
.sf-apsheet-city {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.sf-apsheet-name {
    font-size: 12.5px !important;
    color: #888 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.sf-apsheet-badge-disabled {
    font-size: 11px !important;
    color: #ef4444 !important;
    background: #fef2f2 !important;
    border: 1px solid #fee2e2 !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    margin-left: 6px !important;
    display: inline-block !important;
}
.sf-apsheet-group {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #888 !important;
    text-transform: uppercase !important;
    padding: 10px 12px 4px !important;
    letter-spacing: .3px !important;
}


/* Khuyến mại ĐSVN theo chuyến (POST /promotions) */
.st-trip-promos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 20px 12px;
}
.st-trip-promo {
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--tr-text-dark);
    background: var(--tr-bg-light);
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-sm);
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
    text-align: left;
    overflow-wrap: anywhere; /* tên dài không dấu cách vẫn xuống dòng, không bị cắt ở mép thẻ */
    cursor: pointer;
}
.st-trip-promo:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}
.st-trip-promo .fa-tag,
.st-btn-view-promos .fa-tag,
#stPromosTitle .fa-tag {
    color: #ea580c;
}
.st-promo-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.st-promo-item + .st-promo-item {
    border-top: 1px dashed var(--tr-border);
    padding-top: 14px;
}
.st-promo-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--tr-text-dark);
}
.st-promo-summary {
    font-size: 13px;
    color: var(--tr-text-muted);
    margin-top: 4px;
}
.st-promo-item ul {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--tr-text-dark);
}
.st-promo-note {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--tr-text-muted);
}
/* Mobile: ẩn dải tag (làm thẻ chuyến cao), thay bằng nút cạnh "Lộ trình" mở modal */
@media (max-width: 768px) {
    .st-trip-promos {
        display: none;
    }
    .st-btn-view-promos {
        margin-right: auto; /* nằm sát nút Lộ trình, đẩy giá sang phải */
    }
}
