/* ============================================================
   Waypoint — bus ticketing marketplace
   Light / dark design system, storefront + operator console
   ============================================================ */

:root {
    --font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

    --bg: #f7f2e4;
    --bg-deep: #efe7d2;
    --surface: #fffdf6;
    --surface-2: #faf6eb;
    --panel: #fffdf6;
    --ink: #14251b;
    --ink-2: #45584b;
    --muted: #748375;
    --line: rgba(20, 37, 27, 0.11);
    --line-strong: rgba(20, 37, 27, 0.2);

    --brand: #116b3a;
    --brand-2: #0a4d28;
    --brand-ink: #f5fff8;
    --brand-soft: #e2f3e7;
    --accent: #c48715;
    --accent-soft: #fbefd6;
    --danger: #b23c3c;
    --danger-soft: #fbeae7;
    --success: #1c7a4d;
    --success-soft: #e6f5ec;
    --warn: #a56818;
    --warn-soft: #fbf0dd;

    --radius: 22px;
    --radius-md: 16px;
    --radius-sm: 11px;
    --shadow: 0 28px 70px -38px rgba(12, 48, 26, 0.45);
    --shadow-soft: 0 12px 32px -24px rgba(12, 48, 26, 0.5);
    --ring: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23748375' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #07130c;
    --bg-deep: #0a1a10;
    --surface: #0d1c12;
    --surface-2: #112418;
    --panel: #0e1d13;
    --ink: #edf5ef;
    --ink-2: #bccbc1;
    --muted: #8ca095;
    --line: rgba(237, 245, 239, 0.1);
    --line-strong: rgba(237, 245, 239, 0.18);

    --brand: #66d98f;
    --brand-2: #8ce8aa;
    --brand-ink: #04210f;
    --brand-soft: rgba(102, 217, 143, 0.13);
    --accent: #e8b75c;
    --accent-soft: rgba(232, 183, 92, 0.13);
    --danger: #ef9a96;
    --danger-soft: rgba(239, 154, 150, 0.12);
    --success: #7bdbab;
    --success-soft: rgba(123, 219, 171, 0.12);
    --warn: #e6b060;
    --warn-soft: rgba(230, 176, 96, 0.12);

    --shadow: 0 34px 80px -34px rgba(0, 0, 0, 0.75);
    --shadow-soft: 0 16px 38px -26px rgba(0, 0, 0, 0.8);
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a9bdb2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font: 400 15.5px/1.6 var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.35s ease, color 0.35s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(900px 500px at 88% -6%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 65%),
        radial-gradient(700px 420px at -5% 30%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 65%);
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.55rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0; }

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

img, svg {
    display: block;
}

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

button {
    cursor: pointer;
}

::selection {
    background: color-mix(in srgb, var(--brand) 28%, transparent);
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.container {
    width: min(1200px, 100% - 48px);
    margin-inline: auto;
}

.container--wide {
    width: min(1360px, 100% - 48px);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -80px;
    z-index: 200;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--brand);
    color: var(--brand-ink);
    font-weight: 700;
}

.skip-link:focus {
    top: 14px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.text-brand { color: var(--brand); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 26px; }
.mb-2 { margin-bottom: 16px; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font: 650 14px/1 var(--font-sans);
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn .icon {
    width: 17px;
    height: 17px;
}

.btn--primary {
    background: var(--brand);
    color: var(--brand-ink);
    box-shadow: 0 14px 28px -18px color-mix(in srgb, var(--brand) 75%, transparent);
}

.btn--primary:hover {
    background: var(--brand-2);
}

.btn--accent {
    background: var(--accent);
    color: #2a1703;
    box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--accent) 70%, transparent);
}

[data-theme="dark"] .btn--accent {
    color: #241503;
}

.btn--ghost {
    border-color: var(--line-strong);
    background: transparent;
    color: var(--ink);
}

.btn--ghost:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.btn--soft {
    background: var(--brand-soft);
    color: var(--brand);
}

.btn--soft:hover {
    background: color-mix(in srgb, var(--brand) 18%, transparent);
}

.btn--danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.btn--danger:hover {
    background: color-mix(in srgb, var(--danger) 18%, transparent);
}

.btn--light {
    background: #fdfaf2;
    color: #10251f;
}

.btn--link {
    height: auto;
    padding: 0;
    color: var(--brand);
    font-weight: 700;
    border-radius: 0;
}

.btn--link:hover {
    transform: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn--sm {
    height: 36px;
    padding: 0 14px;
    font-size: 12.5px;
    gap: 6px;
}

.btn--lg {
    height: 54px;
    padding: 0 30px;
    font-size: 15px;
}

.btn--block {
    width: 100%;
}

.btn--icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    border-color: var(--line);
    background: var(--surface);
}

