/* RAVENIGHT — flyer / box-office styles. Local only (CSP default-src 'self'). */

:root {
  --black: #0b0b0d;
  --ink: #121215;
  --ink-2: #18181c;
  --line: #27262c;
  --line-2: #3a3842;
  --text: #f2f0f5;
  --text-2: #a9a5b2;
  --text-3: #75717e;
  --purple: #9d6cff;
  --purple-2: #b896ff;
  --yellow: #e6ff3c;
  --yellow-2: #f1ff8c;
  --on-yellow: #101200;
  --green: #35d07f;
  --red: #ff4f61;
  --amber: #ffb224;

  --display: "Bahnschrift", "Avenir Next Condensed", "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --r: 4px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;

  color-scheme: dark;
  font-family: var(--body);
  color: var(--text);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--black); font-size: 16px; line-height: 1.5; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p a, .link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--purple); }
p a:hover, .link:hover { color: var(--purple-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: progress; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--yellow); color: var(--on-yellow); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.poster-type { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; line-height: .9; font-stretch: condensed; }
.muted { color: var(--text-2); }
.fine { font-size: .82rem; color: var(--text-3); line-height: 1.5; }
.mono { font-family: var(--mono); font-size: .9em; }
small { font-size: .84rem; color: var(--text-3); }
.label { display: block; font-size: .78rem; color: var(--text-3); margin-bottom: 4px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: grid; gap: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--ink-2); color: var(--text); font-weight: 600; font-size: .94rem; line-height: 1; white-space: nowrap; }
.btn:hover { border-color: var(--text-3); background: #1f1f24; }
.btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); }
.btn-primary:hover { background: var(--yellow-2); border-color: var(--yellow-2); }
.btn-dark { background: var(--black); border-color: var(--black); color: var(--yellow); }
.btn-dark:hover { background: #000; border-color: #000; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #ff6878; border-color: #ff6878; }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: .86rem; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.text-btn { background: none; border: 0; padding: 4px 0; color: var(--text-2); font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.text-btn:hover { color: var(--text); }
.text-btn.danger { color: var(--red); }

/* Status tags */
.tag { display: inline-block; padding: 3px 8px; border-radius: 3px; border: 1px solid currentColor; font-size: .74rem; font-weight: 600; line-height: 1.3; white-space: nowrap; color: var(--text-2); }
.tag.approved, .tag.entered, .tag.active, .tag.sent, .tag.on { color: var(--green); }
.tag.pending, .tag.sending, .tag.soon { color: var(--amber); }
.tag.rejected, .tag.failed, .tag.disabled, .tag.sold { color: var(--red); }
.tag.awaiting_receipt, .tag.staff { color: var(--purple-2); }
.tag.not_entered { color: var(--text-3); }
.tag.admin { color: var(--yellow); }
.count { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 3px; background: var(--line); color: var(--text-2); font-size: .74rem; font-weight: 700; text-align: center; }
.count.hot { background: var(--yellow); color: var(--on-yellow); }

/* Boxes */
.box { background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 2.4vw, 26px); }
.box + .box { margin-top: 16px; }
.box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.box-head a { font-size: .86rem; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.box-head a:hover { color: var(--text); }

/* Notices */
.notice { padding: 12px 16px; border-left: 3px solid var(--line-2); background: var(--ink); margin-bottom: 20px; font-size: .95rem; }
.notice p { margin-top: 4px; color: var(--text-2); }
.notice.success { border-color: var(--green); }
.notice.danger { border-color: var(--red); }
.notice.info { border-color: var(--purple); }

/* Forms */
.field { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--text); }
.field .hint { font-weight: 400; font-size: .8rem; color: var(--text-3); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--black); color: var(--text); font-size: 1rem; font-weight: 400;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder, textarea::placeholder { color: #5f5b68; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); outline: none; }
input[type=date] { color-scheme: dark; }
.input-mono { font-family: var(--mono) !important; text-transform: uppercase; letter-spacing: .04em; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 64px; }
.reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--text-2); font-size: .8rem; padding: 6px 8px; text-decoration: underline; text-underline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--black); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--yellow); flex: none; }
.check strong { display: block; }
.check small { display: block; margin-top: 2px; }
.file { position: relative; display: block; padding: 22px 18px; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--black); text-align: center; }
.file:hover, .file:focus-within, .file.has-file { border-color: var(--purple); }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file strong { display: block; overflow-wrap: anywhere; }
.file.has-file strong { color: var(--green); }

