/* Ticket pages. Plain for now; the visual design comes later.
   Brand colours live only here, as tokens (same values as the app's theme). */
:root {
  --brand: #36b6f0; /* electric cyan: primary */
  --accent: #e81e8e; /* magenta: main buttons */
  --accent-strong: #c4127a;
  --bg: #0a0b0e;
  --surface: #14161b;
  --surface-2: #1d2027;
  --line: #2a2e37;
  --ink: #f3f4f6;
  --muted: #a0a7b4;
  --faint: #6b7280;
  --success: #3dd68c;
  --warning: #f5b83d;
  --danger: #f2555a;
  --radius: 18px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* Layout classes below set display, which would otherwise beat the hidden attribute. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
  color: var(--brand);
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 0.75rem;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
  display: grid;
  gap: 16px;
}

.page-wide {
  max-width: 880px;
}

.hero {
  text-align: center;
  padding: 16px 0 8px;
}

.hero-small h1 {
  font-size: 1.8rem;
}

.logo {
  display: block;
  margin: 0 auto 8px;
  height: auto;
}

.eyebrow {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.when {
  font-weight: 600;
  margin: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.center {
  text-align: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  gap: 12px;
}

.card > * {
  margin: 0;
}

.card-accent {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.card-brand {
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
}

.card-success {
  border-color: color-mix(in srgb, var(--success) 45%, transparent);
}

.card-warning {
  border-color: color-mix(in srgb, var(--warning) 45%, transparent);
}

details.card > summary {
  cursor: pointer;
  font-weight: 700;
}

.section {
  display: grid;
  gap: 12px;
  padding: 8px 0;
}

.section > h2 {
  margin: 0;
}

.list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 6px;
}

.faq {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  margin: 8px 0 0;
  color: var(--muted);
}

.price {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price-note {
  color: var(--accent);
  font-weight: 600;
}

.progress {
  display: grid;
  gap: 6px;
}

.bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.bar-mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--ink);
}

.notice {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
}

/* Buttons: big tap targets (riders may wear gloves). */
.btn,
.btn-ghost,
.btn-danger {
  display: block;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn {
  background: var(--accent);
  color: #fff;
}

.btn:hover {
  background: var(--accent-strong);
}

.btn-brand {
  background: var(--brand);
  color: var(--bg);
}

.btn-brand:hover {
  background: var(--brand);
  filter: brightness(0.92);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent);
}

.btn-small {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: var(--bg);
}

.btn-danger-small {
  color: var(--danger);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.link {
  font-weight: 600;
}

/* Forms */
form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  font-weight: 600;
}

.field em {
  color: var(--faint);
  font-style: normal;
  font-weight: 400;
}

.field small {
  color: var(--faint);
}

input,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 600;
}

.check input {
  width: 26px;
  min-height: 26px;
  height: 26px;
  margin: 0;
  flex: none;
  accent-color: var(--accent);
}

.error {
  color: var(--danger);
  font-weight: 600;
}

/* Key-value rows (summary, payment details) */
.rows {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.rows > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 14px;
}

.rows > div + div {
  border-top: 1px solid var(--line);
}

.rows dt {
  grid-column: 1;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
}

.rows dd {
  grid-column: 1;
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.rows .btn-small {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.terms {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.95rem;
}

.prose h3 {
  margin: 1rem 0 0.4rem;
}

.prose h3:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  margin: 0 0 0.75rem;
}

.prose p {
  white-space: pre-line;
}

.qr {
  width: 240px;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
}

.qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.chip {
  justify-self: start;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.chip-success {
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
}

.chip-warning {
  background: color-mix(in srgb, var(--warning) 15%, transparent);
  color: var(--warning);
}

.chip-brand {
  background: color-mix(in srgb, var(--brand) 15%, transparent);
  color: var(--brand);
}

.footer {
  text-align: center;
  color: var(--faint);
  font-size: 0.9rem;
  padding-top: 16px;
}

/* Admin */
.admin-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-head .logo {
  margin: 0;
}

.admin-head h1 {
  font-size: 1.6rem;
  margin: 0;
}

.admin-head > div {
  flex: 1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.stat {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px;
}

.stat p {
  margin: 0;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
}

.row-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.row-between h3 {
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 16px;
}

.facts dt {
  font-size: 0.75rem;
  color: var(--faint);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