/* ---------- Badges, avatars, chips ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink-2);
    border: 1px solid var(--line);
    font: 650 11.5px/1 var(--font-sans);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}

.badge--success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge--warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge--neutral { background: var(--surface-2); color: var(--muted); }
.badge--brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge--plain::before { display: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--ink-2);
    font: 600 11px/1 var(--font-sans);
}

.chip .icon {
    width: 13px;
    height: 13px;
    color: var(--brand);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font: 700 12px/1 var(--font-sans);
    letter-spacing: 0.02em;
    flex: none;
}

.avatar--sm { width: 28px; height: 28px; border-radius: 9px; font-size: 10px; }
.avatar--lg { width: 48px; height: 48px; border-radius: 15px; font-size: 14px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font: 700 11px/1 var(--font-sans);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.kicker {
    color: var(--muted);
    font: 700 11px/1.3 var(--font-sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s ease;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #1f9d55 0 30%, #f3c33d 30% 45%, #111 45% 62%, #2478b5 62% 100%);
    pointer-events: none;
}

@supports (backdrop-filter: blur(1px)) {
    .site-header {
        background: color-mix(in srgb, var(--bg) 86%, transparent);
        backdrop-filter: blur(18px) saturate(140%);
    }
}

.header-inner {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #e7fff8;
    background: linear-gradient(145deg, #128073, #06453e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 24px -16px rgba(8, 60, 50, 0.7);
}

[data-theme="dark"] .brand-mark {
    color: #052620;
    background: linear-gradient(145deg, #74e2c9, #31a790);
}

.brand-mark .icon {
    width: 23px;
    height: 23px;
    stroke-width: 1.7;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 23px;
    line-height: 1;
    letter-spacing: -0.035em;
}

.brand-sub {
    font: 650 8.5px/1 var(--font-sans);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.site-nav a {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--ink-2);
    font: 600 13px/1 var(--font-sans);
    transition: background-color 0.16s ease, color 0.16s ease;
}

.site-nav a:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.site-nav a.is-active {
    background: var(--brand-soft);
    color: var(--brand);
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-account {
    display: flex;
    align-items: center;
    gap: 9px;
}

.header-account__name {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    font-size: 12.5px;
    font-weight: 650;
}

.header-account__name span {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 500;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    align-items: center;
    justify-content: center;
}

.theme-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
    color: var(--muted);
    flex: none;
}

.theme-toggle .icon {
    width: 14px;
    height: 14px;
    position: relative;
    z-index: 1;
    transition: color 0.25s ease;
}

[data-theme="light"] .theme-toggle .icon--sun { color: var(--accent); }
[data-theme="dark"] .theme-toggle .icon--moon { color: var(--brand); }

.theme-toggle__knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 3px 8px rgba(10, 30, 24, 0.12);
    transition: transform 0.28s cubic-bezier(0.32, 0.9, 0.35, 1);
}

[data-theme="dark"] .theme-toggle__knob {
    transform: translateX(28px);
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 56px 0 40px;
}

.footer-brand p {
    margin-top: 16px;
    max-width: 34ch;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.7;
}

.footer-col h4 {
    font: 700 11px/1 var(--font-sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    padding: 5px 0;
    color: var(--ink-2);
    font-size: 13.5px;
}

.footer-col a:hover { color: var(--brand); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0 26px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.footer-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-note .icon { width: 14px; height: 14px; color: var(--brand); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(52px, 7vw, 88px) 0 36px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 520px at 92% -8%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 62%),
        radial-gradient(700px 460px at -8% 22%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 1;
    max-width: 850px;
}

.hero h1 {
    margin: 22px 0 22px;
    font-size: clamp(3rem, 7.2vw, 6.1rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.hero h1 em {
    font-style: italic;
    color: var(--brand);
}

.hero__lede {
    max-width: 56ch;
    color: var(--ink-2);
    font-size: clamp(1rem, 1.5vw, 1.14rem);
    line-height: 1.7;
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(22px, 4vw, 46px);
    margin-top: 32px;
}

.hero-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.65rem;
    letter-spacing: -0.03em;
    line-height: 1;
}

.hero-stat span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11.5px;
    letter-spacing: 0.02em;
}

.hero__art {
    position: absolute;
    right: -60px;
    top: 40px;
    width: min(48vw, 640px);
    opacity: 0.55;
    color: var(--brand);
    pointer-events: none;
}

[data-theme="dark"] .hero__art { opacity: 0.38; }

.hero__search {
    position: relative;
    z-index: 2;
    margin-top: clamp(34px, 5vw, 54px);
}

/* ---------- Search form (incl. searchable station picker) ---------- */

.search-card {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1.2fr 42px 1.2fr 0.95fr 0.62fr auto;
    gap: 4px;
    align-items: end;
}

.search-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 13px;
    border-radius: 15px;
    transition: background-color 0.16s ease;
}

.search-field:hover {
    background: var(--surface-2);
}

.search-field label {
    font: 700 9.5px/1 var(--font-sans);
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
}

.search-field select,
.search-field input {
    width: 100%;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    font: 600 14.5px/1.2 var(--font-sans);
    color: var(--ink);
    cursor: pointer;
}

.search-field select:focus-visible,
.search-field input:focus-visible {
    outline: none;
}

.search-field:focus-within {
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 55%, transparent);
}

.search-field input[type="date"] {
    min-width: 0;
}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.75);
    opacity: 0.9;
    cursor: pointer;
}

/* Searchable station combobox (progressive enhancement over <select>) */

.combo {
    position: relative;
    min-width: 0;
}

.combo__select {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

.search-field .combo__input {
    cursor: text;
    padding-right: 20px;
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: right center;
}

.combo__panel {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    left: 0;
    width: max(100%, 252px);
    max-height: 288px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
}

.combo__option {
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--ink-2);
    font-size: 13.5px;
    line-height: 1.35;
    cursor: pointer;
}

.combo__option:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.combo__option.is-active {
    background: var(--brand-soft);
    color: var(--brand);
}

.combo__option[aria-selected="true"] {
    font-weight: 700;
}

.combo__empty {
    padding: 10px 11px;
    color: var(--muted);
    font-size: 12.5px;
}

.search-card .btn {
    height: 58px;
    border-radius: 17px;
    padding-inline: 25px;
    align-self: center;
}

.swap-btn {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    align-self: center;
    justify-self: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink-2);
    display: grid;
    place-items: center;
    transition: transform 0.25s ease, color 0.2s ease, border-color 0.2s ease;
}

