/* ============================================================
   JB simplified UI (2026-10-09). Loaded last on counter, mechanic, owner.
   Phone-first: one task per screen, bottom tab bar (≤5), big search, 44px+ targets, whitespace.
   Wider screens get the same screens with two panes where it helps.
   ============================================================ */
body.simple{--gap:16px;--tap:48px;--soft:#f1ede8}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ---------- screen switching + motion ---------- */
body.counter[data-tab=""] #app,body.counter[data-tab=""] .pane{display:none!important}
body.counter:not([data-tab=home]) #homePane,body.counter:not([data-tab=more]) #morePane,body.counter:not([data-tab=barcodes]) #bcPane{display:none!important}
@keyframes jbin{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.pane.enter,#app.enter,.jobview:not(.hidden),#listView{animation:jbin .2s ease-out}
.btn,.tile,.gl,.menu a,.menu button,.jt,.scanbtn,.chips button,.tabbar button,.tabbar a{-webkit-tap-highlight-color:transparent}
.tile:active,.gl:active,.menu a:active,.menu button:active,.jt:active,.scanbtn:active{transform:scale(.97)}
.pane-in.narrow{max-width:880px}
body.simple .pane-in{padding:20px 16px 28px}
.backlink{display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0 4px;margin:-6px 0 6px -4px;border:0;background:none;color:var(--red);font-weight:800;font-size:17px}
.ptitle{font-size:26px;margin:0 0 12px;letter-spacing:-.01em}
.hello{font-size:28px;line-height:1.15;margin:4px 0 16px;letter-spacing:-.02em}
.gh{font-size:18px;margin:26px 0 10px}
.empty{padding:28px 12px;text-align:center;color:var(--muted);font-size:17px}

/* ---------- header ---------- */
body.counter .top .avatar{width:44px;height:44px;border-radius:50%;border:0;background:var(--ink);color:#fff;font-weight:900;font-size:18px;display:inline-flex;align-items:center;justify-content:center}
.avatar.big{width:56px;height:56px;border-radius:50%;background:var(--ink);color:#fff;font-weight:900;font-size:24px;display:flex;align-items:center;justify-content:center;flex:0 0 56px}
html[data-device=desktop] body.counter .top .title{display:none}
html[data-device=desktop] body.counter .tabs button{min-height:44px;padding:8px 18px;font-size:16px}
html[data-device=phone] body.counter .top{gap:10px;min-height:60px}
html[data-device=phone] body.counter .top .logo{height:20px}
html[data-device=phone] body.counter .top .title{display:block;border-left:2px solid var(--line);padding-left:10px;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}
html[data-device=phone] body.counter .top .who{margin-left:auto}
html[data-device=phone] body.counter .appbar .datebar{order:10}
html[data-device=phone] body.counter[data-tab=routes] .top .who{display:none!important}

/* ---------- bottom tab bar (phone) ---------- */
html[data-device=phone] body.simple .tabbar button,html[data-device=phone] body.simple .tabbar a{flex:1;min-height:60px;border:0;background:transparent;border-radius:14px;font-weight:800;font-size:12.5px;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;transition:color .15s,background-color .15s}
html[data-device=phone] body.simple .tabbar .ic{font-size:22px;line-height:1}
html[data-device=phone] body.simple .tabbar .on{color:var(--red);background:var(--card,#fff)1f2}
html[data-device=phone] body.counter .pane{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
html[data-device=phone] body.counter:not([data-tab=routes]) .toast{bottom:calc(92px + env(safe-area-inset-bottom))}
html[data-device=tablet] body.counter .rail button{min-height:72px;font-size:13px}

/* ---------- Home ---------- */
.bigsearch{position:relative;display:flex;align-items:center;gap:8px;background:var(--card,#fff);border:2px solid #e2dcd4;border-radius:20px;padding:6px 6px 6px 16px;box-shadow:var(--shadow);transition:border-color .15s,box-shadow .15s}
.bigsearch:focus-within{border-color:var(--red);box-shadow:0 0 0 4px #fde2e6}
.bigsearch .bs-ic{font-size:20px;opacity:.7}
.bigsearch input[type=search]{flex:1;border:0;outline:0;min-height:56px;font-size:19px;padding:0 4px;background:transparent;box-shadow:none}
.bigsearch input:focus{outline:0}
.scanbtn{flex:0 0 auto;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:64px;min-height:56px;padding:4px 10px;border-radius:14px;border:1px solid var(--line);background:var(--soft);font-size:22px;line-height:1;color:var(--ink);transition:transform .12s}
.scanbtn b{font-size:12px;font-weight:800;letter-spacing:.02em}
.bigsearch .scanbtn{background:var(--ink);color:#fff;border-color:var(--ink)}
.tiles4{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.tile{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;gap:4px;min-height:140px;padding:16px;border-radius:20px;border:1px solid var(--line);background:var(--card,#fff);box-shadow:var(--shadow);text-align:left;color:var(--ink);transition:transform .12s,box-shadow .15s}
.tile .ti{font-size:34px;line-height:1;margin-bottom:auto}
.tile b{font-size:19px;line-height:1.15}
.tile small{font-size:14px;color:var(--muted);font-weight:600}
.tile.t-red{background:var(--red);border-color:var(--red);color:#fff}
.tile.t-red small{color:#ffe4e8}
body.nocost .cost-only{display:none!important}
.glist{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.gl{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:84px;padding:12px 14px;border-radius:16px;border:1px solid var(--line);background:var(--card,#fff);text-align:left;color:var(--ink)}
.gl b{font-size:28px;line-height:1;font-weight:900}
.gl span{font-size:14px;font-weight:700;color:var(--muted)}
.gl.warn{background:var(--card,#fff)7ed;border-color:#fed7aa}.gl.warn b{color:#c2410c}
.gl.ok{background:#f0fdf4;border-color:#bbf7d0}.gl.ok b{color:var(--green)}
.gl.zero b{color:#a8a29e}
html[data-device=desktop] .tiles4{grid-template-columns:repeat(4,minmax(0,1fr))}
html[data-device=tablet][data-orient=landscape] .tiles4{grid-template-columns:repeat(4,minmax(0,1fr))}
html[data-device=phone] .glist{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
html[data-device=phone] .gl{padding:10px;min-height:80px}
html[data-device=phone] .gl span{font-size:13px}

/* ---------- More menu ---------- */
.me{display:flex;gap:14px;align-items:center;margin:4px 0 18px}
.me b{font-size:20px}
.menu{list-style:none;margin:0;padding:0;background:var(--card,#fff);border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:var(--shadow)}
.menu li+li{border-top:1px solid #efeae4}
.menu a,.menu button{display:flex;align-items:center;gap:14px;width:100%;min-height:68px;padding:12px 16px;border:0;background:var(--card,#fff);text-align:left;color:var(--ink);text-decoration:none;font:inherit;position:relative}
.menu a::after,.menu button::after{content:"›";margin-left:auto;font-size:26px;color:#c3bcb3;line-height:1}
.menu .mi{font-size:24px;width:32px;text-align:center;flex:0 0 32px}
.menu b{display:block;font-size:17px}
.menu small{display:block;font-size:14px;color:var(--muted);margin-top:2px}
#logout b,#logout2 b{color:#b91c1c}

/* ---------- collapsible sections ---------- */
details.sect{background:var(--card,#fff);border:1px solid var(--line);border-radius:16px;margin:0 0 12px;box-shadow:var(--shadow)}
details.sect>summary{list-style:none;display:flex;align-items:center;gap:8px;min-height:56px;padding:12px 16px;font-weight:800;font-size:17px;cursor:pointer;user-select:none}
details.sect>summary::-webkit-details-marker{display:none}
details.sect>summary::after{content:"";width:10px;height:10px;border-right:2.5px solid #a8a29e;border-bottom:2.5px solid #a8a29e;transform:rotate(45deg);margin-left:auto;transition:transform .18s;flex:0 0 auto}
details.sect[open]>summary::after{transform:rotate(-135deg)}
details.sect>summary .cnt{font-size:14px;font-weight:700;color:var(--muted);background:var(--soft);border-radius:999px;padding:2px 10px}
details.sect>*:not(summary){margin-left:16px;margin-right:16px}
details.sect[open]{padding-bottom:14px}
details.sect>summary .muted{font-weight:600;font-size:14px}
.side details.sect{box-shadow:none}
.side .legendbox .legend{margin-top:0}

/* ---------- Jobs ---------- */
.btn.big.wide{width:100%;min-height:60px;font-size:19px;border-radius:16px;margin-bottom:14px}
body.counter .wobar input[type=search]{min-height:54px;font-size:17px;border-radius:14px}
body.simple .chips button{min-height:44px;font-size:15px;padding:8px 16px}
html[data-device=phone] body.simple .chips{flex-wrap:wrap;overflow:visible;margin-left:0;margin-right:0;padding:0}
#woMoreF .chips{margin-top:2px}
#woMoreF select{max-width:320px}
body.simple .wocard{padding:12px;border-radius:18px;gap:14px}
body.simple .wocard .nm{font-size:18px}
html[data-device=phone] body.counter .wocard{grid-template-columns:76px minmax(0,1fr)}
html[data-device=phone] body.counter .wocard .ph{width:76px;height:76px}

/* WO detail (counter) */
.backbtn{min-height:44px}
.wosum{background:var(--card,#fff);border:1px solid var(--line);border-radius:18px;padding:14px 16px;margin-bottom:12px;box-shadow:var(--shadow)}
.wosum .ws-c{font-size:18px}
.wosum .ws-m{font-size:16px;margin-top:2px}
.wosum .ws-p{font-size:17px;margin:10px 0 6px;white-space:pre-wrap}
html[data-device=phone] #woViewBody .flow+.mt{display:none}
html[data-device=phone] #woViewBody .wosec h3{display:none}
#woViewBody .btn.big{min-height:58px;width:100%;font-size:18px;border-radius:16px}

/* Check-in wizard (phone + tablet: one step per screen) */
html:not([data-device=desktop]) #woForm .wfsec:not(.cur){display:none}
html:not([data-device=desktop]) #woForm .wfsec.cur{animation:jbin .18s ease-out}
.wfsteps{display:flex;gap:6px;list-style:none;padding:0;margin:8px 0 14px;counter-reset:s}
.wfsteps li{flex:1;font-size:12px;font-weight:800;color:#a8a29e;padding-top:8px;border-top:4px solid #e7e2da;transition:border-color .2s,color .2s}
.wfsteps li.on{color:var(--red);border-color:var(--red)}
.wfsteps li.past{color:var(--ink);border-color:var(--ink)}
html[data-device=desktop] .wfsteps li{border-top-color:#e7e2da;color:var(--muted)}
#woDlg[open]{display:flex;flex-direction:column;max-height:min(92vh,900px);overflow:hidden}
#woForm{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#woForm .wfbody{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding-bottom:8px}
.wffoot{position:static;flex:0 0 auto;background:var(--card,#fff);padding-top:10px;padding-bottom:calc(8px + env(safe-area-inset-bottom));display:flex;gap:10px;border-top:1px solid var(--line,#ece8e1);margin-top:0}
.wffoot .btn{min-height:54px;font-size:17px;flex:1}
.wffoot #wfNext,.wffoot #wfSave{flex:2}
html:not([data-device=desktop]) #woForm .photodrop{min-height:220px}
html[data-device=phone] #woForm .wfsec h3{font-size:22px}

/* ---------- Part search ---------- */
body.counter .psearch{display:flex;flex-wrap:nowrap;gap:8px;align-items:stretch}
body.counter .psearch input[type=search]{flex:1 1 auto;min-width:0;min-height:56px;border-radius:16px;font-size:18px}
body.counter .psearch .btn{min-width:0;min-height:56px;padding:0 18px;border-radius:16px;font-size:17px}
body.counter .psearch .scanbtn{min-height:56px}
.popts-box>summary #pStatus{margin-left:6px}
.popts-box .popts{flex-direction:column;align-items:flex-start;gap:10px}
.popts-box .popts label{display:flex;gap:10px;align-items:center;min-height:44px}
.popts-box .popts input[type=checkbox]{width:22px;height:22px}
.hintcard{display:flex;flex-direction:column;gap:6px;padding:22px 18px;border:2px dashed #ddd6cd;border-radius:18px;color:var(--muted);text-align:center;font-size:16px}
.hintcard b{color:var(--ink);font-size:18px}
.scancard{background:var(--card,#fff);border:2px solid var(--line);border-radius:18px;padding:14px 16px;margin:0 0 12px;animation:jbin .18s ease-out}
.scancard.ok{border-color:#86efac;background:#f0fdf4}
.scancard.miss{border-color:#fdba74;background:var(--card,#fff)7ed}
.scancard .sc-h{font-weight:800;font-size:17px;margin-bottom:6px}
.scancard code{font-size:16px;background:var(--card,#fff);border:1px solid var(--line);border-radius:8px;padding:2px 8px;word-break:break-all}
.sc-acts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 4px}
.sc-acts .btn{min-height:54px;white-space:normal}
#scPick input{margin-top:10px;min-height:52px}
.sc-alts{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.chipbtn{min-height:44px;border:1px solid var(--line);border-radius:999px;background:var(--card,#fff);padding:6px 14px;font-weight:700}
.bcrow{display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:var(--card,#fff);border:1px solid var(--line);border-radius:16px;padding:12px 14px;margin-bottom:10px}
.bcrow .grow{flex:1;min-width:0}
.bcrow code{font-size:17px;font-weight:800;word-break:break-all}
.bcrow .btn.sm{min-height:44px;min-width:44px}
.bcpick{flex-basis:100%}
.bcpick input{min-height:50px}

/* ---------- scanner overlay ---------- */
.scanov{position:fixed;inset:0;z-index:5000;background:#0b0b0b;color:#fff;display:flex;flex-direction:column;opacity:0;transition:opacity .18s ease}
.scanov.on{opacity:1}
body.scanning{overflow:hidden}
.scantop{display:flex;align-items:center;justify-content:space-between;padding:calc(10px + env(safe-area-inset-top)) 14px 10px;font-size:18px}
.scanx{width:48px;height:48px;border-radius:50%;border:0;background:rgba(255,255,255,.16);color:#fff;font-size:22px}
.scanview{position:relative;flex:1;overflow:hidden;display:flex;align-items:center;justify-content:center}
.scanview video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.scanbox{position:relative;width:min(82vw,460px);height:min(42vw,220px);border-radius:18px;box-shadow:0 0 0 100vmax rgba(0,0,0,.45);border:3px solid rgba(255,255,255,.9)}
.scanbox i{position:absolute;left:8%;right:8%;top:50%;height:2px;background:#ef4444;box-shadow:0 0 12px #ef4444;animation:scanl 1.6s ease-in-out infinite}
@keyframes scanl{0%,100%{transform:translateY(-70px)}50%{transform:translateY(70px)}}
.scanmsg{position:absolute;left:0;right:0;bottom:18px;text-align:center;font-weight:700;font-size:16px;padding:0 20px;text-shadow:0 1px 4px #000}
.scanfoot{padding:12px 14px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;background:#111}
.scantype{display:flex;gap:8px}
.scantype input{flex:1;min-height:52px;font-size:17px;border-radius:14px;background:var(--card,#fff);color:#111}
.scantype .btn{min-height:52px}
.scanphoto{min-height:50px;background:#262626;border-color:#333;color:#fff}

/* ---------- Mechanic ---------- */
body.mech #listView .ptitle{margin-top:4px}
body.mech .mmorebox{display:none}
body.mech.mmore .mmorebox{display:block;animation:jbin .18s ease-out}
body.mech.mmore #chips,body.mech.mmore #list{display:none}
body.mech .mtabbar{display:none}
html[data-device=phone] body.mech #chips{display:none}
html[data-device=phone] body.mech .mtabbar{display:flex;position:fixed;z-index:60;left:0;right:0;bottom:0;background:color-mix(in srgb, var(--card,#fff) 97%, transparent);border-top:1px solid var(--line);padding:4px 6px calc(6px + env(safe-area-inset-bottom));justify-content:space-around;backdrop-filter:blur(12px)}
html[data-device=phone] body.mech #app.hidden~.mtabbar{display:none}
html[data-device=phone] body.mech main.wrap{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
html[data-device=phone] body.mech .toast{bottom:calc(92px + env(safe-area-inset-bottom))}
html[data-device=phone] body.mech .top .who{display:none!important}
html[data-device=phone] body.mech .top .title{display:block;border-left:2px solid var(--line);padding-left:10px;font-size:18px}
html[data-device=phone] body.mech .top .logo{height:20px}
html[data-device=phone] body.mech .top{min-height:58px}
.jobview .wohead h2{font-size:21px}
.jobgrid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.jmain,.jsubs{min-width:0}
.herolink{display:block}
.jobview img.hero,.jobview .hero{max-height:40vh;border-radius:20px}
.jhead{padding:14px 2px 4px}
.jhead .mtitle{font-size:24px;font-weight:900;line-height:1.15}
.jhead .problem{font-size:19px;line-height:1.4;margin-top:10px;white-space:pre-wrap;background:var(--card,#fff);border:1px solid var(--line);border-radius:16px;padding:14px 16px}
.actionbox{margin:12px 0 14px}
.actionbox .banner{margin-bottom:12px}
.jtiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body.mech .jt.bigbtn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:112px;padding:10px 6px;border-radius:20px;border:1px solid var(--line);background:var(--card,#fff);color:var(--ink);box-shadow:var(--shadow);font-size:17px;font-weight:900;width:100%;text-align:center;transition:transform .12s}
.jt .ti{font-size:30px;line-height:1}
.jt b{font-size:17px;line-height:1.1}
.jt small{font-size:13px;color:var(--muted);font-weight:700}
body.mech .jt.red{background:var(--red);border-color:var(--red);color:#fff}
body.mech .jt.go{background:var(--green);border-color:var(--green);color:#fff}
.jt.red small,.jt.go small{color:rgba(255,255,255,.85)}
body.mech .jt.off{background:var(--soft);color:var(--muted);box-shadow:none}
.jsub{display:none}
.jsub h3{font-size:22px;margin:4px 0 12px;text-transform:none;letter-spacing:0;color:var(--ink)}
html[data-device=phone] .jobview[data-sub=time] .jmain,html[data-device=phone] .jobview[data-sub=part] .jmain{display:none}
html[data-device=phone] .jobview[data-sub=time] .wohead,html[data-device=phone] .jobview[data-sub=part] .wohead{display:none}
html[data-device=phone] .jsub.on{display:block;animation:jbin .18s ease-out}
.jsub .psearch .inl{flex-wrap:nowrap}
.jsub .psearch input{min-width:0;min-height:56px;font-size:18px}
.jsub .psearch .btn{min-height:56px}
.jsub .quick button{min-height:52px;font-size:17px}
.jsub .timeform input{min-height:56px;font-size:18px}
html:not([data-device=phone]) .jobgrid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
html:not([data-device=phone]) .jsub{display:block;margin-bottom:14px}
html:not([data-device=phone]) .jsub .backlink{display:none}
html:not([data-device=phone]) .jsubs{position:sticky;top:76px}
html[data-device=tablet][data-orient=portrait] .jobgrid{grid-template-columns:minmax(0,1fr)}
html[data-device=tablet][data-orient=portrait] .jsubs{position:static}

/* ---------- Owner ---------- */
body.owner .hello{margin-top:6px}
body.owner .tiles{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
body.owner .tiles .k{min-height:96px;border-radius:18px;padding:14px;box-shadow:var(--shadow)}
body.owner .tiles div.k{cursor:default}
body.owner .tiles .k b{font-size:32px}
body.owner .tiles .k span{font-size:14px}
body.owner .otabbar{display:none}
html[data-device=tablet] body.owner .tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
html[data-device=phone] body.owner .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-device=phone] body.owner .otabbar{display:flex;position:fixed;z-index:60;left:0;right:0;bottom:0;background:rgba(255,255,255,.97);border-top:1px solid var(--line);padding:4px 6px calc(6px + env(safe-area-inset-bottom));justify-content:space-around;backdrop-filter:blur(12px)}
html[data-device=phone] body.owner #app.hidden~.otabbar{display:none}
html[data-device=phone] body.owner main.wrap{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
html[data-device=phone] body.owner .top .who{display:none!important}
html[data-device=phone] body.owner .board{grid-template-columns:minmax(0,1fr)}
html[data-device=phone] body.owner .wobar{flex-wrap:wrap}
html[data-device=phone] body.owner .wobar input{flex:1 1 100%!important;min-height:52px}
body.owner .lane{border-radius:18px;padding:12px}
body.owner .lane .mini{min-height:64px;border-radius:14px}
body.owner aside details.sect>*:not(summary){margin-left:14px;margin-right:14px}

/* ---------- big touch targets everywhere on touch devices ---------- */
html:not([data-device=desktop]) body.simple .btn{min-height:48px}
html:not([data-device=desktop]) body.simple .btn.sm{min-height:44px}
html:not([data-device=desktop]) body.simple .x{min-width:44px;min-height:44px}
html:not([data-device=desktop]) body.simple .linkbtn{min-height:48px;display:inline-flex;align-items:center}

/* ---- pass 2 ---- */
html[data-device=phone] .jobview img.hero,html[data-device=phone] .jobview .hero{max-height:30vh;aspect-ratio:16/10}
html[data-device=phone] body.counter .psearch .btn{padding:0 14px}
html[data-device=phone] body.counter .psearch .scanbtn{min-width:58px;padding:4px 6px}
html[data-device=phone] .popts-box>summary{flex-wrap:wrap;row-gap:2px}
html[data-device=phone] .popts-box>summary #pStatus{flex-basis:100%;order:3;margin-left:0;font-size:13px}
html[data-device=phone] .popts-box>summary::after{order:2}
.t-short{display:none}
html[data-device=phone] .t-long{display:none}
html[data-device=phone] .t-short{display:inline}
.jsub .psearch{display:block}
.jsub .psearch .inl{display:flex;gap:8px;align-items:stretch}
.jsub .psearch .inl input{flex:1 1 auto;width:auto;min-width:0}
.jsub .pres{margin-top:10px}
.jsub .prow{flex-wrap:wrap}
.jsub .prow .grow{flex:1 1 180px;min-width:0}
input[type=email]{width:100%;border:1px solid #d6d0c8;background:var(--card,#fff);border-radius:12px;padding:11px 12px;min-height:46px;font-size:16px}
body.simple details>summary{min-height:44px;display:flex;align-items:center;cursor:pointer}

/* ---- Redesign (Nov 2026): Parts home, Jobs chips, Routes segment ---- */
.phead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0 10px}
.phead h1,.phead .ptitle{margin:0;font-size:26px;letter-spacing:-.01em}
.phead .ab-sp{flex:1}
.smode,.rseg,.htabs{display:flex;gap:4px;background:var(--chip-bg,#efe9e1);border-radius:12px;padding:4px;margin:0 0 10px;overflow-x:auto;scrollbar-width:none}
.smode::-webkit-scrollbar,.htabs::-webkit-scrollbar,.rseg::-webkit-scrollbar{display:none}
.smode button,.rseg button,.htabs button{flex:1 0 auto;border:0;background:transparent;border-radius:9px;padding:9px 14px;font:inherit;font-weight:700;font-size:15px;color:var(--muted,#5f584f);cursor:pointer;min-height:42px;white-space:nowrap}
.smode button.on,.rseg button.on,.htabs button.on{background:var(--inv,#1a1a1a);color:var(--on-inv,#fff);box-shadow:0 1px 3px rgba(40,30,20,.14)}
.htabs{margin-top:6px}
.htabs i,#woChips i{font-style:normal;display:inline-block;min-width:20px;padding:0 6px;margin-left:6px;border-radius:10px;background:var(--red);color:#fff;font-size:12px;line-height:20px;text-align:center}
.htabs i:empty,#woChips i:empty{display:none}
.mbox{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto auto;gap:8px;margin-bottom:12px}
.mbox input,.mbox select{min-height:50px;border:1px solid #d6d0c8;border-radius:12px;padding:10px 12px;font-size:16px;background:var(--card,#fff);min-width:0}
.hsec.hidden,.mbox.hidden,#pForm.hidden{display:none!important}
.vbest{border:2px solid var(--red);border-radius:14px;padding:12px 14px;margin:10px 0}
.vlabel{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--red);margin-bottom:4px}
.vtop,.vrow{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap}
.vrow{padding:10px 0;border-top:1px solid #eee6dc}
.vmain{flex:1 1 300px;min-width:0}
.vmain .pn{font-size:20px;font-weight:800}
.vtop .pn{font-size:24px}
.vmain .desc{color:#4a443d;margin:2px 0 4px}
.vmain .meta{display:flex;gap:12px;flex-wrap:wrap;font-size:15px;color:#5f584f}
.vact{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.vmore{margin-top:8px}
.vmore>summary{cursor:pointer;font-weight:700;padding:8px 0;color:var(--ink)}
.stk.y{color:#1d7a3a;font-weight:700}.stk.n{color:#a33}
.linkish{border:0;background:none;padding:0;font:inherit;color:inherit;cursor:copy;text-decoration:underline dotted 1px;text-underline-offset:3px}
.ordgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin:6px 0 12px}
.ordcard{display:flex;flex-direction:column;gap:4px;padding:14px;border:1px solid #e2dcd4;background:var(--card,#fff);border-radius:14px;text-decoration:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.ordcard b{font-size:26px}.ordcard span{color:#5f584f;font-size:14px}
.ordcard:hover{border-color:var(--red)}
.ordrow{display:flex;gap:10px;align-items:center;padding:10px 12px;border:1px solid #eee6dc;border-radius:10px;margin:6px 0;text-decoration:none;color:inherit;background:var(--card,#fff);flex-wrap:wrap}
.ordrow span:nth-child(2){flex:1}
.rseg{max-width:640px}
.qbadge{display:inline-block;min-width:20px;padding:1px 6px;margin-left:4px;border-radius:10px;background:#c41230;color:#fff;font-size:12px;line-height:18px;text-align:center}
.qbadge.hidden{display:none}
html[data-device=phone] .mbox{grid-template-columns:1fr 1fr}
html[data-device=phone] .mbox button{grid-column:1/-1}
html[data-device=phone] .phead h1{font-size:22px}
html[data-device=phone] .phead .btn{min-height:40px;font-size:14px;padding:8px 12px}
html[data-device=phone] .vact .btn{flex:1 1 auto}
html[data-device=phone] .smode button,html[data-device=phone] .htabs button{padding:8px 10px;font-size:14px}
html[data-device=phone] .htabs button{flex:1 1 0;white-space:normal;line-height:1.15;padding:7px 6px;font-size:13px}
/* Nov 5 mobile pass: part search row on a phone — the box gets the full width so "Part # or name" isn't cut off; Scan + Search sit under it */
html[data-device=phone] body.mech .psearch .inl{flex-wrap:wrap!important;gap:8px}
html[data-device=phone] body.mech .psearch .inl input{flex:1 1 100%!important;width:100%;font-size:18px}
html[data-device=phone] body.mech .psearch .inl .scanbtn{flex:0 0 auto;flex-direction:row;gap:6px;min-width:110px}
html[data-device=phone] body.mech .psearch .inl .scanbtn b{font-size:16px}
html[data-device=phone] body.mech .psearch .inl .btn{flex:1 1 auto;min-height:56px;font-size:18px}
.pslink{white-space:normal;line-height:1.25;padding:8px 14px;width:100%;display:flex;justify-content:center;align-items:center;min-height:52px;margin:10px 0;font-weight:800;text-decoration:none;text-align:center}

body.owner #board,body.owner .board{min-height:40vh}
body.owner #tiles,body.owner .tiles{min-height:96px}

/* Phase 1: check-in is a full-screen sheet on a phone */
html[data-device=phone] #woDlg[open]{
  width:100vw;height:100dvh;max-height:100dvh;max-width:100vw;margin:0;border-radius:0;border:0;
  display:flex;flex-direction:column;overflow:hidden
}
html[data-device=phone] #woDlg[open] #woForm{flex:1;min-height:0;border-radius:0}
html[data-device=phone] #woDlg[open] .wfhead{padding:12px 16px 0}
html[data-device=phone] #woDlg[open] .wffoot{padding:10px 16px calc(12px + env(safe-area-inset-bottom))}
