/* Quentro — Accept Tickets
   Standalone accept + confirmation flow. Restrained dark/teal brand,
   mobile-first, built to read like a real product, not a template. */

:root {
  --bg: #0b1113;
  --surface: #12181b;
  --surface-2: #171e21;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f2f5f6;
  --muted: #939ba3;
  --faint: #626b73;
  --teal: #2dd4bf;
  --teal-strong: #14b8a6;
  --teal-ink: #04231f;
  --danger: #f87171;
  --radius: 18px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --tap: rgba(45, 212, 191, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background-image:
    radial-gradient(90% 42% at 50% -8%, rgba(45, 212, 191, 0.09), transparent 62%);
}

.frame {
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* ── Brand bar ─────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 26px;
}
.brand__logo {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--line);
}
.brand .name {
  font-size: 17px; font-weight: 650; letter-spacing: -0.02em;
}
.brand .badge {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 550; letter-spacing: 0.01em;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.22);
  padding: 5px 10px; border-radius: 999px;
}
.brand .badge svg { width: 13px; height: 13px; }

/* ── Event header ──────────────────────────────────────── */
.event {
  display: flex; gap: 14px; align-items: center;
  padding: 14px; margin-bottom: 22px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.event__poster {
  width: 66px; height: 66px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
  background: #0d1214;
}
.event__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event .kicker {
  font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 5px;
}
.event h1 { font-size: 18px; font-weight: 680; letter-spacing: -0.02em; line-height: 1.15; }
.event .venue { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.event .when { font-size: 12.5px; color: var(--faint); margin-top: 2px; }

/* ── Lead ──────────────────────────────────────────────── */
.lead { margin-bottom: 20px; }
.lead .count {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  margin-bottom: 12px;
}
.lead .count svg { width: 14px; height: 14px; color: var(--teal); }
.lead h2 { font-size: 25px; font-weight: 720; letter-spacing: -0.03em; line-height: 1.1; }
.lead p { font-size: 14px; line-height: 1.55; color: var(--muted); margin-top: 10px; }

/* ── Form ──────────────────────────────────────────────── */
form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; }
.field label {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  margin-bottom: 8px; letter-spacing: 0.005em;
}
.input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-wrap .ic { width: 18px; height: 18px; color: var(--faint); flex-shrink: 0; }
.input-wrap input {
  flex: 1; border: 0; outline: 0; background: transparent;
  color: var(--text); font-family: var(--font);
  font-size: 16px; padding: 15px 0; letter-spacing: -0.01em;
}
.input-wrap input::placeholder { color: var(--faint); }
.input-wrap:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--tap);
}
.input-wrap:focus-within .ic { color: var(--teal); }
.field .err {
  font-size: 12px; color: var(--danger); margin-top: 7px;
  display: none;
}
.field.error .input-wrap { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14); }
.field.error .err { display: block; }

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  margin-top: 6px;
  border: 0; cursor: pointer;
  font-family: var(--font); font-size: 15.5px; font-weight: 680; letter-spacing: -0.01em;
  color: var(--teal-ink);
  background: var(--teal);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.08s ease, background 0.15s, opacity 0.15s;
}
.btn-primary:hover { background: #34ddc9; }
.btn-primary:active { transform: scale(0.988); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-primary svg { width: 18px; height: 18px; }

/* ── Reassurance + footer ──────────────────────────────── */
.secure {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; color: var(--faint);
  margin-top: 18px;
}
.secure svg { width: 14px; height: 14px; }

.spacer { flex: 1; min-height: 20px; }

.foot {
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; line-height: 1.7; color: var(--faint); text-align: center;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ═══ Success page ═════════════════════════════════════ */
.success-mark {
  width: 60px; height: 60px; margin: 8px auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.30);
}
.success-mark svg { width: 28px; height: 28px; color: var(--teal); }

.success-head { text-align: center; margin-bottom: 24px; }
.success-head h2 { font-size: 24px; font-weight: 720; letter-spacing: -0.03em; }
.success-head p { font-size: 14px; line-height: 1.55; color: var(--muted); margin-top: 10px; }
.success-head .to { color: var(--text); font-weight: 600; }

/* Status block — ordered rows (transfer state, then pass), on-brand, no strip */
.status {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
  overflow: hidden;
}
.status__row {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 16px;
}
.status__row + .status__row { border-top: 1px solid var(--line); }
.status__ic {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}
.status__ic svg { width: 16px; height: 16px; }
.status__ic.ok { background: rgba(45, 212, 191, 0.12); color: var(--teal); }
.status__title {
  font-size: 13.5px; font-weight: 650; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: 4px;
}
.status__sub { font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* Ticket stub — two panels split by a perforation with side notches */
.stub {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.stub__top { display: flex; gap: 13px; align-items: center; padding: 16px; }
.stub__poster {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line);
}
.stub__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stub__top h3 { font-size: 15.5px; font-weight: 680; letter-spacing: -0.02em; }
.stub__top .venue { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

.stub__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.stub__cell { padding: 13px 16px; }
.stub__cell:nth-child(odd) { border-right: 1px solid var(--line); }
.stub__cell:nth-child(n+3) { border-top: 1px solid var(--line); }
.stub__cell .k {
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 5px;
}
.stub__cell .v { font-size: 13.5px; font-weight: 560; color: var(--text); }

/* perforation divider */
.stub__perf {
  position: relative; height: 22px;
  border-top: 1px dashed var(--line-strong);
  background:
    radial-gradient(circle at 0 50%, var(--bg) 11px, transparent 11px) left / 50% 100% no-repeat,
    radial-gradient(circle at 100% 50%, var(--bg) 11px, transparent 11px) right / 50% 100% no-repeat;
}

.stub__qr { display: flex; align-items: center; gap: 14px; padding: 16px; }
.stub__qr .qr {
  width: 74px; height: 74px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  background: #fff; padding: 6px;
}
.stub__qr .qr img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stub__qr .k {
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 5px;
}
.stub__qr .code { font-size: 15px; font-weight: 640; letter-spacing: 0.04em; }

/* Wallet action block */
.wallet-cta { display: flex; flex-direction: column; gap: 11px; }
.wallet-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  font-family: var(--font); font-size: 15px; font-weight: 640; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.08s ease, opacity 0.15s, background 0.15s;
}
.wallet-btn:active { transform: scale(0.988); }
.wallet-btn.apple { background: #fff; color: #000; }
.wallet-btn.apple:hover { background: #f0f0f0; }
.wallet-btn.google { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.wallet-btn.google:hover { border-color: var(--faint); }
.wallet-btn.pdf { background: transparent; color: var(--muted); border-color: var(--line); }
.wallet-btn.pdf:hover { color: var(--text); border-color: var(--line-strong); }
.wallet-btn .glyph { display: inline-flex; }

/* "or" divider between wallet apps and the PDF fallback */
.wallet-or {
  display: flex; align-items: center; gap: 12px;
  margin: 3px 2px; color: var(--faint);
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.wallet-or::before, .wallet-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.wallet-note {
  text-align: center; font-size: 12px; color: var(--faint); margin-top: 14px;
}
.wallet-note a { color: var(--muted); text-decoration: none; }
.wallet-note a:hover { color: var(--text); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 9px;
  background: #0f1518; border: 1px solid var(--line-strong);
  color: var(--text); font-size: 13px; font-weight: 550;
  padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100% - 40px);
}
.toast svg { width: 16px; height: 16px; color: var(--teal); flex-shrink: 0; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
.success-mark { animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

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