@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/bebas-neue-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(/fonts/dm-sans-latin-wght-normal.woff2) format('woff2-variations'); }

:root {
  --velvet: #170a0d;
  --velvet-2: #241115;
  --velvet-3: #3a1b21;
  --line: #4a262d;
  --gold: #e9b44c;
  --gold-2: #f6d27e;
  --paper: #f5ead6;
  --paper-ink: #2a1216;
  --paper-mute: #7a5b55;
  --text: #f3e6e1;
  --mute: #b89c97;
  --ok: #3fb47a;
  --warn: #e6a23c;
  --bad: #e2574c;
  --radius: 14px;
  --display: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 16px/1.5 var(--body);
  background:
    radial-gradient(1200px 600px at 50% -10%, #4a1a22 0%, transparent 60%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 2px, transparent 2px 28px),
    var(--velvet);
  background-attachment: fixed;
}
a { color: var(--gold-2); }
main { padding: 24px 16px 64px; max-width: 1100px; margin: 0 auto; }

/* ---------- marquee + type ---------- */
.marquee-dots {
  height: 10px; margin: 0 auto 18px; width: min(320px, 80%);
  background: radial-gradient(circle, var(--gold-2) 0 3px, rgba(233,180,76,.25) 4px, transparent 5px) 0 50% / 20px 10px repeat-x;
  filter: drop-shadow(0 0 6px rgba(246,210,126,.7));
  animation: chase 1.2s steps(2) infinite;
}
@keyframes chase { to { background-position: 20px 50%; } }
@media (prefers-reduced-motion: reduce) { .marquee-dots { animation: none; } }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.film { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 9vw, 64px); line-height: .95; letter-spacing: .02em; margin: 6px 0 0; }
.page-title { font-family: var(--display); font-weight: 400; font-size: 44px; letter-spacing: .03em; margin: 0; }
.sub { color: var(--mute); margin: 4px 0 16px; }
.fine { color: var(--mute); text-align: center; font-size: 14px; margin: 10px 0 0; }

