/* SafiriHub — soft teal theme: white cards, rounded corners, bottom tab bar */
:root {
  --ink: #22313a;        /* text */
  --ink-2: #4a5d68;      /* secondary text */
  --teal: #1d9bb0;       /* brand accent */
  --teal-d: #137a8c;     /* pressed / borders on teal */
  --deep: #0e4a57;       /* dark teal: info bar, footer, hero sky */
  --sun: #f4a63a;        /* sunset amber: highlights and prices */
  --sun-d: #d9861a;
  --tint: #e6f4f6;       /* light teal wash */
  --paper: #f3f6f6;      /* page background */
  --card: #ffffff;
  --line: #e2e9ec;
  --muted: #8a98a2;
  --ok: #2a9d6f;
  --warn: #c98510;
  --bad: #d4553f;
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 8px 28px rgba(34, 72, 84, .08);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='2' cy='2' r='1' fill='%230e4a57' fill-opacity='.07'/%3E%3C/svg%3E"); }
a { color: var(--teal-d); }
h1, h2 { font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
h2 { font-size: 1.15rem; }
small, .muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .04em; }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.main { padding: 20px 0 64px; min-height: 70vh; }
.nowrap { white-space: nowrap; }
.ta-r { text-align: right; }
:focus-visible { outline: 3px solid rgba(59,165,182,.45); outline-offset: 2px; }

/* Top bar */
.topbar { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); }
.brand svg { width: 20px; height: 20px; fill: #fff; }
.brand svg .glass { fill: var(--teal); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; white-space: nowrap; font-size: .92rem; font-weight: 600; }
.nav a:hover { background: var(--tint); color: var(--teal-d); }
.nav a[aria-current="page"] { color: var(--teal-d); background: var(--tint); }
.lang { display: inline-flex; background: var(--paper); border-radius: 999px; padding: 3px; margin: 0 4px; }
.lang a { padding: 5px 10px; font-size: .78rem; font-weight: 800; color: var(--muted); }
.lang a[aria-current="true"] { color: #fff; background: var(--teal); }
.nav-out { color: var(--muted) !important; }

/* Bottom tab bar (customer pages on phones) */
.tabbar { display: none; }
@media (max-width: 759px) {
  .is-public .nav-desktop { display: none; }
  .is-public .main { padding-bottom: 110px; }
  .is-public .footer { padding-bottom: 110px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(34,72,84,.07);
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); }
  .tab { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; text-decoration: none; color: #a8b4bb; font-size: .7rem; font-weight: 700; }
  .tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tab[aria-current="page"] { color: var(--teal); }
  .tab-main { position: relative; top: -18px; justify-self: center; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
    background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(59,165,182,.45); border: 5px solid #fff; }
  .tab-main svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
}

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px;
  border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--teal); color: var(--teal-d); }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-d); border-color: var(--teal-d); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.inline { display: inline; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: .85rem; color: var(--ink-2); }
input, select { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r);
  font: inherit; color: var(--ink); background: #fff; }
