:root {
    --ink: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --paper: #ffffff;
    --wash: #f6f8fb;
    --blue: #1a2a6c;
    --royal: #3e54ac;
    --gold: #ffd166;
    --red: #b42318;
    --green: #087443;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--wash);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 850;
    letter-spacing: 0;
}

.brand img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.navlinks {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
}

.navlinks a,
.navlinks button {
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.navlinks a:hover,
.navlinks button:hover {
    background: #f2f4f7;
}

.hero {
    min-height: 590px;
    padding: 46px 0 32px;
    background:
        linear-gradient(90deg, rgba(10, 18, 48, 0.90), rgba(10, 18, 48, 0.55)),
        url("/assets/eswatini-shuttle-hero.png") center / cover;
    color: #fff;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
    gap: 38px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffe8a3;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 720px;
    margin: 0 0 18px;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero p {
    max-width: 630px;
    margin: 0;
    color: #e8eefc;
    font-size: 18px;
    line-height: 1.65;
}

.search-panel,
.panel,
.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
}

.search-panel {
    padding: 20px;
    color: var(--ink);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: grid;
    gap: 7px;
}

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

.field label {
    color: #475467;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

.input:focus {
    border-color: var(--royal);
    box-shadow: 0 0 0 4px rgba(62, 84, 172, 0.14);
    outline: 0;
}

.typeahead {
    position: relative;
}

.typeahead-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 20;
    display: none;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(16, 24, 40, 0.14);
}

.typeahead-menu.open {
    display: block;
}

.typeahead-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid #f2f4f7;
    background: #fff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.typeahead-option:last-child {
    border-bottom: 0;
}

.typeahead-option:hover,
.typeahead-option:focus {
    background: #f8fafc;
    outline: 0;
}

.typeahead-option span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.search-hint {
    min-height: 18px;
    margin: -4px 0 0;
    font-size: 13px;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}

.button:hover {
    background: var(--royal);
}

.button.secondary {
    border-color: #d0d5dd;
    background: #fff;
    color: #344054;
}

.button.gold {
    background: var(--gold);
    color: #16213e;
}

.button.danger {
    background: var(--red);
}

.section {
    padding: 44px 0;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.section-title h2 {
    margin: 0;
    font-size: 30px;
}

.section-title p,
.muted {
    color: var(--muted);
}

.trip-list,
.route-grid,
.metric-grid,
.two-col,
.three-col {
    display: grid;
    gap: 16px;
}

.route-grid,
.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-col {
    grid-template-columns: 1.1fr 0.9fr;
}

.trip-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 18px;
}

.timeline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 13px 0;
}

.time {
    font-size: 24px;
    font-weight: 900;
}

.rail {
    height: 2px;
    min-width: 96px;
    flex: 1;
    background: linear-gradient(90deg, var(--blue), var(--gold), var(--red));
}

.badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3538cd;
    font-size: 12px;
    font-weight: 850;
}

.badge.green {
    background: #ecfdf3;
    color: var(--green);
}

.badge.red {
    background: #fff1f0;
    color: var(--red);
}

.price {
    font-size: 28px;
    font-weight: 950;
}

.panel {
    padding: 20px;
}

.card {
    padding: 18px;
}

.route-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 14px;
}

.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.passenger-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.premium-booking {
    background:
        linear-gradient(180deg, rgba(246, 248, 251, 0.92), rgba(246, 248, 251, 1)),
        radial-gradient(circle at 12% 8%, rgba(255, 209, 102, 0.22), transparent 28%),
        radial-gradient(circle at 92% 22%, rgba(62, 84, 172, 0.18), transparent 30%);
}

.booking-stage {
    padding: 8px 0 24px;
    border-bottom: 1px solid var(--line);
}

.booking-stage:last-child {
    border-bottom: 0;
}

.stage-heading {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stage-heading h2 {
    margin: 0 0 4px;
}

.stage-number {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 900;
}

.option-grid,
.addon-grid,
.last-mile-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-card,
.addon-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.option-card {
    cursor: pointer;
}

.option-card input {
    width: 18px;
    height: 18px;
}

.option-card strong,
.addon-card strong {
    display: block;
    font-size: 17px;
}

.option-card span,
.addon-card p {
    color: var(--muted);
    line-height: 1.5;
}

.selected-option {
    border-color: var(--royal);
    box-shadow: 0 0 0 4px rgba(62, 84, 172, 0.12);
}

.addon-card {
    grid-template-columns: 1fr 86px;
    align-items: center;
}

.confirm-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #344054;
    font-weight: 700;
    text-transform: none;
}

