/* Purpose: styles for the 1080x1920 portrait kiosk mockup: large touch targets, high contrast, picture-first. */
:root {
  --scale: 0.45;
  --bg: #eef2f6; --card: #ffffff; --ink: #0f172a; --muted: #475569; --line: #d5dde8;
  --blue: #1d4ed8; --blue-t: #dbeafe;
  --green: #15803d; --green-t: #dcfce7;
  --red: #b91c1c; --red-t: #fee2e2;
  --amber: #b45309; --amber-t: #fef3c7;
  --purple: #6d28d9; --purple-t: #ede9fe;
  --teal: #0f766e; --teal-t: #ccfbf1;
  --orange: #c2410c; --orange-t: #ffedd5;
  --grey-t: #e2e8f0;
  --font: 'Noto Sans', 'Noto Sans Tamil', 'Noto Sans Devanagari', 'Nirmala UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: #1e293b; font-family: var(--font); color: var(--ink); overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Stage & scaling ---------- */
#stage { display: flex; gap: 24px; justify-content: center; align-items: flex-start; padding: 16px; height: 100%; }
#kiosk-wrap { width: calc(1080px * var(--scale)); height: calc(1920px * var(--scale)); flex: none; }
#kiosk {
  width: 1080px; height: 1920px; transform: scale(var(--scale)); transform-origin: 0 0;
  background: var(--bg); border-radius: 40px; overflow: hidden; position: relative;
  display: flex; flex-direction: column; box-shadow: 0 0 0 14px #0b1220, 0 30px 80px rgba(0,0,0,.5);
  font-size: 34px; line-height: 1.3;
}

/* ---------- Presenter panel ---------- */
#demo { width: 300px; flex: none; background: #0f172a; color: #cbd5e1; border-radius: 16px; padding: 20px; font-size: 14px; line-height: 1.45; max-height: 100%; overflow-y: auto; }
#demo h3 { margin: 0 0 6px; color: #fff; font-size: 16px; }
#demo p { margin: 0 0 12px; }
#demo button { display: block; width: 100%; padding: 12px; margin: 0 0 10px; border-radius: 10px; background: #16a34a; color: #fff; font-weight: 700; font-size: 15px; }
#demo button.warn { background: #dc2626; }
#demo button.ghost { background: #334155; }
#demo dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 8px 0 12px; }
#demo dt { color: #94a3b8; } #demo dd { margin: 0; color: #fff; font-family: ui-monospace, monospace; }
#demo .small { color: #94a3b8; font-size: 13px; }
#demo .note:not(:empty) { background: #78350f; color: #fef3c7; padding: 10px; border-radius: 8px; }
body.narrow #stage { flex-direction: column; align-items: center; overflow-y: auto; height: auto; }
body.narrow { overflow: auto; }
body.narrow #demo { width: calc(1080px * var(--scale)); }