.swap-btn:hover {
    transform: rotate(180deg);
    color: var(--brand);
    border-color: var(--brand);
}

.swap-btn .icon { width: 15px; height: 15px; }

.search-hint {
    margin-top: 12px;
    color: var(--muted);
    font-size: 11.5px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.search-hint .icon { width: 13px; height: 13px; color: var(--brand); }

/* ---------- Sections ---------- */

.section {
    padding: clamp(48px, 6vw, 76px) 0 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-head h2 {
    margin-top: 8px;
}

.section-head p {
    max-width: 52ch;
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--brand);
    font: 650 13px/1 var(--font-sans);
    white-space: nowrap;
}

.section-link .icon { width: 15px; height: 15px; }

.route-grid,
.operator-grid,
.feature-grid {
    display: grid;
    gap: 18px;
}

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

.route-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.route-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    box-shadow: var(--shadow);
}

.route-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -54px;
    bottom: -64px;
    border: 1px dashed var(--line-strong);
    border-radius: 50%;
    pointer-events: none;
}

.route-card__operator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font: 600 11.5px/1.3 var(--font-sans);
}

.operator-dot {
    width: 20px;
    height: 20px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: #fff;
    font: 750 8px/1 var(--font-sans);
    letter-spacing: 0.02em;
    flex: none;
}

.route-card__cities {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.route-card__cities .icon {
    width: 17px;
    height: 17px;
    color: var(--muted);
    flex: none;
}

.route-card__meta {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.route-card__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}

.route-card__price {
    font: 700 15px/1.2 var(--font-sans);
    letter-spacing: -0.02em;
}

.route-card__price small {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font: 600 9.5px/1 var(--font-sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.route-card__go {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.route-card:hover .route-card__go {
    background: var(--brand);
    color: var(--brand-ink);
}

/* Operators */

.operator-card {
    position: relative;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.operator-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--op-color, var(--brand));
}

.operator-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.operator-card h3 {
    font-size: 1.22rem;
}

.operator-card p {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.operator-card__foot {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11.5px;
}

.operator-card__foot strong {
    color: var(--ink);
    font-size: 12.5px;
}

/* Features */

.feature {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.feature__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 18px;
}

.feature__icon .icon { width: 21px; height: 21px; }

.feature h3 { font-size: 1.18rem; }

.feature p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.7;
}

/* CTA */

.cta-band {
    position: relative;
    overflow: hidden;
    margin-top: clamp(52px, 6vw, 80px);
    padding: clamp(34px, 5vw, 58px);
    border-radius: 30px;
    background:
        radial-gradient(700px 380px at 90% 10%, rgba(255, 255, 255, 0.16), transparent 60%),
        linear-gradient(135deg, #0d5c30 0%, #0a3f22 55%, #062414 100%);
    color: #f1fffb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}

.cta-band::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -110px;
    width: 360px;
    height: 360px;
    border: 1px dashed rgba(255, 255, 255, 0.24);
    border-radius: 50%;
}

.cta-band h2 {
    color: #fff;
    max-width: 22ch;
    font-size: clamp(1.9rem, 3.6vw, 3rem);
}

.cta-band p {
    margin-top: 12px;
    color: rgba(241, 255, 251, 0.72);
    max-width: 46ch;
    font-size: 14px;
}

.cta-band__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.cta-band .btn--ghost {
    border-color: rgba(255, 255, 255, 0.3);
    color: #f1fffb;
}

.cta-band .btn--ghost:hover {
    border-color: #fff;
    color: #fff;
}

/* ---------- Page head (search etc) ---------- */

.page-head {
    position: relative;
    padding: 34px 0 22px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 14px;
}

.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs .icon { width: 13px; height: 13px; opacity: 0.7; }

.page-head h1 {
    font-size: clamp(2rem, 3.6vw, 3rem);
}

.page-head__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.page-head__sub {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13.5px;
}

.page-head .search-card {
    margin-top: 24px;
    box-shadow: var(--shadow-soft);
}

.result-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 28px 0 18px;
    flex-wrap: wrap;
}

.result-count {
    font-size: 13px;
    color: var(--muted);
}

.result-count strong { color: var(--ink); font-weight: 700; }

.sort-pills {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.sort-pills a {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--muted);
    font: 600 11.5px/1 var(--font-sans);
}

.sort-pills a:hover { color: var(--ink); }

.sort-pills a.is-active {
    background: var(--ink);
    color: var(--bg);
}

[data-theme="dark"] .sort-pills a.is-active {
    background: var(--brand);
    color: var(--brand-ink);
}

/* ---------- Trip result cards ---------- */

.trip-list {
    display: grid;
    gap: 14px;
}

.trip-card {
    display: grid;
    grid-template-columns: 1.05fr 1.75fr 0.72fr auto;
    align-items: center;
    gap: 26px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.trip-card:hover {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.trip-operator {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.trip-operator__name {
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: -0.01em;
}

.trip-operator__meta {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.trip-operator__meta .icon { width: 11px; height: 11px; }

.trip-times {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.trip-time strong {
    display: block;
    font: 700 1.25rem/1 var(--font-sans);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.trip-time span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.trip-timeline {
    position: relative;
    text-align: center;
    color: var(--muted);
    font-size: 10px;
    padding-top: 1px;
}

.trip-timeline__line {
    position: relative;
    height: 2px;
    margin: 6px 0 5px;
    background: var(--line-strong);
    border-radius: 2px;
}

.trip-timeline__line::before,
.trip-timeline__line::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    transform: translateY(-50%);
}

.trip-timeline__line::before { left: 0; }
.trip-timeline__line::after { right: 0; background: var(--surface); border: 2px solid var(--brand); }

.trip-price {
    text-align: right;
}

.trip-price small {
    display: block;
    color: var(--muted);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.trip-price strong {
    font: 700 1.22rem/1 var(--font-sans);
    letter-spacing: -0.03em;
}

.trip-price .seats-left {
    display: block;
    margin-top: 5px;
    color: var(--success);
    font-size: 10.5px;
    white-space: nowrap;
}

.trip-price .seats-left.is-low { color: var(--danger); }

.trip-card .btn {
    align-self: center;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.empty-state__icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--brand);
}

.empty-state__icon .icon { width: 26px; height: 26px; }

.empty-state h3 { font-size: 1.35rem; }
.empty-state p { margin: 9px auto 20px; max-width: 44ch; color: var(--muted); font-size: 13.5px; }

/* ---------- Trip detail ---------- */

.trip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
    padding: 34px 0 26px;
    border-bottom: 1px solid var(--line);
}

.trip-header h1 {
    font-size: clamp(1.9rem, 3.4vw, 2.8rem);
}

.trip-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 12.5px;
}

.trip-header__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trip-header__meta .icon { width: 14px; height: 14px; color: var(--brand); }

.trip-header__badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 26px;
    align-items: start;
    padding-top: 28px;
}

.summary-card {
    position: sticky;
    top: 98px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.summary-card__head {
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.summary-card__body {
    padding: 20px 22px;
}

.summary-trip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.summary-trip .icon {
    width: 18px;
    height: 18px;
    color: var(--brand);
    margin-top: 3px;
}

.summary-trip strong { display: block; font-size: 14px; }
.summary-trip span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }

.summary-route {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.summary-route .icon { width: 17px; height: 17px; color: var(--muted); }

.fare-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}

.fare-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--ink-2);
    font-size: 13px;
}

.fare-line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

.fare-line--total {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

.fare-line--muted { color: var(--muted); font-size: 11.5px; }

.summary-actions {
    padding: 0 22px 22px;
}

.summary-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.55;
    text-align: center;
}

.user-count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font: 650 11px/1 var(--font-sans);
}

.user-count strong { font-size: 13px; }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.card__head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.card__head h2,
.card__head h3 {
    font-size: 1.28rem;
}

.card__body {
    padding: 24px;
}

.card__body--flush {
    padding: 0;
}

.stop-select {
    display: grid;
    grid-template-columns: 1fr 44px 1fr;
    gap: 10px;
    align-items: end;
}

.seat-panel {
    margin-top: 18px;
}

.seat-map-wrap {
    padding: 26px 24px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    overflow-x: auto;
}

.deck-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 360px;
    margin: 0 auto 14px;
    color: var(--muted);
    font: 700 9.5px/1 var(--font-sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.driver-seat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.driver-seat .icon { width: 14px; height: 14px; }

.seat-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    min-width: 300px;
}

.seat-row {
    display: grid;
    grid-template-columns: 22px 42px 42px 20px 42px 42px;
    gap: 8px;
    align-items: center;
}

.seat-aisle {
    width: 20px;
}

.seat-row-label {
    display: grid;
    place-items: center;
    color: var(--muted);
    font: 600 10px/1 var(--font-sans);
}

.seat {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: var(--surface);
    color: var(--ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font: 650 10.5px/1 var(--font-sans);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.seat:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
}

.seat input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seat:has(input:checked) {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-ink);
    box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--brand) 80%, transparent);
}

.seat.is-taken {
    border-style: dashed;
    background: transparent;
    color: var(--muted);
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.55;
}

.seat.is-taken:hover {
    transform: none;
    border-color: var(--line-strong);
    color: var(--muted);
}

.seat.is-locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.seat.is-locked:hover {
    transform: none;
    border-color: var(--line-strong);
    color: var(--ink-2);
}

.seat.is-accessible::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

.seat-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 10.5px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
}