/* ===================== PUBLIC ===================== */
.site-header { border-bottom: 1px solid var(--line); background: var(--black); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase; }
.wordmark b { color: var(--purple); font-weight: 700; }
.site-nav { display: flex; gap: 26px; font-size: .92rem; color: var(--text-2); }
.site-nav a:hover { color: var(--text); }
.site-actions { display: flex; align-items: center; gap: 18px; font-size: .92rem; }
.site-actions > a:not(.btn) { color: var(--text-2); }
.site-actions > a:not(.btn):hover { color: var(--text); }

/* Poster */
.poster { background: var(--purple); color: #0d0716; }
.poster-inner { padding-top: clamp(20px, 3vw, 32px); padding-bottom: clamp(24px, 3vw, 36px); }
.poster-top { display: flex; justify-content: space-between; gap: 16px; font-size: .86rem; font-weight: 600; padding-bottom: 14px; border-bottom: 2px solid #0d0716; }
.poster-name { font-size: clamp(4.6rem, 17.5vw, 15.5rem); margin: clamp(14px, 2vw, 24px) 0 clamp(10px, 1.5vw, 18px) -.04em; line-height: .8; white-space: nowrap; }
.poster-name span { color: inherit; }
.poster-tagline { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; max-width: 34ch; margin-bottom: clamp(20px, 3vw, 34px); }
.poster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; border-top: 2px solid #0d0716; }
.poster-grid > div { padding: 14px 16px 0 0; }
.poster-grid dt { font-size: .78rem; font-weight: 600; opacity: .75; }
.poster-grid dd { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 700; text-transform: uppercase; line-height: 1.05; margin-top: 4px; }
.poster-grid .poster-cta { display: flex; align-items: flex-end; padding-right: 0; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; border-bottom: 1px solid var(--line); }
.section h2.big { font-family: var(--display); font-size: clamp(2rem, 4.2vw, 3rem); text-transform: uppercase; line-height: .95; letter-spacing: -.005em; margin-bottom: 18px; font-stretch: condensed; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.about p { font-size: 1.1rem; color: var(--text-2); max-width: 56ch; line-height: 1.6; }
.about .where { margin-top: 18px; color: var(--text); font-weight: 600; }

.ticket-box { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--ink); }
.ticket-box-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px dashed var(--line-2); font-weight: 600; }
.ticket-box-body { padding: 20px; }
.price { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 4vw, 3rem); line-height: 1; }
.price.tbc { font-size: 1.6rem; }
.ticket-box ul { margin: 16px 0 20px; display: grid; gap: 8px; color: var(--text-2); font-size: .94rem; }
.ticket-box li { padding-left: 18px; position: relative; }
.ticket-box li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 2px; background: var(--yellow); }
.ticket-box .fine { margin-top: 10px; }

.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); counter-reset: how; }
.how li { padding: 18px 24px 0 0; counter-increment: how; }
.how li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.how li::before { content: counter(how); display: block; font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--purple); margin-bottom: 14px; }
.how h3 { font-size: 1.1rem; margin-bottom: 6px; }
.how p { color: var(--text-2); font-size: .95rem; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--purple-2); }
.faq details p { color: var(--text-2); padding: 0 32px 18px 0; max-width: 62ch; }

