/* =====================================================================
   Kenyatta's Extradite - design system
   Mobile first. Every interactive target is at least 44x44px, which is
   what makes the seat map usable one-handed at a bus station.
   ===================================================================== */

:root {
    --green-900: #06301d;
    --green-800: #0b4529;
    --green-700: #0f5132;
    --green-600: #16704a;
    --green-500: #1f8d5f;
    --green-100: #e3f3ea;
    --green-050: #f2faf6;

    --gold-600: #b7791f;
    --gold-500: #d69e2e;
    --gold-100: #fdf3d8;

    --ink-900: #10151b;
    --ink-800: #1f2933;
    --ink-700: #364152;
    --ink-500: #64748b;
    --ink-400: #8b97a8;
    --ink-300: #cbd3dd;
    --ink-200: #e2e8f0;
    --ink-100: #eef2f6;
    --ink-050: #f7f9fb;

    --red-600: #c0392b;
    --red-100: #fdecea;
    --amber-600: #b45309;
    --amber-100: #fef3c7;
    --blue-600: #1d4ed8;
    --blue-100: #e0e7ff;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(16, 21, 27, .06), 0 1px 3px rgba(16, 21, 27, .08);
    --shadow-md: 0 4px 12px rgba(16, 21, 27, .08);
    --shadow-lg: 0 12px 32px rgba(16, 21, 27, .12);

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --wrap: 1120px;
}

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

/* The UA rule for [hidden] is display:none, but any class that sets a
   display value outranks it. Make the attribute win everywhere, so
   toggling `element.hidden` from JS actually hides the element. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-800);
    background: var(--ink-050);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; color: var(--ink-900); font-weight: 700; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.2rem, 3vw, 1.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--green-700); }
a:hover { color: var(--green-600); }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2rem, 720px); margin-inline: auto; }

/* ---------------- Header ---------------- */
.site-header {
    background: var(--green-800);
    color: #fff;
    position: sticky; top: 0; z-index: 40;
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 62px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: var(--gold-500); color: var(--green-900); font-weight: 800; font-size: .85rem; flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-weight: 500; font-size: .68rem; color: #a9d6bf; letter-spacing: .04em; text-transform: uppercase; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-nav a, .site-nav button {
    color: #d6ece0; text-decoration: none; font-size: .9rem; font-weight: 500;
    padding: .55rem .7rem; border-radius: var(--radius-sm); background: none; border: 0; cursor: pointer;
    font-family: inherit;
}
.site-nav a:hover, .site-nav button:hover { background: rgba(255,255,255,.1); color: #fff; }
.site-nav a.is-active { background: rgba(255,255,255,.14); color: #fff; }

/* ---------------- Progress steps ---------------- */
.steps { display: flex; gap: .25rem; overflow-x: auto; padding: .85rem 0; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step { display: flex; align-items: center; gap: .45rem; padding: .35rem .7rem; border-radius: 999px; font-size: .8rem; color: var(--ink-500); white-space: nowrap; flex: none; }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--ink-200); color: var(--ink-500); display: grid; place-items: center; font-size: .72rem; font-weight: 700; flex: none; }
.step.is-done { color: var(--green-700); }
.step.is-done .step-num { background: var(--green-100); color: var(--green-700); }
.step.is-current { background: var(--green-700); color: #fff; font-weight: 600; }
.step.is-current .step-num { background: rgba(255,255,255,.25); color: #fff; }

/* ---------------- Cards & surfaces ---------------- */
.card {
    background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.15rem; }
.card + .card { margin-top: 1rem; }
.card-head { padding: 1rem 1.15rem; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { margin-left: auto; }
.panel { background: #fff; border-radius: var(--radius); border: 1px solid var(--ink-200); overflow: hidden; }

.section { padding: 1.5rem 0; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }

/* ---------------- Hero / search ---------------- */
.hero { background: linear-gradient(160deg, var(--green-800), var(--green-600) 70%, var(--green-500)); color: #fff; padding: 2.5rem 0 4.5rem; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { color: #cfe8db; max-width: 52ch; }
.hero-stats { display: flex; gap: 1.75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.hero-stat strong { display: block; font-size: 1.3rem; }
.hero-stat span { font-size: .8rem; color: #a9d6bf; }
.search-card { margin-top: -3.5rem; position: relative; z-index: 2; box-shadow: var(--shadow-lg); }

/* ---------------- Forms ---------------- */
.field { display: block; margin-bottom: .9rem; }
.field > label, .label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-700); margin-bottom: .35rem; }
.hint { font-size: .78rem; color: var(--ink-500); margin-top: .3rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time],
input[type=number], input[type=password], input[type=search], select, textarea {
    width: 100%; padding: .7rem .8rem; font-family: inherit; font-size: 1rem; color: var(--ink-900);
    background: #fff; border: 1.5px solid var(--ink-300); border-radius: var(--radius-sm);
    transition: border-color .12s, box-shadow .12s; min-height: 46px;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 20px; padding-right: 2.2rem; }
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--red-600); }
.field-error { color: var(--red-600); font-size: .78rem; margin-top: .3rem; font-weight: 500; }
fieldset { border: 0; margin: 0; padding: 0; }

.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--green-700); }

.grid { display: grid; gap: .9rem; }
/* Grid and flex items default to min-width:auto, so one wide child - a data
   table, a long unbroken reference - can push the whole layout sideways.
   Let every layout child shrink; wide content scrolls inside .table-scroll. */
.grid > *, .stat-grid > *, .filters > *,
.checkout-layout > *, .results-layout > *, .footer-grid > * { min-width: 0; }
.card, .panel { min-width: 0; }
.table-scroll { max-width: 100%; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.search-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.15rem; min-height: 46px; font: inherit; font-weight: 600; font-size: .95rem;
    border-radius: var(--radius-sm); border: 1.5px solid transparent; cursor: pointer;
    text-decoration: none; transition: background .12s, border-color .12s, transform .06s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-600); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink-800); border-color: var(--ink-300); }