.legend-swatch--selected { background: var(--brand); border-color: var(--brand); }
.legend-swatch--taken { border-style: dashed; opacity: 0.5; }

.seat-error {
    margin-top: 14px;
    text-align: center;
    color: var(--danger);
    font-size: 12px;
}

.seat-helper {
    margin-top: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
}

.stop-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
}

.stop-item {
    display: grid;
    grid-template-columns: 56px 18px 1fr;
    gap: 10px;
    min-height: 54px;
}

.stop-item__time {
    color: var(--ink);
    font: 650 12px/1.4 var(--font-sans);
    font-variant-numeric: tabular-nums;
    text-align: right;
    padding-top: 3px;
}

.stop-item__rail {
    position: relative;
    display: flex;
    justify-content: center;
}

.stop-item__dot {
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--brand);
    z-index: 1;
}

.stop-item__rail::after {
    content: "";
    position: absolute;
    top: 14px;
    bottom: -4px;
    width: 1px;
    background: var(--line-strong);
}

.stop-item:last-child .stop-item__rail::after { display: none; }

.stop-item__name {
    padding-bottom: 16px;
}

.stop-item__name strong {
    display: block;
    font-size: 13px;
    font-weight: 650;
}

.stop-item__name span {
    color: var(--muted);
    font-size: 11px;
}

.stop-item.is-active .stop-item__dot {
    background: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.stop-item.is-active .stop-item__name strong { color: var(--brand); }

/* ---------- Checkout ---------- */

.steps {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.step {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 13px 7px 7px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font: 600 11.5px/1 var(--font-sans);
    background: var(--surface);
}

.step__num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 10px;
}

.step.is-done { color: var(--success); border-color: transparent; background: var(--success-soft); }
.step.is-done .step__num { background: var(--success); color: #fff; }
.step.is-active { color: var(--brand); border-color: var(--brand); }
.step.is-active .step__num { background: var(--brand); color: var(--brand-ink); }

.step-divider {
    width: 16px;
    height: 1px;
    background: var(--line-strong);
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 26px;
    align-items: start;
}

.hold-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 18px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--ink);
    font-size: 12.5px;
}