.site-footer { padding: 28px 0 36px; color: var(--text-3); font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.footer-inner nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-inner a:hover { color: var(--text); }
.buy-bar { display: none; }

/* Inner public pages */
.page { padding-top: clamp(24px, 4vw, 44px); padding-bottom: clamp(40px, 6vw, 72px); }
.page-title { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.4rem); text-transform: uppercase; line-height: .95; letter-spacing: -.005em; font-stretch: condensed; }
.page-sub { color: var(--text-2); margin-top: 8px; }
.back { display: inline-block; font-size: .88rem; color: var(--text-2); margin-bottom: 18px; }
.back:hover { color: var(--text); }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 26px; font-size: .86rem; color: var(--text-3); }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--line-2); }
.crumbs .now { color: var(--text); font-weight: 600; }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.checkout-main { display: grid; gap: 16px; }
fieldset.box { margin: 0; min-width: 0; }
fieldset.box + fieldset.box { margin-top: 0; }
.legend { float: left; width: 100%; padding: 0; margin-bottom: 16px; font-size: 1.05rem; font-weight: 700; }
.legend + * { clear: both; }
.legend span { color: var(--purple-2); margin-right: 6px; }
.name-count { font-weight: 600; margin-left: 6px; }
.name-count.ok { color: var(--green); }
.name-count.off { color: var(--amber); }
.summary { position: sticky; top: 20px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .94rem; color: var(--text-2); }
.line span:last-child { color: var(--text); text-align: right; overflow-wrap: anywhere; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 0 18px; font-weight: 600; }
.total strong { font-family: var(--display); font-size: 1.9rem; line-height: 1; }
.summary .fine { margin-top: 12px; }
.state { padding: clamp(28px, 5vw, 48px) clamp(18px, 3vw, 32px); }
.state h2 { font-size: 1.4rem; margin-bottom: 8px; }
.state p { color: var(--text-2); max-width: 52ch; margin-bottom: 18px; }

/* Order */
.order-ref { font-family: var(--mono); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.3rem); letter-spacing: .01em; overflow-wrap: anywhere; line-height: 1.1; }
.order-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 24px 0 26px; }
.steps li { border-top: 3px solid var(--line-2); padding-top: 8px; font-size: .86rem; font-weight: 600; color: var(--text-3); }
.steps li small { display: block; font-weight: 400; font-size: .78rem; }
.steps li.done { border-color: var(--purple); color: var(--text); }
.steps li.current { border-color: var(--yellow); color: var(--yellow); }
.steps li.alert { border-color: var(--red); color: var(--red); }
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.order-side { position: sticky; top: 20px; }
.order-side .help { margin-top: 14px; font-size: .88rem; color: var(--text-2); }
.bank { margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r); }
.bank > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; }
.bank > div + div { border-top: 1px solid var(--line); }
.bank dt { font-size: .78rem; color: var(--text-3); }
.bank dd { font-weight: 600; overflow-wrap: anywhere; }
.bank dd.big { font-family: var(--mono); font-size: 1.15rem; color: var(--yellow); }
.copy-btn { flex: none; background: none; border: 1px solid var(--line-2); border-radius: 3px; color: var(--text-2); padding: 5px 10px; font-size: .78rem; font-weight: 600; }
.copy-btn:hover { color: var(--text); border-color: var(--text-3); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }
.instructions { color: var(--text-2); border-left: 3px solid var(--purple); padding: 4px 0 4px 14px; margin-bottom: 22px; font-size: .95rem; }
.upload { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }

