:root { color-scheme: dark; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0c0d10; color: #f7f7f2; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(circle at 70% -10%, #25331f 0, #0c0d10 42%); }
button, input { font: inherit; }
button { cursor: pointer; }
.screen { min-height: 100dvh; max-width: 520px; margin: auto; padding: calc(24px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom)); }
.hidden { display: none !important; }
.login-screen { display: flex; flex-direction: column; justify-content: center; }
.brand-mark { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: #c8ff54; color: #111; font-weight: 950; letter-spacing: -.06em; transform: rotate(-5deg); box-shadow: 0 16px 60px #b8ff3b2b; }
h1 { font-size: clamp(38px, 12vw, 60px); line-height: .95; letter-spacing: -.055em; margin: 28px 0 12px; }
.muted { color: #9a9ca2; margin: 0 0 28px; }
.login-form { display: grid; gap: 16px; }
label { color: #aaaeb5; font-size: 13px; display: grid; gap: 8px; }
input { width: 100%; min-height: 54px; padding: 0 16px; color: #fff; background: #17191e; border: 1px solid #2b2e34; border-radius: 15px; outline: none; }
input:focus { border-color: #c8ff54; box-shadow: 0 0 0 3px #c8ff5420; }
button { border: 0; border-radius: 15px; min-height: 52px; font-weight: 800; }
.primary { background: #c8ff54; color: #10120c; }
.form-error { min-height: 20px; color: #ff6f6f; margin: 0; text-align: center; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
header div { display: grid; gap: 3px; }
.eyebrow { color: #74777d; font-size: 10px; letter-spacing: .14em; }
.icon-button { min-height: 38px; padding: 0 13px; border: 1px solid #303238; background: transparent; color: #aaa; border-radius: 12px; font-size: 12px; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 14px; padding: 5px; border: 1px solid #24272c; border-radius: 16px; background: #15171b; }
.mode-tab { min-height: 42px; border-radius: 11px; background: transparent; color: #85888e; font-size: 14px; }
.mode-tab.is-active { background: #292c31; color: #fff; box-shadow: 0 4px 18px #0004; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stats div { background: #17191e; border: 1px solid #24272c; border-radius: 16px; padding: 13px 11px; display: grid; }
.stats strong { font-size: 26px; letter-spacing: -.04em; }
.stats span { color: #888b91; font-size: 11px; }
.scanner-card { position: relative; min-height: 330px; border: 1px solid #292c31; border-radius: 24px; overflow: hidden; background: #15171b; }
#reader { width: 100%; border: 0 !important; }
#reader video { object-fit: cover; min-height: 330px; }
#reader__scan_region { background: #15171b; }
#reader__dashboard { display: none; }
.scanner-placeholder { min-height: 330px; display: grid; place-content: center; justify-items: center; color: #888b91; text-align: center; padding: 24px; }
.scan-icon { width: 76px; height: 52px; border: 3px solid #c8ff54; border-left-color: transparent; border-right-color: transparent; border-radius: 12px; position: relative; }
.scan-icon::after { content: ""; position: absolute; left: 8px; right: 8px; top: 23px; height: 2px; background: #ff5656; box-shadow: 0 0 12px #ff5656; }
.camera-button { position: absolute; z-index: 3; left: 18px; right: 18px; bottom: 18px; width: calc(100% - 36px); transition: background .2s, color .2s; }
.camera-button.is-active { background: rgba(17, 17, 17, .82); color: #fff; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(12px); }
.manual-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.manual-form input { min-height: 48px; font-size: 14px; }
.manual-form button { min-height: 48px; padding: 0 16px; background: #292c31; color: #fff; }
.recent { margin-top: 26px; }
.recent h2 { font-size: 15px; margin: 0 0 10px; }
.recent-list { display: grid; gap: 7px; }
.recent-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: #15171b; border-radius: 13px; font-variant-numeric: tabular-nums; }
.recent-item div { display: grid; gap: 2px; }
.recent-item small, .empty { color: #777a80; }
.recent-item time { font-size: 12px; color: #a5a8ae; }
.empty { text-align: center; }
.guest-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.guest-summary div { display: grid; padding: 13px 11px; border: 1px solid #24272c; border-radius: 16px; background: #17191e; }
.guest-summary strong { font-size: 26px; letter-spacing: -.04em; }
.guest-summary span { color: #888b91; font-size: 11px; }
.guest-search-wrap { display: grid; gap: 8px; }
.guest-search-label { color: #f4f4ef; font-size: 15px; font-weight: 800; }
#guest-search { min-height: 58px; padding-left: 48px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23888b91' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 17px center; }
.guest-hint { margin: 10px 2px 16px; color: #777a80; font-size: 12px; }
.guest-results { display: grid; gap: 8px; padding-bottom: 24px; }
.guest-row { position: relative; width: 100%; min-height: 76px; display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 13px 48px 13px 15px; text-align: left; border: 1px solid #292c31; border-radius: 16px; background: #17191e; color: #fff; }
.guest-row__main { min-width: 0; display: grid; gap: 3px; }
.guest-row__main strong { font-size: 16px; line-height: 1.2; }
.guest-row__main span { color: #c8ff54; font-size: 14px; font-variant-numeric: tabular-nums; }
.guest-row small { grid-column: 1 / -1; color: #787b81; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.guest-row__status { position: absolute; top: 50%; right: 15px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; transform: translateY(-50%); background: #292c31; color: #c8ff54; font-size: 18px; }
.guest-row.is-arrived { opacity: .72; border-color: #5d742c; background: #172015; }
.guest-row.is-arrived .guest-row__status { background: #c8ff54; color: #10120c; }
.result { position: fixed; inset: 0; z-index: 20; padding: 40px 24px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #111; }
.result.ok { background: #bdf545; color: #10150a; }
.result.duplicate { background: #ffba3a; color: #241500; }
.result.invalid { background: #f24f58; color: #fff; }
.result-symbol { width: 116px; height: 116px; border: 6px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 70px; font-weight: 900; }
.result h2 { font-size: 42px; line-height: .95; letter-spacing: -.05em; margin: 30px 0 12px; }
#result-code { font-size: 24px; font-weight: 800; letter-spacing: .08em; margin: 0 0 8px; }
#result-detail { max-width: 320px; min-height: 42px; margin: 0 0 24px; opacity: .72; }
.result-close { width: min(100%, 360px); background: #111; color: #fff; margin-top: 10px; }
.undo { background: transparent; color: currentColor; text-decoration: underline; min-height: 40px; }
@media (min-width: 700px) { .app-screen { padding-top: 36px; } }