.hold-banner .icon { width: 20px; height: 20px; color: var(--accent); flex: none; }

.hold-banner strong {
    font-variant-numeric: tabular-nums;
    font-size: 14px;
}

.hold-banner__text { flex: 1; }

.form-section {
    padding: 24px;
}

.form-section + .form-section {
    border-top: 1px solid var(--line);
}

.form-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.form-section__head h2 {
    font-size: 1.32rem;
}

.form-section__head p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12.5px;
}

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

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

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field label,
.field-label {
    font: 650 11px/1.3 var(--font-sans);
    letter-spacing: 0.04em;
    color: var(--ink-2);
}

.field .hint {
    color: var(--muted);
    font-size: 10.5px;
}

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

.input,
.select,
.textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font: 500 14px/1.45 var(--font-sans);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.input::placeholder,
.textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.select {
    appearance: none;
    padding-right: 38px;
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: right 13px center;
    cursor: pointer;
}

.select:hover {
    border-color: var(--line-strong);
}

.select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Native dropdown lists: keep the option surface on-theme in both modes. */
select option,
select optgroup {
    background-color: var(--surface);
    color: var(--ink);
}

.textarea {
    min-height: 92px;
    resize: vertical;
}

.input--sm {
    min-height: 38px;
    border-radius: 10px;
    font-size: 12.5px;
}

.passenger-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px;
    background: var(--surface-2);
}

.passenger-card + .passenger-card {
    margin-top: 12px;
}

.passenger-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.seat-badge {
    min-width: 38px;
    height: 30px;
    padding: 0 8px;
    border-radius: 9px;
    background: var(--brand);
    color: var(--brand-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 700 11px/1 var(--font-sans);
    font-variant-numeric: tabular-nums;
}

.passenger-card__head strong { font-size: 13px; }
.passenger-card__head span { margin-left: auto; color: var(--muted); font-size: 11px; }

.passenger-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 12px;
}

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

.payment-option {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.payment-option:hover { border-color: var(--line-strong); }

.payment-option:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.payment-option input {
    position: absolute;
    opacity: 0;
}

.payment-option__icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    color: var(--brand);
    flex: none;
}

.payment-option strong { display: block; font-size: 12.5px; }
.payment-option span { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }

.alert {
    display: flex;
    gap: 11px;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.55;
    border: 1px solid transparent;
}

.alert .icon { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.alert--info { background: var(--brand-soft); color: var(--brand); }
.alert--warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert--danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert--success { background: var(--success-soft); color: var(--success); }

.summary-card .alert { margin: 0 22px 18px; }

/* ---------- Pay ---------- */

.pay-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 26px;
    align-items: start;
    max-width: 980px;
    margin: 0 auto;
}

.pay-panel {
    padding: 30px;
}

.pay-panel h1 {
    font-size: 1.9rem;
    margin-bottom: 8px;
}

.pay-panel__sub {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.card-mock {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 24px;
    min-height: 190px;
    color: #effffb;
    background:
        radial-gradient(420px 240px at 85% 10%, rgba(255, 255, 255, 0.2), transparent 60%),
        linear-gradient(135deg, #0d5686, #072b45);
    box-shadow: 0 26px 50px -26px rgba(6, 34, 30, 0.65);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-mock::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -90px;
    width: 220px;
    height: 220px;
    border: 1px dashed rgba(255, 255, 255, 0.28);
    border-radius: 50%;
}

.card-mock__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(239, 255, 251, 0.65);
}

.card-chip {
    width: 34px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #e6c17b, #b88a39);
    position: relative;
}

.card-chip::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(70, 45, 8, 0.35);
    border-radius: 3px;
}

.card-number {
    font: 600 1.18rem/1 var(--font-monospace, ui-monospace, "SFMono-Regular", monospace);
    letter-spacing: 0.14em;
    margin: 22px 0 16px;
}

.card-meta {
    display: flex;
    gap: 32px;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(239, 255, 251, 0.6);
}

.card-meta strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 11.5px;
    letter-spacing: 0.04em;
}

.sandbox-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 18px;
    padding: 10px 13px;
    border: 1px dashed var(--line-strong);
    border-radius: 10px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.sandbox-note .icon { width: 15px; height: 15px; color: var(--accent); flex: none; }

.pay-total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 22px 0;
    padding: 18px 0;
    border-top: 1px dashed var(--line);
    border-bottom: 1px dashed var(--line);
}

.pay-total span { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.pay-total strong { font: 700 1.8rem/1 var(--font-sans); letter-spacing: -0.04em; }

/* ---------- Booking ---------- */

.status-hero {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 28px 0 22px;
}

.status-hero__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    flex: none;
}

.status-hero__icon .icon { width: 27px; height: 27px; }
.status-hero--pending .status-hero__icon { background: var(--accent-soft); color: var(--accent); }
.status-hero--danger .status-hero__icon { background: var(--danger-soft); color: var(--danger); }

.status-hero h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}