.tickets { display: grid; gap: 14px; margin: 18px 0; }
.eticket { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--ink); overflow: hidden; }
.eticket-body { padding: 20px 22px; border-left: 6px solid var(--purple); display: grid; gap: 6px; align-content: start; }
.eticket-event { font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .04em; color: var(--purple-2); text-transform: uppercase; }
.eticket h2 { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 1.9rem); text-transform: uppercase; line-height: 1; overflow-wrap: anywhere; }
.eticket-id { font-family: var(--mono); color: var(--text-2); }
.eticket-meta { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 8px; font-size: .88rem; }
.eticket-meta dt { font-size: .74rem; color: var(--text-3); }
.eticket-qr { display: grid; place-items: center; padding: 16px; border-left: 1px dashed var(--line-2); background: #fff; }
.eticket-qr img { width: 160px; height: 160px; }

/* Login */
.login { min-height: calc(100vh - 65px); display: grid; place-items: center; padding: 40px var(--gutter); }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.login-card > p { color: var(--text-2); margin-bottom: 24px; }
.login-card .fine { margin-top: 18px; }

/* ===================== WORKSPACE ===================== */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px 16px; border-right: 1px solid var(--line); background: var(--black); overflow-y: auto; }
.sidebar .wordmark { padding: 0 10px; }
.side-event { padding: 10px 10px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--text-3); line-height: 1.4; }
.side-event strong { color: var(--text-2); font-weight: 600; }
.side-nav { display: grid; gap: 1px; }
.side-group { padding: 14px 10px 6px; font-size: .74rem; color: var(--text-3); }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 3px; color: var(--text-2); font-size: .92rem; }
.side-nav a .icon { width: 17px; height: 17px; }
.side-nav a:hover { color: var(--text); background: var(--ink-2); }
.side-nav a.selected { color: var(--text); background: var(--ink-2); box-shadow: inset 2px 0 0 var(--yellow); }
.side-nav .count { margin-left: auto; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: .86rem; display: grid; gap: 8px; }
.side-foot strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot small { display: block; }
.side-links { display: flex; gap: 16px; }
.side-links a, .side-links button { background: none; border: 0; padding: 0; color: var(--text-2); font-size: .84rem; text-decoration: underline; text-underline-offset: 3px; }
.side-links a:hover, .side-links button:hover { color: var(--text); }

.app-body { min-width: 0; }
.app-topbar { display: none; }
.app-main { max-width: 1120px; padding: 32px clamp(18px, 3.5vw, 44px) 64px; }
.app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.app-head p { color: var(--text-2); margin-top: 4px; font-size: .94rem; }
.app-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--ink); margin-bottom: 20px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 16px 18px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .label { margin-bottom: 6px; }
.stat-value { font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-value small { font-family: var(--body); font-size: .9rem; font-weight: 400; }
.stat-note { font-size: .8rem; color: var(--text-3); margin-top: 6px; }
.stat-note a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }
.bar { height: 4px; background: var(--line); margin-top: 10px; }
.bar span { display: block; height: 100%; background: var(--purple); }
.bar.in span { background: var(--yellow); }

.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols > .box { margin: 0; }
.rows > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rows > div:first-child { border-top: 0; padding-top: 0; }
.rows strong { display: block; font-weight: 600; font-size: .94rem; }
.rows small { display: block; }
.rows .time { font-family: var(--mono); font-size: .86rem; color: var(--text-2); flex: none; }
.empty { padding: 22px 0 8px; color: var(--text-2); font-size: .94rem; }
.queue { display: grid; gap: 0; margin-top: 12px; }
.queue div { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.queue div strong { font-variant-numeric: tabular-nums; }

/* Toolbar / tabs / tables */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.search { display: flex; gap: 8px; flex: 1; max-width: 480px; }
.search input { min-height: 42px !important; }
.search .btn { min-height: 42px; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: -6px 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 0 11px; color: var(--text-2); font-size: .92rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.selected { color: var(--text); border-color: var(--yellow); font-weight: 600; }

.table-wrap { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; padding: 10px 14px; font-size: .78rem; font-weight: 600; color: var(--text-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--ink-2); }
.table .strong { font-weight: 600; }
.table .dim { color: var(--text-3); }
.table .empty-cell { padding: 28px 14px; color: var(--text-2); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; color: var(--text-3); font-size: .86rem; flex-wrap: wrap; }
.pager div { display: flex; gap: 8px; }

/* Payments */
.orders { display: grid; gap: 12px; }
.order { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink); }
.order.pending { border-left: 3px solid var(--amber); }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.order-top h2 { font-size: 1.05rem; }
.order-top small { display: block; margin-top: 2px; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1.3fr); gap: 16px; padding: 0 18px 14px; font-size: .92rem; }
.order-grid dd { overflow-wrap: anywhere; }
.order-grid .amount { font-family: var(--display); font-size: 1.3rem; font-weight: 700; }
.reason { margin: 0 18px 14px; font-size: .88rem; color: var(--text-2); }
.reason strong { color: var(--red); font-weight: 600; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.order-actions form { display: contents; }
.reject summary { list-style: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--red); font-weight: 600; font-size: .86rem; cursor: pointer; }
.reject summary::-webkit-details-marker { display: none; }
.reject summary:hover { border-color: var(--red); }
.reject[open] { flex-basis: 100%; }
.reject form.reject-form { display: grid; gap: 10px; margin-top: 10px; max-width: 520px; }
.reject-form .btn { justify-self: start; }

