/* DailyCheck app screens added on top of the shared design (styles.css). */
:root{--f-body:-apple-system,BlinkMacSystemFont,"SF Pro Text","Noto Sans Khmer","Inter",system-ui,"Segoe UI",Roboto,sans-serif;
  --f-display:-apple-system,BlinkMacSystemFont,"SF Pro Display","Noto Sans Khmer","Inter",system-ui,sans-serif}
html[lang="km"] body{line-height:1.55}
html[lang="km"] h1,html[lang="km"] h2{line-height:1.35;letter-spacing:0}
html[lang="km"] .eyebrow{text-transform:none;letter-spacing:0}
html[lang="km"] .btn{letter-spacing:0}
body.signed-out main{padding-bottom:32px!important}
.mark img{display:block;width:30px;height:30px}
.small{font-size:var(--t-foot)}
.bad-t{color:var(--bad)}.gold-t{color:var(--gold-text)}.danger-t{color:var(--bad)!important}
.btn.danger{background:var(--bad);color:#fff}
.row.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.row.two>.btn:only-child{grid-column:1/-1}
.row.wrap{flex-wrap:wrap}
.chips.two{grid-template-columns:1fr 1fr}
.chips.wrap{display:flex;flex-wrap:wrap}
.chips.wrap button{flex:1 1 auto;padding-inline:14px}
.boot{min-height:70vh;display:grid;place-items:center}
.boot img{animation:pop .8s var(--bounce) both}

/* bottom tabs: 2 or 4 */
@media(max-width:719px){.botnav{grid-template-columns:repeat(var(--tabs,2),1fr)!important}}
.botnav .badge{left:calc(50% + 6px)}

/* sign in + setup */
.auth{max-width:420px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:14px;padding-top:max(24px,4vh)}
.auth-top{align-self:flex-end}
.auth-logo{width:84px;height:84px;border-radius:23px;box-shadow:0 12px 30px rgba(47,58,31,.22);animation:pop .7s var(--bounce) both}
.auth-title{text-align:center;font-size:30px}
.auth-title .brand-t{font-size:34px}
.auth-sub{text-align:center;color:var(--muted);font-size:var(--t-sub);margin-top:-6px}
.auth-card{width:100%;gap:14px}
.auth-card.shake{animation:shake .45s ease}
.foot-note{color:var(--muted);font-size:var(--t-foot)}
.fld{display:flex;flex-direction:column;gap:6px}
.fld>span{font-size:var(--t-foot);font-weight:600;color:var(--muted)}
.fld small{font-weight:400}
.fld input,.inl,select{font:inherit;font-size:var(--t-body);color:var(--ink);background:var(--fill);border:0;border-radius:10px;padding:12px;width:100%;min-height:46px}
.fld input:focus,.inl:focus{outline:2px solid var(--accent);outline-offset:0}
.form-err{color:var(--bad);font-size:var(--t-sub);font-weight:500}
.lang-switch button{min-width:72px}

/* install tip, offline bar */
.install-tip{display:flex;align-items:center;gap:12px;background:var(--surface);border-radius:12px;padding:10px 12px;position:relative}
.install-tip img{border-radius:8px;flex:none}
.install-tip p{flex:1;font-size:var(--t-foot);color:var(--muted);min-width:0}
.tip-x{border:0;background:none;color:var(--muted);font-size:22px;line-height:1;cursor:pointer;padding:4px 6px}
.offline-bar{position:fixed;left:50%;top:calc(env(safe-area-inset-top,0px) + 60px);transform:translateX(-50%);z-index:9;background:var(--ink);color:var(--surface);font-size:var(--t-foot);font-weight:600;padding:6px 14px;border-radius:99px}

/* camera */
.viewfinder video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .3s}
.viewfinder.live video{opacity:1}
.viewfinder.live .vf-icon{opacity:0}
.viewfinder.live::before{z-index:1}
.viewfinder .vf-line,.viewfinder .vf-ok{z-index:2}
.selfie video{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
#scanMsg{min-height:0}
.scanbody .linkbtn{align-self:center;padding:6px}

/* team bits */
.skel{height:120px;background:linear-gradient(90deg,var(--surface),var(--raised),var(--surface));background-size:200% 100%;animation:skel 1.2s linear infinite}
@keyframes skel{to{background-position:-200% 0}}
.thumbbtn img{width:22px;height:22px}

/* report */
.month-bar{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:10px 12px}
.month-bar b{font-size:var(--t-head)}
.icon-btn{width:40px;height:40px;border-radius:50%;border:0;background:var(--fill);color:var(--accent);font-size:22px;font-weight:600;display:grid;place-items:center;cursor:pointer;flex:none}
.icon-btn:disabled{opacity:.35;cursor:default}
#view-report>.btn{width:100%;margin-top:16px}

/* settings */
#view-settings{display:flex;flex-direction:column;gap:22px}
#view-settings .hero{margin:0}
.set-group{display:flex;flex-direction:column;gap:8px}
.set-group h3{font-size:var(--t-foot);font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.03em;padding:0 4px;margin:0}
html[lang="km"] .set-group h3{text-transform:none;letter-spacing:0;font-size:var(--t-sub)}
.card.list{padding:0 16px;gap:0}
.li{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:10px 0;border-top:.5px solid var(--sep);font-size:var(--t-body)}
.li:first-child{border-top:0}
.li>span:first-child:not(.li-ico){display:flex;flex-direction:column;gap:2px;min-width:0}
.li small{font-size:var(--t-foot);color:var(--muted);font-weight:400}
.li.plain{border:0;padding:0}
.li-btn{width:100%;background:none;border:0;border-top:.5px solid var(--sep);font:inherit;color:inherit;text-align:left;cursor:pointer}
.card.list>.li-btn:first-child{border-top:0}
.li-btn:active{opacity:.6}
.li-main{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;text-align:left;background:none;border:0;font:inherit;color:inherit;padding:0;cursor:pointer}
.li-main small{font-size:var(--t-foot);color:var(--muted)}
.chev{color:var(--muted);font-size:22px}
.inl{max-width:200px;text-align:right;min-height:40px;padding:8px 10px}
.inl.num{max-width:120px}
.pill.ip{display:inline-flex;gap:6px;align-items:center}
.pill.ip button{border:0;background:none;color:var(--muted);cursor:pointer;font-size:15px;padding:0 2px}
.role-seg{margin-bottom:4px}
.ed-sec{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.ed-sec h4{margin:0;padding:0 4px;font-size:var(--t-foot);color:var(--muted);font-weight:600}
.ed-row{gap:8px}
.ed-btns{display:flex;gap:6px}
.ed-btns .icon-btn{width:34px;height:34px;font-size:16px}
.days{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.days button{border:0;border-radius:10px;background:var(--fill);color:var(--muted);font:600 14px var(--f-body);min-height:42px;cursor:pointer}
.days button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.chips button[aria-pressed="true"]{background:var(--accent-soft);color:var(--accent);box-shadow:inset 0 0 0 2px var(--accent)}
.sheet input[type=time]{font:inherit;color:var(--ink);background:var(--fill);border:0;border-radius:10px;padding:12px;min-height:46px;width:100%}

/* reception */
body.reception main{max-width:none}
.rec .qr{background:#fff}

/* ===== Settings, iOS style ===== */
#view-settings{max-width:680px;margin-inline:auto;gap:26px}
#adminSettings{display:flex;flex-direction:column;gap:0} /* closed groups join into one list: see ux.css, Settings */
.set-me{flex-direction:row;align-items:center;gap:14px;padding:14px 16px}
.set-me .av.lg{width:60px;height:60px;font-size:22px}
.set-me-t{display:flex;flex-direction:column;gap:2px;min-width:0}
.set-me-t b{font:600 var(--t-title3) var(--f-display);letter-spacing:-.02em}
.set-me-t small{color:var(--muted);font-size:var(--t-foot)}
.set-group{gap:6px}
.set-group h3{padding:0 16px;font-size:var(--t-foot)}
.set-foot{font-size:var(--t-foot);color:var(--muted);padding:0 16px;line-height:1.45;margin:0}
.card.list{padding:0;overflow:hidden}
.card.list .li{padding:0 16px;min-height:50px;gap:12px;border-top:0;position:relative}
.card.list .li + .li::before,.card.list .li + .li-btn::before{content:"";position:absolute;top:0;right:0;left:56px;height:.5px;background:var(--sep)}
.card.list .li.li-sub::before{left:56px}
.li-ico{width:29px;height:29px;border-radius:7px;display:grid;place-items:center;flex:none}
.li-ico svg{width:17px;height:17px}
.li-l{flex:1;min-width:0;font-size:var(--t-body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.li-v{color:var(--muted);font-size:var(--t-sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:45%}
.li-v.mono{font-family:var(--f-mono);font-size:12px}
.good-t{color:var(--good)!important;font-weight:600}
.li .btn.sm{flex:none}
.li .linkbtn{flex:none}
.li-btn{text-decoration:none}
.li-btn:hover{background:var(--fill)}
.li-btn:active{opacity:1;background:var(--fill)}
.li-center{justify-content:center;font-weight:600}
.li-sub{flex-wrap:wrap;padding-left:57px!important;padding-block:10px!important;gap:8px 12px!important}
.li-sub .pills{flex:1}
.inl{flex:0 1 52%;max-width:52%;min-height:auto;padding:6px 0;background:transparent;text-align:right;color:var(--muted);border-radius:8px;font-size:var(--t-body)}
.inl:focus{background:var(--fill);color:var(--ink);padding:6px 10px;outline:none}
.inl.num{flex:0 0 auto;width:auto;max-width:150px;min-width:64px}
input[type=time].inl{min-width:120px}
.mini button{font-size:13px;padding:6px 12px;min-width:0}
.lang-switch button{min-width:64px}
.card.list .av.sm,.card.list .av{width:36px;height:36px;font-size:13px}
.card.list .av .dot{display:none}
.li-main b{font-weight:600;font-size:var(--t-body)}
.add-row .li-l{color:var(--accent);font-weight:500}
.add-i{width:29px;height:29px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font:600 20px/1 var(--f-body);flex:none}
.role-seg{margin:0 0 2px}
.ed-sec{margin-top:6px}
.ed-sec h4{padding:0 16px}
.card.list .ed-row{padding-block:10px;min-height:56px}
.card.list .ed-row::before{left:16px!important}
.ed-open b{font-weight:500}
.inl.num[type=number]{width:44px;min-width:0;padding-right:0}
.unit{margin-left:-6px;max-width:none}

/* ===== v2 screens ===== */
.li-l small{display:block;white-space:normal;line-height:1.35}
.li .li-ico.ghost{background:transparent}
.warn-t{color:var(--warn)!important;font-weight:600}
.li-sub2{min-height:46px!important}
.botnav{--tabs:2}
/* sign-up, forgot PIN, legal */
.auth-alt{color:var(--accent);font-weight:600;text-decoration:none;font-size:var(--t-sub);text-align:center}
.auth-card .linkbtn{align-self:center;padding:4px}
.legal-links{display:flex;gap:18px;justify-content:center;margin-top:-6px}
.legal-links a{color:var(--muted);font-size:var(--t-foot)}
.agree{display:flex;gap:10px;align-items:flex-start;font-size:var(--t-sub);line-height:1.45;cursor:pointer}
.agree input{width:20px;height:20px;flex:none;margin-top:2px;accent-color:var(--accent)}
.agree a{color:var(--accent);font-weight:600}
.legal{max-width:680px;margin:0 auto;display:flex;flex-direction:column;gap:10px;padding-block:12px 40px}
.legal .auth-top{display:flex;justify-content:space-between;align-items:center;align-self:stretch}
.legal h1{font-size:28px;margin-top:8px}
.legal h2{font-size:17px;margin-top:10px}
.legal p{line-height:1.65;color:var(--ink)}
.ack{display:flex;flex-direction:column;gap:10px;padding-left:20px;line-height:1.5}
/* account */
.lockcard{border-color:var(--bad);background:var(--bad-soft)}
.lockcard h2{color:var(--bad)}
.banner{display:flex;align-items:center;gap:10px;width:100%;border:0;cursor:pointer;text-align:left;background:var(--gold-soft,var(--warn-soft));color:var(--ink);border-radius:14px;padding:12px 16px;font:inherit;font-size:var(--t-sub)}
.banner b{flex:1;font-weight:600}
.banner.warn{background:var(--warn-soft)}
.banner .chev{color:var(--muted)}
.ask{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;border-color:var(--accent)}
.ask p{flex:1;min-width:200px;font-size:var(--t-sub)}
.ask .row{gap:8px}
/* time off */
.to-list{display:flex;flex-direction:column}
.to-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:.5px solid var(--sep)}
.to-row>div{flex:1;min-width:0;display:flex;flex-direction:column}
.to-row b{font-weight:600;font-size:var(--t-body)}
.to-row small{color:var(--muted);font-size:var(--t-foot)}
.to-row .icon-btn{flex:none}
/* report: payroll */
/* staff sheet: per-day hours */
.weekhours{display:flex;flex-direction:column;gap:8px}
.weekhours:empty{display:none}
.wk-row{display:grid;grid-template-columns:44px 1fr 1fr;gap:8px;align-items:center}
.wk-row input{font:inherit;color:var(--ink);background:var(--fill);border:0;border-radius:10px;padding:10px;min-height:42px;width:100%}
.keybox code{flex:1;min-width:0;word-break:break-all;font-size:13px;background:var(--fill);padding:8px 10px;border-radius:8px}
.keybox p{flex-basis:100%;margin:0}
/* clinics (platform) */
.tiles.four{grid-template-columns:repeat(2,1fr)}
@media(min-width:760px){.tiles.four{grid-template-columns:repeat(4,1fr)}}
.clin-list{display:grid;gap:12px}
@media(min-width:760px){.clin-list{grid-template-columns:1fr 1fr}}
.clin{text-align:left;font:inherit;color:inherit;cursor:pointer;gap:8px}
.clin:active{transform:scale(.99)}
.clin-h{display:flex;justify-content:space-between;align-items:center;gap:10px}
.clin-h b{font-size:17px;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.clin-m{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.sh-h{font-size:var(--t-foot);text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-top:8px}
html[lang="km"] .sh-h{text-transform:none;letter-spacing:0}
.hero .btn.sm{flex:none;text-decoration:none}
.hero>.btn{flex:none;width:auto;align-self:center}
.hero>.btn{flex:0 0 auto!important;width:auto!important;margin-left:auto}
#ckM{grid-template-columns:repeat(4,1fr)}
.li.li-wrap .li-l{white-space:normal}
.li.li-wrap .li-v{max-width:55%;white-space:normal;text-align:right}

/* ===== v3: holidays, split shifts, punctuality ===== */
.streak{display:inline-flex;align-items:center;gap:6px;margin-top:6px;padding:4px 10px;border-radius:999px;background:var(--gold-soft,rgba(201,169,110,.18));color:#7a5a1f;font-size:var(--t-foot);font-weight:600;width:fit-content}
.closedcard{flex-direction:row;align-items:center;justify-content:space-between;gap:12px;background:var(--info-soft,rgba(47,109,181,.08))}
.closedcard span{color:var(--muted)}
.starcard .stars{display:flex;flex-wrap:wrap;gap:14px}
.star{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:84px;text-align:center}
.star b{font-size:var(--t-sub);font-weight:600}
.star small{color:var(--muted);font-size:var(--t-foot)}
.hol-list{display:flex;flex-direction:column}
.hol-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:.5px solid var(--sep)}
.hol-row>div:first-child{flex:1;min-width:0;display:flex;flex-direction:column}
.hol-row b{font-weight:600;font-size:var(--t-sub)}
.hol-row small{color:var(--muted);font-size:var(--t-foot)}
.hol-row.dim{opacity:.5}
.seg2{display:inline-flex;background:var(--fill);border-radius:10px;padding:2px;flex:none}
.seg2 button{border:0;background:transparent;font:inherit;font-size:var(--t-foot);font-weight:600;color:var(--muted);padding:7px 12px;border-radius:8px;min-height:34px;cursor:pointer}
.seg2 button[aria-pressed=true]{background:var(--surface,#fff);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.wk-row.four{grid-template-columns:40px repeat(4,minmax(0,1fr));gap:6px}
.wk-row.four input{padding:8px 4px;font-size:14px}
.dd.hol{background:repeating-linear-gradient(45deg,var(--gold,#c9a96e) 0 3px,transparent 3px 6px);border:1px solid var(--gold,#c9a96e)}
.month-bar .num{font-variant-numeric:tabular-nums}
