:root {
    --fb-navy: #0f2c59;
    --fb-navy-dark: #0a1e3f;
    --fb-orange: #ff6b35;
    --fb-orange-hover: #e8551f;
    --fb-teal: #00a896;
    --fb-teal-light: #e6f6f4;
    --fb-green: #1bb978;
    --fb-green-hover: #159460;
    --fb-green-light: #e8f8f1;
    --fb-bg: #f8fafc;
    --fb-text: #1e293b;
    --fb-muted: #64748b;
    --fb-line: #e2e8f0;
    --fb-radius: 16px;
    --fb-shadow: 0 10px 30px rgba(15, 44, 89, 0.08);
    --bs-primary: #ff6b35;
    --bs-primary-rgb: 255, 107, 53;
    --bs-link-color: #0f2c59;
    --bs-link-hover-color: #ff6b35;
    --bs-body-font-family: Inter, system-ui, sans-serif;
    --bs-body-color: #1e293b;
    --bs-body-bg: #f8fafc;
    --bs-border-radius: 12px;
}

html { scroll-behavior: smooth; }

body {
    font-family: Inter, system-ui, sans-serif;
    color: var(--fb-text);
    background: var(--fb-bg);
}

a { color: var(--fb-navy); }
a:hover { color: var(--fb-orange); }