/* Scanner */
.scan-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.scan-side { display: grid; gap: 16px; }
.viewfinder { position: relative; aspect-ratio: 1 / 1; max-height: 500px; width: 100%; background: #000; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; margin-bottom: 12px; }
#reader { width: 100%; height: 100%; border: 0 !important; }
#reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
#reader img[alt="Info icon"], #reader img[alt="Camera based scan"] { display: none !important; }
.scanner-placeholder { height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 24px; color: var(--text-2); font-size: .94rem; }
.scanner-placeholder .frame { width: 110px; height: 110px; margin-bottom: 12px; background:
  linear-gradient(var(--text-3), var(--text-3)) top left / 26px 2px, linear-gradient(var(--text-3), var(--text-3)) top left / 2px 26px,
  linear-gradient(var(--text-3), var(--text-3)) top right / 26px 2px, linear-gradient(var(--text-3), var(--text-3)) top right / 2px 26px,
  linear-gradient(var(--text-3), var(--text-3)) bottom left / 26px 2px, linear-gradient(var(--text-3), var(--text-3)) bottom left / 2px 26px,
  linear-gradient(var(--text-3), var(--text-3)) bottom right / 26px 2px, linear-gradient(var(--text-3), var(--text-3)) bottom right / 2px 26px; background-repeat: no-repeat; }
.scanner-placeholder strong { color: var(--text); font-size: 1.05rem; }
.scanner-controls { display: grid; gap: 8px; }

.scan-result { display: grid; gap: 4px; min-height: 112px; align-content: center; padding: 18px 20px; border-radius: var(--r); background: var(--ink); border: 1px solid var(--line); color: var(--text-2); font-size: .98rem; }
.scan-result-title { font-family: var(--display); font-size: 1.7rem; font-weight: 700; text-transform: uppercase; line-height: 1; color: var(--text); }
.scan-result.busy .scan-result-title { color: var(--text-2); }
.scan-result.success { background: var(--green); border-color: var(--green); color: #032312; }
.scan-result.success .scan-result-title { color: #032312; font-size: 2.3rem; }
.scan-result.error { background: var(--red); border-color: var(--red); color: #fff; }
.scan-result.error .scan-result-title { color: #fff; font-size: 2.1rem; }
.scan-result.repeat { background: var(--amber); border-color: var(--amber); color: #2a1a00; }
.scan-result.repeat .scan-result-title { color: #2a1a00; font-size: 2.1rem; }
.scan-grid[data-state=ok] .viewfinder { border: 3px solid var(--green); }
.scan-grid[data-state=bad] .viewfinder { border: 3px solid var(--red); }
.scan-grid[data-state=repeat] .viewfinder { border: 3px solid var(--amber); }
#next-scan { margin-top: 10px; }
.manual h2 { margin-bottom: 4px; }
.manual > p { color: var(--text-2); font-size: .92rem; margin-bottom: 14px; }

/* Reports */
.reports { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink); }
.report { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 28px; align-items: center; padding: 20px 22px; }
.report + .report { border-top: 1px solid var(--line); }
.report p { color: var(--text-2); font-size: .92rem; margin-top: 4px; max-width: 60ch; }
.report-cols { font-size: .8rem; color: var(--text-3); margin-top: 8px; }
.formats { display: flex; gap: 8px; }

/* Settings, staff, account */
.settings { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink); margin-bottom: 18px; }
.settings section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 22px; }
.settings section + section { border-top: 1px solid var(--line); }
.settings h2 { font-size: 1rem; }
.settings section > div:first-child p { font-size: .86rem; color: var(--text-3); margin-top: 4px; }
.save-row { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.save-row span { font-size: .86rem; color: var(--text-3); }
.team-actions { display: flex; gap: 10px; align-items: center; flex: none; }
.account dl { margin: 4px 0 18px; }
.account dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .94rem; }
.account dt { color: var(--text-3); }

.tabbar { display: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat:nth-child(3) { border-left: 0; }
  .stats .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats.three .stat:nth-child(3) { border-left: 1px solid var(--line); border-top: 0; }
  .settings section { grid-template-columns: 1fr; gap: 14px; }
  .order-grid { grid-template-columns: 1fr 1fr; }
  .order-grid .wide { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
  .site-nav { display: none; }
  .split { grid-template-columns: 1fr; }
  .poster-grid { grid-template-columns: 1fr 1fr; }
  .poster-grid .poster-cta { grid-column: 1 / -1; padding-top: 18px; }
  .poster-grid .poster-cta .btn { width: 100%; }
  .how { grid-template-columns: 1fr; }
  .how li, .how li + li { padding: 18px 0; border-left: 0; }
  .how li + li { border-top: 1px solid var(--line); }
  .checkout, .order-layout { grid-template-columns: 1fr; }
  .summary, .order-side { position: static; }

  .shell { display: block; }
  .sidebar { display: none; }
  .app-topbar { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; background: var(--black); border-bottom: 1px solid var(--line); }
  .app-topbar .wordmark { font-size: 1.15rem; }
  .app-topbar form { display: flex; }
  .app-topbar button { background: none; border: 0; color: var(--text-2); font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
  .app-main { padding: 20px 16px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); background: var(--black); border-top: 1px solid var(--line-2); }
  .tabbar > a, .tabbar summary { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; height: 60px; color: var(--text-3); font-size: .7rem; font-weight: 600; list-style: none; cursor: pointer; }
  .tabbar summary::-webkit-details-marker { display: none; }
  .tabbar .icon { width: 21px; height: 21px; }
  .tabbar > a.selected, .tabbar details.selected summary, .tabbar details[open] summary { color: var(--text); box-shadow: inset 0 2px 0 var(--yellow); }
  .tabbar > a.tab-scan { color: var(--on-yellow); background: var(--yellow); box-shadow: none; }
  .tab-badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 3px; background: var(--yellow); color: var(--on-yellow); font-size: .62rem; font-weight: 800; display: grid; place-items: center; }
  .tabbar details { position: relative; }
  .more-sheet { position: absolute; right: 8px; bottom: calc(100% + 8px); width: min(240px, calc(100vw - 16px)); padding: 6px; border-radius: var(--r); background: var(--ink-2); border: 1px solid var(--line-2); display: grid; }
  .more-sheet a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 3px; font-size: .94rem; color: var(--text-2); }
  .more-sheet a:hover, .more-sheet a.selected { background: var(--line); color: var(--text); }

  .cols, .cols.even, .scan-grid { grid-template-columns: 1fr; }
  .viewfinder { max-height: 60vh; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .site-header-inner { height: 56px; }
  .site-actions > a:not(.btn) { display: none; }
  .wordmark { font-size: 1.2rem; }
  .poster-top span:last-child { display: none; }
  .poster-name { font-size: 22vw; white-space: normal; }
  .poster-name span { display: block; }
  .poster-grid dd { font-size: 1.25rem; }
  .faq details p { padding-right: 0; }
  .page-home .site-footer { padding-bottom: 96px; }
  .buy-bar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--black); border-top: 1px solid var(--line-2); }
  .buy-bar strong { font-family: var(--display); font-size: 1.25rem; display: block; line-height: 1.1; }
  .buy-bar small { font-size: .76rem; }

  .field-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .eticket { grid-template-columns: 1fr; }
  .eticket-qr { border-left: 0; border-top: 1px dashed var(--line-2); }
  .eticket-qr img { width: 210px; height: 210px; }
  .order-main > .btn { width: 100%; }

  .app-head { padding-bottom: 14px; margin-bottom: 16px; }
  .app-head h1 { font-size: 1.5rem; }
  .app-head-actions { width: 100%; }
  .app-head-actions .btn { flex: 1; }
  .stats.three { grid-template-columns: 1fr 1fr; }
  .stats.three .stat:first-child { grid-column: 1 / -1; }
  .stats.three .stat:nth-child(2) { border-left: 0; border-top: 1px solid var(--line); }
  .stats.three .stat:nth-child(3) { border-top: 1px solid var(--line); }
  .stat { padding: 14px; }
  .search { max-width: none; }

  .table-wrap { border: 0; background: none; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink); padding: 4px 14px; margin-bottom: 8px; }
  .table td { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: right; }
  .table td::before { content: attr(data-label); color: var(--text-3); font-size: .82rem; text-align: left; flex: none; }
  .table td.cell-main { font-size: 1rem; padding: 10px 0; text-align: left; }
  .table td.cell-main::before { display: none; }
  .table tr td:last-child { border-bottom: 0; }
  .table .empty-cell { display: block; text-align: left; }
  .table .empty-cell::before { display: none; }
  .table tbody tr:hover td { background: none; }

  .order-top, .order-grid, .order-actions { padding-left: 14px; padding-right: 14px; }
  .reason { margin-inline: 14px; }
  .order-actions .btn { flex: 1 1 auto; }
  .reject summary { width: 100%; justify-content: center; }
  .report { grid-template-columns: 1fr; padding: 18px; }
  .formats .btn { flex: 1; }
  .save-row { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-header, .site-footer, .buy-bar, .sidebar, .tabbar, .app-topbar, .btn { display: none !important; } }

/* Ticket type catalogue and editor */
.type-cards{display:grid;gap:20px}.type-cards .ticket-box{width:100%}.type-benefits{padding-left:20px;line-height:1.65;margin:16px 0;overflow-wrap:anywhere}.type-benefits li{margin:6px 0}.type-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.type-editor-grid .box{min-width:0}.ticket-type-label{font-weight:700;color:var(--purple,#b194ee);font-size:1.1rem;margin:12px 0}.eticket .type-benefits{font-size:.85rem}.type-cards .price{font-size:clamp(1.7rem,3vw,2.8rem)}
@media(max-width:800px){.type-editor-grid{grid-template-columns:1fr}}
.guest-ticket{border:1px solid #39333f;padding:20px;margin:12px 0 0;min-width:0}.guest-ticket legend{padding:0 8px;font-weight:700}.guest-ticket[hidden],#guest-details[hidden],#guest-prompt[hidden]{display:none!important}

/* Dirty December Rave Fest identity and admission cards */
.wordmark{font-size:1.05rem;line-height:1.15;display:inline-flex;flex-direction:column}.wordmark b{font-size:.75em;letter-spacing:.17em;margin-top:4px}.poster-name{font-size:clamp(3rem,10vw,8rem)}.poster-name small{display:block;font-size:.3em;letter-spacing:.14em;margin-top:14px;color:var(--purple-2)}
.eticket{background:#111113}.eticket-body{padding:28px;border-left:6px solid #a36aff;gap:12px}.eticket h2{font-size:clamp(1.8rem,3vw,2.5rem)}.eticket-qr{min-width:210px}.eticket-qr img{width:180px;height:180px}.eticket-event{color:#bb8dff}.ticket-type-label{color:#a36aff}.eticket .type-benefits{margin:18px 0}.eticket-meta{margin-top:8px}
@media(max-width:600px){.eticket{grid-template-columns:1fr}.eticket-qr{min-width:0}.eticket-body{padding:22px}.poster-name{font-size:clamp(3rem,14vw,5rem)}}

.poster-name span{display:block}.poster-name{white-space:normal}
.poster-name small{color:#111113}