.status-hero__sub {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.status-hero__badge { margin-left: auto; align-self: center; }

.booking-layout--booking {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.pass {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.pass + .pass { margin-top: 14px; }

.pass::before,
.pass::after {
    content: "";
    position: absolute;
    right: 181px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--line);
    z-index: 2;
}

.pass::before { top: -11px; }
.pass::after { bottom: -11px; }

.pass__body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pass__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pass__route {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.pass__route span { color: var(--muted); }

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

.pass__label {
    color: var(--muted);
    font: 600 9px/1.3 var(--font-sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pass__value {
    margin-top: 4px;
    font: 650 12.5px/1.4 var(--font-sans);
    overflow-wrap: anywhere;
}

.pass__stub {
    position: relative;
    padding: 18px;
    border-left: 1px dashed var(--line-strong);
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.qr {
    width: 132px;
    height: 132px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    display: grid;
    place-items: center;
}

.qr img,
.qr canvas,
.qr svg {
    width: 100% !important;
    height: 100% !important;
}

.pass__stub small {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ticket-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

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

.info-row {
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.info-row span {
    display: block;
    color: var(--muted);
    font: 600 9.5px/1.3 var(--font-sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.info-row strong {
    display: block;
    margin-top: 4px;
    font: 650 13px/1.4 var(--font-sans);
}

.cancel-box {
    padding: 20px 22px;
    border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent);
    border-radius: var(--radius-md);
    background: var(--danger-soft);
}

.cancel-box h3 {
    font-size: 1.15rem;
    color: var(--danger);
}

.cancel-box p {
    margin: 7px 0 14px;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.6;
}

.cancel-box form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cancel-box .input { background: var(--surface); }

.refund-lines {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 10px 0 14px;
    font-size: 11.5px;
}

.refund-lines div { display: flex; justify-content: space-between; gap: 12px; }

/* ---------- Find / auth ---------- */

.narrow-page {
    min-height: 66vh;
    display: flex;
    align-items: center;
    padding: 56px 0;
}

.narrow-card {
    width: min(520px, 100%);
    margin: 0 auto;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.narrow-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}

.narrow-card__icon .icon { width: 24px; height: 24px; }

.narrow-card h1 {
    font-size: 2.1rem;
}

.narrow-card p {
    margin: 9px 0 24px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 26px;
    align-items: stretch;
    padding: 46px 0 20px;
}

.auth-aside {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border-radius: 28px;
    background:
        radial-gradient(620px 360px at 90% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
        linear-gradient(145deg, #0c6b60, #073a34 70%);
    color: #effffb;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    min-height: 520px;
}

.auth-aside::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -110px;
    width: 330px;
    height: 330px;
    border: 1px dashed rgba(255, 255, 255, 0.24);
    border-radius: 50%;
}

.auth-aside h2 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.25rem);
    max-width: 12ch;
    line-height: 1.02;
}

.auth-aside p {
    margin-top: 16px;
    max-width: 38ch;
    color: rgba(239, 255, 251, 0.7);
    font-size: 13.5px;
    line-height: 1.7;
}

.auth-quote {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.45;
}

.auth-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-form h1 { font-size: 2.4rem; }

.auth-form > p {
    margin: 8px 0 26px;
    color: var(--muted);
    font-size: 13px;
}

.demo-box {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    background: var(--surface-2);
    font-size: 11px;
    color: var(--muted);
    line-height: 1.8;
}

.demo-box code {
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 10.5px;
}

/* ---------- Flash toasts ---------- */

.toast-stack {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 40px));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 20px 44px -24px rgba(10, 30, 25, 0.55);
    font-size: 12.5px;
    line-height: 1.5;
    animation: toast-in 0.3s cubic-bezier(0.22, 0.9, 0.35, 1);
}

.toast .icon { width: 17px; height: 17px; flex: none; color: var(--brand); margin-top: 1px; }
.toast--success { border-left-color: var(--success); }
.toast--success .icon { color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--error .icon { color: var(--danger); }
.toast--info { border-left-color: var(--accent); }
.toast--info .icon { color: var(--accent); }
.toast__message { flex: 1; }

.toast__close {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0;
    line-height: 1;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

/* ---------- Admin ---------- */

.admin-shell {
    display: grid;
    grid-template-columns: 262px minmax(0, 1fr);
    min-height: 100vh;
    background: var(--bg);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 14px;
    border-right: 1px solid var(--line);
    background: var(--surface);
    z-index: 70;
}

.admin-brand {
    padding: 4px 10px 14px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.admin-brand .brand-name { font-size: 19px; }
.admin-brand .brand-sub { font-size: 7.5px; }

.admin-company {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.admin-company__name {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-company__role {
    color: var(--muted);
    font-size: 10px;
    text-transform: capitalize;
    margin-top: 2px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    flex: 1;
    padding-right: 2px;
}

.nav-group-label {
    padding: 14px 12px 6px;
    color: var(--muted);
    font: 700 9px/1 var(--font-sans);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 41px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--ink-2);
    font: 600 13px/1 var(--font-sans);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-nav a .icon {
    width: 17px;
    height: 17px;
    color: var(--muted);
    transition: color 0.15s ease;
}

.admin-nav a:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav a:hover .icon { color: var(--ink); }

.admin-nav a.is-active {
    background: var(--brand-soft);
    color: var(--brand);
}

.admin-nav a.is-active .icon { color: var(--brand); }

.admin-nav a .nav-count {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
}

.admin-sidebar__foot {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
}

.admin-user__name { font-size: 12.5px; font-weight: 650; line-height: 1.25; }
.admin-user__meta { color: var(--muted); font-size: 10px; }

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 30px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(16px);
}

.admin-topbar__title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.admin-topbar__meta {
    color: var(--muted);
    font-size: 11.5px;
    padding-left: 14px;
    border-left: 1px solid var(--line);
}

.admin-topbar__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-content {
    padding: 28px 30px 56px;
    width: 100%;
    max-width: 1440px;
}

.admin-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.admin-page-head h1 {
    font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.admin-page-head p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12.5px;
}

.admin-page-head__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--surface);
    align-items: center;
    justify-content: center;
}

.admin-overlay {
    display: none;
}

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

.kpi {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.kpi__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.kpi__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}

.kpi__icon .icon { width: 17px; height: 17px; }
.kpi__icon--accent { background: var(--accent-soft); color: var(--accent); }
.kpi__icon--danger { background: var(--danger-soft); color: var(--danger); }

.kpi__label {
    color: var(--muted);
    font-size: 10.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 650;
}

.kpi__value {
    margin-top: 14px;
    font: 700 1.7rem/1 var(--font-sans);
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.kpi__foot {
    margin-top: 6px;
    color: var(--muted);
    font-size: 10.5px;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
}

.panel__head h2 {
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.panel__head .muted { font-size: 11px; }

.panel__body {
    padding: 20px;
}

.panel__body--flush { padding: 0; }

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
    gap: 16px;
    margin-top: 16px;
}

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

.chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 180px;
    padding-top: 12px;
}

.chart__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}

.chart__bar-wrap {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
}

.chart__bar {
    width: 100%;
    min-height: 4px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 55%, transparent));
    position: relative;
    transition: filter 0.2s ease;
}

.chart__bar:hover { filter: brightness(1.12); }

.chart__bar.is-today {
    background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent));
}

.chart__label {
    color: var(--muted);
    font: 600 9.5px/1 var(--font-sans);
}

.chart__value {
    color: var(--ink);
    font: 650 10.5px/1 var(--font-sans);
    font-variant-numeric: tabular-nums;
}

.list {
    display: flex;
    flex-direction: column;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--line);
}

.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }

.list-row__main { min-width: 0; flex: 1; }
.list-row__title { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row__meta { color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.list-row__end { text-align: right; flex: none; }
.list-row__amount { font: 700 12.5px/1.2 var(--font-sans); }
.list-row__status { margin-top: 4px; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.table-wrap--flush { border: 0; border-radius: 0; box-shadow: none; }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

table.data th {
    position: sticky;
    top: 0;
    padding: 11px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font: 700 9.5px/1.2 var(--font-sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

table.data td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .cell-strong { font-weight: 650; color: var(--ink); }
table.data .cell-muted { color: var(--muted); font-size: 11px; }
table.data .row-link { color: var(--brand); font-weight: 650; }

.progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.progress__fill {
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}

.progress__fill--warn { background: var(--accent); }
.progress__fill--danger { background: var(--danger); }

.progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 120px;
}

.progress-row .progress { flex: 1; }

.progress-row span {
    color: var(--muted);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.toolbar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.toolbar .field { min-width: 150px; }
.toolbar .input,
.toolbar .select { height: 40px; min-height: 40px; font-size: 12.5px; border-radius: 10px; }
.toolbar .btn { height: 40px; }

.filter-pills {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-pills a {
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font: 600 11px/1 var(--font-sans);
}

.filter-pills a.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

[data-theme="dark"] .filter-pills a.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-ink);
}

.scan-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 16px;
    align-items: start;
}

.scan-box {
    padding: 22px;
}

.scan-input {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 12px !important;
    letter-spacing: 0.02em;
    min-height: 76px !important;
    resize: vertical;
}

.scan-result {
    display: flex;
    gap: 13px;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    font-size: 12px;
}

.scan-result .icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.scan-result--ok { background: var(--success-soft); border-color: transparent; color: var(--success); }
.scan-result--danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.scan-result--warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.scan-result strong { display: block; font-size: 13px; margin-bottom: 3px; }
.scan-result p { font-size: 11.5px; line-height: 1.5; }
.scan-result__meta {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px dashed currentColor;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    font-size: 10.5px;
    opacity: 0.9;
}

.trip-picker {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
}

.trip-pill {
    flex: none;
    min-width: 178px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.trip-pill:hover { border-color: var(--line-strong); }

.trip-pill.is-active {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.trip-pill strong { display: block; font-size: 11.5px; }
.trip-pill span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.trip-pill.is-active span { color: var(--brand); }

.route-admin-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.route-admin-card + .route-admin-card { margin-top: 12px; }

.route-admin-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.route-admin-card h3 { font-family: var(--font-sans); font-size: 14px; font-weight: 700; }
.route-admin-card__code { color: var(--muted); font-size: 10px; letter-spacing: 0.08em; margin-top: 3px; }

.stop-strip {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 11px;
    color: var(--ink-2);
}

.stop-strip__node {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stop-strip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.stop-strip__line {
    width: 18px;
    height: 1px;
    background: var(--line-strong);
}

.schedule-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.settlement-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.settlement-row:last-child { border-bottom: 0; }

.summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.summary-strip__item {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.summary-strip__item span {
    display: block;
    color: var(--muted);
    font: 650 9px/1.2 var(--font-sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.summary-strip__item strong {
    display: block;
    margin-top: 6px;
    font: 700 1.12rem/1 var(--font-sans);
    letter-spacing: -0.03em;
}

/* ---------- Print ---------- */

.print-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
}

.print-page {
    width: min(760px, 100% - 40px);
    margin: 0 auto;
    padding: 24px 0 48px;
}

.print-ticket {
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface);
}

.print-ticket__top {
    padding: 26px 28px;
   background: linear-gradient(135deg, #0d6e63, #073f38);
    color: #effffb;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.print-ticket__brand {
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: -0.03em;
}

.print-ticket__label {
    margin-top: 4px;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(239, 255, 251, 0.6);
}

.print-ticket__body {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 20px;
    padding: 26px 28px;
}

.print-route {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.print-ticket__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.print-ticket__qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-left: 1px dashed var(--line-strong);
    padding-left: 20px;
}

.print-ticket__qr .qr { width: 160px; height: 160px; }

.print-ticket__foot {
    padding: 16px 28px 22px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.6;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.print-signature {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--ink);
    font-size: 12px;
}

@media print {
    body { background: #fff !important; color: #111 !important; }
    body::before { display: none; }
    .site-header, .site-footer, .toast-stack, .print-toolbar, .no-print,
    .admin-sidebar, .admin-topbar, .admin-overlay { display: none !important; }
    .print-page { width: 100%; max-width: none; padding: 0; }
    .print-ticket { border-color: #bbb; box-shadow: none; }
    .admin-shell { display: block; }
    .admin-content { padding: 0; }
    .pass, .print-ticket { break-inside: avoid; }
    a { text-decoration: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .route-grid,
    .operator-grid,
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .booking-layout,
    .checkout-layout,
    .pay-layout,
    .booking-layout--booking { grid-template-columns: minmax(0, 1fr) 330px; }

    .trip-card { grid-template-columns: 1fr 1.5fr auto; }
    .trip-card .btn { grid-column: 1 / -1; width: 100%; }

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

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

    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { min-height: 280px; padding: 32px; }
}

@media (max-width: 900px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        z-index: 60;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px 18px;
        gap: 2px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

    body.nav-open .site-nav { display: flex; }

    .site-nav a { padding: 12px 10px; border-radius: 8px; }

    .nav-toggle { display: inline-flex; }

    .header-account__name { display: none; }

    .search-card {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .search-card .swap-btn { display: none; }
    .search-card .btn { grid-column: 1 / -1; width: 100%; margin-top: 4px; }

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

    .trip-times { grid-column: 1 / -1; order: 2; }
    .trip-price { order: 3; }
    .trip-card > .trip-operator { order: 1; }
    .trip-card > .btn { order: 4; grid-column: 1 / -1; }

    .booking-layout,
    .checkout-layout,
    .pay-layout,
    .booking-layout--booking { grid-template-columns: 1fr; }

    .summary-card { position: static; }

    .pass { grid-template-columns: 1fr; }
    .pass::before, .pass::after { display: none; }
    .pass__stub { border-left: 0; border-top: 1px dashed var(--line-strong); }

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

    .admin-shell { grid-template-columns: 1fr; }

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 280px;
        transform: translateX(-102%);
        transition: transform 0.28s cubic-bezier(0.32, 0.9, 0.35, 1);
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.25);
    }

    body.admin-nav-open .admin-sidebar { transform: translateX(0); }

    .admin-overlay {
        position: fixed;
        inset: 0;
        z-index: 65;
        background: rgba(4, 14, 11, 0.5);
        backdrop-filter: blur(2px);
    }

    body.admin-nav-open .admin-overlay { display: block; }

    .admin-mobile-toggle { display: inline-flex; }

    .admin-topbar { padding: 0 18px; }
    .admin-content { padding: 22px 18px 44px; }
    .admin-topbar__meta { display: none; }

    .scan-layout { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cta-band { flex-direction: column; align-items: flex-start; }

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

    .print-ticket__body { grid-template-columns: 1fr; }
    .print-ticket__qr { border-left: 0; border-top: 1px dashed var(--line-strong); padding: 20px 0 0; }
}

@media (max-width: 640px) {
    .container,
    .container--wide { width: calc(100% - 32px); }

    .header-inner { height: 68px; gap: 12px; }
    .site-nav { top: 68px; }
    .brand-name { font-size: 20px; }
    .brand-sub { display: none; }
    .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
    .header-actions { gap: 7px; }
    .header-actions .btn--ghost { display: none; }

    .hero { padding-top: 42px; }
    .hero h1 { font-size: clamp(2.7rem, 13vw, 4rem); }
    .hero__stats { gap: 20px; }
    .hero-stat strong { font-size: 1.35rem; }
    .hero__art { display: none; }

    .search-card { grid-template-columns: 1fr; padding: 10px; border-radius: 20px; }
    .search-card .btn { border-radius: 14px; height: 52px; }
    .search-field { padding: 8px 12px; }

    .route-grid,
    .operator-grid,
    .feature-grid { grid-template-columns: 1fr; }

    .section { padding-top: 44px; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }

    .cta-band { padding: 28px 22px; border-radius: 22px; }

    .form-grid,
    .form-grid--3,
    .passenger-grid,
    .payment-options,
    .info-grid { grid-template-columns: 1fr; }

    .trip-header { padding-top: 24px; }
    .status-hero { flex-wrap: wrap; }
    .status-hero__badge { margin-left: 76px; }

    .pass__grid { grid-template-columns: 1fr 1fr; }
    .pass__body { padding: 18px; }

    .trip-times { grid-template-columns: auto 1fr auto; gap: 7px; }
    .trip-time strong { font-size: 1.05rem; }

    .page-head { padding-top: 24px; }

    .kpi-grid,
    .dashboard-grid--even,
    .summary-strip { grid-template-columns: 1fr; }

    .admin-topbar__title { font-size: 1.1rem; }
    .admin-topbar .theme-toggle { display: none; }

    .steps { gap: 5px; }
    .step { padding: 6px 9px 6px 6px; font-size: 10.5px; }
    .step-divider { display: none; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 36px 0 28px; }
    .footer-bottom { flex-direction: column; gap: 8px; }

    .narrow-card { padding: 24px; }
    .auth-form { padding: 24px; }
    .auth-aside { min-height: 240px; }
    .print-page { width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