/* ---------- Top bar ---------- */
#topbar { height: 140px; flex: none; display: flex; align-items: center; gap: 24px; padding: 0 40px; background: #0b3b6e; color: #fff; }
.tb-brand { display: flex; align-items: center; gap: 18px; font-weight: 800; font-size: 36px; white-space: nowrap; }
.tb-brand small { display: block; font-weight: 400; font-size: 22px; opacity: .85; }
.logo { width: 76px; height: 76px; border-radius: 20px; background: #fff; color: #0b3b6e; display: grid; place-items: center; font-size: 44px; font-weight: 800; }
.tb-user { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 26px; margin-left: auto; white-space: nowrap; }
.tb-user small { display: block; font-weight: 400; font-size: 20px; opacity: .85; }
.tb-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tb-user + .tb-right { margin-left: 16px; }
.tb-langs { display: flex; background: rgba(255,255,255,.12); border-radius: 18px; padding: 6px; }
.tb-langs button { padding: 10px 14px; border-radius: 14px; font-size: 22px; font-weight: 600; }
.tb-langs button.on { background: #fff; color: #0b3b6e; }
.tb-btn { width: 72px; height: 72px; border-radius: 18px; background: rgba(255,255,255,.12); font-size: 34px; }

/* ---------- Screen layout ---------- */
#screen { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.scr { flex: 1; padding: 48px 56px; display: flex; flex-direction: column; gap: 32px; }
.scr.center { align-items: center; justify-content: center; text-align: center; }
.big-q { font-size: 58px; font-weight: 800; margin: 0; line-height: 1.25; }
.big-q.left { text-align: left; }
.page-title { font-size: 52px; font-weight: 800; margin: 0; }
.sub { font-size: 36px; color: var(--muted); margin: 0; }
.sub.left { text-align: left; }
.label { font-size: 34px; font-weight: 700; margin: 0; color: var(--muted); }
.hint { font-size: 30px; color: var(--muted); text-align: center; margin: 0; }
.steps { font-size: 34px; letter-spacing: 12px; color: var(--blue); margin: -16px 0 0; }
.sec { font-size: 40px; margin: 16px 0 0; }

/* ---------- Home ---------- */
.home { gap: 40px; }
.home-hero { text-align: center; padding: 20px 0 10px; }
.home-hero h1 { font-size: 84px; margin: 16px 0 0; line-height: 1.15; }
.clock b { display: block; font-size: 96px; color: #0b3b6e; }
.clock span { font-size: 36px; color: var(--muted); }
.lang-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lang-btn { height: 140px; border-radius: 32px; background: var(--card); border: 5px solid var(--line); font-size: 48px; font-weight: 800; }
.lang-btn.on { border-color: var(--blue); background: var(--blue-t); color: var(--blue); }

/* ---------- Tiles ---------- */
.tile { position: relative; display: flex; align-items: center; gap: 36px; border-radius: 40px; padding: 40px 48px; text-align: left; border: 5px solid transparent; box-shadow: 0 8px 0 rgba(15,23,42,.12); transition: transform .08s; }
.tile:active, .btn-big:active, .row-card:active { transform: translateY(6px); box-shadow: 0 2px 0 rgba(15,23,42,.12); }
.tile-ic { font-size: 120px; line-height: 1; }
.tile-txt b { display: block; font-size: 60px; }
.tile-txt small { display: block; font-size: 32px; color: var(--muted); margin-top: 8px; }
.tile-txt em { display: inline-block; font-style: normal; font-size: 30px; font-weight: 700; margin-top: 14px; padding: 6px 20px; border-radius: 999px; background: #fff; }
.tile-xl { min-height: 380px; }
.tile-row { min-height: 220px; }
.tile-row .tile-ic { font-size: 96px; }
.tile-row .tile-txt b { font-size: 52px; }
.tile-v { flex-direction: column; justify-content: center; gap: 20px; min-height: 340px; text-align: center; padding: 32px; }
.tile-v b { font-size: 46px; }
.tile-badge { position: absolute; top: 20px; right: 20px; background: var(--red); color: #fff; font-size: 24px; font-weight: 700; padding: 6px 16px; border-radius: 999px; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.c-blue { background: var(--blue-t); border-color: #93c5fd; } .c-blue b { color: var(--blue); }
.c-green { background: var(--green-t); border-color: #86efac; } .c-green b { color: var(--green); }
.c-purple { background: var(--purple-t); border-color: #c4b5fd; } .c-purple b { color: var(--purple); }
.c-teal { background: var(--teal-t); border-color: #5eead4; } .c-teal b { color: var(--teal); }
.c-orange { background: var(--orange-t); border-color: #fdba74; } .c-orange b { color: var(--orange); }
.c-red { background: var(--red-t); border-color: #fca5a5; } .c-red b { color: var(--red); }

/* ---------- Buttons & bottom nav ---------- */
.btn-big { width: 100%; min-height: 150px; border-radius: 36px; font-size: 48px; font-weight: 800; color: #fff; box-shadow: 0 8px 0 rgba(15,23,42,.2); }
.btn-big.green { background: var(--green); } .btn-big.blue { background: var(--blue); }
.btn-big.ghost { background: var(--card); color: var(--ink); border: 5px solid var(--line); }
.btn-ghost { align-self: stretch; padding: 30px; border-radius: 28px; border: 4px dashed var(--line); font-size: 38px; font-weight: 700; color: var(--blue); background: var(--card); }
.btn-col { width: 100%; display: flex; flex-direction: column; gap: 28px; margin-top: 20px; }
.bottom-nav { position: sticky; bottom: 0; display: flex; gap: 20px; padding: 24px 40px 32px; background: linear-gradient(transparent, var(--bg) 22%); }
.nb { flex: 1; min-height: 120px; border-radius: 28px; background: var(--card); border: 4px solid var(--line); font-size: 36px; font-weight: 800; white-space: nowrap; padding: 0 12px; }
.nb-exit { background: var(--red-t); border-color: #fca5a5; color: var(--red); }
.nb-menu { color: var(--blue); }

/* ---------- Fingerprint ---------- */
.scanner { width: 520px; height: 600px; border-radius: 80px; background: #0f172a; color: #38bdf8; display: grid; place-items: center; border: 12px solid #334155; box-shadow: inset 0 0 60px rgba(56,189,248,.25); }
.scanner-fp { width: 320px; height: 320px; animation: pulse 1.8s ease-in-out infinite; }
.scanner-fp svg { width: 100%; height: 100%; }
.scanner.checking { color: #facc15; } .scanner.checking .scanner-fp { animation: spin-glow .6s linear infinite; }
.scanner.fail { color: #f87171; border-color: var(--red); }
.scanner-arrow { font-size: 60px; color: var(--blue); animation: bob 1s ease-in-out infinite; }
.status { font-size: 46px; font-weight: 800; padding: 28px 40px; border-radius: 32px; width: 100%; }
.status small { display: block; font-size: 34px; font-weight: 600; margin-top: 8px; }
.status.checking { background: var(--amber-t); color: var(--amber); }
.status.bad { background: var(--red-t); color: var(--red); }
@keyframes pulse { 50% { opacity: .55; transform: scale(.94); } }
@keyframes spin-glow { 50% { opacity: .4; } }
@keyframes bob { 50% { transform: translateY(14px); } }

/* ---------- Results & people ---------- */
.result-ic { width: 300px; height: 300px; border-radius: 50%; display: grid; place-items: center; font-size: 160px; }
.result-ic.sm { width: 160px; height: 160px; font-size: 90px; }
.result-ic.ok { background: var(--green-t); } .result-ic.warn { background: var(--amber-t); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: #f59e0b; color: #fff; font-weight: 800; flex: none; }
.avatar.sm { width: 64px; height: 64px; font-size: 26px; }
.avatar.lg { width: 130px; height: 130px; font-size: 50px; }
.avatar.xl { width: 280px; height: 280px; font-size: 110px; border: 10px solid #fff; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.who { display: flex; align-items: center; gap: 28px; background: var(--card); border-radius: 32px; padding: 28px 32px; }
.who b { display: block; font-size: 46px; } .who span { font-size: 30px; color: var(--muted); }

/* ---------- Lists, badges ---------- */
.list { display: flex; flex-direction: column; gap: 22px; }
.row-card { display: flex; align-items: center; gap: 24px; background: var(--card); border: 4px solid var(--line); border-radius: 30px; padding: 30px 34px; text-align: left; }
.row-card.attn { border-color: #fca5a5; background: #fff7f7; }
.row-card.past { opacity: .5; }
.row-card.next { border-color: #86efac; background: var(--green-t); }
.rc-main { flex: 1; display: flex; flex-direction: column; }
.rc-main b { font-size: 42px; } .rc-main span { font-size: 30px; color: var(--muted); }
.rc-main .rc-amt { font-size: 38px; color: var(--ink); font-weight: 700; }
.badges { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.badge { font-size: 26px; font-weight: 700; padding: 8px 20px; border-radius: 999px; white-space: nowrap; }
.badge.red { background: var(--red-t); color: var(--red); } .badge.green { background: var(--green-t); color: var(--green); }
.badge.grey { background: var(--grey-t); color: var(--muted); } .badge.amber { background: var(--amber-t); color: var(--amber); }
.chev { font-size: 70px; color: var(--muted); }
.hd-date { width: 120px; text-align: center; font-size: 26px; color: var(--muted); }
.hd-date b { display: block; font-size: 52px; color: var(--ink); }

/* ---------- Payslip ---------- */
.pay-hero { background: var(--green); color: #fff; border-radius: 40px; padding: 44px; text-align: center; }
.ph-label { display: block; font-size: 38px; opacity: .9; }
.ph-amt { display: block; font-size: 130px; font-weight: 800; line-height: 1.1; }
.stat-row, .bal-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.stat, .bal { background: var(--card); border-radius: 30px; padding: 26px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.stat span, .bal span { font-size: 60px; } .stat b { font-size: 72px; line-height: 1.1; } .stat small, .bal small { font-size: 28px; color: var(--muted); }
.bal b { font-size: 110px; line-height: 1.1; color: var(--teal); }
.detail { display: grid; gap: 22px; }
.detail-col { background: var(--card); border-radius: 28px; padding: 26px 32px; }
.detail-col h3 { margin: 0 0 10px; font-size: 38px; }
.line { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 2px solid var(--grey-t); font-size: 32px; }
.line.total { border: 0; font-weight: 800; font-size: 36px; }
.action-area { display: flex; flex-direction: column; gap: 22px; margin-top: auto; }
.ok-line { font-size: 42px; font-weight: 800; color: var(--green); text-align: center; }
.notice { background: var(--amber-t); color: var(--amber); font-size: 36px; font-weight: 700; padding: 30px; border-radius: 28px; text-align: center; }

/* ---------- Signature pad ---------- */
.sign-box { position: relative; background: #fff; border: 5px dashed #93c5fd; border-radius: 32px; overflow: hidden; }
.sign-box canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; position: relative; z-index: 1; }
.sign-guide { position: absolute; left: 50px; right: 50px; bottom: 120px; border-bottom: 4px solid #cbd5e1; color: #94a3b8; font-size: 36px; padding-bottom: 10px; display: flex; gap: 20px; align-items: baseline; }
.sign-guide span { font-size: 48px; font-weight: 800; }
.sign-box.drawn .sign-guide { color: transparent; }
.sign-box.drawn .sign-guide span { color: #94a3b8; }
.sign-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.doc { background: var(--card); border: 3px solid var(--line); border-radius: 32px; padding: 36px 40px; display: flex; flex-direction: column; gap: 22px; }
.doc .detail-col { background: var(--bg); }
.doc-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px solid var(--line); padding-bottom: 18px; font-size: 40px; }
.doc-head span { font-size: 34px; color: var(--muted); }
.doc-emp { font-size: 34px; } .doc-emp small { display: block; font-size: 28px; color: var(--muted); }
.doc-net { font-size: 44px; color: var(--green); }
.doc-sign { display: flex; flex-direction: column; gap: 12px; text-align: center; } .doc-sign small { font-size: 26px; color: var(--muted); }
.sig-img { display: block; width: 70%; max-width: 640px; margin: 0 auto; background: #fff; border: 3px solid var(--line); border-radius: 20px; }

/* ---------- Printing ---------- */
.printer { font-size: 220px; position: relative; }
.paper { position: absolute; left: 50%; top: 70%; width: 130px; height: 0; margin-left: -65px; background: #fff; border: 4px solid var(--line); animation: feed 3.4s ease-out forwards; }
@keyframes feed { to { height: 180px; } }
.progress { width: 100%; height: 40px; border-radius: 20px; background: var(--grey-t); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--blue); animation: fill 3.4s linear forwards; }
@keyframes fill { to { width: 100%; } }
.spinner { width: 200px; height: 200px; border-radius: 50%; border: 22px solid var(--purple-t); border-top-color: var(--purple); animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Calendar ---------- */
.cal-nav { display: flex; align-items: center; gap: 20px; }
.cal-nav b { flex: 1; text-align: center; font-size: 44px; }
.cal-nav .nb { flex: none; width: 140px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.cal-head { text-align: center; font-size: 30px; font-weight: 700; color: var(--muted); }
.cal-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 22px; background: var(--card); font-size: 38px; font-weight: 700; border: 4px solid transparent; }
.cal-day.sun { color: var(--red); }
.cal-day.past { opacity: .3; }
.cal-day.today { border-color: var(--blue); }
.cal-day.sel { background: var(--blue); color: #fff; }
.cal-day.future { background: transparent; color: var(--muted); }
.att-P { background: var(--green-t); color: var(--green); } .att-A { background: var(--red-t); color: var(--red); }
.att-L { background: var(--amber-t); color: var(--amber); } .att-W { background: var(--grey-t); color: var(--muted); }
.att-H { background: var(--purple-t); color: var(--purple); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; font-size: 32px; }
.leg { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 22px; padding: 18px 22px; }
.leg b { margin-left: auto; font-size: 40px; }
.dot { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.pick-sum { background: var(--card); border-radius: 28px; padding: 28px; font-size: 40px; text-align: center; }
.pick-sum.bad { background: var(--red-t); color: var(--red); }
.pick-sum small { display: block; font-size: 30px; font-weight: 700; }
.summary { background: var(--card); border-radius: 36px; padding: 20px 40px; }
.sum-row { display: flex; align-items: center; gap: 30px; padding: 26px 0; border-bottom: 3px solid var(--grey-t); font-size: 46px; }
.sum-row:last-child { border: 0; }
.sum-row span { font-size: 70px; width: 90px; text-align: center; }

/* ---------- Workday placeholder ---------- */
.wd { flex: 1; display: flex; flex-direction: column; background: #f3f4f6; }
.wd-close { background: var(--red); color: #fff; font-size: 44px; font-weight: 800; min-height: 130px; }
.wd-note { background: var(--amber-t); color: var(--amber); font-size: 30px; font-weight: 700; padding: 18px 40px; text-align: center; }
.wd-frame { margin: 60px; background: #fff; border-radius: 16px; padding: 70px 80px; display: flex; flex-direction: column; gap: 28px; font-family: Arial, sans-serif; font-size: 30px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.wd-logo { font-size: 64px; font-weight: 700; color: #6b7280; text-align: center; border: 4px dashed #d1d5db; border-radius: 16px; padding: 30px; }
.wd-tag { text-align: center; color: #6b7280; margin: 0 0 20px; font-size: 26px; }
.wd-frame label { display: flex; flex-direction: column; gap: 10px; font-weight: 700; color: #374151; }
.wd-frame input { font-size: 34px; padding: 24px; border: 2px solid #d1d5db; border-radius: 10px; }
.wd-signin { background: #4b5563; color: #fff; font-size: 36px; font-weight: 700; padding: 28px; border-radius: 10px; margin-top: 10px; }
.wd-foot { color: #6b7280; font-size: 24px; text-align: center; margin: 20px 0 0; }

/* ---------- Overlays ---------- */
.overlay { position: absolute; inset: 0; background: rgba(15,23,42,.75); display: flex; align-items: center; justify-content: center; padding: 60px; z-index: 10; }
.idle-card { background: var(--card); border-radius: 48px; padding: 60px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.countdown { font-size: 160px; font-weight: 800; color: var(--amber); margin: 0; line-height: 1; }
.toast { position: absolute; left: 60px; right: 60px; bottom: 200px; background: #0f172a; color: #fff; font-size: 32px; padding: 30px 36px; border-radius: 26px; z-index: 11; text-align: center; }
