:root { --brand: #E11D27; --brand-dark: #B80800; --accent: #F26522; --ink: #182230; --muted: #526175; --line: #ECECEE; --bg: #F5F7FA; --surface: #fff; --radius: 12px;
  --ok-bg: #ECFDF3; --ok-fg: #067647; --warn-bg: #FFFAEB; --warn-fg: #B54708; --err-bg: #FEF3F2; --err-fg: #B42318; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: 'Inter', Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-user-select: none; user-select: none; touch-action: manipulation; overflow: hidden; }
h1, h2, .k-clock, .k-wordmark { font-family: 'Sora', 'Inter', sans-serif; }
#app { height: 100%; }
.k-boot { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.k-wordmark { display: inline-flex; align-items: baseline; gap: 8px; }
.k-wordmark span { font-weight: 800; font-size: 1.8rem; letter-spacing: .04em; color: var(--brand); }
.k-wordmark small { font-weight: 700; font-size: .8rem; letter-spacing: .12em; color: var(--muted); border: 1.5px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.k-screen { height: 100%; width: 100%; }
.k-center { display: flex; align-items: center; justify-content: center; padding: 24px; }
.k-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: 0 8px 30px rgba(24, 34, 48, .06); }
.k-narrow { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 10px; }
.k-note { color: var(--muted); font-size: .95rem; margin: 4px 0; }
.k-label { font-size: .85rem; font-weight: 600; margin-top: 8px; }
.k-input { width: 100%; padding: 16px; font-size: 1.3rem; border: 1.5px solid #D4D4D8; border-radius: var(--radius); background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text; }
.k-input:focus { outline: 3px solid #FDECEE; border-color: var(--brand); }
.k-code { text-transform: uppercase; letter-spacing: .25em; font-family: 'JetBrains Mono', ui-monospace, monospace; text-align: center; font-size: 1.8rem; }
.k-btn { padding: 16px 28px; font-size: 1.1rem; font-weight: 600; border-radius: var(--radius); border: 1.5px solid #D4D4D8; background: #fff; color: var(--ink); cursor: pointer; }
.k-btn:active { transform: scale(.98); }
.k-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.k-btn-primary:disabled { background: #F1A5A9; border-color: #F1A5A9; }
.k-btn-wide { width: 100%; margin-top: 12px; }
.k-link { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: .85rem; margin-top: 24px; cursor: pointer; }
.k-row { display: flex; gap: 12px; margin-top: 16px; justify-content: center; }
.k-error { background: var(--err-bg); color: var(--err-fg); border-radius: 10px; padding: 12px 14px; font-weight: 500; margin: 8px 0; }

.k-outlet { display: grid; grid-template-columns: 1fr 1fr; }
.k-left { padding: 32px 40px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: linear-gradient(160deg, #FDF1F1, #FFFFFF 60%); border-right: 1px solid var(--line); overflow: hidden; }
.k-outlet-name { margin: 16px 0 0; font-size: 1.9rem; text-align: center; }
.k-clock { font-size: 5rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.k-date { color: var(--muted); font-size: 1.15rem; }
.k-qr-wrap { margin-top: 16px; text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; }
.k-qr { width: min(300px, 32vh); height: min(300px, 32vh); background: #fff; padding: 10px; border-radius: 16px; border: 1px solid var(--line); }
.k-qr svg { width: 100%; height: 100%; display: block; }
.k-qr-off { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: .95rem; }
.k-offline { margin-top: 8px; background: var(--warn-bg); color: var(--warn-fg); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .85rem; }
.k-offline-strong { background: var(--err-bg); color: var(--err-fg); }
.k-right { padding: 32px 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: auto; }
.k-right h2 { margin: 0 0 8px; font-size: 1.6rem; text-align: center; }
.k-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; max-width: 560px; }
.k-action { padding: 40px 12px; font-size: 1.5rem; font-weight: 700; border-radius: 16px; border: 0; color: #fff; cursor: pointer; font-family: 'Sora', sans-serif; }
.k-action:active { transform: scale(.98); }
.k-in { background: var(--brand); } .k-out { background: #182230; } .k-break { background: var(--accent); }

.k-pinpad { width: 100%; max-width: 380px; }
.k-pin-dots { display: flex; gap: 14px; justify-content: center; margin: 8px 0 12px; }
.k-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #A1A1AA; }
.k-dot.filled { background: var(--brand); border-color: var(--brand); }
.k-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.k-key { padding: 20px 0; font-size: 1.8rem; font-weight: 600; border-radius: var(--radius); border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.k-key:active { background: #FDECEE; }
.k-key-muted { font-size: 1rem; color: var(--muted); background: #F4F4F5; }

.k-result { text-align: center; width: 100%; max-width: 460px; padding: 32px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.k-result.ok { background: var(--ok-bg); } .k-result.queued { background: var(--warn-bg); } .k-result.fail { background: var(--err-bg); }
.k-result-icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: #fff; background: #12B76A; }
.k-result.queued .k-result-icon { background: #F79009; } .k-result.fail .k-result-icon { background: #D92D20; }
.k-result-name { font-size: 1.8rem; font-weight: 700; font-family: 'Sora', sans-serif; }
.k-result-time { font-size: 2.6rem; font-weight: 800; font-family: 'Sora', sans-serif; }

#blazor-error-ui { background: #FFFAEB; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

@media (max-width: 900px), (orientation: portrait) {
  .k-outlet { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow: auto; }
  .k-clock { font-size: 3.4rem; } .k-qr { width: 200px; height: 200px; }
  html, body { overflow: auto; }
}
