/* Foxx Canada — Shop Operations. Brand colours carried over from the Pig Wash Board. */
:root{
  --ink:#0f1722; --panel:#1c2735; --bg:#eceff3; --card:#ffffff;
  --line:#d2d8e0; --muted:#5b6573; --faint:#8a94a3;
  --amber:#b5852f; --green:#2f6f86; --grey:#64748b; --red:#a83a3a; --ok:#2f7d4f;
  --gold1:#6b4f1d; --gold2:#c9a44c; --gold3:#ecd9a0;
  --navw:232px;
}
html{color-scheme:light only; -webkit-text-size-adjust:100%;}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
body{margin:0; background:var(--bg); color:var(--ink); font-family:'Helvetica Neue',Arial,sans-serif;}
button{font-family:inherit; cursor:pointer; border:none; background:none; color:inherit;}
input,textarea,select{font-family:inherit;}
a{color:var(--green);}
[hidden]{display:none !important;}

/* ---------- header ---------- */
header{background:var(--ink); color:#fff; padding:14px 16px 12px; position:sticky; top:0; z-index:20;
  box-shadow:0 4px 14px rgba(0,0,0,.25);}
.hwrap{max-width:1100px; margin:0 auto;}
.hrow{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.brand{display:flex; align-items:center; gap:12px; min-width:0; text-decoration:none; color:#fff;}
.brand img{width:44px; height:44px; object-fit:contain; flex-shrink:0; filter:drop-shadow(0 2px 3px rgba(0,0,0,.5));}
.brand h1{margin:0; font-size:21px; font-weight:900; text-transform:uppercase; letter-spacing:.12em;
  font-family:'Arial Black','Helvetica Neue',Arial,sans-serif; white-space:nowrap;}
.goldline{height:3px; border-radius:2px; margin:3px 0 4px;
  background:linear-gradient(90deg,var(--gold1) 0%,var(--gold2) 35%,var(--gold3) 50%,var(--gold2) 65%,var(--gold1) 100%);}
.brand .sub{font-size:10px; font-weight:700; letter-spacing:.25em; text-transform:uppercase; color:var(--faint); white-space:nowrap;}
.btn-add{background:linear-gradient(135deg,#d4af37,#b5852f); color:#1a1205; font-weight:900; text-transform:uppercase;
  letter-spacing:.06em; font-size:13px; padding:13px 16px; border-radius:8px; flex-shrink:0; min-height:46px;}
.btn-add:active{transform:scale(.95);}
.userchip{font-size:11px; color:var(--faint); text-align:right; line-height:1.3;}
.userchip b{color:var(--gold2); text-transform:uppercase; letter-spacing:.06em;}

.stats{display:flex; gap:8px; margin-top:12px;}
.stat{flex:1; border-radius:12px; padding:12px 12px 10px; text-align:left; color:#fff; box-shadow:0 2px 6px rgba(0,0,0,.25);}
.stat:active{transform:scale(.97);}
.stat .n{font-size:28px; font-weight:900; line-height:1;}
.stat .l{font-size:9px; text-transform:uppercase; letter-spacing:.08em; color:rgba(255,255,255,.85); margin-top:5px; font-weight:700;}
.stat.amber{background:linear-gradient(135deg,#c0913a,#9c6f24);}
.stat.green{background:linear-gradient(135deg,#3a7e96,#285c70);}
.stat.red{background:linear-gradient(135deg,#b34646,#8f3030);}
.stat.slate{background:linear-gradient(135deg,#475569,#334155);}
.stat.ok{background:linear-gradient(135deg,#3b8c5c,#2a6a44);}

/* ---------- layout & navigation ---------- */
.layout{max-width:1100px; margin:0 auto; display:flex; gap:18px;}
nav.side{display:none;}
main{flex:1; min-width:0; padding:12px 12px 110px;}
nav.tabs{position:fixed; left:0; right:0; bottom:0; z-index:25; background:var(--ink); display:flex;
  padding:6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow:0 -4px 14px rgba(0,0,0,.2);}
nav.tabs a{flex:1; text-align:center; color:var(--faint); text-decoration:none; font-size:10px; font-weight:800;
  text-transform:uppercase; letter-spacing:.05em; padding:6px 0; border-radius:8px; min-height:50px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;}
nav.tabs a .ic{font-size:20px; line-height:1;}
nav.tabs a.on{color:#fff; background:var(--panel);}
@media(min-width:900px){
  nav.tabs{display:none;}
  nav.side{display:block; width:var(--navw); flex-shrink:0; padding:14px 0 40px; position:sticky; top:118px; align-self:flex-start;}
  main{padding:14px 12px 60px;}
}
nav.side a{display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:8px; color:var(--ink);
  text-decoration:none; font-weight:700; font-size:14px;}
nav.side a .ic{width:22px; text-align:center;}
nav.side a.on{background:var(--ink); color:#fff;}
nav.side a:hover:not(.on){background:#dde2e8;}
nav.side .navhead{font-size:10px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--faint); margin:16px 12px 4px;}

.menu-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.menu-tile{background:#fff; border:2px solid var(--line); border-radius:12px; padding:16px 12px; text-align:left;
  text-decoration:none; color:var(--ink); min-height:84px; display:flex; flex-direction:column; gap:6px;}
.menu-tile .ic{font-size:24px;} .menu-tile b{font-size:14px;} .menu-tile span{font-size:11px; color:var(--muted);}

/* ---------- page header ---------- */
.pagehdr{margin:4px 0 12px; display:flex; justify-content:space-between; align-items:flex-end; gap:10px; flex-wrap:wrap;}
.backbtn{color:var(--muted); font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:.05em; padding:8px 0; text-decoration:none; display:inline-block;}
.pagetitle{font-size:22px; font-weight:900; letter-spacing:.01em;}
.pagesub{font-size:13px; color:var(--muted); margin-top:2px;}
.hdr-actions{display:flex; gap:8px; flex-wrap:wrap;}

/* ---------- controls ---------- */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:6px; font-size:14px; font-weight:800;
  padding:12px 16px; border-radius:8px; min-height:46px; background:#fff; border:2px solid var(--line); color:var(--ink); text-decoration:none;}
.btn:active{transform:scale(.97);}
.btn.dark{background:var(--ink); border-color:var(--ink); color:#fff;}
.btn.gold{background:var(--amber); border-color:var(--amber); color:#000;}
.btn.teal{background:var(--green); border-color:var(--green); color:#fff;}
.btn.danger{background:#fff; border-color:var(--red); color:var(--red);}
.btn.danger.on{background:var(--red); color:#fff;}
.btn.small{font-size:12px; padding:8px 12px; min-height:38px;}
.btn.block{width:100%;}
.btn:disabled{opacity:.5; cursor:default;}
.linkbtn{color:var(--green); font-weight:700; font-size:13px; text-decoration:underline; padding:6px 0;}

.pills{display:flex; gap:6px; overflow-x:auto; padding-bottom:8px; -webkit-overflow-scrolling:touch;}
.pill{white-space:nowrap; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:10px 14px;
  border-radius:999px; border:2px solid var(--line); background:#fff; color:var(--muted);}
.pill.on{background:var(--ink); border-color:var(--ink); color:#fff;}

.search{width:100%; background:#fff; border:2px solid var(--line); border-radius:8px; padding:12px; font-size:16px; margin-bottom:10px;}
.search:focus,.inp:focus{outline:none; border-color:var(--amber);}
.filters{display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:8px; margin-bottom:10px;}
.filters select,.filters input{width:100%; background:#fff; border:2px solid var(--line); border-radius:8px; padding:10px; font-size:15px; min-height:46px;}
.filters label{display:block; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin-bottom:3px;}

.banner{border-radius:8px; padding:10px 12px; font-size:13px; font-weight:700; margin-bottom:12px; color:#fff; line-height:1.45;}
.banner.err{background:var(--red);} .banner.warn{background:#b45309;} .banner.ok{background:var(--ok);} .banner.info{background:var(--green);}

.empty{text-align:center; padding:48px 16px; border:2px dashed var(--line); border-radius:12px; color:var(--muted);}
.empty img{width:64px; height:64px; object-fit:contain; opacity:.55; margin-bottom:8px;}
.empty b{color:var(--ink);}

/* ---------- cards & rows ---------- */
.card{background:var(--card); border:2px solid #e4e4e7; border-radius:10px; margin-bottom:10px; overflow:hidden;}
.card.rebuild,.card.alert{border-color:var(--red);}
.card.picked{border-color:var(--green); box-shadow:0 0 0 2px rgba(13,148,136,.25);}
.card-head{width:100%; display:flex; align-items:center; gap:10px; padding:12px; text-align:left; text-decoration:none; color:inherit;}
.pigicon{width:40px; height:40px; object-fit:contain; flex-shrink:0; filter:drop-shadow(0 1px 2px rgba(0,0,0,.25));}
.sn{flex-shrink:0; background:var(--ink); color:#fff; border-radius:8px; padding:6px 10px; min-width:62px; text-align:center;}
.sn .l{font-size:8px; letter-spacing:.2em; color:var(--faint); text-transform:uppercase;}
.sn .v{font-size:17px; font-weight:900; line-height:1.15; word-break:break-all;}
.card-mid{flex:1; min-width:0;}
.chips{display:flex; gap:5px; flex-wrap:wrap;}
.chip{font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.06em; padding:3px 8px; border-radius:4px; color:#fff; background:var(--grey); white-space:nowrap;}
.chip.amber{background:var(--amber); color:#000;} .chip.teal{background:var(--green);} .chip.grey{background:var(--grey);}
.chip.red{background:var(--red);} .chip.ok{background:var(--ok);} .chip.dark{background:var(--ink);} .chip.gold{background:var(--gold2); color:#000;}
.who{font-size:13px; font-weight:600; margin-top:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:flex; align-items:center; gap:6px;}
.sizebadge{display:inline-block; background:var(--ink); color:#fff; font-weight:900; font-size:13px; letter-spacing:.03em; padding:3px 9px; border-radius:6px; border-bottom:2px solid var(--gold2);}
.dates{font-size:11px; color:var(--muted); margin-top:3px;}
.caret{color:var(--faint); font-size:16px;}
.checkbox{width:30px; height:30px; flex-shrink:0; border:2px solid var(--green); border-radius:7px; display:flex; align-items:center; justify-content:center; font-weight:900; color:#fff; background:#fff;}
.checkbox.on{background:var(--green);}
.card-body{border-top:2px solid #eef2f7; background:#f8fafc; padding:12px 14px;}
.acts{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px;}
.infobox{background:#fff7ed; border:1px solid #fed7aa; border-radius:8px; padding:9px 11px; font-size:12px; color:#9a3412; margin-bottom:10px; line-height:1.5;}
.logmeta{font-size:11px; color:var(--faint); margin-top:10px; font-style:italic;}
.selbar{display:flex; gap:8px; margin-bottom:10px;}
.selbar .btn{flex:1;}

/* ---------- panels ---------- */
.panel{background:#fff; border:2px solid #e4e4e7; border-radius:12px; padding:14px; margin-bottom:12px;}
.panel h3{margin:0 0 10px; font-size:13px; font-weight:900; text-transform:uppercase; letter-spacing:.08em;}
.panel h3 .count{color:var(--faint); font-weight:700;}
.kv{display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px 16px;}
.kv div{min-width:0;}
.kv .k{font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--muted);}
.kv .v{font-size:15px; font-weight:600; margin-top:2px; white-space:pre-wrap; word-break:break-word;}
.kv .wide{grid-column:1/-1;}
.rowlist{list-style:none; margin:0; padding:0;}
.rowlist li{padding:10px 0; border-top:1px solid #eef2f7; font-size:14px; display:flex; gap:10px; justify-content:space-between; align-items:flex-start;}
.rowlist li:first-child{border-top:none;}
.rowlist .meta{font-size:11px; color:var(--muted); margin-top:2px;}
.rowlist a{color:var(--ink); text-decoration:none; font-weight:700;}

.dash-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-bottom:12px;}
@media(min-width:640px){ .dash-grid{grid-template-columns:repeat(4,1fr);} }
.dash-grid .stat{text-decoration:none; display:block;}
.two-col{display:grid; grid-template-columns:1fr; gap:12px;}
@media(min-width:900px){ .two-col{grid-template-columns:1fr 1fr;} }
.section-label{font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.12em; color:var(--muted); margin:14px 0 8px;}

/* ---------- forms ---------- */
.form{background:#fff; border:2px solid #e4e4e7; border-radius:12px; padding:16px;}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:8px 10px;}
@media(max-width:420px){ .grid2.stack-sm{grid-template-columns:1fr;} }
.fgroup{grid-column:span 1; min-width:0;}
.fgroup.full{grid-column:1/-1;}
label.f{display:block; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin:10px 0 4px;}
label.f .req{color:var(--red);}
.inp{width:100%; background:#fff; border:2px solid var(--line); border-radius:8px; padding:11px; font-size:16px; min-height:46px;}
textarea.inp{resize:vertical; min-height:70px;}
.inp.bad{border-color:var(--red); background:#fff5f5;}
.hint{font-size:11px; color:var(--muted); margin-top:3px;}
.seg{display:flex; gap:6px; flex-wrap:wrap;}
.seg button{flex:1; min-width:64px; padding:11px 6px; border-radius:8px; border:2px solid var(--line); background:#fff; font-weight:900; font-size:13px; color:var(--muted); min-height:46px;}
.seg button.on{background:var(--ink); border-color:var(--ink); color:#fff;}
.submit{width:100%; background:var(--amber); color:#000; font-weight:900; text-transform:uppercase; letter-spacing:.06em; font-size:15px; padding:16px; border-radius:8px; margin-top:16px; min-height:54px;}
.submit:disabled{background:#d4d4d8; cursor:default;}
.items-table{width:100%; border-collapse:collapse; font-size:14px;}
.items-table th{font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); text-align:left; padding:6px 4px;}
.items-table td{padding:6px 4px; border-top:1px solid #eef2f7; vertical-align:top;}
.item-row{display:grid; grid-template-columns:110px 1fr 70px 40px; gap:6px; margin-bottom:6px; align-items:center;}
.item-row .inp{min-height:44px; padding:9px;}
.item-row .x{color:var(--red); font-size:20px; font-weight:900;}
@media(max-width:520px){ .item-row{grid-template-columns:1fr 70px 40px;} .item-row .itype{grid-column:1/-1;} }

/* ---------- attachments ---------- */
.att-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:8px;}
.att{position:relative; border-radius:8px; overflow:hidden; background:#e5e7eb; aspect-ratio:1/1; border:2px solid #e4e4e7;}
.att img{width:100%; height:100%; object-fit:cover; display:block;}
.att .doc{display:flex; align-items:center; justify-content:center; height:100%; font-size:30px;}
.att .cap{position:absolute; left:0; right:0; bottom:0; background:rgba(15,23,34,.75); color:#fff; font-size:10px; padding:3px 5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.att .stage{position:absolute; top:4px; left:4px;}
.att-actions{display:flex; gap:8px; margin:10px 0 4px; flex-wrap:wrap;}
.att-actions .btn{flex:1;}
.queue-item{display:grid; grid-template-columns:64px 1fr 36px; gap:8px; align-items:center; padding:6px 0; border-top:1px solid #eef2f7;}
.queue-item img,.queue-item .doc{width:64px; height:64px; object-fit:cover; border-radius:6px; background:#e5e7eb; display:flex; align-items:center; justify-content:center; font-size:26px;}
.queue-item .inp{min-height:40px; padding:8px; font-size:14px;}
.queue-item .x{color:var(--red); font-size:20px; font-weight:900;}
.locline{font-size:12px; color:var(--muted); margin:6px 0;}
.locline.good{color:var(--ok); font-weight:700;}

/* ---------- modal / sheet ---------- */
.overlay{position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:40; display:flex; align-items:flex-end; justify-content:center;}
.sheet{background:#fff; width:100%; max-width:520px; border-radius:18px 18px 0 0; padding:20px; max-height:92vh; overflow-y:auto;
  padding-bottom:calc(20px + env(safe-area-inset-bottom));}
.sheet.wide{max-width:900px;}
@media(min-width:640px){ .overlay{align-items:center;} .sheet{border-radius:18px;} }
.sheet h2{margin:0; font-size:17px; font-weight:900; text-transform:uppercase; letter-spacing:.05em;}
.sheet-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; gap:10px;}
.x{font-size:22px; font-weight:700; color:var(--muted); padding:4px 10px; min-width:44px; min-height:44px;}
.lightbox img{width:100%; border-radius:10px; background:#111; max-height:62vh; object-fit:contain;}

/* ---------- toast / sync ---------- */
#toasts{position:fixed; top:12px; left:50%; transform:translateX(-50%); z-index:60; display:flex; flex-direction:column; gap:8px; width:min(92vw,460px);}
.toast{background:var(--ink); color:#fff; padding:12px 14px; border-radius:10px; font-size:14px; font-weight:700; box-shadow:0 6px 18px rgba(0,0,0,.3); border-left:6px solid var(--gold2);}
.toast.err{border-left-color:#ef4444;} .toast.ok{border-left-color:#22c55e;}
.sync{position:fixed; bottom:84px; left:50%; transform:translateX(-50%); background:var(--ink); color:var(--faint); font-size:11px; font-weight:600; padding:6px 14px; border-radius:999px; z-index:26; opacity:.92;}
@media(min-width:900px){ .sync{bottom:16px;} }

/* ---------- auth ---------- */
.auth-wrap{max-width:420px; margin:28px auto; padding:0 14px;}
.auth-card{background:#fff; border-radius:16px; padding:22px; border:2px solid #e4e4e7;}
.auth-card h2{margin:0 0 4px; font-size:20px; font-weight:900;}
.auth-card p{color:var(--muted); font-size:14px; margin:0 0 10px; line-height:1.5;}
.auth-links{display:flex; justify-content:space-between; margin-top:14px; flex-wrap:wrap; gap:8px;}

/* ---------- confirmation ---------- */
.confirm-box{text-align:center; padding:28px 16px; background:#fff; border:2px solid var(--ok); border-radius:14px;}
.confirm-box .big{font-size:44px;}
.confirm-box .num{font-size:28px; font-weight:900; letter-spacing:.04em; margin:6px 0;}

table.simple{width:100%; border-collapse:collapse; font-size:14px; background:#fff;}
table.simple th{font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); text-align:left; padding:8px; border-bottom:2px solid var(--line);}
table.simple td{padding:8px; border-bottom:1px solid #eef2f7; vertical-align:middle;}
.diff{font-size:12px; color:var(--muted); margin-top:2px;}
.diff b{color:var(--ink);}

.print-only{display:none;}
@media print{
  header, nav, .noprint, #toasts, .sync, .btn, .linkbtn{display:none !important;}
  body{background:#fff;}
  main{padding:0;}
  .panel,.card{border:1px solid #999; break-inside:avoid;}
  .print-only{display:block;}
  .att-grid{grid-template-columns:repeat(3,1fr);}
}

/* ---------- section icons ---------- */
img.ico{display:inline-block; object-fit:contain; flex-shrink:0; vertical-align:middle; -webkit-user-drag:none; user-select:none;}
img.ico.tile{border-radius:22%; box-shadow:0 1px 2px rgba(0,0,0,.35);}
nav.tabs a .ic{height:28px; display:flex; align-items:center; justify-content:center;}
nav.tabs a:not(.on) img.ico.tile{opacity:.92;}
nav.side a .ic{display:flex; align-items:center; justify-content:center;}
nav.side a.on img.ico{filter:drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 0 3px rgba(255,255,255,.35));}
.menu-tile .ic{line-height:1; height:40px; display:flex; align-items:center;}
.btn img.ico{margin:-4px 0;}

/* ---------- icon set (line icons, inherit text colour) ---------- */
svg.i{width:20px; height:20px; flex-shrink:0; vertical-align:-4px; display:inline-block; overflow:visible;}
svg.i.sm{width:14px; height:14px; vertical-align:-2px;}
svg.i.xl{width:64px; height:64px;}
svg.i.ok{color:var(--ok);}
.btn svg.i{width:19px; height:19px;}
.btn.small svg.i{width:16px; height:16px;}
.chip svg.i{width:11px; height:11px; vertical-align:-1.5px; stroke-width:2.4;}
.pill svg.i{width:13px; height:13px; vertical-align:-2px;}
nav.tabs a .ic svg.i{width:24px; height:24px;}
nav.tabs a .ic{height:26px;}
nav.side a .ic svg.i{width:20px; height:20px;}
nav.side a:not(.on) .ic{color:var(--muted);}
nav.side a.on .ic{color:var(--gold2);}
nav.side a.on img.ico{filter:none;}
.menu-tile .ic{width:46px; height:46px; border-radius:12px; background:var(--ink); color:var(--gold2); display:flex; align-items:center; justify-content:center;}
.menu-tile .ic svg.i{width:26px; height:26px;}
.cat-ic{width:40px; height:40px; border-radius:10px; background:var(--ink); color:var(--gold2); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.cat-ic svg.i{width:22px; height:22px;}
.att .doc svg.i{width:34px; height:34px; color:var(--muted);}
.queue-item .doc svg.i{width:28px; height:28px; color:var(--muted);}
.x svg.i{width:20px; height:20px;}
.caret svg.i{width:18px; height:18px;}
.checkbox svg.i{width:18px; height:18px; stroke-width:2.6;}
.section-label svg.i{width:14px; height:14px; vertical-align:-2px;}
.locline svg.i{width:14px; height:14px; vertical-align:-2px;}
.confirm-box .big{line-height:1;}
.sizebadge svg.i{width:12px; height:12px; vertical-align:-1px; stroke-width:2.4;}

/* ---------- hose baskets ---------- */
.hose-grid{display:flex; flex-direction:column; gap:6px;}
.hg-head,.hg-row{display:grid; grid-template-columns:minmax(90px,1fr) 150px 150px; gap:10px; align-items:center;}
.hg-head{font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); padding:0 6px;}
.hg-row{background:#f8fafc; border:2px solid #eef2f7; border-radius:10px; padding:6px;}
.hg-row.has{border-color:#b9d6df; background:#f0f8fa;}
.hg-row.bad{border-color:var(--red); background:#fff5f5;}
.hg-row.tot{background:var(--ink); color:#fff; border-color:var(--ink);}
.hg-label{font-weight:800; font-size:15px;}
.stepper{display:grid; grid-template-columns:40px 1fr 40px; gap:4px; align-items:center;}
.stepper .inp{text-align:center; padding:8px 4px; min-height:42px; font-weight:800;}
.stp{height:42px; border-radius:8px; background:#fff; border:2px solid var(--line); font-size:20px; font-weight:900; color:var(--ink);}
.stp:active{background:#e5e7eb;}
.tot-n{text-align:center; font-weight:900; font-size:17px;}
.hg-cell{display:block; min-width:0;}
.hg-cap{display:none;}
@media(max-width:520px){
  .hg-head{display:none;}
  .hg-row{grid-template-columns:1fr 1fr;}
  .hg-row .hg-label{grid-column:1/-1;}
  .hg-cap{display:block; font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); text-align:center; margin-bottom:3px;}
  .hg-row.tot .tot-n::before{display:block; font-size:9px; letter-spacing:.08em; color:var(--faint);}
  .hg-row.tot span:nth-child(2)::before{content:"RECEIVED";}
  .hg-row.tot span:nth-child(3)::before{content:"CLEANED";}
}
}
.progress{height:6px; background:#e5e7eb; border-radius:3px; margin-top:6px; overflow:hidden; max-width:260px;}
.progress div{height:100%; background:var(--ok);}
.dl-list{display:flex; flex-direction:column; gap:6px; max-height:46vh; overflow:auto;}
.dl-item{display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:10px; border:2px solid var(--line); border-radius:10px; font-size:15px;}
.dl-item input{width:22px; height:22px;}
table.sheet td.num, table.sheet th.num{text-align:right; font-variant-numeric:tabular-nums;}
table.sheet tr.tot td{font-weight:900; border-top:2px solid var(--ink);}

td.num, th.num{text-align:right; font-variant-numeric:tabular-nums;}
@media print{
  body.print-qr > *:not(#modal){display:none !important;}
  body.print-qr #modal .overlay{position:static; background:none;}
  body.print-qr #modal .sheet{box-shadow:none; max-width:none; padding:0;}
  body.print-qr #modal .sheet > *:not(#qr-img){display:none !important;}
  body.print-qr #qr-img{border:none !important; width:100% !important;}
}

.xl-sets{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:6px;}

/* ---------- BOL signature ---------- */
.sig-wrap{position:relative; background:#fff; border:2px dashed #b9c3cf; border-radius:12px; touch-action:none; user-select:none; -webkit-user-select:none; overflow:hidden;}
.sig-wrap.bad{border-color:var(--red);}
.sig-wrap canvas{display:block; width:100%; touch-action:none; cursor:crosshair; position:relative; z-index:2;}
.sig-baseline{position:absolute; left:8%; right:6%; bottom:24%; border-bottom:1.5px solid #c4ccd6; z-index:1;}
.sig-x{position:absolute; left:3%; bottom:24%; font-size:18px; color:#9aa5b3; z-index:1; transform:translateY(40%);}
.sig-ph{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#b6bfca; font-size:20px; font-weight:700; letter-spacing:.06em; pointer-events:none; z-index:1;}
.sheet.sig-sheet{max-width:640px;}
.sig-show{max-width:520px;}
.sig-img{display:block; width:100%; max-width:480px; height:auto; background:#fff; border-radius:6px;}
.sig-line{border-bottom:1.5px solid var(--ink); max-width:480px; margin-top:-8px;}
.sig-blank .sig-line{height:70px; margin:0 0 4px;}
.sig-thumb{height:30px; width:auto; vertical-align:middle; margin-right:6px; background:#fff; border:1px solid var(--line); border-radius:4px;}
@media print{ .sig-panel{break-inside:avoid;} .sig-img{max-width:320px;} .sig-line{max-width:320px;} }

/* ---------- AI ---------- */
.unsure{border-color:#d97706 !important; background:#fff8eb !important; box-shadow:0 0 0 3px rgba(217,119,6,.18);}
.unsure-row{border-color:#d97706 !important; background:#fff8eb !important;}
.unsure-t{color:#b45309 !important; font-weight:700;}
.unsure-key{background:#fff3d6; border:2px solid #d97706; border-radius:4px; padding:0 4px; color:#7c3d06; font-weight:800;}
.banner ul{margin:6px 0 0; padding-left:18px; font-weight:600;}
.ai-steps{margin:0 0 12px; padding-left:20px; font-size:14px; line-height:1.6;}
.ai-progress{display:flex; gap:12px; align-items:center; background:#f0f6f8; border:1px solid #cfe1e8; border-radius:10px; padding:12px 14px; margin-top:12px;}
.spin{width:22px; height:22px; border-radius:50%; border:3px solid #cfe1e8; border-top-color:var(--green); animation:spin .8s linear infinite; flex-shrink:0;}
@keyframes spin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion:reduce){.spin{animation-duration:2.4s;}}
.ai-basket.dup{border:2px solid var(--red);}
.ai-basket.saved{opacity:.55;}
.ai-inc{display:flex; gap:8px; align-items:center; font-weight:800; font-size:15px; margin-bottom:6px;}
.ai-inc input{width:22px; height:22px; accent-color:var(--green);}
.ai-um{display:grid; grid-template-columns:1fr minmax(140px,200px); gap:8px; align-items:center; margin-top:8px; font-weight:600;}
.ai-um .inp{min-height:38px; padding:6px 8px; color:var(--ink);}
.ai-cta{display:flex; flex-wrap:wrap; gap:10px 16px; align-items:center; justify-content:space-between; border:2px solid #cfe1e8; background:#f5fafb;}
.ai-cta > div:first-child{flex:1 1 220px;}
.ai-cta #ai-bol-status{flex-basis:100%;}
.ai-dash{display:flex; gap:14px; align-items:center; text-decoration:none; color:#fff; background:linear-gradient(120deg,var(--ink),#22384a); border-radius:12px; padding:14px 16px; margin:4px 0 14px; box-shadow:0 2px 6px rgba(0,0,0,.2);}
.ai-dash .hint{color:#c9d4df; display:block; font-weight:500; margin-top:2px;}
.ai-dash > span:nth-child(2){flex:1;}
.ai-dash-ic{width:46px; height:46px; border-radius:12px; background:var(--gold2); color:var(--ink); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.ai-dash-ic svg.i{width:28px; height:28px;}
.ai-chat{display:flex; flex-direction:column; min-height:calc(100vh - 190px);}
.ai-head{display:flex; gap:12px; align-items:center; margin-bottom:10px;}
.ai-head svg.i.xl{width:48px; height:48px; color:var(--green);}
.ai-log{flex:1; display:flex; flex-direction:column; gap:12px; padding-bottom:10px;}
.ai-empty{background:var(--card); border-radius:12px; padding:14px; border:1px solid var(--line);}
.ai-sug{display:block; width:100%; text-align:left; background:#f4f7fa; border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin-bottom:6px; font-size:14px; font-weight:600; color:var(--ink);}
.ai-sug:hover{background:#e9f1f5;}
.msg{display:flex; gap:8px; align-items:flex-start;}
.msg.me{justify-content:flex-end;}
.msg .bubble{max-width:min(720px,88%); border-radius:14px; padding:10px 14px; font-size:15px; line-height:1.5; overflow-wrap:anywhere;}
.msg.me .bubble{background:var(--green); color:#fff; border-bottom-right-radius:4px; white-space:pre-wrap;}
.msg.ai .bubble{background:var(--card); border:1px solid var(--line); border-bottom-left-radius:4px; min-width:0;}
.msg.ai .bubble p{margin:0 0 8px;} .msg.ai .bubble p:last-child{margin-bottom:0;}
.msg.ai .bubble ul,.msg.ai .bubble ol{margin:4px 0 8px; padding-left:20px;}
.ai-h{font-weight:800; margin:8px 0 4px;}
.ai-av{width:32px; height:32px; border-radius:10px; background:var(--ink); color:var(--gold2); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.ai-av svg.i{width:20px; height:20px;}
.ai-steps-used{font-size:11px; color:var(--faint); margin-top:6px;}
.ai-prop{display:flex; flex-wrap:wrap; gap:8px; align-items:center; background:#fff8eb; border:1px solid #f1c27d; border-radius:10px; padding:8px 10px; margin-top:8px; font-size:14px;}
.ai-table{margin-top:10px; border:1px solid var(--line); border-radius:10px; padding:8px;}
.ai-table-head{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:6px;}
.ai-table-head .btn{margin-left:auto;}
.tablewrap{overflow-x:auto; -webkit-overflow-scrolling:touch; max-height:420px; overflow-y:auto;}
.tablewrap table.sheet{font-size:12px; white-space:nowrap;}
.ai-compose{position:sticky; bottom:0; background:var(--bg); padding:8px 0 calc(8px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); z-index:5;}
.ai-row{display:grid; grid-template-columns:44px 1fr 52px; gap:6px; align-items:end;}
.ai-row textarea{resize:none; min-height:46px; max-height:160px; font-size:16px; line-height:1.4;}
.ai-send{min-height:46px; padding:0; display:flex; align-items:center; justify-content:center;}
.ai-attach{height:46px; width:44px; display:flex; align-items:center; justify-content:center; border:2px solid var(--line); border-radius:10px; background:#fff;}
.ai-files{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px;}
.ai-files .chip{font-size:11px; text-transform:none; letter-spacing:0; display:inline-flex; gap:4px; align-items:center; padding:4px 6px 4px 8px;}
.ai-files .chip .linkbtn{color:#fff; padding:0;}
@media (max-width:899px){ .ai-compose{bottom:calc(64px + env(safe-area-inset-bottom));} .ai-chat{min-height:calc(100vh - 230px);} .ai-um{grid-template-columns:1fr;} }
.ai-more{display:flex; flex-direction:column; gap:6px;}

/* ---------- Foxx Canada logo ---------- */
.brand h1{line-height:0; letter-spacing:0;}
.brand h1 img.logo{display:block; height:22px; width:auto; max-width:100%; filter:none;}
.brand img.logo{width:auto; filter:none;}
@media (min-width:600px){ .brand h1 img.logo{height:28px;} }
.auth-brand{background:var(--ink); border-radius:16px; padding:22px 18px 16px; text-align:center; margin-bottom:12px; box-shadow:0 2px 8px rgba(0,0,0,.18);}
.auth-brand img{display:block; width:min(300px,100%); height:auto; margin:0 auto;}
.auth-brand .sub{margin-top:10px; font-size:11px; font-weight:800; letter-spacing:.25em; text-transform:uppercase; color:var(--gold2);}
.print-brand{display:flex; align-items:center; gap:12px; margin-bottom:10px; font-weight:700;}
.print-brand img{height:34px; width:auto; border-radius:4px;}
/* operator portal */
.op-views{display:grid; grid-template-columns:1fr 1fr; gap:6px; background:#e5e9ef; padding:4px; border-radius:12px; margin:4px 0 12px;}
.op-views button{display:flex; gap:8px; align-items:center; justify-content:center; min-height:46px; border-radius:9px; font-weight:800; font-size:15px; color:var(--ink); background:transparent; border:0;}
.op-views button.on{background:var(--ink); color:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25);}
.op-co{display:flex; align-items:center; gap:6px; background:#eef2f6; color:var(--ink); font-weight:700;}
details.ship-bol > summary{list-style:none; cursor:pointer;}
details.ship-bol > summary::-webkit-details-marker{display:none;}
details.ship-bol[open] > summary svg.i:last-child{transform:rotate(180deg);}
.ship-body{padding:0 14px 14px;}
.qr-table{white-space:normal;} .qr-table td{vertical-align:top;} .sheet-head h2{min-width:0; overflow-wrap:anywhere;}