.fb-topbar {
    background: var(--fb-navy-dark);
    color: #cbd5e1;
    font-size: 12px;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #1e293b;
}
.fb-topbar a { color: inherit; text-decoration: none; }
.fb-topbar a:hover { color: #fff; }
.fb-topbar__left, .fb-topbar__right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fb-topbar .fa-phone, .fb-topbar .text-orange { color: var(--fb-orange); }
.fb-topbar .text-teal { color: var(--fb-teal); }

.fb-header {
    background: var(--fb-navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 8px 24px rgba(10, 30, 63, 0.25);
}
.fb-header__inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.fb-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    color: #fff;
    text-decoration: none;
}
.fb-brand:hover { color: #fff; }
.fb-brand__logo { height: 36px; width: auto; display: block; }
.fb-brand__mark { width: 44px; height: 44px; border-radius: 12px; background: var(--fb-orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex: none; }
.fb-brand__name { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1; }
.fb-brand__name span { color: var(--fb-orange); }
.fb-brand__tag { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #cbd5e1; margin-top: 2px; }

.fb-nav { display: flex; align-items: center; gap: 4px; }
.fb-nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 10px;
}
.fb-nav a:hover, .fb-nav a.is-active { color: #fff; background: rgba(255,255,255,.12); }
.fb-header__actions { display: flex; align-items: center; gap: 8px; }
.fb-nav-toggle {
    display: none;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 8px 10px;
}

.fb-wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding: 28px 16px 48px; }
.fb-main--flush { padding: 0; }

.fb-hero {
    background: var(--fb-navy);
    color: #fff;
    padding: 28px 16px 72px;
    position: relative;
    overflow: hidden;
}
.fb-hero h1 { font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.fb-hero h1 span, .text-orange { color: var(--fb-orange); }
.fb-hero p.lead { color: #cbd5e1; }

.fb-search-card, .fb-card, .card {
    background: #fff;
    border: 1px solid var(--fb-line);
    border-radius: var(--fb-radius);
    box-shadow: var(--fb-shadow);
}
.fb-search-card { color: var(--fb-text); padding: 18px; border-radius: 20px; }
.card-body { padding: 1.25rem; }

.fb-btn, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    padding: 10px 16px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
}
.btn-primary, .fb-btn-orange {
    background: var(--fb-orange);
    color: #fff !important;
    border-color: var(--fb-orange);
}
.btn-primary:hover, .fb-btn-orange:hover { background: var(--fb-orange-hover); border-color: var(--fb-orange-hover); color: #fff !important; }
.btn-outline-light { background: transparent; color: #e2e8f0; border-color: transparent; }
.btn-outline-light:hover { color: #fff; }
.btn-light, .fb-btn-navy { background: var(--fb-navy); color: #fff !important; }
.btn-light:hover, .fb-btn-navy:hover { background: var(--fb-navy-dark); color: #fff !important; }
.btn-secondary, .fb-btn-ghost { background: #f1f5f9; color: var(--fb-text) !important; border-color: var(--fb-line); }
.btn-outline-primary { background: #fff; color: var(--fb-navy); border-color: var(--fb-line); }
.btn-outline-primary:hover { border-color: var(--fb-navy); color: var(--fb-navy); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-lg { padding: 12px 22px; }

.form-control, .form-select, .fb-input {
    background: #f1f5f9;
    border: 1px solid var(--fb-line);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--fb-text);
    width: 100%;
}
.form-control:focus, .form-select:focus {
    background: #fff;
    border-color: var(--fb-navy);
    box-shadow: 0 0 0 3px rgba(15, 44, 89, 0.15);
    outline: none;
}
.form-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fb-muted); }
.form-text.text-danger, .invalid-feedback, .form-error { color: #dc2626; font-size: 12px; }

.fb-table-wrap { overflow-x: auto; }
table.fb-table, .table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fb-table th, .table thead th {
    text-align: left;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--fb-muted);
    padding: 12px;
    background: #f8fafc;
    border-bottom: 1px solid var(--fb-line);
}
.fb-table td, .table td { padding: 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.fb-price { color: var(--fb-teal); font-weight: 800; }

.fb-badge, .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
}
.bg-primary, .fb-badge-navy { background: var(--fb-navy) !important; color: #fff !important; }
.fb-badge-teal { background: var(--fb-teal-light); color: var(--fb-teal); border: 1px solid rgba(0,168,150,.25); }

.alert { border-radius: 12px; border: 1px solid var(--fb-line); padding: 12px 14px; }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-danger, .alert-error { background: #fef2f2; color: #991b1b; }
.alert-info, .alert-warning { background: #fff7ed; color: #9a3412; }

.fb-footer { background: var(--fb-navy-dark); color: #94a3b8; font-size: 13px; padding: 40px 16px; margin-top: 48px; }
.fb-footer a { color: #94a3b8; text-decoration: none; }
.fb-footer a:hover { color: #fff; }
.fb-footer h2 { color: #fff; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.fb-footer__grid { max-width: 80rem; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.fb-footer__bottom { max-width: 80rem; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid #1e293b; display: flex; justify-content: space-between; gap: 12px; }

.fb-stars { color: #f59e0b; letter-spacing: 1px; font-size: 13px; }
.fb-stars button { background: none; border: 0; color: #cbd5e1; cursor: pointer; padding: 0 1px; font-size: 16px; }
.fb-stars button.is-on, .fb-stars .is-on { color: #f59e0b; }

.fb-modal[hidden] { display: none !important; }
.fb-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.fb-modal__panel {
    background: #fff;
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(0,0,0,.2);
}
.modal.fade { display: none; }
.modal.fade.is-open { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(15,23,42,.6); }
.modal.fade.is-open .modal-dialog { margin: 8vh auto; max-width: 520px; }
.modal-content { background: #fff; border-radius: 20px; padding: 8px; }

.fb-dropdown { position: relative; }
.fb-dropdown__menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    color: var(--fb-text);
    border: 1px solid var(--fb-line);
    border-radius: 12px;
    min-width: 140px;
    padding: 6px;
    box-shadow: var(--fb-shadow);
    z-index: 50;
    list-style: none;
    margin: 0;
}
.fb-dropdown.is-open .fb-dropdown__menu { display: block; }
.fb-dropdown__menu a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--fb-text); }
.fb-dropdown__menu a.active, .fb-dropdown__menu a:hover { background: #f1f5f9; }

.fb-more[hidden] { display: none !important; }
.fb-trust { background: #fff; border-top: 1px solid var(--fb-line); padding: 48px 0; margin-top: 48px; }
.fb-trust-card { background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 16px; padding: 24px; height: 100%; }
.fb-trust-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; }
.fb-trust-card p { font-size: 13px; color: #475569; margin: 0; line-height: 1.5; }
.fb-trust-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; margin-bottom: 16px; }
.fb-trust-icon--navy { background: rgba(15, 44, 89, .1); color: var(--fb-navy); }
.fb-trust-icon--orange { background: rgba(255, 107, 53, .12); color: var(--fb-orange); }
.fb-trust-icon--teal { background: rgba(0, 168, 150, .12); color: var(--fb-teal); }
.fb-metric { background: #fff; border: 1px solid var(--fb-line); border-radius: 16px; padding: 16px; }
.fb-metric:hover { border-color: var(--fb-teal); }
.fb-logo, .fb-initials {
    width: 42px; height: 42px; border-radius: 12px; object-fit: cover;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--fb-navy); color: #fff; font-weight: 800; font-size: 12px;
    flex: none;
}
.fb-carrier-card { color: var(--fb-text); transition: border-color .15s ease, box-shadow .15s ease; }
.fb-carrier-card:hover { border-color: var(--fb-teal); }
.fb-carrier-card .stretched-link { color: inherit; }
.fb-carrier-card__actions { position: relative; z-index: 2; }

.auth-page { background: linear-gradient(180deg, var(--fb-navy) 0%, var(--fb-navy-dark) 100%); min-height: 100vh; }
.auth-card { max-width: 440px; margin: 0 auto; background: #fff; border-radius: 20px; padding: 28px; box-shadow: var(--fb-shadow); }

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: #f1f5f9 !important;
    border: 1px solid var(--fb-line) !important;
    border-radius: 12px !important;
    min-height: 42px;
}
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; padding: 8px 12px; font-size: 12px; font-weight: 600; margin: 0 8px 8px 0; border: 1px solid var(--fb-line); background: #f8fafc; }
.chip--active { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.chip--disabled { color: #94a3b8; }
.chip__tag { background: #d1fae5; color: #047857; border-radius: 4px; padding: 1px 6px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.fb-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--fb-muted); margin-bottom: 8px; }
.fb-crumbs a { color: inherit; text-decoration: none; }
.fb-crumbs a:hover { color: var(--fb-orange); }
.fb-crumbs strong { color: var(--fb-text); }
.fb-crumbs i { font-size: 10px; color: #94a3b8; }
.fb-route-bar { height: 8px; background: linear-gradient(90deg, var(--fb-navy), var(--fb-teal), var(--fb-orange)); }
.fb-price-panel { background: linear-gradient(135deg, #0f172a, var(--fb-navy)); color: #fff; border-radius: 16px; padding: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.fb-price-panel__amount { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; color: var(--fb-teal); line-height: 1.1; }
.fb-price-panel .small { color: #cbd5e1; }
.fb-btn-slate { background: #f1f5f9; color: var(--fb-text) !important; border: 1px solid #e2e8f0; }
.fb-btn-slate:hover { background: #e2e8f0; color: var(--fb-text) !important; }
.fb-metric-icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex: none; }
.fb-metric-icon--teal { background: #f0fdfa; color: var(--fb-teal); }
.fb-metric-icon--navy { background: #eff6ff; color: var(--fb-navy); }
.fb-metric-icon--orange { background: #fff7ed; color: var(--fb-orange); }
.fb-metric-kicker { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; }
.fb-metric-value { font-size: 1.05rem; font-weight: 800; }
.fb-metric-sub { font-size: 12px; color: var(--fb-muted); margin-top: 4px; }
.fb-partial { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; height: 100%; }
.fb-partial a { font-size: 12px; font-weight: 800; color: var(--fb-teal); text-decoration: none; white-space: nowrap; }
.fb-partial-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; background: var(--fb-teal-light); border: 1px solid rgba(0,168,150,.25); border-radius: 12px; font-size: 12px; color: var(--fb-navy); }
.fb-partial-note a { font-weight: 800; color: var(--fb-orange); white-space: nowrap; }
.fb-route-side { position: sticky; top: 96px; }
.fb-carrier-ribbon { position: absolute; top: 0; right: 0; background: var(--fb-teal); color: #fff; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 12px; border-bottom-left-radius: 12px; }
.fb-contact-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.fb-contact-row i { width: 18px; margin-top: 3px; text-align: center; }
.fb-contact-panel { background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 12px; padding: 20px; }
.fb-contact-ico { width: 32px; height: 32px; border-radius: 8px; background: #fff; border: 1px solid var(--fb-line); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fb-company-routes { max-height: 70vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.fb-route-mini { background: #f8fafc; border: 1px solid var(--fb-line); border-radius: 12px; padding: 14px; }
.fb-route-mini:hover { background: #fff; border-color: var(--fb-teal); }
.fb-enquiry { background: var(--fb-navy); color: #fff; border-radius: 16px; padding: 20px; }
.fb-enquiry p { color: #cbd5e1; font-size: 13px; margin: 8px 0 0; line-height: 1.5; }
.city-autocomplete-menu {
    background: #fff;
    border: 1px solid var(--fb-line);
    border-radius: 12px;
    box-shadow: var(--fb-shadow);
    z-index: 30;
}

@media (max-width: 991px) {
    .fb-nav-toggle { display: inline-flex; }
    .fb-nav, .fb-header__actions .fb-hide-sm { display: none; }
    .fb-header.is-open .fb-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        left: 0; right: 0; top: 100%;
        background: var(--fb-navy-dark);
        padding: 12px;
    }
    .fb-header.is-open .fb-header__actions { display: flex; }
    .fb-header.is-open .fb-header__actions .fb-hide-sm { display: inline-flex; }
    .fb-footer__grid { grid-template-columns: 1fr 1fr; }
    .fb-topbar__extra { display: none; }
    .fb-route-side { position: static; }
}
@media (max-width: 640px) {
    .fb-footer__grid, .fb-footer__bottom { grid-template-columns: 1fr; display: grid; }
}