.btn-secondary:hover { background: var(--ink-050); color: var(--ink-900); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-100); }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger:hover { background: #a93226; color: #fff; }
.btn-gold { background: var(--gold-500); color: var(--green-900); }
.btn-gold:hover { background: var(--gold-600); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: .9rem 1.4rem; min-height: 52px; font-size: 1rem; }
.btn-sm { padding: .45rem .7rem; min-height: 38px; font-size: .82rem; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.btn-row-end { justify-content: flex-end; }

/* ---------------- Flash & callouts ---------------- */
.flash { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: .75rem; font-size: .92rem; border: 1px solid; display: flex; gap: .6rem; align-items: flex-start; }
.flash-success { background: var(--green-050); border-color: #a8d5bd; color: var(--green-800); }
.flash-error   { background: var(--red-100);  border-color: #f0b3ac; color: #8c2b20; }
.flash-info    { background: var(--blue-100); border-color: #b6c4f5; color: #1e3a8a; }
.flash-warning { background: var(--amber-100);border-color: #f0d18a; color: #7c4a04; }

.callout { border-left: 4px solid var(--green-600); background: var(--green-050); padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: .9rem; }
.callout-warn { border-left-color: var(--gold-500); background: var(--gold-100); }

/* ---------------- Badges ---------------- */
.badge {
    display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem;
    border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
    text-transform: uppercase; white-space: nowrap;
}
.badge-ok      { background: var(--green-100); color: var(--green-800); }
.badge-warn    { background: var(--amber-100); color: var(--amber-600); }
.badge-bad     { background: var(--red-100);   color: #8c2b20; }
.badge-info    { background: var(--blue-100);  color: var(--blue-600); }
.badge-neutral { background: var(--ink-100);   color: var(--ink-700); }

/* ---------------- Trip cards ---------------- */
.trip-card { display: grid; gap: 1rem; padding: 1.1rem; }
.trip-top { display: flex; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.trip-operator { font-weight: 700; color: var(--ink-900); }
.trip-bus { font-size: .8rem; color: var(--ink-500); }
.trip-price { margin-left: auto; text-align: right; }
.trip-price strong { display: block; font-size: 1.35rem; color: var(--green-700); letter-spacing: -.02em; }
.trip-price span { font-size: .74rem; color: var(--ink-500); }

.timeline { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; }
.timeline-time { font-size: 1.1rem; font-weight: 700; color: var(--ink-900); }
.timeline-place { font-size: .82rem; color: var(--ink-500); }
.timeline-mid { text-align: center; }
.timeline-line { height: 2px; background: var(--ink-200); position: relative; margin: .4rem 0; }
.timeline-line::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: var(--ink-300); }
.timeline-dur { font-size: .74rem; color: var(--ink-500); font-weight: 600; }

.amenities { display: flex; flex-wrap: wrap; gap: .35rem; }
.amenity { font-size: .72rem; padding: .2rem .5rem; background: var(--ink-100); border-radius: 999px; color: var(--ink-700); }
.trip-foot { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; border-top: 1px solid var(--ink-100); padding-top: .85rem; }
.seats-left { font-size: .85rem; font-weight: 600; color: var(--green-700); }
.seats-left.is-low { color: var(--gold-600); }
.seats-left.is-none { color: var(--red-600); }

/* ---------------- Seat map ---------------- */
.seatmap-wrap { display: grid; gap: 1.25rem; }
.bus-shell {
    border: 2px solid var(--ink-300); border-radius: 22px 22px 14px 14px;
    padding: .85rem; background: #fff; max-width: 420px; margin-inline: auto; width: 100%;
}
.bus-front {
    display: flex; align-items: center; justify-content: space-between;
    padding: .5rem .6rem .8rem; border-bottom: 2px dashed var(--ink-200); margin-bottom: .85rem;
}
.driver-badge { font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: var(--ink-500); text-transform: uppercase; }
.steering { width: 30px; height: 30px; border: 3px solid var(--ink-300); border-radius: 50%; position: relative; }
.steering::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--ink-300); }

.seat-rows { display: grid; gap: .45rem; }
.seat-row { display: grid; gap: .45rem; justify-content: center; }
.seat {
    width: 46px; height: 46px; border-radius: 10px 10px 6px 6px; border: 1.5px solid var(--ink-300);
    background: #fff; color: var(--ink-700); font-size: .78rem; font-weight: 700; font-family: var(--font);
    cursor: pointer; display: grid; place-items: center; padding: 0; position: relative;
    transition: transform .08s, background .12s, border-color .12s;
}
.seat::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 4px; border-radius: 0 0 5px 5px; background: var(--ink-200); }
.seat:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--green-600); }
.seat:focus-visible { outline: 3px solid var(--green-500); outline-offset: 2px; }
.seat.is-available { background: #fff; border-color: var(--ink-300); }
.seat.is-selected  { background: var(--green-700); border-color: var(--green-800); color: #fff; }
.seat.is-selected::after { background: var(--green-900); }
.seat.is-held      { background: var(--amber-100); border-color: #e3c06a; color: var(--amber-600); cursor: not-allowed; }
.seat.is-occupied  { background: var(--ink-200); border-color: var(--ink-300); color: var(--ink-400); cursor: not-allowed; }
.seat.is-disabled  { background: repeating-linear-gradient(45deg, var(--ink-100), var(--ink-100) 4px, #fff 4px, #fff 8px); border-color: var(--ink-200); color: var(--ink-400); cursor: not-allowed; }
.seat-gap { width: 46px; height: 46px; }
.seat-gap.is-aisle { width: 22px; }

.legend { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .8rem; color: var(--ink-700); }
.legend-item { display: flex; align-items: center; gap: .4rem; }
.legend-swatch { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--ink-300); flex: none; }
.legend-swatch.is-selected { background: var(--green-700); border-color: var(--green-800); }
.legend-swatch.is-held { background: var(--amber-100); border-color: #e3c06a; }
.legend-swatch.is-occupied { background: var(--ink-200); }
.legend-swatch.is-disabled { background: repeating-linear-gradient(45deg, var(--ink-100), var(--ink-100) 3px, #fff 3px, #fff 6px); }

.selection-bar {
    position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--ink-200);
    padding: .85rem 1rem; display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
    box-shadow: 0 -4px 16px rgba(16,21,27,.07); z-index: 20;
}
.selection-summary { font-size: .9rem; }
.selection-summary strong { color: var(--ink-900); }
.selection-bar .btn { margin-left: auto; }

.hold-timer {
    display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700;
    padding: .35rem .7rem; border-radius: 999px; background: var(--green-100); color: var(--green-800);
    font-variant-numeric: tabular-nums;
}
.hold-timer.is-urgent { background: var(--red-100); color: #8c2b20; }

/* ---------------- Summary / totals ---------------- */
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: .92rem; }
.summary-row dt { color: var(--ink-500); }
.summary-row dd { margin: 0; font-weight: 600; text-align: right; }
.summary-total { border-top: 2px solid var(--ink-200); margin-top: .5rem; padding-top: .7rem; font-size: 1.1rem; }
.summary-total dd { color: var(--green-700); font-size: 1.25rem; font-weight: 800; }

/* ---------------- Tables ---------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
table.data th, table.data td { padding: .65rem .75rem; text-align: left; border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
table.data th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); background: var(--ink-050); font-weight: 700; white-space: nowrap; }
table.data tbody tr:hover { background: var(--ink-050); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .88em; }

/* ---------------- Stats ---------------- */
.stat-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 1rem; }
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); font-weight: 700; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--ink-900); letter-spacing: -.02em; margin-top: .2rem; }
.stat-sub { font-size: .78rem; color: var(--ink-500); }

.bar-track { height: 8px; border-radius: 4px; background: var(--ink-100); overflow: hidden; margin-top: .4rem; }
.bar-fill { height: 100%; background: var(--green-600); border-radius: 4px; }

/* ---------------- Empty states ---------------- */
.empty { text-align: center; padding: 2.5rem 1.25rem; }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ink-100); display: grid; place-items: center; margin: 0 auto .85rem; font-size: 1.5rem; }
.empty h3 { margin-bottom: .35rem; }
.empty p { color: var(--ink-500); max-width: 44ch; margin-inline: auto; }

/* ---------------- Ticket ---------------- */
.ticket {
    background: #fff; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg); max-width: 460px; margin-inline: auto;
}
.ticket-head { background: var(--green-700); color: #fff; padding: 1.25rem; }
.ticket-head .ref { font-family: var(--mono); font-size: 1.25rem; font-weight: 700; letter-spacing: .04em; }
.ticket-route { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem; }
.ticket-route .city { font-size: 1.35rem; font-weight: 800; color: var(--ink-900); letter-spacing: -.02em; }
.ticket-route .terminal { font-size: .75rem; color: var(--ink-500); }
.ticket-arrow { color: var(--green-600); font-size: 1.1rem; }
.ticket-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 1rem; padding: 0 1.25rem 1.25rem; }
.ticket-cell .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; }
.ticket-cell .v { font-size: 1rem; font-weight: 700; color: var(--ink-900); }
.ticket-perf { border-top: 2px dashed var(--ink-200); position: relative; }
.ticket-perf::before, .ticket-perf::after {
    content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-050);
}
.ticket-perf::before { left: -11px; }
.ticket-perf::after  { right: -11px; }
.ticket-qr { padding: 1.25rem; text-align: center; }
.ticket-qr svg { max-width: 190px; height: auto; }
.ticket-qr p { font-size: .78rem; color: var(--ink-500); margin: .6rem 0 0; }

