:root {
  color-scheme: light;
  --ink: #16211f;
  --muted: #66736f;
  --line: #d8e1de;
  --surface: #ffffff;
  --page: #f3f7f5;
  --green: #0f7a5f;
  --green-dark: #07503f;
  --gold: #d99b28;
  --red: #c8513a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef6f2 0%, var(--page) 48%, #fff 100%);
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.75fr);
  gap: 24px;
  align-items: center;
  padding: 32px 0;
}

.booking-panel,
.ticket-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(27, 55, 48, 0.1);
}

.booking-panel {
  padding: 28px;
}

.ticket-panel {
  padding: 20px;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.eyebrow,
.ticket-label {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.55rem;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid #bfe7d6;
  color: var(--green-dark);
  background: #e8f8f1;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 800;
}

.booking-form {
  display: grid;
  gap: 22px;
}

.route-grid,
.passenger-grid {
  display: grid;
  gap: 14px;
}

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

.passenger-grid {
  grid-template-columns: 1.5fr 1.2fr 0.55fr;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfc;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

input:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(15, 122, 95, 0.22);
  outline-offset: 2px;
}

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

.trip-option {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
  cursor: pointer;
  transition: 160ms ease;
}

.trip-option:hover,
.trip-option.is-selected {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.trip-option strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.trip-option span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.primary-action,
.whatsapp-action,
.payment-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #fff;
  background: var(--green);
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.primary-action:hover,
.whatsapp-action:hover,
.payment-action:hover {
  background: var(--green-dark);
}

.ticket-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(217, 155, 40, 0.12), transparent 35%),
    #fff;
}

.ticket-details {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 12px;
  margin: 22px 0;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.ticket-details span,
.ticket-ref span,
.helper-text {
  color: var(--muted);
}

.ticket-details strong {
  text-align: right;
}

.ticket-ref {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}

#ticketRef {
  color: var(--red);
}

.whatsapp-action,
.payment-action {
  width: 100%;
  margin-top: 16px;
  background: #128c7e;
}

.payment-action {
  margin-top: 10px;
  background: var(--green);
}

.whatsapp-action.disabled,
.payment-action.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.helper-text {
  margin: 12px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .route-grid,
  .passenger-grid,
  .trip-list {
    grid-template-columns: 1fr;
  }
}