input:focus, select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 4px rgba(59,165,182,.15); }
.input-sm { width: 110px; min-height: 34px; border-radius: 10px; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.check input { width: 20px; min-height: 20px; accent-color: var(--teal); }
.panel { background: var(--card); border-radius: var(--r-lg); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.narrow { max-width: 480px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; align-items: end; }
.form-grid .btn, .form-grid .check { margin-bottom: 14px; }
.form-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.form-row .field { flex: 1 1 220px; }
.form-row .btn { margin-bottom: 14px; }
details.panel summary { cursor: pointer; }
details.panel[open] summary { margin-bottom: 16px; }

/* Flash */
.flash { padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; font-weight: 600; }
.flash-ok { background: #e3f5ee; color: #1d6f4f; }
.flash-err { background: #fcebe7; color: #a63b28; }

/* Home: greeting + summary cards */
.greet { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 600; margin: 6px 0 4px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--tint); color: var(--teal-d); font-weight: 800; flex: none; }
.avatar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.home-title { font-size: clamp(1.9rem, 7vw, 2.6rem); margin: 0 0 18px; }
.home { display: grid; gap: 0 22px; }
@media (min-width: 860px) { .home { grid-template-columns: 1fr 420px; align-items: start; } }
.row-card { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.row-card .icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #fdeee9; color: var(--bad); flex: none; }
.row-card .icon.teal { background: var(--tint); color: var(--teal-d); }
.row-card .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.row-card strong { display: block; font-size: 1.05rem; }
.row-card small { display: block; }
.row-card .chev { margin-left: auto; color: var(--muted); font-size: 1.4rem; line-height: 1; }
.search h2 { margin-bottom: 14px; }
.od { position: relative; }
.swap { position: absolute; right: 44px; top: 50%; transform: translateY(-62%); width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--tint); color: var(--teal-d); font-size: 1.05rem; cursor: pointer; z-index: 1; }
.od select { padding-right: 64px; }
.popular h2 { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 10px 16px; background: var(--card); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); }
.chip:hover { color: var(--teal-d); }

/* Results */
.route-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.route-head h1 { margin-bottom: 6px; }
.arrow { color: var(--teal); }
.link { font-weight: 700; text-decoration: none; }
.meta-line { margin: 0 0 18px; color: var(--ink-2); }
.daybar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 18px; }
.daybar input { width: auto; }
.daybar .btn { background: var(--card); border-color: transparent; box-shadow: var(--shadow); }
.empty { text-align: center; padding: 36px 16px; background: var(--card); border-radius: var(--r-lg); margin-bottom: 20px; box-shadow: var(--shadow); }
.trips { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.trip { background: var(--card); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.trip-link { text-decoration: none; color: inherit; }
.trip-link:hover { box-shadow: 0 10px 32px rgba(34,72,84,.14); }
.trip-op { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.trip-od { font-weight: 700; font-size: 1.05rem; }
.trip-times { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.trip-times small { display: block; }
.time { font-size: 1.6rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.trip-line { text-align: center; border-top: 2px dotted var(--line); padding-top: 4px; }
.trip-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 -4px -4px; border-radius: 16px; background: var(--tint); }
.price { font-size: 1.15rem; font-weight: 800; }
.trip-foot .btn { white-space: nowrap; flex: none; }
.daybar .btn { white-space: nowrap; }
.daybar strong { text-align: center; font-size: .95rem; }
@media (max-width: 480px) { .daybar .lbl { display: none; } .daybar .btn { width: 44px; padding: 0; font-size: 1.2rem; } }
.low { color: var(--bad); font-weight: 700; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--paper); color: var(--muted); }
.badge.ok { background: #e0f4ec; color: var(--ok); }
.badge.warn { background: #fdf1db; color: var(--warn); }
.badge.bad { background: #fce6e1; color: var(--bad); }

/* Seat picker shaped like the bus */
.booking { display: grid; gap: 0 20px; }
@media (min-width: 860px) { .booking { grid-template-columns: minmax(320px, 400px) 1fr; align-items: start; } }
.bus { max-width: 340px; margin: 0 auto; padding: 14px 16px 18px; border: 2px solid var(--line); border-radius: 40px 40px 18px 18px; background: #fbfdfd; }
.bus-front { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.door { width: 30px; height: 6px; background: var(--line); border-radius: 3px; }
.wheel { width: 26px; height: 26px; border: 4px solid var(--teal); border-radius: 50%; position: relative; }
.wheel::after { content: ""; position: absolute; inset: 7px; background: var(--teal); border-radius: 50%; }
.seat-grid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; }
.aisle { min-height: 1px; }
.seat { position: relative; display: block; }
.seat input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.seat span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 12px 12px 6px 6px;
  border: 1.5px solid #cfdce1; background: #fff; font-weight: 700; font-size: .88rem; cursor: pointer; user-select: none; color: var(--ink-2);
  transition: transform .08s ease; }
.seat input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(59,165,182,.35); }
.seat input:focus-visible + span { outline: 3px solid rgba(59,165,182,.45); outline-offset: 2px; }
.seat.taken span { background: #eef2f4; border-color: #eef2f4; color: #b9c4ca; cursor: not-allowed; }
.legend { display: flex; justify-content: center; gap: 16px; padding: 0; margin: 14px 0 0; list-style: none; font-size: .85rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; border: 1.5px solid #cfdce1; }
.legend .sw-mine { background: var(--teal); border-color: var(--teal); }
.legend .sw-taken { background: #eef2f4; border-color: #eef2f4; }
.summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; margin: 4px 0 14px; border-radius: 16px; background: var(--tint); }
.summary-total strong { font-size: 1.3rem; color: var(--teal-d); }

/* Payment */
.facts { display: grid; gap: 10px; margin: 0 0 16px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--paper); padding-bottom: 8px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 700; }
.hold { background: var(--tint); color: var(--teal-d); padding: 10px 14px; border-radius: var(--r); }
.methods { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.methods legend { font-weight: 600; font-size: .85rem; color: var(--ink-2); margin-bottom: 6px; }
.method { position: relative; }
.method input { position: absolute; opacity: 0; }
.method span { display: block; padding: 13px; border: 1.5px solid var(--line); border-radius: var(--r); text-align: center; font-weight: 700; cursor: pointer; }
.method input:checked + span { border-color: var(--teal); background: var(--tint); color: var(--teal-d); }
.method input:focus-visible + span { outline: 3px solid rgba(59,165,182,.45); }
.note { font-size: .85rem; color: var(--muted); text-align: center; }

/* E-ticket (screen + A4 print) */
.tickets { display: grid; gap: 22px; margin: 16px 0; }
.eticket { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; display: grid; gap: 12px; padding-bottom: 0; }
.et-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; color: #fff;
  background: linear-gradient(120deg, var(--teal) 0%, var(--teal-d) 100%); }
.et-brand { display: flex; align-items: center; gap: 10px; }
.et-brand .brand-mark { background: #fff; width: 38px; height: 38px; }
.et-brand .brand-mark svg { width: 22px; height: 22px; fill: var(--teal); }
.et-brand .brand-mark svg .glass { fill: #fff; }
.et-brand strong { display: block; font-size: 1.15rem; line-height: 1.1; }
.et-brand small, .et-title small { display: block; color: rgba(255,255,255,.85); font-size: .75rem; }
.et-title { text-align: right; }
.et-title strong { font-size: 1.2rem; letter-spacing: .02em; }
.et-box { margin: 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 12px; }
.et-box > div { display: grid; align-content: start; gap: 2px; min-width: 0; }
.et-4 { grid-template-columns: repeat(2, 1fr); }
.et-3 { grid-template-columns: repeat(3, 1fr); }
.et-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .et-4 { grid-template-columns: 1.3fr 1fr .8fr 1.3fr; } .et-2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 479px) { .et-3 { grid-template-columns: 1fr; } }
.et-l { font-size: .68rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.et-box b { font-size: .95rem; overflow-wrap: anywhere; }
.et-sm { font-size: .8rem !important; }
.et-lg { font-size: 1.15rem !important; }
@media (max-width: 479px) { .et-box b.mono.et-lg { font-size: .95rem !important; overflow-wrap: normal; } .et-title strong { font-size: 1rem; } }
.et-xl { font-size: 1.6rem !important; line-height: 1; color: var(--teal-d); }
.et-op { display: flex; align-items: center; gap: 8px; }
.et-op i { font-style: normal; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--tint); color: var(--teal-d); font-weight: 800; font-size: .75rem; flex: none; }
.et-journey { margin: 0 16px; padding: 16px 18px; border-radius: 16px; background: var(--teal-d); color: #fff;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.et-journey .et-l { color: rgba(255,255,255,.75); }
.et-journey strong { display: block; font-size: clamp(1.05rem, 4vw, 1.5rem); line-height: 1.1; }
.et-journey small { color: rgba(255,255,255,.85); }
.et-dur { display: grid; justify-items: center; gap: 4px; }
.et-dur span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--teal-d); font-size: 1.1rem; }
.et-dur b { font-size: .85rem; }
.et-board { margin: 0 16px; display: grid; gap: 16px; align-items: center; }
@media (min-width: 640px) { .et-board { grid-template-columns: 220px 1fr; } }
.et-qr { display: grid; justify-items: center; gap: 4px; text-align: center; }
.et-qr .mono { font-weight: 700; }
.et-qr small { font-size: .78rem; }
.qr { width: 170px; height: 170px; padding: 6px; background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.eticket h3 { font-size: .9rem; color: var(--teal-d); margin: 0 0 6px; }
.eticket h4 { font-size: .85rem; color: var(--teal-d); margin: 0 0 4px; }
.eticket ul { margin: 0; padding-left: 18px; font-size: .88rem; display: grid; gap: 4px; }
.et-support p { margin: 0; font-size: .85rem; line-height: 1.55; }
.et-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 20px; font-size: .78rem; color: var(--ink-2); }
.et-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px; background: var(--ink); color: #fff; font-size: .8rem; }
.et-bar b { color: #8fd8e3; }
.et-terms .et-box { display: block; }
.et-terms p { font-size: .88rem; }
.et-table { width: 100%; max-width: 560px; border-collapse: collapse; font-size: .85rem; margin: 10px 0; }
.et-table th, .et-table td { border: 1px solid #b9e0e7; padding: 8px 10px; text-align: center; }
.et-table th { background: var(--tint); color: var(--teal-d); }
.et-more { margin: 0 20px; }
.et-print-terms { display: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Tables & stats (staff) */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--r-lg); margin-bottom: 20px; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--paper); vertical-align: middle; }
.table th { font-size: .78rem; color: var(--muted); font-weight: 700; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.row-muted td { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--card); border-radius: var(--r-lg); padding: 16px 18px; display: grid; box-shadow: var(--shadow); }
.stat span { color: var(--muted); font-size: .85rem; }
.stat strong { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.stat:first-child { background: var(--teal); color: #fff; }
.stat:first-child span, .stat:first-child small { color: rgba(255,255,255,.85); }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); }
.list a { text-decoration: none; color: inherit; display: grid; }
.list a span { color: var(--muted); font-size: .88rem; }

/* Conductor scanner */
.scan { display: grid; gap: 16px; max-width: 520px; }
.reader { border-radius: var(--r-lg); overflow: hidden; background: #000; min-height: 60px; }
.reader:empty { display: none; }
.scan-result { padding: 18px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); font-size: 1.05rem; }
.scan-result p { margin: 0; }
.scan-result.ok { background: var(--ok); color: #fff; }
.scan-result.warn { background: #f4b740; color: var(--ink); }
.scan-result.bad { background: var(--bad); color: #fff; }
.scan-result .who { font-size: 1.4rem; font-weight: 800; display: block; }

.footer { color: var(--muted); font-size: .85rem; padding: 20px 0 40px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  /* One A4/Letter page per seat. Terms are printed in short form on the ticket itself. */
  @page { size: A4 portrait; margin: 8mm; }
  html { font-size: 11.5px; }
  body { background: #fff !important; font-size: 11.5px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar, .footer, .no-print, .actions, .flash, .tabbar, .route-head, .et-terms { display: none !important; }
  .wrap, .is-public .main, .is-staff .main, .main { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
  .tickets { display: block; margin: 0; }
  .eticket { display: grid; gap: 7px; box-shadow: none; border-radius: 0; min-height: 0; max-height: 279mm; overflow: hidden;
    break-inside: avoid; page-break-inside: avoid; break-after: auto; page-break-after: auto; }
  .eticket + .eticket { break-before: page; page-break-before: always; }
  .et-head { padding: 10px 16px; }
  .et-box { margin: 0 10px; padding: 8px 12px; gap: 8px; }
  .et-journey { margin: 0 10px; padding: 10px 14px; }
  .et-board { margin: 0 10px; gap: 12px; grid-template-columns: 170px 1fr; }
  .qr { width: 118px; height: 118px; }
  .et-4 { grid-template-columns: 1.3fr 1fr .8fr 1.3fr; }
  .et-3 { grid-template-columns: repeat(3, 1fr); }
  .et-2 { grid-template-columns: 1fr 1fr; }
  .et-xl { font-size: 1.5rem !important; }
  .et-print-terms { display: block !important; margin: 0 10px; font-size: .78rem; color: var(--ink-2); line-height: 1.4; }
  .et-print-terms p { margin: 0 0 3px; }
  .et-foot { margin: 0 14px; }
  .panel, .table-wrap { box-shadow: none; border: 1px solid #bbb; }
}
@media (max-width: 859px) { .home .search { order: -1; } .home { display: flex; flex-direction: column; } }
.route-pts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.route-pts .input-sm { width: 150px; }

/* ---------- Public site: info bar, hero, sections, footer ---------- */
.infobar { background: var(--deep); color: #d6ecef; font-size: .82rem; }
.infobar-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; }
.infobar a { color: #d6ecef; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.infobar a:hover { color: #fff; }
.infobar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.info-contacts, .info-right { display: flex; align-items: center; gap: 16px; }
.infobar .lang { background: rgba(255,255,255,.1); margin: 0; }
.infobar .lang a { color: #d6ecef; font-size: .74rem; padding: 3px 10px; }
.infobar .lang a[aria-current="true"] { background: var(--sun); color: var(--deep); }
@media (max-width: 640px) { .hide-sm { display: none !important; } }
.is-public .topbar { position: sticky; }

.hero { position: relative; margin: -20px calc(50% - 50vw) 0; padding: 56px max(16px, calc(50vw - 550px)) 28px; min-height: 430px;
  background: #0e4a57 url("hero.svg") center bottom / cover no-repeat; display: grid; align-content: end; gap: 22px; overflow-x: clip; overflow-y: visible; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,74,87,.35) 0%, rgba(14,74,87,0) 40%, rgba(40,22,10,.25) 100%); pointer-events: none; }
.hero-bus { position: absolute; z-index: 1; width: min(440px, 40vw); left: max(16px, calc(50vw - 560px)); bottom: 118px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.25)); }
.hero-text { position: relative; z-index: 1; max-width: 640px; margin-left: auto; color: #fff; text-align: right; text-shadow: 0 2px 14px rgba(14,40,50,.45); }
.hero-text h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); margin-bottom: 8px; }
.hero-text p { margin: 0; font-size: 1.05rem; color: #fdf3e2; }
@media (max-width: 760px) {
  .hero { min-height: 0; padding-top: 34px; align-content: start; }
  .hero-text { text-align: left; margin: 0; }
  .hero-bus { position: relative; left: auto; bottom: auto; width: 210px; justify-self: end; margin: 4px -4px -34px 0; }
}
.search-bar { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 44px 1fr 190px auto; gap: 10px; align-items: end;
  background: rgba(255,255,255,.97); border-radius: 20px; padding: 16px 18px; box-shadow: 0 18px 40px rgba(14,40,50,.28); }
.search-bar .field { margin: 0; }
.search-bar .swap { position: static; transform: none; width: 44px; height: 46px; border-radius: 12px; margin-bottom: 1px; font-size: 1.1rem; }
.search-bar .btn { height: 48px; padding: 0 26px; background: var(--sun); border-color: var(--sun); color: var(--deep); font-weight: 800; }
.search-bar .btn:hover { background: var(--sun-d); border-color: var(--sun-d); color: #fff; }
@media (max-width: 900px) { .search-bar { grid-template-columns: 1fr 44px 1fr; } .search-bar > .field:nth-of-type(3), .search-bar .btn { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .search-bar { grid-template-columns: 1fr; gap: 12px; }
  .search-bar .swap { position: absolute; right: 26px; top: 82px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; transform: rotate(90deg);
    background: var(--deep); color: var(--sun); box-shadow: 0 4px 10px rgba(14,40,50,.25); margin: 0; }
}

.mine { margin-top: 22px; display: grid; gap: 0 14px; }
@media (min-width: 760px) { .mine { grid-template-columns: 1fr 1fr; } }
.block { margin: 40px 0 0; }
.block > h2, .block-head h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: 16px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: none; }
.steps li { position: relative; background: var(--card); border-radius: var(--r-lg); padding: 22px 20px 20px; box-shadow: var(--shadow); }
.steps li::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 4px; border-radius: 4px 4px 0 0; background: linear-gradient(90deg, var(--teal), var(--sun)); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--deep); color: var(--sun); font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; }
.steps h3, .why h3 { font-size: 1.05rem; margin: 0 0 4px; }
.steps p, .why p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.why { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.why > div { background: var(--card); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.why-i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #fff3e0; color: var(--sun-d); margin-bottom: 12px; }
.why-i svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.companies { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.company { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.company strong { display: block; font-size: .95rem; line-height: 1.2; }
.company small { display: block; }
.co-i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; font-weight: 800; font-size: .8rem; color: #fff;
  background: linear-gradient(135deg, var(--teal) 0%, var(--deep) 100%); }
.company:nth-child(3n+2) .co-i { background: linear-gradient(135deg, var(--sun) 0%, #c9661c 100%); }
.company:nth-child(3n) .co-i { background: linear-gradient(135deg, #5d5470 0%, #2f2a3c 100%); }
.route-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.route-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 14px 16px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border-left: 4px solid var(--teal); }
.route-link:hover { border-left-color: var(--sun); }
.route-link strong { display: block; font-size: .95rem; }
.route-link small { display: block; color: var(--muted); }
.route-price { text-align: right; font-weight: 800; color: var(--deep); white-space: nowrap; font-size: .92rem; }
[data-more] .extra { display: none; }
[data-more].open .extra { display: flex; }
.more-btn { margin-top: 14px; background: var(--card); box-shadow: var(--shadow); border-color: transparent; }
.app-cta { margin: 44px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px; border-radius: 26px; color: #fff;
  background: linear-gradient(120deg, var(--deep) 0%, var(--teal-d) 60%, var(--teal) 100%); position: relative; overflow: hidden; }
.app-cta::before { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(244,166,58,.45), rgba(244,166,58,0) 70%); }
.app-cta h2 { margin-bottom: 6px; }
.app-cta p { margin: 0 0 14px; color: #d6ecef; max-width: 520px; }
.btn-light { background: #fff; color: var(--deep); border-color: #fff; }
.app-ios { font-size: .88rem; }
.app-mark { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 26px; background: rgba(255,255,255,.12); flex: none; }
.app-mark svg { width: 56px; height: 56px; fill: var(--sun); }
.app-mark svg .glass { fill: var(--deep); }
@media (max-width: 560px) { .app-mark { display: none; } }

.site-footer { margin-top: 56px; background: var(--deep); color: #cfe3e7; font-size: .92rem; }
.foot-grid { display: grid; gap: 24px; padding: 36px 0; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: #cfe3e7; text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.site-footer p { margin: 12px 0 0; max-width: 420px; }
.brand-light { color: #fff !important; }
.brand-light .brand-mark { background: var(--sun); }
.brand-light .brand-mark svg .glass { fill: var(--sun); }
.foot-bar { background: rgba(0,0,0,.18); padding: 12px 0; font-size: .82rem; }
.is-public .footer { display: none; }
@media (max-width: 759px) { .site-footer { padding-bottom: 96px; } }
.prose ul { padding-left: 20px; display: grid; gap: 6px; }

/* Searchable town picker */
.combo { position: relative; }
.combo input { padding-right: 34px; }
.combo::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: 14px; box-shadow: 0 14px 34px rgba(14,40,50,.2); }
.combo-list li { padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--tint); color: var(--teal-d); }
.combo-list .none { color: var(--muted); cursor: default; }
.combo select { position: absolute; opacity: 0; pointer-events: none; height: 1px; width: 1px; bottom: 0; left: 10px; min-height: 0; padding: 0; }

/* Results */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; }
.found { color: var(--ink-2); }
@media (max-width: 640px) { .found, .chips-row, .sortby { flex-basis: 100%; } .chips-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; } .fchip { white-space: nowrap; } .sortby select { flex: 1; } }
.found strong { color: var(--deep); font-size: 1.1rem; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.fchip { padding: 6px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .85rem; }
.fchip[aria-current="true"] { background: var(--deep); color: #fff; }
.sortby { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.sortby select { width: auto; min-height: 40px; }
.results { display: grid; gap: 14px; }
.rcard { display: grid; grid-template-columns: 1.3fr 1.2fr auto; gap: 18px; align-items: center; background: var(--card); border-radius: var(--r-lg);
  padding: 18px 20px; box-shadow: var(--shadow); border-left: 5px solid var(--teal); }
.rcard.cls-vip { border-left-color: var(--sun); }
.rcard.cls-semi-luxury { border-left-color: #8fa7b0; }
.rc-info { display: grid; gap: 3px; min-width: 0; }
.rc-op { color: var(--teal-d); font-weight: 800; font-size: .95rem; }
.rc-route { font-size: .92rem; }
.rc-route small { font-weight: 600; color: var(--muted); }
.rc-bus { font-size: .82rem; color: var(--ink-2); }
.cls-badge { font-weight: 800; color: var(--deep); }
.cls-vip .cls-badge { color: var(--sun-d); }
.rc-points { list-style: none; margin: 6px 0 0; padding: 0 0 0 16px; position: relative; font-size: .88rem; display: grid; gap: 4px; }
.rc-points::before { content: ""; position: absolute; left: 4px; top: 9px; bottom: 9px; border-left: 2px dotted #c3d2d7; }
.rc-points li { position: relative; }
.rc-points li::before { content: ""; position: absolute; left: -16px; top: 6px; width: 10px; height: 10px; border-radius: 50%; }
.pt-from::before { background: var(--teal); }
.pt-to::before { background: var(--sun); border-radius: 2px !important; }
.rc-time { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 0 18px; border-left: 1px dashed var(--line); border-right: 1px dashed var(--line); }
.rc-time small { display: block; font-size: .7rem; font-weight: 700; color: var(--muted); }
.rc-time b { display: block; font-size: 1.4rem; line-height: 1.1; letter-spacing: -.02em; }
.rc-time em { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--teal-d); }
.rc-line { position: relative; text-align: center; padding-top: 14px; }
.rc-line span { position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: linear-gradient(90deg, var(--teal) 0 6px, transparent 6px) left / 12px 2px repeat-x; }
.rc-line span::before, .rc-line span::after { content: ""; position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--teal); background: #fff; }
.rc-line span::before { left: -2px; } .rc-line span::after { right: -2px; border-color: var(--sun); }
.rc-line b { font-size: .82rem !important; color: var(--bad); }
.rc-buy { display: grid; justify-items: end; gap: 6px; text-align: right; }
.rc-seats { font-size: .82rem; color: var(--ink-2); }
.rc-seats b { color: var(--deep); }
.rc-seats.low b, .rc-seats.low { color: var(--bad); }
.rc-price { font-size: 1.45rem; font-weight: 800; color: var(--deep); letter-spacing: -.02em; }
.rc-price small { font-size: .75rem; color: var(--muted); }
.rc-buy .btn { background: var(--deep); border-color: var(--deep); }
.rc-buy .btn:hover { background: var(--teal-d); border-color: var(--teal-d); }
@media (max-width: 860px) {
  .rcard { grid-template-columns: 1fr; gap: 14px; }
  .rc-time { padding: 12px 0; border: 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
  .rc-buy { grid-template-columns: 1fr auto; grid-template-areas: "seats btn" "price btn"; justify-items: start; text-align: left; align-items: center; }
  .rc-seats { grid-area: seats; } .rc-price { grid-area: price; } .rc-buy .btn { grid-area: btn; }
}

/* Demo / sample-system warning */
.demo-ribbon { background: repeating-linear-gradient(135deg, #f4a63a 0 14px, #f0b65c 14px 28px); color: #3a2200; text-align: center;
  font-size: .8rem; font-weight: 800; padding: 6px 12px; letter-spacing: .01em; }
.demo-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(9,34,40,.62); backdrop-filter: blur(3px); }
.demo-modal[hidden] { display: none; }
.demo-box { position: relative; width: min(480px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px; padding: 26px 22px 20px;
  box-shadow: 0 30px 60px rgba(0,0,0,.3); border-top: 8px solid var(--sun); }
.demo-badge { display: inline-block; background: var(--deep); color: var(--sun); font-weight: 800; font-size: .75rem; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.demo-box h2 { font-size: 1.4rem; margin-bottom: 8px; }
.demo-box p { margin: 0 0 10px; color: var(--ink-2); }
.demo-box ul { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 6px; }
.demo-box li strong { color: var(--bad); }
.demo-contact { display: grid; gap: 4px; background: var(--tint); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; font-size: .92rem; }
.demo-contact a { font-weight: 700; }
body.modal-open { overflow: hidden; }
.demo-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; }
.demo-watermark span { transform: rotate(-24deg); font-size: clamp(1.6rem, 6vw, 3.4rem); font-weight: 800; color: rgba(212,85,63,.22); border: 6px solid rgba(212,85,63,.22);
  padding: 6px 18px; border-radius: 14px; white-space: nowrap; }
.eticket { position: relative; }
@media print { .demo-modal, .demo-ribbon { display: none !important; } }
