:root {
  --navy: #0F2739; --ink: #0F2739; --muted: #4A5D72; --paper: #FAF7F2; --card: #fff;
  --accent: #0E9F6E; --accent-ink: #0A7D56; --accent-soft: rgba(14,159,110,.12);
  --line: rgba(15,39,57,.08); --line2: rgba(15,39,57,.14);
  --ok: #0A7D56; --ok-bg: rgba(14,159,110,.12);
  --warn: #9A5B00; --warn-bg: rgba(229,152,20,.16);
  --bad: #B3261E; --bad-bg: rgba(214,58,48,.12);
  --info: #1F5FA8; --info-bg: rgba(43,108,190,.12);
  --neutral: #4A5D72; --neutral-bg: rgba(15,39,57,.07);
  --shadow: 0 1px 2px rgba(15,39,57,.05);
  --shadow-lg: 0 12px 40px rgba(15,39,57,.18);
  --ease: cubic-bezier(.22,1,.36,1);
  --r: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: 'Manrope', system-ui, sans-serif; font-size: 15px; line-height: 24px; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-ink); }
.ic { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; font-weight: 600; cursor: pointer; transition: transform .15s var(--ease), background .15s, box-shadow .15s; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: #F3F0EA; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #8F1D17; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 32px; padding: 4px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--neutral-bg); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input { height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; width: 100%; min-width: 0; }
textarea.input { height: auto; min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 48px; }
.pw-eye { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; border: 0; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; }
.pw-eye:hover { color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hint { font-size: 13px; color: var(--muted); line-height: 20px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { font-size: 40px; line-height: 48px; font-weight: 700; max-width: 480px; }
.login-art p { color: rgba(255,255,255,.72); max-width: 440px; margin-top: 16px; }
.login-art .art { position: absolute; right: -40px; bottom: -20px; width: 460px; opacity: .95; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); display: flex; align-items: center; justify-content: center; color: #fff; }
.brand small { display: block; font-weight: 500; font-size: 12px; line-height: 16px; opacity: .7; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.login-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 24px; }
.login-box h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.btn-xl { min-height: 56px; font-size: 17px; border-radius: 14px; width: 100%; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.role-card { border: 1px solid var(--line2); background: #fff; border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 92px; transition: border-color .15s, transform .15s var(--ease); }
.role-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.role-card b { font-size: 14px; line-height: 20px; display: block; }
.role-card span { font-size: 12px; line-height: 16px; color: var(--muted); display: block; }
.role-card .ic { color: var(--accent); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-brand { display: none !important; }
.login-err { color: var(--bad); font-size: 13px; font-weight: 600; min-height: 20px; }

/* Shell */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; background: var(--navy); color: #fff; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 24px 16px; z-index: 40; transition: transform .28s var(--ease); }
.sidebar .brand { padding: 0 8px 24px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.78); text-decoration: none; font-weight: 600; min-height: 44px; transition: background .15s; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: var(--accent); color: #fff; }
.nav .badge { margin-left: auto; background: #E59814; color: #fff; font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 999px; }
.nav-sep { height: 1px; background: rgba(255,255,255,.1); margin: 8px 4px; }
.side-foot { font-size: 12px; color: rgba(255,255,255,.55); padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.main { flex: 1; margin-left: 248px; min-width: 0; display: flex; flex-direction: column; }
.strip { background: #FFF4DC; color: #6B4A00; font-size: 13px; line-height: 20px; padding: 8px 32px; display: flex; align-items: center; gap: 12px; }
.strip span { flex: 1; }
.strip .icon-btn { width: 32px; height: 32px; color: #6B4A00; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 16px 32px; border-bottom: 1px solid var(--line); background: rgba(250,247,242,.92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30; }
.topbar h1 { font-size: 24px; line-height: 32px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hamburger { display: none; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.user-chip b { font-size: 14px; line-height: 20px; display: block; }
.user-chip small { font-size: 12px; line-height: 16px; color: var(--muted); display: block; }
.content { padding: 32px; display: flex; flex-direction: column; gap: 24px; max-width: 1360px; width: 100%; }
.scrim { display: none; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3 { font-size: 16px; line-height: 24px; font-weight: 700; }
.card-head .sub { font-size: 13px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.kpi .k-lbl { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi .k-val { font-size: 32px; line-height: 40px; font-weight: 700; }
.kpi .k-val.accent { color: var(--accent-ink); }
.kpi .k-sub { font-size: 13px; color: var(--muted); line-height: 20px; }
.row2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.row-even { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.toolbar .field { min-width: 150px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.search .input { padding-left: 40px; }
.muted { color: var(--muted); }
.muted-p { color: var(--muted); }
.accent-txt { color: var(--accent-ink); font-weight: 700; }
.section-title { font-size: 16px; line-height: 24px; font-weight: 700; }
.spacer { flex: 1; }
.flex { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }

/* Pills, avatars */
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: 12px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-neutral { background: var(--neutral-bg); color: var(--neutral); }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700; flex: none; letter-spacing: .02em; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person b { display: block; font-weight: 600; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }

/* Lists of rows */
.rows { display: flex; flex-direction: column; }
.rowi { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); min-height: 56px; }
.rowi:last-child { border-bottom: 0; }
.rowi .person { flex: 1; }
.rowi .r-val { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.rank { width: 28px; height: 28px; border-radius: 999px; background: var(--neutral-bg); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; color: var(--muted); }
.rank.top { background: var(--warn-bg); color: var(--warn); }
.meter { height: 6px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; width: 120px; flex: none; }
.meter i { display: block; height: 100%; background: #E59814; border-radius: 999px; }
.scroll-list { max-height: 336px; overflow-y: auto; }

/* Tables */
.table-wrap { overflow: auto; max-height: 640px; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 20px; }
.tbl th { position: sticky; top: 0; background: #fff; z-index: 1; text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { padding-left: 24px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 24px; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl td.wrapc { white-space: normal; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #F7F5F0; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line2); background: #FCFBF8; position: sticky; bottom: 0; }
.tbl .acts { text-align: right; white-space: nowrap; }
.tbl .acts .icon-btn { width: 36px; height: 36px; }
.cardno { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; letter-spacing: .04em; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 4px; background: var(--neutral-bg); padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 10px; font-weight: 600; cursor: pointer; color: var(--muted); white-space: nowrap; min-height: 40px; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* Empty */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 24px; color: var(--muted); text-align: center; }

/* Chart */
.chart { position: relative; padding: 16px 24px 24px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); padding: 0 0 8px; flex-wrap: wrap; }
.chart .legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 18px; opacity: 0; transition: opacity .12s; white-space: nowrap; transform: translate(-50%, -110%); }
.chart-tip.on { opacity: 1; }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(15,39,57,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; opacity: 0; transition: opacity .2s var(--ease); }
.modal-back.show { opacity: 1; }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.98); transition: transform .24s var(--ease); }
.modal-wide { max-width: 760px; }
.modal-back.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 16px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; line-height: 28px; font-weight: 700; }
.modal-body { padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Toast */
.toasts { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .2s var(--ease), transform .25s var(--ease); max-width: 360px; }
.toast.show { opacity: 1; transform: none; }
.toast-ok .ic { color: #5BD6A6; }
.toast-warn .ic { color: #F5B544; }

/* Register card waiting */
.scan-wait { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; border: 2px dashed var(--accent); border-radius: 16px; background: var(--accent-soft); text-align: center; }
.scan-wait .ring { width: 80px; height: 80px; border-radius: 999px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--accent); position: relative; }
.scan-wait .ring::after { content: ''; position: absolute; inset: -8px; border-radius: 999px; border: 2px solid var(--accent); opacity: .5; animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { from { transform: scale(.9); opacity: .6; } to { transform: scale(1.25); opacity: 0; } }
.scan-got { font-size: 20px; font-weight: 700; }

/* Kiosk */
.kiosk { min-height: 100vh; background: radial-gradient(1200px 600px at 20% 0%, #163A54 0%, #0F2739 60%); color: #fff; display: flex; flex-direction: column; }
.kiosk-top { display: flex; align-items: center; gap: 16px; padding: 16px 32px; }
.kiosk-top .brand { flex: 1; }
.kiosk-top .reader { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.75); }
.kiosk-top .dot { width: 8px; height: 8px; border-radius: 999px; background: #3DDC97; box-shadow: 0 0 0 4px rgba(61,220,151,.2); }
.kbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; font-weight: 600; cursor: pointer; }
.kbtn:hover { background: rgba(255,255,255,.12); }
.kiosk-body { flex: 1; display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; padding: 16px 32px 32px; min-height: 0; }
.kiosk-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; }
.k-clock { font-size: 112px; line-height: 112px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.k-clock small { font-size: 36px; margin-left: 12px; font-weight: 600; opacity: .75; letter-spacing: 0; }
.k-date { font-size: 24px; line-height: 32px; color: rgba(255,255,255,.75); font-weight: 500; }
.k-stage { width: 100%; max-width: 620px; min-height: 300px; display: flex; align-items: center; justify-content: center; }
.k-idle { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.k-idle .tapzone { width: 160px; height: 160px; border-radius: 32px; border: 2px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; color: #5BD6A6; position: relative; }
.k-idle .tapzone::after { content: ''; position: absolute; inset: -12px; border-radius: 40px; border: 2px solid rgba(91,214,166,.5); animation: pulse 2s var(--ease) infinite; }
.k-idle h2 { font-size: 32px; line-height: 40px; font-weight: 700; }
.k-idle p { color: rgba(255,255,255,.7); }
.k-result { width: 100%; background: #fff; color: var(--ink); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.35); animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
.k-result .k-name { font-size: 30px; line-height: 38px; font-weight: 700; }
.k-result .k-meta { color: var(--muted); }
.k-type { font-size: 20px; line-height: 28px; font-weight: 700; padding: 8px 24px; border-radius: 999px; letter-spacing: .04em; }
.k-type.in { background: var(--ok-bg); color: var(--ok); }
.k-type.out { background: var(--info-bg); color: var(--info); }
.k-result .k-time { font-size: 44px; line-height: 52px; font-weight: 700; font-variant-numeric: tabular-nums; }
.k-result.bad .k-name { color: var(--bad); }
.k-side { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.k-panel { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; display: flex; flex-direction: column; min-height: 0; }
.k-panel h3 { font-size: 15px; font-weight: 700; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 8px; }
.k-panel h3 .muted { color: rgba(255,255,255,.6); font-weight: 500; margin-left: auto; font-size: 13px; }
.k-recent { overflow-y: auto; max-height: 300px; }
.k-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid rgba(255,255,255,.06); }
.k-row:last-child { border-bottom: 0; }
.k-row .person b { color: #fff; }
.k-row .person small { color: rgba(255,255,255,.6); }
.k-row .t { margin-left: auto; text-align: right; font-size: 13px; line-height: 18px; white-space: nowrap; }
.k-row .t b { display: block; font-size: 14px; }
.k-tag { font-size: 11px; font-weight: 700; padding: 0 8px; border-radius: 999px; line-height: 18px; }
.k-tag.in { background: rgba(61,220,151,.18); color: #6EE7B7; }
.k-tag.out { background: rgba(120,170,240,.2); color: #A8C8F5; }
.k-tag.late { background: rgba(245,181,68,.2); color: #F5C26B; }
.k-sim { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.k-sim .input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
.k-sim .input::placeholder { color: rgba(255,255,255,.5); }
.k-sim .search .ic { color: rgba(255,255,255,.6); }
.k-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 260px; overflow-y: auto; }
.k-card { display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #fff; cursor: pointer; min-height: 52px; transition: background .15s, transform .15s var(--ease); }
.k-card:hover { background: rgba(255,255,255,.12); }
.k-card:active { transform: scale(.98); }
.k-card b { font-size: 13px; line-height: 16px; display: block; }
.k-card small { font-size: 11px; line-height: 14px; color: rgba(255,255,255,.55); font-family: ui-monospace, Menlo, monospace; }
.k-row .avatar, .k-card .avatar { background: rgba(255,255,255,.12) !important; color: #fff !important; }
.k-card.unknown { border-style: dashed; }
.k-hint { font-size: 12px; line-height: 18px; color: rgba(255,255,255,.55); }
.k-avatar-big { width: 112px; height: 112px; font-size: 40px; }

/* PIN pad */
.pin-dots { display: flex; justify-content: center; gap: 16px; padding: 8px 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 999px; border: 2px solid var(--line2); }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-pad button { min-height: 56px; border-radius: 14px; border: 1px solid var(--line2); background: #fff; font-size: 22px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pin-pad button:hover { background: #F3F0EA; }
.pin-err { text-align: center; color: var(--bad); font-weight: 600; font-size: 14px; min-height: 24px; }
.shake { animation: shake .35s var(--ease); }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* Payslip */
.payslip { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 40px; }
.payslip header { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.payslip h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.payslip .ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; padding: 24px 0; border-bottom: 1px solid var(--line2); }
.payslip .ps-grid div { display: flex; justify-content: space-between; gap: 12px; }
.payslip .ps-lines { padding: 16px 0; }
.payslip .ps-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line2); }
.payslip .ps-line span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.payslip .ps-total { display: flex; justify-content: space-between; padding: 16px 0; font-size: 20px; font-weight: 700; }
.payslip .ps-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 48px; font-size: 13px; color: var(--muted); }
.payslip .ps-sign div { border-top: 1px solid var(--ink); padding-top: 8px; }

.audit-line { display: flex; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.audit-line:last-child { border-bottom: 0; }
.audit-line .when { font-size: 13px; color: var(--muted); width: 170px; flex: none; }
.audit-line .what b { font-weight: 700; }
.audit-line .what p { color: var(--muted); font-size: 14px; line-height: 20px; }

.shift-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.shift-time { font-size: 28px; line-height: 36px; font-weight: 700; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .row2, .row-even { grid-template-columns: 1fr; }
  .kiosk-body { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,39,57,.4); z-index: 35; }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .topbar { padding: 12px 16px; gap: 8px; }
  .topbar h1 { font-size: 20px; line-height: 28px; }
  .user-chip { padding: 4px; }
  .user-chip .uc-txt { display: none; }
  .strip { padding: 8px 16px; }
  .content { padding: 16px; gap: 16px; }
  .card-pad, .kpi { padding: 16px; }
  .card-head { padding: 12px 16px; }
  .rowi { padding: 12px 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .kpi .k-val { font-size: 26px; line-height: 32px; }
  .toolbar .field, .toolbar .grow { min-width: 0; flex: 1 1 140px; }
  .toolbar > .btn { flex: 1 1 auto; min-height: 44px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  /* Tables become stacked cards */
  .table-wrap { max-height: none; overflow: visible; }
  table.tbl, .tbl tbody, .tbl tr, .tbl td, .tbl tfoot { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tbody tr, .tbl tfoot tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .tbl td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; min-height: 28px; align-items: center; }
  .tbl td::before { content: attr(data-l); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; flex: none; }
  .tbl td:first-child, .tbl td:last-child { padding-left: 0; padding-right: 0; }
  .tbl td.first { padding-bottom: 8px; justify-content: flex-start; text-align: left; }
  .login-brand { display: flex !important; color: var(--ink); }
  .tbl td.first::before { display: none; }
  .tbl td.acts { justify-content: flex-end; }
  .tbl td.acts::before { display: none; }
  .tbl tfoot td { position: static; background: none; border: 0; }
  .tbl tfoot tr { background: #FCFBF8; }
  .pager { padding: 12px 16px; }
  .meter { width: 64px; }
  .audit-line { flex-direction: column; gap: 4px; padding: 12px 16px; }
  .audit-line .when { width: auto; }
  .payslip { padding: 24px 16px; }
  .payslip .ps-grid { grid-template-columns: 1fr; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
  .kiosk-top { padding: 12px 16px; flex-wrap: wrap; }
  .kiosk-top .reader { order: 3; width: 100%; }
  .kiosk-body { padding: 8px 16px 24px; gap: 16px; }
  .k-clock { font-size: 64px; line-height: 72px; }
  .k-clock small { font-size: 22px; }
  .k-date { font-size: 18px; line-height: 26px; }
  .k-stage { min-height: 260px; }
  .k-idle .tapzone { width: 120px; height: 120px; }
  .k-idle h2 { font-size: 26px; line-height: 32px; }
  .k-result { padding: 24px 16px; }
  .k-result .k-name { font-size: 24px; line-height: 30px; }
  .k-result .k-time { font-size: 36px; line-height: 44px; }
  .k-cards { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr; }
  .role-card { min-height: 56px; flex-direction: row; align-items: center; gap: 12px; }
  .login-panel { padding: 32px 16px; align-items: flex-start; }
  .modal-body { padding: 16px; }
}
@media (max-width: 560px) {
  .kpis-money { grid-template-columns: 1fr; }
  .toolbar .field.wide { flex-basis: 100%; }
}
@media print {
  .sidebar, .topbar, .strip, .no-print, .toasts { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  body { background: #fff; }
  .payslip { border: 0; padding: 0; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Shared demo strip colours: identical on every EulClavie demo */
.strip { background: #FFF6E5; color: #6B4A00; border-bottom: 1px solid rgba(183, 121, 31, .22); font-size: 13px; line-height: 20px; font-weight: 500; }
.strip .ic, .strip > svg { color: #6B4A00; }
.strip #stripReset { color: #6B4A00; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; background: none; }
.strip #stripReset:hover { background: rgba(183, 121, 31, .12); }
.strip .icon-btn { color: #6B4A00; text-decoration: none; background: none; }
.strip .icon-btn:hover { background: rgba(183, 121, 31, .14); color: #6B4A00; }
