/* Registration pages: ticket, counter, admin. Builds on the brand tokens in site.css. */
body.reg { padding-bottom: 0; min-height: 100dvh; }
.reg .topbar { position: sticky; }
.reg main { overflow: visible; }
.reg-wrap { max-width: 560px; margin: 0 auto; padding: 20px var(--gutter) 60px; position: relative; z-index: 2; }
.reg-wide { max-width: 1120px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stack > * + * { margin-top: 12px; }
.muted { color: var(--grey); }
.tiny { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.hidden { display: none !important; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; font-weight: 600; color: var(--soft); }
.input, select.input, textarea.input { width: 100%; min-height: 50px; border-radius: 12px; border: 1px solid #333; background: #111; color: var(--white); padding: 0 14px; font: inherit; font-size: 16px; }
textarea.input { padding: 12px 14px; min-height: 90px; }
.input:focus { outline: none; border-color: var(--white); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--soft); }
.check input { width: 22px; height: 22px; accent-color: var(--red); flex: none; margin-top: 1px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-white { background: var(--white); color: var(--black); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: #222; color: var(--soft); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #777; }
.status.ok { background: #0F2A18; color: #7BE39A; } .status.ok::before { background: #36C26B; }
.status.warn { background: #2D2410; color: #F4C860; } .status.warn::before { background: #E6A817; }
.status.bad { background: #330A12; color: #FF8095; } .status.bad::before { background: var(--red); }

/* PIN gate */
.gate { max-width: 380px; margin: 8vh auto 0; }
.gate h1 { font-size: 32px; }
.pin { letter-spacing: .3em; text-align: center; font-size: 22px; font-weight: 800; }

/* ---------- ticket ---------- */
.tk-hero { position: relative; overflow: hidden; padding: 26px 20px 22px; border-radius: 18px; background: #111; border: 1px solid var(--line); }
.tk-hero .glow { width: 420px; height: 420px; right: -220px; bottom: -260px; }
.tk-hero > *:not(.glow) { position: relative; z-index: 1; }
.tk-hero .glow { position: absolute; }
.tk-hi { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-top: 6px; }
.qrbox { margin: 20px auto 0; width: min(280px, 78vw); background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 0 0 6px #111, 0 0 0 7px #333; }
.qrbox svg { display: block; width: 100%; height: auto; }
.tk-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; font-size: 13px; }
.tk-meta b { display: block; font-size: 14px; }
.tk-meta small { color: var(--grey); }
.tk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.sess-head { display: flex; justify-content: space-between; align-items: end; margin-top: 34px; }
.sess { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; transition: border-color .2s; }
.sess.mine { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.sess .ph { width: 64px; height: 80px; border-radius: 10px; overflow: hidden; background: #1C1C1C; display: grid; place-items: center; font-weight: 800; color: #555; }
.sess .ph img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.sess h3 { font-size: 17px; line-height: 1.2; }
.sess .sub { font-size: 13px; color: var(--grey); margin-top: 2px; }
.seats { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--soft); }
.bar { flex: 1; height: 6px; border-radius: 3px; background: #2A2A2A; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; transition: width .4s; }
.sess .act { grid-column: 1 / -1; display: flex; gap: 8px; }
.sess .act .btn { flex: 1; min-height: 44px; }
.sess .act .btn[disabled] { background: transparent; border: 1.5px solid #333; color: var(--grey); opacity: 1; }
.badge-mine { font-size: 11px; font-weight: 800; color: var(--white); background: var(--red); padding: 3px 7px; border-radius: 5px; margin-left: 6px; vertical-align: 2px; }

/* ---------- counter ---------- */
.ct-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ct-count { font-size: 14px; color: var(--grey); }
.ct-count b { color: var(--white); font-size: 22px; font-weight: 800; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #111; padding: 5px; border-radius: 12px; border: 1px solid var(--line); }
.tabs button { min-height: 44px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--grey); }
.tabs button[aria-selected="true"] { background: var(--white); color: var(--black); }
.cam { position: relative; margin-top: 14px; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; }
.cam video { width: 100%; height: 100%; object-fit: cover; }
.cam .frame { position: absolute; inset: 18%; border: 3px solid var(--white); border-radius: 18px; box-shadow: 0 0 0 999px #00000066; }
.cam .camtip { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 14px; font-weight: 600; }
.cam .camstart { position: absolute; inset: 0; display: grid; place-items: center; }
.result { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; animation: pop .2s ease; }
.result.ok { background: #0F7A3A; } .result.warn { background: #A06A00; } .result.bad { background: #A3001C; }
.result .big { font-size: 64px; line-height: 1; }
.result h2 { font-size: 34px; margin-top: 16px; }
.result p { color: #FFFFFFE6; font-size: 18px; margin-top: 10px; }
.result .btn { margin-top: 24px; }
.result .tap { position: absolute; bottom: 24px; font-size: 13px; color: #FFFFFFB3; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.results-list { list-style: none; margin-top: 12px; }
.results-list li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.results-list b { display: block; }
.results-list small { color: var(--grey); }

/* ---------- admin ---------- */
.dash-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 6px 0 18px; scrollbar-width: none; }
.dash-tabs button { flex: none; min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid #333; font-weight: 700; font-size: 14px; color: var(--grey); }
.dash-tabs button[aria-selected="true"] { background: var(--white); color: var(--black); border-color: var(--white); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.kpi b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.kpi span { font-size: 13px; color: var(--grey); }
.kpi .bar { margin-top: 10px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin-top: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.tbl th { text-align: left; font-size: 12px; color: var(--grey); font-weight: 600; padding: 10px 12px; background: #111; position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl td small { display: block; color: var(--grey); }
.mini { min-height: 32px; padding: 0 10px; font-size: 12px; border-radius: 8px; border: 1px solid #3A3A3A; font-weight: 700; }
.mini:hover { border-color: var(--white); }
.mini.danger { color: #FF8095; }
.preview-frame { width: 100%; height: 640px; border: 0; border-radius: 14px; background: #F2F2F2; margin-top: 12px; }
.progress { height: 10px; border-radius: 5px; background: #2A2A2A; overflow: hidden; margin-top: 12px; }
.progress i { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }
.sess-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sess-edit .wide { grid-column: 1 / -1; }
.drop { border: 2px dashed #3A3A3A; border-radius: 14px; padding: 26px; text-align: center; cursor: pointer; }
.drop.over { border-color: var(--white); }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.switch input { width: 46px; height: 26px; appearance: none; background: #333; border-radius: 13px; position: relative; transition: .2s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked { background: #36C26B; } .switch input:checked::after { left: 23px; }
.setup-warn { background: #2D2410; border: 1px solid #6B5110; color: #F4C860; border-radius: 12px; padding: 14px; font-size: 14px; margin-bottom: 16px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.tk-hi { color: var(--white); }

/* counter: session door mode */
.field.mode { margin-top: 14px; }
.field.mode select { font-weight: 700; }
.reg.session-mode .field.mode select { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.mode-stat { margin-top: 8px; font-size: 14px; color: var(--soft); }
.mode-stat b { color: var(--white); }
.result .sub2 { font-size: 15px; opacity: .9; }
