/* RiversJoy — public site styles
   Palette: black, white and two blues. One family (Archivo) used at two widths:
   expanded for display type (like road signage), normal for reading. */
:root {
  --black: #000;
  --ink: #121826;
  --river: #0A3FAE;
  --river-deep: #062A78;
  --signal: #2E7BFF;
  --sky: #DDE8FF;
  --mist: #F3F6FB;
  --line: #DDE4EF;
  --muted: #5B6576;
  --white: #fff;
  --green: #0F8A4F;
  --amber: #B97F00;
  --red: #C8302C;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --tabbar-h: 0px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink);
  background: var(--white); font-variant-numeric: tabular-nums;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; height: auto; }
a { color: var(--river); }
h1, h2, h3, h4 { font-stretch: 115%; font-weight: 800; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--black); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.hidden { display: none !important; }

/* ---- Buttons & forms ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.3rem; border-radius: var(--r-sm); border: 2px solid transparent;
  font: inherit; font-weight: 700; font-stretch: 105%; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s; white-space: nowrap;
}
.btn-primary { background: var(--river); color: #fff; }
.btn-primary:hover { background: var(--river-deep); }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #1d2433; }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--river); color: var(--river); }
.btn-ghost { background: transparent; color: var(--river); padding-inline: .4rem; }
.btn-whatsapp { background: #128C4B; color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: .35rem .8rem; font-size: .875rem; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field { margin-bottom: 1rem; }
.field small { color: var(--muted); display: block; margin-top: .3rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date],
input[type=time], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 50px; padding: .7rem .9rem; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm); appearance: none;
}
select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23121826' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 1rem center; padding-right: 2.5rem; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--river); outline: none; box-shadow: 0 0 0 3px var(--sky); }
input[type=file] { width: 100%; padding: .9rem; border: 1.5px dashed var(--line); border-radius: var(--r-sm); background: var(--mist); }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--river); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r-sm); margin: 0 0 1rem; border-left: 4px solid; background: var(--mist); }
.alert i { margin-top: .2rem; }
.alert-success { border-color: var(--green); background: #EAF7F0; }
.alert-error { border-color: var(--red); background: #FDEEEE; }
.alert-warning { border-color: var(--amber); background: #FFF6E0; }
.alert-info { border-color: var(--river); background: #EEF3FF; }
.flash-wrap { padding-top: 1rem; }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge-green { background: #E3F5EC; color: var(--green); }
.badge-amber { background: #FFF2D1; color: #8A5E00; }
.badge-red { background: #FDE6E5; color: var(--red); }
.badge-blue { background: var(--sky); color: var(--river); }
.badge-grey { background: #ECEFF4; color: var(--muted); }

/* ---- Header ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand img { display: block; height: 35px; width: auto; }
.main-nav { display: flex; gap: .2rem; margin-left: auto; align-items: center; }
.main-nav a { padding: .55rem .75rem; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.main-nav a:hover { background: var(--mist); }
.main-nav a.active { color: var(--river); }
.main-nav .nav-account { border: 1.5px solid var(--line); margin-left: .4rem; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.4rem; width: 48px; height: 48px; cursor: pointer; }
@media (max-width: 980px) {
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; padding: .75rem 1.25rem 1.25rem; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(6, 42, 120, .12); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .9rem .75rem; }
  .main-nav .nav-account { margin: .4rem 0 0; text-align: center; }
  .nav-toggle { display: block; margin-left: auto; }
  .btn-book { display: none; }
}

/* Booking progress */
.stepper-bar { background: var(--black); color: #fff; }
.stepper { display: flex; list-style: none; padding: 0; margin-block: 0; overflow-x: auto; scrollbar-width: none; }
.stepper li { flex: 1; min-width: 88px; position: relative; padding: .65rem 0 .7rem; font-size: .82rem; font-weight: 600; color: #7F8AA0; text-align: center; }
.stepper li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #262d3b; }
.stepper li.done { color: #fff; }
.stepper li.done::after { background: var(--signal); }
.stepper li.current { color: #fff; }
.stepper li.current::after { background: #fff; }

/* ---- Hero --------------------------------------------------------------- */
.hero { background: var(--black); color: #fff; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 6vw, 4.5rem); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: auto -10% -40% auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(46, 123, 255, .35), transparent); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; position: relative; }
.hero h1 { font-stretch: 125%; font-size: clamp(2.2rem, 5.2vw, 4.1rem); line-height: 1.02; margin-bottom: 1.1rem; max-width: 13ch; }
.hero-lede { color: #C3CCDD; font-size: 1.1rem; max-width: 46ch; margin-bottom: 2rem; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.search-card { background: #fff; color: var(--ink); border-radius: var(--r-lg); padding: 1.4rem; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.search-card h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.search-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: end; }
.search-grid .field { margin: 0; }
.swap-btn { width: 44px; height: 50px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--mist); cursor: pointer; color: var(--river); }
.search-row-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: .6rem; margin: .8rem 0 1rem; }
.pax { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-sm); min-height: 50px; }
.pax button { width: 48px; height: 48px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--river); }
.pax input { border: 0; text-align: center; min-height: 46px; padding: 0; font-weight: 700; }
.pax input:focus { box-shadow: none; }
@media (max-width: 560px) {
  .search-grid { grid-template-columns: 1fr; }
  .swap-btn { justify-self: end; margin: -.3rem 0; height: 40px; transform: rotate(90deg); }
}

/* Departure board — the one loud element on the page */
.board { background: #05070C; border: 1px solid #1F2635; border-radius: var(--r-lg); overflow: hidden; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 1.2rem; background: var(--river); }
.board-head strong { font-stretch: 120%; font-size: 1.05rem; }
.board-head span { font-size: .8rem; color: #CFE0FF; }
.board-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .78rem 1.2rem; border-top: 1px solid #161C28; text-decoration: none; color: #fff; }
.board-row:hover { background: #0C1220; }
.board-city { font-weight: 700; font-stretch: 112%; font-size: 1.05rem; }
.board-state { color: #7F8AA0; font-size: .8rem; }
.board-fare { text-align: right; font-weight: 800; font-stretch: 112%; color: #8FBBFF; font-size: 1.05rem; }
.board-veh { text-align: right; color: #7F8AA0; font-size: .8rem; }
.board-foot { padding: .85rem 1.2rem; border-top: 1px solid #161C28; }
.board-foot a { color: #fff; font-weight: 600; }

/* ---- Sections ----------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--mist); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head p { color: var(--muted); max-width: 52ch; margin: 0; }

.route-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.route-tile { display: block; padding: 1.2rem 1.25rem; border: 1.5px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s; }
.route-tile:hover { border-color: var(--river); }
.route-tile .rt-cities { font-weight: 800; font-stretch: 112%; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.route-tile .rt-cities i { color: var(--signal); font-size: .85rem; }
.route-tile .rt-meta { display: flex; justify-content: space-between; margin-top: .6rem; color: var(--muted); font-size: .9rem; }
.route-tile .rt-meta strong { color: var(--river); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2rem 2.5rem; }
.feature i { font-size: 1.4rem; color: var(--river); margin-bottom: .8rem; display: block; }
.feature h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.feature p { color: var(--muted); margin: 0; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; border-top: 3px solid var(--black); padding-top: 1rem; }
.steps li::before { content: counter(s); font-weight: 800; font-stretch: 125%; font-size: 2rem; color: var(--river); display: block; line-height: 1; margin-bottom: .6rem; }
.steps strong { display: block; font-size: 1.05rem; margin-bottom: .2rem; }
.steps span { color: var(--muted); }

.cta-band { background: var(--river); color: #fff; border-radius: var(--r-lg); padding: clamp(2rem, 5vw, 3rem); display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .3rem; }
.cta-band p { margin: 0; color: #D6E4FF; }
.cta-band .btn { background: #fff; color: var(--river); }

.page-head { background: var(--black); color: #fff; padding: 2.4rem 0 2.2rem; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .3rem; }
.page-head p { color: #B8C2D6; margin: 0; }
.page-body { padding: 2rem 0 4rem; }

/* ---- Cards & panels ----------------------------------------------------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; }
.panel + .panel { margin-top: 1rem; }
.panel h2, .panel h3 { font-size: 1.15rem; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.panel-title h2, .panel-title h3 { margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .92rem; }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--black); margin-top: 1rem; padding-top: .9rem; font-weight: 800; }
.total-row strong { font-size: 1.5rem; font-stretch: 112%; color: var(--river); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty i { font-size: 2rem; color: var(--line); display: block; margin-bottom: .8rem; }

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; align-items: start; }
.layout-2 .sticky { position: sticky; top: 96px; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: 1fr; } .layout-2 .sticky { position: static; } }

/* ---- Search results ----------------------------------------------------- */
.search-bar { background: var(--black); padding: 1rem 0; }
.search-bar form { display: grid; grid-template-columns: 1fr 1fr 180px 130px auto; gap: .5rem; }
.search-bar select, .search-bar input { min-height: 46px; }
.search-bar .pax { background: #fff; min-height: 46px; }
.search-bar .pax button, .search-bar .pax input { height: 42px; min-height: 42px; }
@media (max-width: 860px) { .search-bar form { grid-template-columns: 1fr 1fr; } .search-bar .btn { grid-column: span 2; } }

.date-strip { display: flex; gap: .4rem; overflow-x: auto; padding: 1rem 0; scrollbar-width: thin; }
.date-strip a { flex: 0 0 auto; min-width: 84px; text-align: center; padding: .5rem .6rem; border: 1.5px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); line-height: 1.2; }
.date-strip a small { display: block; color: var(--muted); font-size: .75rem; }
.date-strip a.on { background: var(--black); color: #fff; border-color: var(--black); }
.date-strip a.on small { color: #B8C2D6; }

.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { padding: .45rem .9rem; border: 1.5px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .88rem; background: #fff; }
.chip.on { border-color: var(--river); color: var(--river); background: #EEF3FF; }

.trip-card { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 1.2rem; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem; background: #fff; margin-bottom: .8rem; }
.trip-card:hover { border-color: #B9C7E0; }
.trip-times { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; }
.trip-times .t { font-weight: 800; font-stretch: 112%; font-size: 1.35rem; line-height: 1.1; }
.trip-times .c { color: var(--muted); font-size: .85rem; }
.trip-line { position: relative; height: 2px; background: var(--line); text-align: center; }
.trip-line span { position: relative; top: -.7rem; background: #fff; padding: 0 .5rem; font-size: .8rem; color: var(--muted); }
.trip-bus { font-size: .92rem; }
.trip-bus strong { display: block; }
.seats-left { font-size: .85rem; font-weight: 600; color: var(--green); }
.seats-left.low { color: var(--amber); }
.seats-left.none { color: var(--red); }
.trip-price { text-align: right; }
.trip-price .p { font-weight: 800; font-stretch: 115%; font-size: 1.5rem; color: var(--river); display: block; line-height: 1.1; margin-bottom: .5rem; }
@media (max-width: 760px) {
  .trip-card { grid-template-columns: 1fr; }
  .trip-price { display: flex; justify-content: space-between; align-items: center; text-align: left; border-top: 1px solid var(--line); padding-top: .9rem; }
  .trip-price .p { margin: 0; }
}

/* ---- Seat map ----------------------------------------------------------- */
.vehicle { background: #fff; border: 2px solid var(--black); border-radius: 40px 40px 18px 18px; padding: 1.4rem 1.2rem 1.4rem; max-width: 360px; margin: 0 auto; position: relative; }
.vehicle::before { content: "Front"; position: absolute; top: -.75rem; left: 50%; transform: translateX(-50%); background: var(--black); color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .7rem; border-radius: 99px; }
.seat-row { display: grid; gap: .55rem; margin-bottom: .55rem; }
.seat, .seat-space, .seat-driver { aspect-ratio: 1; min-height: 52px; }
.seat {
  border: 2px solid var(--green); background: #F0FAF4; color: var(--ink); border-radius: 12px 12px 8px 8px;
  font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; position: relative; transition: transform .08s;
}
.seat::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 5px; height: 4px; border-radius: 4px; background: currentColor; opacity: .18; }
.seat:hover { transform: translateY(-1px); }
.seat.selected { background: var(--river); border-color: var(--river); color: #fff; }
.seat.occupied { background: #D5D9E0; border-color: #D5D9E0; color: #7B8494; cursor: not-allowed; }
.seat.reserved { background: #FFE9A8; border-color: #E8C04B; color: #6B4E00; cursor: not-allowed; }
.seat.blocked { background: #2A3040; border-color: #2A3040; color: #6B7488; cursor: not-allowed; }
.seat.mine { background: var(--river); border-color: var(--river); color: #fff; }
.seat:disabled:hover { transform: none; }
.seat-driver { display: grid; place-items: center; color: var(--muted); font-size: 1.5rem; border: 2px dashed var(--line); border-radius: 50%; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; justify-content: center; margin: 1.2rem 0 0; padding: 0; list-style: none; font-size: .85rem; }
.legend li { display: flex; align-items: center; gap: .4rem; }
.legend i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; border: 2px solid; }
.lg-available { background: #F0FAF4; border-color: var(--green) !important; }
.lg-selected { background: var(--river); border-color: var(--river) !important; }
.lg-occupied { background: #D5D9E0; border-color: #D5D9E0 !important; }
.lg-reserved { background: #FFE9A8; border-color: #E8C04B !important; }
.lg-blocked { background: #2A3040; border-color: #2A3040 !important; }

.selection-seats { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 2rem; }
.selection-seats .tag { background: var(--river); color: #fff; font-weight: 700; border-radius: 6px; padding: .2rem .55rem; }

.timer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--black); color: #fff; border-radius: var(--r); padding: .9rem 1.2rem; margin-bottom: 1rem; }
.timer p { margin: 0; color: #B8C2D6; font-size: .9rem; }
.timer strong { font-size: 1.8rem; font-stretch: 115%; font-weight: 800; color: #8FBBFF; font-variant-numeric: tabular-nums; }
.timer.low strong { color: #FFB4A8; }

.mobile-bar { display: none; }
@media (max-width: 900px) {
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: .7rem 1rem; gap: 1rem; align-items: center; justify-content: space-between; box-shadow: 0 -8px 24px rgba(6, 42, 120, .08); }
  .mobile-bar .mb-total { font-weight: 800; font-stretch: 112%; font-size: 1.2rem; }
  .mobile-bar .mb-seats { font-size: .8rem; color: var(--muted); }
  body.has-mobile-bar { padding-bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- Passenger forms / payment ------------------------------------------ */
.passenger { border: 1.5px solid var(--line); border-radius: var(--r); padding: 1.2rem; margin-bottom: 1rem; }
.passenger-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.passenger-head h3 { margin: 0; }
.seat-pill { background: var(--black); color: #fff; font-weight: 800; padding: .3rem .8rem; border-radius: 99px; font-size: .9rem; }

.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.pay-tab { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: var(--r); padding: 1rem; cursor: pointer; font: inherit; color: var(--ink); }
.pay-tab strong { display: block; font-stretch: 110%; }
.pay-tab span { color: var(--muted); font-size: .85rem; }
.pay-tab i { color: var(--river); font-size: 1.2rem; margin-bottom: .4rem; display: block; }
.pay-tab.on { border-color: var(--river); background: #F3F7FF; }
.bank-box { background: var(--black); color: #fff; border-radius: var(--r); padding: 1.2rem; margin-bottom: 1.2rem; }
.bank-box .kv dt { color: #8C97AC; }
.bank-box .kv dd { color: #fff; }
.copy { background: none; border: 1px solid #3A4458; color: #8FBBFF; border-radius: 6px; padding: .1rem .5rem; margin-left: .4rem; cursor: pointer; font: inherit; font-size: .8rem; }

/* ---- Tickets ------------------------------------------------------------ */
.ticket { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin: 0 auto 1.5rem; max-width: 760px; display: grid; grid-template-columns: minmax(0, 1fr) 230px; page-break-inside: avoid; }
.ticket-main { padding: 1.5rem 1.6rem; }
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.ticket-top img { height: 30px; width: auto; }
.ticket-kind { font-weight: 800; font-stretch: 120%; letter-spacing: .02em; color: var(--river); }
.ticket-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.ticket-route .city { font-size: 1.6rem; font-weight: 800; font-stretch: 120%; line-height: 1.05; }
.ticket-route .city small { display: block; font-size: .8rem; font-weight: 500; font-stretch: 100%; color: var(--muted); }
.ticket-route .city:last-child { text-align: right; }
.ticket-route i { color: var(--signal); }
.ticket-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem 1rem; }
.ticket-fields div small { display: block; color: var(--muted); font-size: .76rem; }
.ticket-fields div strong { font-size: .98rem; }
.ticket-stub { background: var(--black); color: #fff; padding: 1.5rem 1.2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; text-align: center; position: relative; border-left: 2px dashed #fff; }
.ticket-stub::before, .ticket-stub::after { content: ""; position: absolute; left: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--mist); }
.ticket-stub::before { top: -12px; }
.ticket-stub::after { bottom: -12px; }
.ticket-seat { font-size: .8rem; color: #B8C2D6; }
.ticket-seat strong { display: block; font-size: 2.6rem; font-stretch: 125%; color: #fff; line-height: 1; }
.qr { background: #fff; padding: 8px; border-radius: 8px; width: 150px; height: 150px; }
.qr img, .qr canvas { width: 100% !important; height: 100% !important; }
.ticket-status { font-weight: 800; font-size: .85rem; }
.ticket-status.valid { color: #6FE3A6; }
.ticket-status.bad { color: #FF9C91; }
.ticket-foot { grid-column: 1 / -1; padding: .8rem 1.6rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ticket-terms { max-width: 760px; margin: 0 auto 1.5rem; font-size: .85rem; color: var(--muted); }
.ticket-terms ul { padding-left: 1.2rem; margin: .3rem 0 0; }
@media (max-width: 680px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket-stub { border-left: 0; border-top: 2px dashed #fff; flex-direction: row; justify-content: space-around; }
  .ticket-stub::before, .ticket-stub::after { top: -13px; left: auto; }
  .ticket-stub::before { left: -12px; }
  .ticket-stub::after { right: -12px; bottom: auto; }
  .ticket-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qr { width: 130px; height: 130px; }
}
.doc-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 0 auto 1.5rem; max-width: 760px; }
.doc-bg { background: var(--mist); }

/* Receipt */
.receipt { background: #fff; max-width: 760px; margin: 0 auto 1.5rem; border: 1px solid var(--line); border-radius: var(--r); padding: 2rem; }
.receipt-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--black); padding-bottom: 1.2rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.receipt-head img { height: 34px; width: auto; }
.receipt-head .muted { font-size: .85rem; }
.receipt h1 { font-size: 1.6rem; margin: 0; }
.receipt table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.receipt th, .receipt td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .92rem; }
.receipt th { color: var(--muted); font-weight: 600; }
.paid-stamp { display: inline-block; border: 3px solid var(--green); color: var(--green); font-weight: 800; font-stretch: 125%; padding: .3rem 1rem; border-radius: 8px; transform: rotate(-4deg); font-size: 1.3rem; }

/* Verification */
.verify-card { max-width: 520px; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.verify-status { padding: 1.6rem; text-align: center; color: #fff; }
.verify-status i { font-size: 2.6rem; display: block; margin-bottom: .5rem; }
.verify-status h2 { margin: 0; font-stretch: 125%; }
.verify-status.ok { background: var(--green); }
.verify-status.warn { background: #A36B00; }
.verify-status.bad { background: var(--red); }
.verify-status.done { background: var(--river); }
.verify-body { padding: 1.5rem; }

/* ---- Tables (account) --------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-weight: 700; background: var(--mist); padding: .75rem .9rem; white-space: nowrap; }
table.data td { padding: .75rem .9rem; border-top: 1px solid var(--line); vertical-align: middle; }
.booking-cards { display: grid; gap: .8rem; }
.booking-card { border: 1.5px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; background: #fff; }
.booking-card .bc-top { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.booking-card .bc-route { font-weight: 800; font-stretch: 112%; font-size: 1.1rem; }
.booking-card .bc-meta { color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.booking-card .bc-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

.account-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.5rem; padding: 2rem 0 4rem; }
.account-nav { display: flex; flex-direction: column; gap: .2rem; }
.account-nav a { padding: .75rem 1rem; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 600; display: flex; gap: .7rem; align-items: center; }
.account-nav a i { width: 18px; color: var(--muted); }
.account-nav a.on { background: var(--black); color: #fff; }
.account-nav a.on i { color: #8FBBFF; }
@media (max-width: 820px) { .account-shell { grid-template-columns: 1fr; } .account-nav { flex-direction: row; overflow-x: auto; } .account-nav a { white-space: nowrap; } }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.stat { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; background: #fff; }
.stat small { color: var(--muted); display: block; font-size: .85rem; }
.stat strong { font-size: 1.7rem; font-stretch: 115%; font-weight: 800; }
.next-trip { background: var(--black); color: #fff; border-radius: var(--r-lg); padding: 1.5rem; margin-bottom: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.next-trip .nt-route { font-size: 1.6rem; font-weight: 800; font-stretch: 118%; }
.next-trip p { color: #B8C2D6; margin: 0; }

/* Auth */
.auth { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--river); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: flex-end; }
.auth-side h2 { font-stretch: 125%; font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 14ch; }
.auth-side p { color: #D6E4FF; max-width: 38ch; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.25rem; }
.auth-form form { width: min(420px, 100%); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; min-height: 0; } .auth-side { display: none; } }

/* Fare table */
.fare-state { margin-bottom: 2rem; }
.fare-state h2 { font-size: 1.2rem; border-bottom: 3px solid var(--black); padding-bottom: .5rem; margin-bottom: 0; }
table.fares { width: 100%; border-collapse: collapse; }
table.fares th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
table.fares td { padding: .8rem .5rem; border-bottom: 1px solid var(--line); }
table.fares td.city a { font-weight: 800; font-stretch: 112%; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
table.fares td.city a:hover { color: var(--river); }
table.fares td.fare { font-weight: 700; white-space: nowrap; }
table.fares td.na { color: #B0B8C6; }

.pager { display: flex; gap: .3rem; justify-content: center; margin: 1.5rem 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; }
.pager .current { background: var(--black); color: #fff; border-color: var(--black); }

/* ---- Footer & tab bar --------------------------------------------------- */
.site-footer { background: var(--black); color: #C3CCDD; padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.footer-grid a { display: block; color: #C3CCDD; text-decoration: none; padding: .25rem 0; }
.footer-grid a:hover { color: #fff; }
.footer-about { margin-top: 1rem; max-width: 34ch; }
.muted-light { color: #7F8AA0; font-size: .9rem; margin-top: .5rem; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid #1F2635; margin-top: 2.5rem; padding-top: 1.2rem; font-size: .85rem; color: #7F8AA0; flex-wrap: wrap; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --tabbar-h: 64px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .tabbar a { height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; }
  .tabbar a i { font-size: 1.15rem; }
  .tabbar a.on { color: var(--river); }
  .site-footer { padding-bottom: 2rem; }
}

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

/* ---- Print: tickets, receipts, manifests -------------------------------- */
@media print {
  .site-header, .site-footer, .tabbar, .doc-actions, .no-print, .flash-wrap, .mobile-bar { display: none !important; }
  body { padding: 0; background: #fff; }
  .doc-bg { background: #fff; }
  .ticket, .receipt { border-color: #999; box-shadow: none; }
  .ticket-stub { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page-body { padding: 0; }
}
