:root {
  --brand: #2d3a8c;
  --brand-dark: #1f2866;
  --ink: #16161d;
  --muted: #6b6b76;
  --line: #e4e4ea;
  --bg: #f6f6f9;
  --card: #ffffff;
  --ok: #157f3b;
  --bad: #b00020;
  --accent: #ff4f9a;
  --radius: 14px;
  font-family: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.5; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
code { background: #eef; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

.topbar { background: var(--brand); color: #fff; text-align: center; font-size: .78rem; font-weight: 700; letter-spacing: .08em; padding: 7px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 4vw, 40px); background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.brand img { height: 40px; }
.header-link { color: var(--ink); font-weight: 600; text-decoration: none; font-size: .95rem; }
.wrap { max-width: 920px; margin: 0 auto; padding: 24px clamp(14px, 4vw, 32px) 60px; }
.wrap.wide { max-width: 1180px; }
.site-footer { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 24px; color: var(--muted); font-size: .85rem; }

.hero { text-align: center; padding: 18px 0 8px; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

.notice { background: #eef7f0; border: 1px solid #bfe3c9; color: #10522a; padding: 12px 16px; border-radius: 10px; margin: 16px 0; }
.error { display: none; background: #fdeef0; border: 1px solid #f3c2ca; color: var(--bad); padding: 12px 16px; border-radius: 10px; margin: 12px 0; }
.error.show { display: block; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .05s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: #111; color: #fff; }
.btn.primary:hover { background: #2a2a33; }
.btn.primary:disabled { background: #9a9aa6; cursor: wait; }
.btn.ghost { background: #fff; border: 1.5px solid var(--ink); color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.big { width: 100%; padding: 16px; font-size: 1.1rem; }
.btn.link, button.link { background: none; border: 0; padding: 4px 6px; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.danger-text { color: var(--bad) !important; }

/* Booking steps */
.booking { display: grid; gap: 18px; margin-top: 18px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 3vw, 26px); transition: opacity .2s; }
.step.disabled { opacity: .45; pointer-events: none; }
.step h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; }

.ride-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ride { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ride:hover { border-color: #b9bde0; }
.ride.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45, 58, 140, .15); }
.ride-name { font-weight: 800; font-size: 1.1rem; }
.ride-price { font-weight: 800; font-size: 1.3rem; color: var(--brand); }
.ride-price small { font-weight: 500; font-size: .8rem; color: var(--muted); }
.ride-blurb { font-size: .92rem; color: #3b3b45; }
.ride-meta { font-size: .8rem; color: var(--muted); margin-top: auto; }

.seat-picker { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); font-weight: 600; }
.stepper { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.stepper button { width: 42px; border: 0; background: #fff; font-size: 1.3rem; cursor: pointer; }
.stepper input { width: 54px; text-align: center; border: 0; font: inherit; font-weight: 800; font-size: 1.1rem; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.picker { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 760px) { .picker { grid-template-columns: 1fr; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-weight: 800; }
.cal-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid.loading { opacity: .5; }
.cal-dow { text-align: center; font-size: .75rem; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-day { height: 42px; border: 0; border-radius: 10px; background: transparent; font: inherit; color: #b5b5bf; text-decoration: line-through; }
.cal-day.open { color: var(--ink); text-decoration: none; font-weight: 700; background: #eef0fa; cursor: pointer; }
.cal-day.open:hover { background: #dfe2f5; }
.cal-day.selected { background: var(--brand) !important; color: #fff; }
.cal-loading { padding: 40px; text-align: center; color: var(--muted); }
.times-title { font-weight: 800; margin-bottom: 10px; min-height: 36px; display: flex; align-items: center; }
.time-list { display: grid; gap: 8px; }
.time { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; }
.time span { font-size: .85rem; color: var(--ok); font-weight: 600; }
.time:hover:not(:disabled) { border-color: var(--brand); }
.time.selected { border-color: var(--brand); background: var(--brand); color: #fff; }
.time.selected span { color: #fff; }
.time:disabled { cursor: not-allowed; color: #a5a5b0; background: #fafafb; }
.time:disabled span { color: #a5a5b0; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } }
.booking:not(.is-seats) .group-only { display: flex; }
.booking.is-seats .group-only { display: none; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
label > .muted { margin-top: -6px; font-weight: 400; font-size: .82rem; }
input, select, textarea { font: inherit; font-weight: 400; padding: 11px 12px; border: 1.5px solid #d4d4dc; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45, 58, 140, .15); }
label.check, label.agree { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
label.check input, label.agree input { width: auto; margin-top: 4px; }
label.agree { margin: 16px 0 6px; font-size: .9rem; color: #3b3b45; }

.summary { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.sum-row.discount { color: var(--ok); font-weight: 600; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 1.2rem; }
.promo { display: flex; gap: 8px; }
.promo input { text-transform: uppercase; }
.promo-msg { font-size: .88rem; min-height: 1.3em; margin-top: 6px; color: var(--muted); }
.promo-msg.ok { color: var(--ok); font-weight: 600; }
.promo-msg.bad { color: var(--bad); }
.secure { text-align: center; color: var(--muted); font-size: .85rem; margin: 12px 0 0; }

/* Panels / confirmation */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); margin: 18px 0; }
.panel.center { text-align: center; }
.panel.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.big-emoji { font-size: 3rem; }
.ride-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; text-align: left; background: var(--bg); border-radius: 12px; padding: 16px; margin: 18px 0; }
.ride-card dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.ride-card dd { margin: 2px 0 0; font-weight: 700; }
.status { display: inline-block; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; background: #eee; }
.status-confirmed { background: #e3f4e8; color: var(--ok); }
.status-cancelled { background: #fdeef0; color: var(--bad); }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #eef0fa; color: var(--brand); }
.pill.warn { background: #fff4d6; color: #7a5700; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 10px clamp(16px, 4vw, 40px); background: var(--brand-dark); }
.admin-nav a, .admin-nav button.link { color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 4px 0; }
.admin-nav form { margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--muted); font-size: .88rem; }
.stats span { display: block; color: var(--ink); font-size: 1.6rem; font-weight: 800; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--ink); border-color: var(--brand); }
.day-group { margin-bottom: 22px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .93rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafafc; padding: 9px 12px; }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #f8f8fc; }
.table tr.faded { opacity: .5; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eee; text-transform: capitalize; white-space: nowrap; }
.badge-confirmed { background: #e3f4e8; color: var(--ok); }
.badge-pending { background: #fff4d6; color: #7a5700; }
.badge-cancelled, .badge-expired { background: #fdeef0; color: var(--bad); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols .panel { margin: 0 0 18px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } .table { font-size: .85rem; } }
.stack { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-form { display: inline; }
input.tiny { width: 90px; display: inline-block; padding: 4px 8px; margin-left: 4px; }
.schedule-row { flex-direction: row; align-items: center; gap: 12px; }
.schedule-row span { width: 100px; flex: none; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.preview { display: grid; gap: 8px; }
.preview-day { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.preview-day strong { width: 110px; flex: none; font-size: .9rem; }
.chip { font-size: .78rem; padding: 3px 8px; border-radius: 999px; background: #eef0fa; white-space: nowrap; }
.chip-private { background: var(--brand); color: #fff; }
.chip-seats { background: #ffe3f0; color: #9b1554; }
.chip-blocked { background: #eee; color: #777; text-decoration: line-through; }
.chip-past { background: #f4f4f6; color: #aaa; }
