/* Club 52 Tournaments — brand palette from the club logo:
   black club, bronze-gold rim, card-red "52". */
:root {
  --bg: #0c0b0a;
  --card: #171512;
  --card-edge: #2a251d;
  --ink: #f2efe8;
  --muted: #a39a89;
  --gold: #c9a25a;      /* logo rim bronze-gold */
  --gold-hi: #ecd9ab;   /* rim highlight */
  --red: #c8202c;       /* the "52" */
  --good: #2e9e52;
  --warn: #d99a2b;
  --bad: #c8202c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
h1 { font-size: 26px; margin: 14px 0 10px; }
h2 { font-size: 19px; margin: 6px 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
code { background: #0a0a0c; border: 1px solid var(--card-edge); border-radius: 5px; padding: 2px 7px; font-size: 14px; word-break: break-all; }

.topnav {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 12px 18px; background: #101013; border-bottom: 1px solid var(--card-edge);
}
.brand { font-weight: 700; font-size: 17px; color: var(--ink); display: flex; align-items: center; gap: 9px; }
.brand .tag { color: var(--red); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.logo { height: 28px; width: auto; display: block; filter: drop-shadow(0 0 1px rgba(236, 217, 171, .35)); }
.footlogo { height: 22px; margin: 0 auto 8px; opacity: .8; }
.navlinks { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.navlinks a { color: var(--muted); font-size: 14px; }
.navlinks a.scanlink { color: var(--gold); font-weight: 600; }
.linkbtn { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 0; }

.wrap { max-width: 880px; margin: 0 auto; padding: 16px 14px 40px; }
.foot { text-align: center; color: #5d594f; font-size: 12px; padding: 22px 10px 30px; }
.foot span { display: block; }

.card {
  display: block; background: var(--card); border: 1px solid var(--card-edge);
  border-radius: 12px; padding: 18px; margin: 14px 0; color: var(--ink);
}
.card.narrow { max-width: 420px; margin: 40px auto; }
.card.event:hover { border-color: var(--gold); }
.event-when { color: var(--gold); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.event-meta { color: var(--muted); margin: 6px 0 12px; }
.desc { color: #cfcabd; }

.btn {
  display: inline-block; background: var(--gold); color: #14120a; border: none; border-radius: 8px;
  padding: 10px 18px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.btn:hover { background: var(--gold-hi); color: #14120a; }
.btn.big { width: 100%; padding: 14px; font-size: 17px; margin-top: 10px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn.danger { background: var(--bad); color: #fff; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label { display: block; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
label small { color: #6f695c; }
input, select, textarea {
  width: 100%; margin-top: 5px; padding: 11px 12px; font-size: 16px;
  background: #0e0e11; color: var(--ink); border: 1px solid var(--card-edge); border-radius: 8px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -6000px; height: 1px; opacity: 0; }
.paychoice { border: 1px solid var(--card-edge); border-radius: 8px; margin-top: 14px; padding: 10px 14px 14px; }
.paychoice legend { color: var(--gold); font-weight: 600; padding: 0 6px; }
.radio { display: flex; gap: 8px; align-items: baseline; color: var(--ink); }
.radio input { width: auto; }
.radio small { display: block; color: var(--muted); }
.checkline { display: flex; align-items: center; gap: 8px; margin-top: 30px; }
.checkline input { width: auto; margin: 0; }
.paynote { margin-top: 14px; }
.fineprint { color: #6f695c; font-size: 12.5px; margin-top: 12px; }

.flash { padding: 12px 14px; border-radius: 8px; margin: 12px 0; font-weight: 600; }
.flash.ok { background: #10331c; color: #7fdc9c; border: 1px solid #1d5a32; }
.flash.err { background: #391313; color: #f3a1a1; border: 1px solid #6b2222; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-paid, .pill-published, .pill-verified { background: #123b21; color: #7fdc9c; }
.pill-checked_in { background: #0f2f3c; color: #7cc9e8; }
.pill-reserved, .pill-waitlist, .pill-pending_payment, .pill-draft { background: #3b2f10; color: #e5c46a; }
.pill-cancelled, .pill-refunded, .pill-expired, .pill-closed { background: #3a1616; color: #e89a9a; }
.pill-completed { background: #26262c; color: #a09a8c; }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 14px 0; }
.statgrid > div, .stat { background: #101014; border: 1px solid var(--card-edge); border-radius: 8px; padding: 10px 12px; }
.statlabel { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.statval { display: block; font-size: 18px; font-weight: 700; }
.statval.big { font-size: 30px; }
.statval small { color: var(--muted); font-weight: 400; }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }

.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pagehead .sub { color: var(--muted); margin: 2px 0 0; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px; border-bottom: 1px solid var(--card-edge); }
td { padding: 10px 8px; border-bottom: 1px solid #202026; vertical-align: top; }
.inline { display: inline; }
.inlineform { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.inlineform input, .inlineform select { width: auto; flex: 1; min-width: 140px; margin-top: 0; }
.stackform { margin-top: 16px; border-top: 1px solid var(--card-edge); padding-top: 4px; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .twocol { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.copyable { cursor: pointer; }
.copyable.copied { outline: 2px solid var(--good); }

/* ticket */
.ticket { text-align: center; }
.ticketlogo { height: 54px; margin: 4px auto 12px; display: block; }
.ticket-holder { font-size: 20px; font-weight: 700; margin: 4px 0 8px; }
.statusline { color: var(--muted); }
.qrbox { display: flex; justify-content: center; margin: 16px 0 6px; }
.qrbox svg { background: #fff; border-radius: 10px; padding: 6px; }
.ticket-code { font-size: 24px; letter-spacing: 6px; font-weight: 700; color: var(--gold); margin: 6px 0; }
.ticket-seat { font-size: 19px; font-weight: 800; color: var(--gold-hi); margin: 10px 0 0; letter-spacing: .04em; }
.ticket-amounts { color: var(--muted); margin-top: 10px; font-size: 14px; }

/* scanner */
.scanner { min-height: 130px; border-radius: 10px; overflow: hidden; background: #0a0a0c; }
.scanner.off { display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 10px; }
.verdict { border-width: 2px; }
.verdict.good { border-color: var(--good); }
.verdict.warn { border-color: var(--warn); }
.verdict.bad { border-color: var(--bad); }
.verdict.good h2 { color: #7fdc9c; }
.verdict.warn h2 { color: #e5c46a; }
.verdict.bad h2 { color: #f3a1a1; }
.vname { font-size: 22px; font-weight: 800; margin: 4px 0; }
.vmeta { color: var(--muted); font-size: 14px; margin: 4px 0; }
.idv { padding: 10px 12px; border-radius: 8px; background: #101014; border: 1px solid var(--card-edge); margin: 10px 0; font-size: 14px; }
.idv.good { border-color: var(--good); color: #7fdc9c; }
.idv.warn { border-color: var(--warn); color: #e5c46a; }

/* seating chart */
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ""; width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.lg-reserved::before { background: var(--warn); }
.lg-paid::before { background: var(--good); }
.lg-checked_in::before { background: #3d9dc4; }
.lg-pending_payment::before { background: #6b6558; }
.lg-empty::before { background: transparent; border: 2px dashed #4a4438; }
.livedot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--good); animation: pulse 2s infinite; vertical-align: middle; }
.livedot.off { background: var(--bad); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.ptable-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; margin: 16px 0; }
.ptable-box { padding: 26px 8px; }
.ptable {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: radial-gradient(ellipse at center, #1e4632 0%, #16351f 70%, #10281a 100%);
  border: 4px solid #3a2d18;
  box-shadow: 0 0 0 3px var(--gold), 0 8px 24px rgba(0,0,0,.5), inset 0 0 40px rgba(0,0,0,.45);
  border-radius: 50% / 46%;
}
.ptable-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; }
.ptable-num { display: block; color: var(--gold); font-weight: 800; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }
.ptable-count { display: block; color: #7fa68d; font-size: 13px; margin-top: 2px; }
.seat {
  position: absolute; transform: translate(-50%, -50%);
  width: 66px; height: 44px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; line-height: 1.15; text-align: center;
  border: 2px solid transparent; text-decoration: none; overflow: hidden; padding: 2px 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.seat .seat-num { font-size: 9px; font-weight: 600; opacity: .75; }
.seat .seat-name { max-width: 60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-idv { position: absolute; top: 1px; right: 4px; font-size: 9px; }
.seat.st-empty { background: rgba(0,0,0,.28); border: 2px dashed #3c4a3e; color: #5d6f60; box-shadow: none; }
.seat.st-reserved { background: #4a3a10; border-color: var(--warn); color: #f0d48a; }
.seat.st-pending_payment { background: #33302a; border-color: #6b6558; color: #b8b0a0; }
.seat.st-paid { background: #123b21; border-color: var(--good); color: #8fe3ab; }
.seat.st-checked_in { background: #0f2f3c; border-color: #3d9dc4; color: #8ed3f0; }
.seat.st-checked_in .seat-name::before { content: "● "; font-size: 8px; vertical-align: 1px; }
a.seat:hover { filter: brightness(1.25); }
.wl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wl-chip { background: #3b2f10; border: 1px solid var(--warn); color: #e5c46a; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }

/* poster (print) */
.poster { text-align: center; background: #fff; color: #111; border-radius: 14px; padding: 40px 24px; margin: 14px 0; }
.poster h1 { font-size: 34px; margin: 0 0 6px; }
.posterlogo { height: 90px; margin: 0 auto 14px; display: block; }
.poster-when { font-size: 20px; color: #8a6d1d; font-weight: 700; }
.poster-buyin { font-size: 18px; color: #333; }
.poster .qrbox svg { padding: 0; }
.poster-cta { font-size: 22px; font-weight: 800; margin: 14px 0 4px; }
.poster-url { color: #555; font-size: 16px; }
@media print {
  body { background: #fff; }
  .topnav, .foot, .noprint { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .poster { border-radius: 0; padding-top: 60px; }
}