/* ---------------- Admin shell ---------------- */
.admin-body { background: var(--ink-100); }
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
/* Grid items default to min-width:auto, which lets a wide child (the
   scrolling nav, or a wide table) push the whole page sideways. Allow both
   columns to shrink so their own overflow-x handles the scrolling. */
.admin-shell > * { min-width: 0; }
.admin-side { background: var(--green-900); color: #cfe0d7; padding: .75rem; min-width: 0; }
.admin-side .brand { padding: .5rem .4rem 1rem; max-width: 100%; }
.admin-side .brand-text { min-width: 0; overflow: hidden; }
.admin-nav { display: flex; gap: .2rem; overflow-x: auto; padding-bottom: .3rem; max-width: 100%; scrollbar-width: thin; }
.admin-nav a {
    color: #b9d2c5; text-decoration: none; padding: .55rem .75rem; border-radius: var(--radius-sm);
    font-size: .88rem; font-weight: 500; white-space: nowrap;
}
.admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav a.is-active { background: var(--green-600); color: #fff; font-weight: 600; }
.admin-main { padding: 1.25rem; min-width: 0; }
.admin-head { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; margin-bottom: 1.15rem; }
.admin-head .spacer { margin-left: auto; }

.filters { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.filters .field { margin: 0; }

.pagination { display: flex; gap: .35rem; align-items: center; justify-content: center; padding: 1rem 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .45rem .7rem; border-radius: var(--radius-sm); font-size: .85rem; text-decoration: none; border: 1px solid var(--ink-200); background: #fff; color: var(--ink-700); }
.pagination .is-current { background: var(--green-700); color: #fff; border-color: var(--green-700); font-weight: 700; }

/* ---------------- Misc ---------------- */
.muted { color: var(--ink-500); }
.small { font-size: .82rem; }
.tiny  { font-size: .74rem; }
.strong { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.divider { height: 1px; background: var(--ink-200); margin: 1rem 0; border: 0; }
.chip-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.error-trace { background: var(--ink-900); color: #e2e8f0; padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; font-size: .78rem; }

.spinner {
    width: 42px; height: 42px; border: 4px solid var(--ink-200); border-top-color: var(--green-600);
    border-radius: 50%; animation: spin 900ms linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 3s; }
    * { transition: none !important; }
}

.site-footer { background: var(--green-900); color: #9dc0ae; padding: 2rem 0; margin-top: 2.5rem; font-size: .85rem; }
.site-footer a { color: #cfe8db; }
.footer-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }

/* ---------------- Responsive ---------------- */
@media (min-width: 560px) {
    .search-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
    .seat { width: 52px; height: 52px; font-size: .85rem; }
    .seat-gap { width: 52px; height: 52px; }
    .seat-gap.is-aisle { width: 26px; }
    .results-layout { display: grid; grid-template-columns: 250px 1fr; gap: 1.25rem; align-items: start; }
    .checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
    .checkout-aside { position: sticky; top: 84px; }
}
@media (min-width: 900px) {
    .search-grid { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
    .admin-shell { grid-template-columns: 218px 1fr; }
    .admin-side { padding: 1rem .75rem; }
    .admin-nav { flex-direction: column; overflow: visible; }
    .admin-main { padding: 1.75rem 2rem; }
}
@media (max-width: 559px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .ticket-grid { grid-template-columns: 1fr 1fr; }
    .selection-bar .btn { width: 100%; margin-left: 0; }
}

/* ---------------- Print ---------------- */
@media print {
    body { background: #fff; }
    .site-header, .site-footer, .steps, .selection-bar, .no-print, .admin-side { display: none !important; }
    .ticket { box-shadow: none; border: 1px solid #000; max-width: 100%; page-break-inside: avoid; }
    .card { box-shadow: none; border-color: #999; }
    a[href]::after { content: ""; }
}
