/* Worker site — soft glass, mobile first. Matches /admin. */
:root {
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #5B6880;          /* 5.3:1 on white */
  --base: #EEF1F8;
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .84);
  --glass-line: rgba(255, 255, 255, .9);
  --hair: rgba(15, 23, 42, .08);
  --accent: #5B5BD6;
  --grad: linear-gradient(135deg, #6366F1 0%, #0EA5C6 100%);
  --go-grad: linear-gradient(145deg, #10B981 0%, #0D9488 100%);
  --stop-grad: linear-gradient(145deg, #F43F5E 0%, #DC2626 100%);
  --go: #047857;
  --go-bg: rgba(16, 185, 129, .14);
  --wait: #B45309;
  --wait-bg: rgba(245, 158, 11, .16);
  --bad: #DC2626;
  --bad-bg: rgba(239, 68, 68, .12);
  --info: #4338CA;
  --info-bg: rgba(99, 102, 241, .13);
  --r: 24px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .95) inset, 0 14px 40px -14px rgba(30, 41, 90, .22), 0 2px 6px rgba(30, 41, 90, .04);
  --blur: blur(22px) saturate(170%);
  --ease: cubic-bezier(.16, 1, .3, 1);      /* expo-out */
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root[lang="th"] { --font: "Noto Sans Thai", "Rubik", system-ui, sans-serif; }
:root[lang="hi"], :root[lang="ne"] { --font: "Noto Sans Devanagari", "Rubik", system-ui, sans-serif; }
:root[lang="si"] { --font: "Noto Sans Sinhala", "Rubik", system-ui, sans-serif; }
:root[lang="zh"] { --font: "Rubik", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--base); color: var(--ink);
  font: 400 18px/1.5 var(--font);
  min-height: 100dvh; -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #818CF8; outline-offset: 3px; }
svg.i { width: 24px; height: 24px; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- aurora */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .6; will-change: transform; }
.aurora i:nth-child(1) { width: 90vw; height: 90vw; max-width: 620px; max-height: 620px; background: #A5B4FC; top: -30vw; right: -30vw; animation: d1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 80vw; height: 80vw; max-width: 560px; max-height: 560px; background: #99F6E4; bottom: -20vw; left: -30vw; animation: d2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 60vw; height: 60vw; max-width: 420px; max-height: 420px; background: #FBCFE8; top: 40%; right: -25vw; animation: d1 38s ease-in-out infinite alternate-reverse; opacity: .45; }
@keyframes d1 { to { transform: translate(-12vw, 14vh) scale(1.15); } }
@keyframes d2 { to { transform: translate(14vw, -10vh) scale(1.1); } }

.glass {
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line); border-radius: var(--r); box-shadow: var(--shadow);
}

#app { max-width: 520px; margin: 0 auto; padding: 0 16px 48px; }
.view > * { animation: rise .6s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: .04s; } .view > *:nth-child(3) { animation-delay: .08s; }
.view > *:nth-child(4) { animation-delay: .12s; } .view > *:nth-child(5) { animation-delay: .16s; }
.view > *:nth-child(n+6) { animation-delay: .2s; }
.view.quiet > * { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- top bar */
.top { position: sticky; top: 0; z-index: 5; padding: max(12px, env(safe-area-inset-top)) 0 10px; }
.top .bar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: .02em; margin-inline-end: auto; white-space: nowrap; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 11px; box-shadow: 0 6px 16px -6px rgba(11,37,69,.55); }
.pill-btn {
  min-width: 48px; height: 48px; padding: 0 14px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--glass-strong); border: 1px solid var(--glass-line); font-weight: 600; font-size: 15px;
  transition: transform .15s var(--ease), background .2s;
}
.pill-btn:active { transform: scale(.94); }
.pill-btn .flag { font-size: 22px; line-height: 1; }

/* ---------- language */
.lang-head { text-align: center; margin: 22px 0 18px; }
.lang-head .globe { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 12px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 14px 30px -12px rgba(99,102,241,.8); }
.lang-head .globe svg { width: 32px; height: 32px; }
.lang-head h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lang-grid button {
  min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 19px; font-weight: 600; position: relative; transition: transform .18s var(--ease), box-shadow .25s;
  animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 35ms);
}
.lang-grid button .flag { font-size: 36px; line-height: 1; }
.lang-grid button:active { transform: scale(.96); }
.lang-grid button[aria-pressed="true"] { box-shadow: 0 0 0 3px #818CF8, var(--shadow); }
.lang-grid button[aria-pressed="true"]::after {
  content: ""; position: absolute; top: 10px; inset-inline-end: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad) center/14px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"), var(--grad);
}