/* ---------- public ticket ---------- */
.public-wrap { max-width: 420px; margin: 4vh auto 0; text-align: center; }
.pill { display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; margin: 0 0 18px; }
.pill-ok { background: rgba(63,180,122,.15); color: #8fe0b5; border: 1px solid rgba(63,180,122,.4); }
.pill-muted { background: rgba(255,255,255,.06); color: var(--mute); border: 1px solid var(--line); }
.pill-bad { background: rgba(226,87,76,.15); color: #ffa79f; border: 1px solid rgba(226,87,76,.45); }

.stub {
  --notch: 14px;
  position: relative; text-align: left; color: var(--paper-ink); background: var(--paper);
  border-radius: var(--radius); padding: 22px 22px 20px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(0,0,0,.2) inset;
  background-image: linear-gradient(transparent 0 0), radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px);
  background-size: auto, 4px 4px;
}
.stub-head { text-align: center; padding-bottom: 14px; border-bottom: 2px solid var(--paper-ink); }
.stub-head .eyebrow { color: #a2552f; }
.stub-head .film { color: var(--paper-ink); font-size: clamp(36px, 10vw, 54px); }
.stub-logo { display: block; width: 150px; height: auto; margin: 0 auto 12px; }
.stub-md .stub-logo { width: 132px; }
.stub-head .marquee-dots { margin-bottom: 12px; filter: none;
  background-image: radial-gradient(circle, #c47b2a 0 3px, transparent 4px); }
.stub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 16px 0; }
.stub-grid dt { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--paper-mute); font-weight: 700; }
.stub-grid dd { margin: 2px 0 0; font-weight: 700; font-size: 17px; }
.perf { position: relative; height: 0; border-top: 2px dashed rgba(42,18,22,.35); margin: 0 calc(-1 * 22px); }
.perf::before, .perf::after { content: ''; position: absolute; top: calc(-1 * var(--notch) - 1px); width: calc(var(--notch) * 2); height: calc(var(--notch) * 2); border-radius: 50%; background: var(--velvet); }
.perf::before { left: calc(-1 * var(--notch)); }
.perf::after { right: calc(-1 * var(--notch)); }
.stub-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; }
.admit span { display: block; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--paper-mute); font-weight: 700; }
.admit strong { font-family: var(--display); font-weight: 400; font-size: 84px; line-height: .85; color: #8c1d2c; }
.qr { width: 168px; height: 168px; border-radius: 8px; background: #fff; padding: 4px; image-rendering: pixelated; }
.stub-md .qr { width: 150px; height: 150px; }

/* ---------- owner chrome ---------- */
.ownerbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: rgba(23,10,13,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand-chip { display: inline-flex; align-items: center; background: var(--paper); border-radius: 8px; padding: 5px 9px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.25) inset; }
.brand-chip img { display: block; height: 24px; width: auto; }
.brand-text { font-family: var(--display); font-size: 24px; letter-spacing: .05em; color: var(--gold); white-space: nowrap; }
.navlinks { display: flex; align-items: center; gap: 16px; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.navlinks a { color: var(--text); text-decoration: none; }
.navlinks a:hover { color: var(--gold-2); }
.navlinks form { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--mute); font: inherit; cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--text); }
@media (max-width: 560px) { .navlinks a[href="/owner"] { display: none; } .brand-text { display: none; } .navlinks { gap: 14px; } } 

.panel { background: var(--velvet-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel-title { font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: .03em; margin: 0; line-height: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; font: 600 15px var(--body); text-decoration: none; cursor: pointer;
}
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2b1408; box-shadow: 0 8px 20px -8px rgba(233,180,76,.6); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-danger-ghost { background: transparent; color: #ffa79f; border-color: rgba(226,87,76,.45); }
.btn-xl { min-height: 56px; font-size: 18px; width: 100%; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.actions form { margin: 0; }
.actions form:first-child:has(.btn-xl) { flex-basis: 100%; }

.flash { background: rgba(233,180,76,.12); border: 1px solid rgba(233,180,76,.4); color: var(--gold-2); padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; }
.flash-bad { background: rgba(226,87,76,.12); border-color: rgba(226,87,76,.45); color: #ffb3ac; }

/* ---------- owner ticket (scan result) ---------- */
.owner-ticket { max-width: 560px; margin: 0 auto; }
.verdict { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; display: flex; flex-direction: column; color: #fff; }
.verdict span { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; opacity: .9; }
.verdict strong { font-family: var(--display); font-weight: 400; font-size: 52px; line-height: 1; letter-spacing: .02em; }
.v-ok { background: linear-gradient(135deg, #1f7a4f, var(--ok)); }
.v-warn { background: linear-gradient(135deg, #9a5d10, var(--warn)); color: #1d1004; }
.v-warn strong { font-size: 30px; }
.v-bad { background: linear-gradient(135deg, #8c1d2c, var(--bad)); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; }
.kv dt { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.kv dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.kv dd.big { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--gold-2); }
.notes { background: var(--velvet-3); border-radius: 10px; padding: 10px 12px; margin: 16px 0 0; font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .04em; }
.tag-valid { background: rgba(63,180,122,.18); color: #8fe0b5; }
.tag-checked_in { background: rgba(230,162,60,.18); color: #f5c37a; }
.tag-void { background: rgba(226,87,76,.18); color: #ffa79f; }

/* ---------- share ---------- */
.share { max-width: 900px; margin: 0 auto; }
.share-grid { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .share-grid { grid-template-columns: 1fr; } }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mute); font-weight: 600; }
input, textarea {
  width: 100%; font: 16px var(--body); color: var(--text); background: var(--velvet); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; outline: none;
}
input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233,180,76,.2); }
input[type="datetime-local"] { color-scheme: dark; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-panel { max-width: 760px; margin: 0 auto; }
.grid-form fieldset { border: 0; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-form legend { font-family: var(--display); font-size: 22px; letter-spacing: .05em; color: var(--gold); margin-bottom: 8px; padding: 0; }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid-form fieldset { grid-template-columns: 1fr; } }

/* ---------- login ---------- */
.login { max-width: 380px; margin: 5vh auto 0; text-align: center; }
.login-card, .brand-card {
  position: relative; background: var(--paper); color: var(--paper-ink); border-radius: var(--radius);
  padding: 26px 22px 20px; margin-bottom: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
  background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 4px 4px;
}
.login-logo { display: block; width: 190px; height: auto; margin: 0 auto 20px; }
.login-title { font-family: var(--display); font-weight: 400; font-size: 40px; letter-spacing: .04em; line-height: 1; margin: 18px 0 0; color: var(--paper-ink); }
.login-sub { margin: 4px 0 0; color: var(--paper-mute); font-size: 14px; }
.brand-card { padding: 30px 22px; }
.card-logo { display: block; width: min(240px, 70%); height: auto; margin: 0 auto; }
.login form { text-align: left; margin-top: 8px; }

/* ---------- dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--velvet-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat span { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.stat strong { display: block; font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1.1; color: var(--gold-2); }
.search { display: flex; gap: 8px; margin-bottom: 14px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--velvet-2); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
tr:last-child td { border-bottom: 0; }
td small { color: var(--mute); }
.num { text-align: right; }
.empty { text-align: center; color: var(--mute); padding: 32px; }