.confirm-line input {
    width: 18px;
    height: 18px;
}

.premium-summary {
    border-top: 4px solid var(--gold);
}

.journey-mini {
    display: grid;
    grid-template-columns: 1fr 70px 1fr;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    padding: 14px;
    border-radius: 8px;
    background: #f8fafc;
}

.journey-mini div:not(.rail) {
    display: grid;
    gap: 4px;
}

.journey-mini span {
    color: var(--muted);
    font-size: 13px;
}

.locked-itinerary {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid #dbe4ff;
    border-radius: 8px;
    background: #f8fbff;
}

.locked-itinerary h3 {
    margin: 10px 0 4px;
    font-size: 24px;
}

.locked-itinerary-points {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.locked-itinerary-points div:not(.rail) {
    display: grid;
    gap: 4px;
}

.locked-itinerary-points span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.locked-itinerary-points strong {
    font-size: 18px;
}

.gift-field {
    display: none;
}

.gift-field.visible {
    display: grid;
}

.summary {
    position: sticky;
    top: 96px;
}

.kv {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table th {
    color: #475467;
    font-size: 12px;
    text-transform: uppercase;
}

.notice {
    margin: 18px 0;
    padding: 13px 14px;
    border: 1px solid #abefc6;
    border-radius: 8px;
    background: #ecfdf3;
    color: #075e3f;
    font-weight: 700;
}

.footer {
    margin-top: 42px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    color: #667085;
}

.portal-frame {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    width: min(1480px, calc(100% - 32px));
    margin: 26px auto 0;
    gap: 22px;
}

.portal-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
    min-height: calc(100vh - 128px);
    padding: 18px;
    border: 1px solid rgba(26, 42, 108, 0.12);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
}

.portal-sidebar-head {
    display: grid;
    gap: 8px;
    padding: 4px 4px 18px;
    border-bottom: 1px solid var(--line);
}

.portal-sidebar-head strong {
    font-size: 20px;
    line-height: 1.2;
}

.portal-sidebar-head span:last-child {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.portal-nav {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.portal-nav a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #344054;
    font-weight: 800;
}

.portal-nav a:hover {
    background: #f2f4f7;
}

.portal-nav a.active {
    border-color: #dbe4ff;
    background: #eef4ff;
    color: var(--blue);
}

.portal-nav-icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--line);
    font-size: 13px;
}

.portal-main {
    min-width: 0;
}

.portal-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid rgba(26, 42, 108, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.24), rgba(62, 84, 172, 0.12)),
        #ffffff;
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
}

.portal-top h1 {
    margin: 8px 0 6px;
    font-size: clamp(28px, 3vw, 44px);
    letter-spacing: 0;
}

.portal-menu-button {
    display: none;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
}

.portal-backdrop {
    display: none;
}

.portal-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.portal-stat {
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.07);
}

.portal-stat span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.portal-stat strong {
    display: block;
    margin-top: 12px;
    font-size: clamp(24px, 2.6vw, 34px);
    letter-spacing: 0;
}

.portal-stat small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.45;
}

.portal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.masked-key {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #f2f4f7;
    color: #475467;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 920px) {
    .hero-grid,
    .booking-layout,
    .two-col,
    .route-grid,
    .three-col,
    .option-grid,
    .addon-grid,
    .last-mile-grid {
        grid-template-columns: 1fr;
    }

    .locked-itinerary-points {
        grid-template-columns: 1fr;
    }

    .nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    .navlinks {
        flex-wrap: wrap;
    }

    .trip-card {
        grid-template-columns: 1fr;
    }

    .summary {
        position: static;
    }

    .portal-frame {
        grid-template-columns: 1fr;
        width: min(100% - 24px, 760px);
    }

    .portal-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 40;
        width: min(320px, calc(100vw - 56px));
        min-height: 100vh;
        overflow-y: auto;
        border-radius: 0;
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    .portal-frame.sidebar-open .portal-sidebar {
        transform: translateX(0);
    }

    .portal-frame.sidebar-open .portal-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: block;
        border: 0;
        background: rgba(16, 24, 40, 0.42);
    }

    .portal-menu-button {
        display: inline-grid;
        place-items: center;
    }

    .portal-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding: 34px 0;
    }

    .portal-top {
        padding: 16px;
    }

    .portal-card-grid {
        grid-template-columns: 1fr;
    }
}