/* ---------- login */
.login { padding: 18px 20px 22px; margin-top: 10px; text-align: center; }
.login .step-ic { width: 60px; height: 60px; border-radius: 20px; margin: 4px auto 14px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 14px 30px -12px rgba(99,102,241,.8); }
.login .step-ic svg { width: 28px; height: 28px; }
.login h1 { font-size: 22px; font-weight: 600; margin: 0 0 16px; }
.field { position: relative; }
.field svg { position: absolute; inset-inline-start: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.big-input {
  width: 100%; height: 72px; border-radius: 20px; border: 1.5px solid rgba(15,23,42,.1); background: rgba(255,255,255,.85);
  text-align: center; font-size: clamp(22px, 7.4vw, 28px); font-weight: 600; letter-spacing: clamp(.02em, .6vw, .08em); font-variant-numeric: tabular-nums; direction: ltr; padding: 0 10px;
  transition: border-color .2s, box-shadow .2s;
}
.big-input:focus { outline: none; border-color: #A5B4FC; box-shadow: 0 0 0 5px rgba(99,102,241,.16); }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: 14px; font-weight: 600; direction: ltr; background: rgba(255,255,255,.6); margin-bottom: 6px; }
.dots { display: flex; justify-content: center; gap: 18px; margin: 6px 0 22px; direction: ltr; }
.dots i { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #A5B4FC; transition: transform .25s var(--spring), background .2s, border-color .2s; }
.dots i.on { background: var(--grad); border-color: transparent; transform: scale(1.12); }
.dots.shake { animation: shake .4s; }
.dots.ok i { background: var(--go-grad); border-color: transparent; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 340px; margin: 0 auto; direction: ltr; }
.pad button {
  height: 72px; border-radius: 22px; font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.78); border: 1px solid var(--glass-line); box-shadow: 0 4px 14px -6px rgba(30,41,90,.18);
  transition: transform .12s var(--ease), background .12s;
}
.pad button:active { transform: scale(.92); background: #fff; }
.pad .ghost { background: none; border: 0; box-shadow: none; color: var(--muted); display: grid; place-items: center; }
.err { color: var(--bad); font-weight: 600; min-height: 28px; margin: 10px 0 4px; font-size: 17px; }
.hint { color: var(--muted); font-size: 16px; margin: 12px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.hint svg { width: 18px; height: 18px; }

/* ---------- buttons */
.btn {
  width: 100%; min-height: 64px; border-radius: 20px; font-size: 20px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; transition: transform .15s var(--ease), filter .2s, opacity .2s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 14px 30px -12px rgba(99,102,241,.8); }
.btn-go { background: var(--go-grad); color: #fff; box-shadow: 0 14px 30px -12px rgba(16,185,129,.8); }
.btn-stop { background: var(--stop-grad); color: #fff; box-shadow: 0 16px 34px -12px rgba(244,63,94,.75); min-height: 76px; font-size: 22px; letter-spacing: .02em; }
.btn-glass { background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: 0 4px 14px -6px rgba(30,41,90,.18); color: var(--ink); }
.btn-text { min-height: 52px; width: 100%; color: var(--muted); font-weight: 600; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 16px; }
.btn-text.danger { color: var(--bad); }
.btn .spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- home */
.greet { margin: 8px 4px 16px; }
.greet small { color: var(--muted); font-size: 16px; display: block; }
.greet h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.greet h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero { padding: 26px 20px 22px; text-align: center; overflow: hidden; position: relative; }
.start-wrap { position: relative; width: 236px; height: 236px; margin: 6px auto 8px; }
.start-wrap .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(16,185,129,.35); animation: ripple 2.8s var(--ease) infinite; }
.start-wrap .ring:nth-child(2) { animation-delay: 1.4s; }
@keyframes ripple { from { transform: scale(.82); opacity: 1; } to { transform: scale(1.18); opacity: 0; } }
.start {
  position: absolute; inset: 14px; border-radius: 50%; background: var(--go-grad); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 22px; font-weight: 700; letter-spacing: .03em; line-height: 1.15; padding: 20px;
  box-shadow: 0 22px 44px -16px rgba(13,148,136,.75), inset 0 2px 0 rgba(255,255,255,.35), inset 0 -10px 24px rgba(0,0,0,.08);
  transition: transform .2s var(--ease);
}
.start svg { width: 58px; height: 58px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.15)); }
.start:active { transform: scale(.95); }
.start:disabled { filter: saturate(.6); }
.link-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 16px; font-weight: 600; font-size: 17px; color: var(--ink-2); background: rgba(255,255,255,.6); border: 1px solid var(--glass-line); margin-top: 12px; transition: transform .15s var(--ease); }
.link-btn:active { transform: scale(.96); }
.link-btn svg { width: 20px; height: 20px; }

.working-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--go); background: var(--go-bg); padding: 6px 14px; border-radius: 99px; font-size: 16px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #10B981; animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(16,185,129,0); } }
.dial { position: relative; width: 236px; height: 236px; margin: 14px auto 16px; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 14; stroke-linecap: round; }
.dial .track { stroke: rgba(15,23,42,.06); }
.dial .prog { stroke: url(#dialGrad); transition: stroke-dashoffset 1s linear; }
.dial .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.timer { font-size: 46px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; direction: ltr; }
.timer small { font-size: 22px; color: var(--muted); font-weight: 400; }
.dial .since { margin-top: 8px; color: var(--muted); font-size: 16px; }
.dial .since b { color: var(--ink); direction: ltr; display: inline-block; }

.done-check { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--go-grad); color: #fff; box-shadow: 0 16px 34px -14px rgba(16,185,129,.8); }
.done-check svg { width: 46px; height: 46px; }
.draw path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s var(--ease) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-title { font-weight: 600; color: var(--go); }
.done-times { font-size: 34px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; direction: ltr; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 2px; }
.done-times svg { width: 22px; height: 22px; color: var(--muted); }
.done-total { color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.done-total b { color: var(--ink); font-size: 20px; }

/* month card */
.month { margin-top: 14px; padding: 12px; display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 6px; }
.month .nav-b { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.65); border: 1px solid var(--glass-line); transition: transform .15s var(--ease), opacity .2s; }
.month .nav-b:active { transform: scale(.92); }
.month .nav-b:disabled { opacity: .3; }
.month .mid { text-align: center; }
.month .lbl { font-size: 15px; color: var(--muted); }
.month .tot { font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; }
.month .tot small { font-size: 18px; -webkit-text-fill-color: var(--muted); }
.month .meta { font-size: 14px; color: var(--muted); display: flex; gap: 12px; justify-content: center; }
.month .meta span { display: inline-flex; align-items: center; gap: 4px; }
.month .meta svg { width: 15px; height: 15px; }

.days-title { font-size: 19px; font-weight: 600; margin: 24px 4px 10px; display: flex; align-items: center; gap: 8px; }
.days-title svg { width: 20px; height: 20px; color: var(--accent); }
.days { display: flex; flex-direction: column; gap: 10px; }
.day {
  width: 100%; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px; padding: 10px 14px 10px 10px;
  min-height: 74px; text-align: start; border-radius: 20px; transition: transform .15s var(--ease);
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 30ms);
}
.view.quiet .day { animation: none; }
button.day:active { transform: scale(.98); }
.day.add { background: rgba(255,255,255,.35); border: 1.5px dashed rgba(91,91,214,.3); box-shadow: none; backdrop-filter: none; }
.day.is-today { box-shadow: 0 0 0 2px rgba(129,140,248,.7), var(--shadow); }
.tile { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.75); border: 1px solid var(--glass-line); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.tile span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tile b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.is-today .tile { background: var(--grad); color: #fff; border-color: transparent; }
.is-today .tile span { color: rgba(255,255,255,.85); }
.day .t { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; }
.day .t .rng { direction: ltr; display: inline-block; }
.day .t small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.day .t.muted { color: var(--muted); font-weight: 500; font-size: 17px; }
.day .r { text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.day .r b { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; }
.plus { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px -8px rgba(99,102,241,.8); }
.plus svg { width: 22px; height: 22px; }

.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 3px 10px 3px 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip svg { width: 14px; height: 14px; }
.chip.pending { background: var(--wait-bg); color: var(--wait); }
.chip.approved { background: var(--go-bg); color: var(--go); }
.chip.rejected { background: var(--bad-bg); color: var(--bad); }
.chip.open { background: var(--info-bg); color: var(--info); }

.empty { text-align: center; color: var(--muted); padding: 28px 16px; }

/* skeleton */
.skel { border-radius: var(--r); background: linear-gradient(100deg, rgba(255,255,255,.45) 30%, rgba(255,255,255,.9) 50%, rgba(255,255,255,.45) 70%); background-size: 300% 100%; animation: sk 1.3s infinite linear; }
@keyframes sk { to { background-position: -100% 0; } }

/* ---------- bottom sheet */
.backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(15, 23, 42, .42); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s both; }
.backdrop.out { animation: fadeOut .18s both; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.sheet {
  width: 100%; max-width: 520px; max-height: 94dvh; overflow-y: auto; border-radius: 30px 30px 0 0;
  background: rgba(246, 248, 252, .92); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-line); border-bottom: 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
  animation: up .45s var(--ease) both; box-shadow: 0 -20px 60px -20px rgba(15,23,42,.35);
}
.backdrop.out .sheet { animation: down .2s ease-in both; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
.sheet-head { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; margin-bottom: 12px; }
.grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(15,23,42,.15); margin: 2px auto 8px; }
.sheet h2 { text-align: center; margin: 0; font-size: 21px; font-weight: 600; grid-column: 2; }
.x { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.8); color: var(--muted); grid-column: 3; }
.x svg { width: 20px; height: 20px; }

.stepper { padding: 12px 12px 10px; margin-bottom: 10px; border-radius: 22px; }
.stepper label { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; color: var(--muted); font-size: 15px; }
.stepper label svg { width: 17px; height: 17px; }
.stepper .row { display: grid; grid-template-columns: 60px minmax(0, 1fr) 60px; align-items: center; gap: 8px; margin-top: 4px; }
.round-b { height: 60px; border-radius: 20px; background: rgba(255,255,255,.9); border: 1px solid var(--glass-line); box-shadow: 0 4px 12px -6px rgba(30,41,90,.25); display: grid; place-items: center; color: var(--accent); transition: transform .12s var(--ease); }
.round-b:active { transform: scale(.9); }
.round-b svg { width: 26px; height: 26px; }
.stepper input[type="time"] {
  border: 0; background: none; text-align: center; font-size: 38px; font-weight: 600; width: 100%; min-width: 0; min-height: 60px; letter-spacing: -.01em; padding: 0;
  font-variant-numeric: tabular-nums; color: var(--ink); direction: ltr;
}
.stepper input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.tag { display: block; text-align: center; font-size: 13px; color: #C2410C; font-weight: 600; min-height: 18px; }
.seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.seg button { min-height: 52px; border-radius: 15px; font-weight: 600; font-size: 17px; background: rgba(255,255,255,.75); border: 1px solid var(--glass-line); transition: transform .12s var(--ease), background .2s, color .2s; font-variant-numeric: tabular-nums; }
.seg button:active { transform: scale(.94); }
.seg button[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(99,102,241,.8); }
.total-line { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 14px 0; color: var(--muted); }
.total-line b { font-size: 34px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; }
.note-input { width: 100%; min-height: 56px; border-radius: 18px; border: 1.5px solid rgba(15,23,42,.1); padding: 10px 16px; background: rgba(255,255,255,.85); margin-bottom: 14px; font-size: 17px; }
.note-input:focus { outline: none; border-color: #A5B4FC; box-shadow: 0 0 0 5px rgba(99,102,241,.16); }
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; font-weight: 500; }
.banner svg { width: 22px; height: 22px; margin-top: 1px; }
.banner.ok { background: var(--go-bg); color: var(--go); }
.banner.warn { background: var(--wait-bg); color: var(--wait); }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { justify-content: space-between; }
.choice .ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--info-bg); color: var(--accent); }
.choice > span:not(.ic) { flex: 1; text-align: start; }
.choice .ic { flex: none; }

/* ---------- confirmation overlay */
.celebrate { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; text-align: center; padding: 24px; animation: fade .2s both; backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); }
.celebrate.in-c { background: rgba(209, 250, 229, .78); }
.celebrate.out-c { background: rgba(224, 231, 255, .8); }
.celebrate.leave { animation: fadeOut .3s both; }
.celebrate .badge { width: 132px; height: 132px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; color: #fff; animation: pop .7s var(--spring) both; }
.celebrate.in-c .badge { background: var(--go-grad); box-shadow: 0 0 0 14px rgba(16,185,129,.18), 0 30px 60px -20px rgba(13,148,136,.8); }
.celebrate.out-c .badge { background: var(--grad); box-shadow: 0 0 0 14px rgba(99,102,241,.16), 0 30px 60px -20px rgba(99,102,241,.8); }
.celebrate .badge svg { width: 72px; height: 72px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.celebrate .big { font-size: 64px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; direction: ltr; animation: rise .6s var(--ease) .12s both; }
.celebrate .lbl { font-size: 20px; font-weight: 600; margin-top: 10px; color: var(--ink-2); animation: rise .6s var(--ease) .2s both; }
.celebrate .sub { font-size: 18px; color: var(--muted); margin-top: 6px; animation: rise .6s var(--ease) .26s both; }

/* ---------- toast + offline */
#toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 24px); z-index: 50;
  display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 18px; font-weight: 600; font-size: 17px;
  background: rgba(15,23,42,.88); color: #fff; backdrop-filter: blur(12px); box-shadow: 0 18px 40px -12px rgba(15,23,42,.5);
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); max-width: calc(100% - 32px);
}
#toast svg { width: 22px; height: 22px; flex: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: rgba(220,38,38,.94); }
.offline { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 60; display: none; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px; background: rgba(15,23,42,.88); color: #fff; font-weight: 600; font-size: 15px; }
.offline svg { width: 18px; height: 18px; }
body.is-offline .offline { display: flex; }

@media (min-width: 560px) { #app { padding-top: 10px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .draw path { stroke-dashoffset: 0; }
}
.sheet:focus { outline: none; }

/* finish confirmation */
.auto-break { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--muted); font-size: 15px; margin: 2px 0 16px; text-align: center; }
.auto-break svg { width: 20px; height: 20px; flex: none; }
.brk-line { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.brk-line svg { width: 18px; height: 18px; flex: none; }

/* ---------- first login + self-registration */
.hint.block { display: block; text-align: center; line-height: 1.5; }
.pin-sub { margin: -8px 0 14px; }
.login .step-ic.wait { background: linear-gradient(145deg, #F59E0B, #D97706); box-shadow: 0 14px 30px -12px rgba(217,119,6,.7); }
.login .step-ic.off { background: linear-gradient(145deg, #94A3B8, #64748B); box-shadow: none; }
.reg-cta { margin-top: 14px; min-height: 60px; font-size: 18px; }
.reg-cta svg { width: 24px; height: 24px; color: var(--accent); }
.pulse-cta { border-color: #A5B4FC; box-shadow: 0 0 0 5px rgba(99,102,241,.16); }

.reg { padding: 14px 18px 22px; margin-top: 10px; }
.reg h1 { font-size: 22px; font-weight: 600; margin: 4px 0 12px; text-align: center; }
.reg-sub { margin: -4px 0 16px; font-size: 15px; }
.reg-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.icon-back { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.7); }
.steps { flex: 1; display: flex; gap: 6px; }
.steps i { flex: 1; height: 6px; border-radius: 99px; background: rgba(15,23,42,.1); transition: background .3s; }
.steps i.done { background: #A5B4FC; }
.steps i.on { background: var(--grad); }
.step-n { font-size: 14px; font-weight: 600; color: var(--muted); direction: ltr; min-width: 30px; text-align: end; }
.login .reg-top { margin: -4px 0 8px; }

.fld { display: block; margin: 0 0 14px; text-align: start; }
.fld > span { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 4px 6px; }
.fld input, .fld select {
  width: 100%; height: 58px; border-radius: 16px; border: 1.5px solid rgba(15,23,42,.1); background-color: rgba(255,255,255,.88);
  padding: 0 16px; font: inherit; font-size: 18px; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.fld select {
  appearance: none; -webkit-appearance: none; padding-inline-end: 44px; background-repeat: no-repeat; background-size: 20px; background-position: right 14px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6880' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.fld input:focus, .fld select:focus { outline: none; border-color: #A5B4FC; box-shadow: 0 0 0 5px rgba(99,102,241,.16); }
.fld.bad input, .fld.bad select { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.fld input.ltr { direction: ltr; text-align: left; }
.fld input.caps { text-transform: uppercase; letter-spacing: .06em; }

.photo {
  position: relative; display: grid; place-items: center; align-content: center; gap: 14px; min-height: 230px; border-radius: 20px; cursor: pointer; overflow: hidden;
  border: 2px dashed #A5B4FC; background: rgba(238,242,255,.7); color: var(--accent); transition: transform .15s var(--ease), border-color .2s;
}
.photo:active { transform: scale(.98); }
.photo:focus-visible { outline: none; box-shadow: 0 0 0 5px rgba(99,102,241,.2); }
.photo.selfie_img { min-height: 280px; }
.photo .ph-ic svg { width: 72px; height: 72px; stroke-width: 1.4; }
.photo .ph-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 14px; background: var(--grad); color: #fff; font-size: 17px; font-weight: 600; }
.photo .ph-btn svg { width: 22px; height: 22px; }
.photo.has { border-style: solid; border-color: transparent; background: #0F172A; display: block; }
.photo.has img { width: 100%; max-height: 360px; object-fit: contain; display: block; }
.photo.has .ph-btn { position: absolute; bottom: 12px; inset-inline-end: 12px; background: rgba(15,23,42,.72); backdrop-filter: blur(8px); padding: 10px 14px; font-size: 15px; }
.photo.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255,255,255,.3) 30%, rgba(255,255,255,.9) 50%, rgba(255,255,255,.3) 70%); background-size: 300% 100%; animation: sk 1.3s infinite linear; }
.tip { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 15px; line-height: 1.45; margin: 12px 4px 0; text-align: start; }
.tip svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.sending { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.spin.dark { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(99,102,241,.25); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.reg-done { padding-top: 26px; }

/* ---------------------------------------------------------------- short phone screens
   Small Android phones show ~560-650px under the browser bar: keep the whole PIN pad on screen. */
@media (max-height: 760px) {
  .top { padding-bottom: 6px; }
  .login { padding: 12px 16px 14px; margin-top: 4px; }
  .login .step-ic { width: 46px; height: 46px; border-radius: 16px; margin: 0 auto 8px; }
  .login .step-ic svg { width: 22px; height: 22px; }
  .login h1 { font-size: 20px; margin-bottom: 8px; }
  .login .back-link { min-height: 44px; margin-bottom: 2px; }
  .dots { margin: 4px 0 12px; }
  .pad { gap: 10px; }
  .pad button { height: clamp(52px, 8.6dvh, 72px); }
  .err { min-height: 22px; margin: 6px 0 0; }
}
@media (max-height: 640px) {
  .login .step-ic { display: none; }
  .login h1 { font-size: 19px; }
}

/* ---------------------------------------------------------------- clock-only reporting */
.hint.forgot { display: flex; gap: 8px; align-items: flex-start; justify-content: center; margin-top: 18px; font-size: 15px; line-height: 1.45; }
.hint.forgot svg { flex: none; margin-top: 3px; }
.remind { display: flex; gap: 10px; align-items: flex-start; text-align: start; margin: 4px 0 14px; padding: 12px 14px; border-radius: 16px;
  background: rgba(245,158,11,.16); color: #92400E; font-weight: 600; font-size: 16px; line-height: 1.4; animation: rise .5s var(--ease) both; }
.remind[hidden] { display: none; }
.remind svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.day.missing { box-shadow: inset 0 0 0 1.5px rgba(245,158,11,.45); }
.day.missing small { color: #B45309; font-weight: 600; }
.day .office-note { grid-column: 1 / -1; display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.day .office-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
