:root{
  --bg:#FFFFFF; --soft:#F5FAFF; --ink:#0F1B3D; --muted:#5B6782;
  --blue:#00A2FF; --blue-dark:#0083D1; --blue-soft:#E6F5FF; --line:#BFE5FF; --line-soft:#E3F3FF;
  --red:#D6453D; --red-soft:#FDECEB; --amber:#B7791F; --amber-soft:#FFF4E0; --green:#1E9E63;
  --navy:#131F5B; --navy-2:#1C2B72; --r:12px; color-scheme:light;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 Inter,system-ui,-apple-system,Segoe UI,sans-serif}
a{color:var(--blue-dark)} h1,h2,h3{line-height:1.2;margin:0}
h1{font-size:1.65rem;font-weight:700;letter-spacing:-.01em} h2{font-size:1.1rem;margin:1.4rem 0 .4rem} h3{font-size:.95rem;margin-bottom:.5rem}
.sub,.raw{color:var(--muted)} .raw{font-size:.84rem}
.shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh;background:linear-gradient(90deg,var(--navy) 230px,#fff 230px)}
.side{background:var(--navy);border-right:0;padding:1.4rem .9rem;display:flex;flex-direction:column;gap:.2rem;position:sticky;top:0;height:100vh}
.side a{padding:.6rem .8rem;border-radius:9px;text-decoration:none;color:#D6DCF5;font-weight:500}
.side a:hover{background:var(--navy-2);color:#fff} .side a.on{background:var(--blue);color:#fff;font-weight:600}
.brand{padding:.2rem .6rem 1.2rem!important;background:none!important}
.brand img{height:32px;width:auto;max-width:100%;display:block}
.me{margin-top:auto;padding:.8rem;font-weight:600;font-size:.9rem;border-top:1px solid rgba(255,255,255,.12);color:#fff}
.me small{display:block;color:#9AA6D6;font-weight:400} .me a{padding:0;font-weight:400;color:#9AA6D6}
main{padding:2rem 2.2rem 4rem;max-width:1180px;width:100%;margin:0 auto}
.pagehead{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;margin-bottom:1.4rem;flex-wrap:wrap}
.pagehead .sub{margin:.25rem 0 0}
.actions{display:flex;gap:.5rem;flex-wrap:wrap}
.btn{display:inline-block;background:var(--blue);color:#fff;border:1px solid var(--blue);border-radius:9px;padding:.6rem 1.1rem;font:inherit;font-weight:600;text-decoration:none;cursor:pointer}
.btn:hover{background:var(--blue-dark);border-color:var(--blue-dark)} .btn.small{padding:.35rem .75rem;font-size:.86rem}
.btn.ghost{background:#fff;color:var(--blue-dark);border-color:var(--line)} .btn.ghost:hover{background:var(--soft)}
.btn.ghost.warn{color:var(--amber);border-color:#F3D9A8}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
input,select{font:inherit;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:8px;padding:.55rem .7rem;min-width:0;width:100%}
input:focus,select:focus{border-color:var(--blue);outline:none;box-shadow:0 0 0 3px var(--blue-soft)}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:1.3rem 1.5rem;margin-bottom:1.2rem}
.flash{padding:.75rem 1rem;border-radius:9px;margin-bottom:1.2rem;background:var(--blue-soft);color:var(--blue-dark);border:1px solid var(--line)}
.flash.err{background:var(--red-soft);color:var(--red);border-color:#F6C9C6}
.empty{text-align:center;padding:4rem 1rem}.empty p{color:var(--muted)}
.progress{height:8px;background:var(--blue-soft);border-radius:99px;overflow:hidden;width:280px;max-width:100%;margin:.8rem 0 .3rem}
.progress .bar{height:100%;background:var(--blue);border-radius:99px;transition:width .3s}
/* tickets */
.tickets{border:1px solid var(--line);border-radius:var(--r);background:#fff;overflow:hidden}
.thead,.ticket{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:1.5rem;padding:1rem 1.4rem}
.thead{background:var(--soft);border-bottom:1px solid var(--line);font-size:.82rem;font-weight:600;color:var(--muted)}
.ticket{border-top:1px solid var(--line-soft);border-left:4px solid transparent;align-items:start}
.thead + .ticket{border-top:0}
.ticket.worked{border-left-color:var(--blue);background:linear-gradient(90deg,var(--soft),#fff 30%)}
.ord{font-weight:700;text-decoration:none;font-size:1.02rem;color:var(--ink)}
.back{display:inline-block;margin-left:.4rem;font-size:.74rem;font-weight:600;padding:.12rem .55rem;border-radius:99px;background:var(--amber-soft);color:var(--amber)}
.name{font-weight:500;margin-top:.2rem} .meta{font-size:.86rem;color:var(--muted)}
.tel{color:var(--blue-dark);font-weight:600;text-decoration:none;font-size:.95rem}
.chip{display:inline-block;font-size:.84rem;font-weight:600;padding:.2rem .65rem;border-radius:7px;background:var(--blue-soft);color:var(--blue-dark)}
.chip.hot{background:var(--red-soft);color:var(--red)}
.why .raw{margin-top:.4rem}
.do{display:flex;flex-direction:column;gap:.45rem}
.do select[name=outcome_id]{font-weight:600}
.hide{display:none!important} .saved{font-size:.78rem;color:var(--muted);min-height:1.1em}
.saved.ok{color:var(--green)} .saved.err{color:var(--red)} .readonly{font-weight:600}
/* tables & facts */
.grid{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.grid th,.grid td{text-align:left;padding:.65rem .9rem;border-top:1px solid var(--line-soft);vertical-align:top}
.grid th{font-size:.82rem;color:var(--muted);font-weight:600;border-top:0;background:var(--soft)}
.grid.tight td,.grid.tight th{padding:.45rem .7rem;font-size:.9rem}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.9rem;margin-bottom:1rem}
.facts div{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:1rem 1.1rem}
.facts b{display:block;font-size:1.4rem;font-variant-numeric:tabular-nums} .facts span{font-size:.84rem;color:var(--muted)}
.facts.big b{font-size:2rem;color:var(--ink)} .facts .accent{background:var(--blue-soft);border-color:var(--blue)} .facts .accent b{color:var(--blue-dark)}
.summary{margin:0 0 1.6rem}
.cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(380px,1fr));gap:1.3rem}
.barlabel{font-size:.9rem} .bar{height:5px;width:var(--w);background:var(--blue);border-radius:3px;margin-top:.3rem}
.progress .bar{width:auto;margin:0}

.rephead{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.rephead h2{margin:0}
.payout{text-align:right}.payout b{display:block;font-size:1.8rem;color:var(--blue-dark)}.payout span{font-size:.85rem;color:var(--muted)}
details summary{cursor:pointer;color:var(--blue-dark);margin-bottom:.5rem}
/* settings */
.optrow,.userrow{display:flex;gap:.45rem;align-items:center;padding:.35rem 0;flex-wrap:wrap}
.optrow input,.optrow select,.userrow input,.userrow select{width:auto}
.optrow.off,.userrow.off{opacity:.5} .optrow input[name=label]{flex:0 1 220px} .optrow .wide{flex:1 1 300px}
.n{width:72px!important} .chk{display:flex;align-items:center;gap:.3rem;font-size:.85rem;color:var(--muted)} .chk input{width:auto}
.copy{display:block;padding:.75rem;background:var(--soft);border:1px solid var(--line);border-radius:8px;word-break:break-all;font-size:.85rem;user-select:all}
.upload{display:flex;gap:.8rem;align-items:flex-end;flex-wrap:wrap}
.drop{flex:1;display:flex;flex-direction:column;gap:.35rem;font-weight:600}
.search{display:flex;gap:.5rem;margin-bottom:1rem}.search input{flex:1}
.login{min-height:100vh;display:grid;place-items:center;padding:1rem;background:var(--soft)}
.login form{width:100%;max-width:380px;display:flex;flex-direction:column;gap:1rem}
.loginlogo{height:42px;width:auto;align-self:center;margin-bottom:.5rem}
.login label{display:flex;flex-direction:column;gap:.35rem;font-weight:500;font-size:.9rem}
@media (max-width:900px){
  .shell{grid-template-columns:1fr;background:#fff} .side{position:static;height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;padding:.6rem;border-right:0;border-bottom:0}
  .brand{padding:.2rem .6rem!important} .brand img{height:26px} .me{margin:0 0 0 auto;border:0;padding:.3rem} .me small{display:inline;margin-left:.3rem}
  main{padding:1.2rem} .thead{display:none} .ticket{grid-template-columns:1fr;gap:.7rem} .cols{grid-template-columns:1fr}
  .grid{display:block;overflow-x:auto}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
/* dashboard */
.rings{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:1rem;margin-bottom:1rem}
.ringcard{background:#fff;border:1px solid var(--line);border-radius:16px;padding:1.4rem 1.2rem;display:flex;flex-direction:column;align-items:center;text-align:center;gap:.8rem}
.ring,.donut{width:150px;height:150px}
.ring .track,.donut .track{fill:none;stroke:var(--blue-soft);stroke-width:12}
.ring .val{fill:none;stroke-width:12;stroke-linecap:round;transition:stroke-dasharray .6s ease}
.donut .seg{fill:none;stroke-width:14}
.ring .pct,.donut .pct{font:700 26px Inter,sans-serif;fill:var(--ink);text-anchor:middle;dominant-baseline:central}
.donut .cap{font:500 11px Inter,sans-serif;fill:var(--muted);text-anchor:middle}
.ringlabel b{display:block;font-size:1.05rem}
.ringlabel span{font-size:.84rem;color:var(--muted)}
.pills{display:flex;gap:.8rem;flex-wrap:wrap;margin-bottom:1.4rem}
.pill{flex:1 1 200px;display:flex;align-items:baseline;gap:.5rem;background:var(--soft);border:1px solid var(--line);border-radius:99px;padding:.7rem 1.2rem}
.pill b{font-size:1.3rem;color:var(--navy)} .pill span{font-size:.88rem;color:var(--muted)}
.dgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:1rem}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:1.2rem 1.4rem}
.card h3{font-size:1rem;margin-bottom:1rem}
.donutwrap{display:flex;align-items:center;gap:1.4rem;flex-wrap:wrap}
.legend{list-style:none;margin:0;padding:0;flex:1;min-width:180px;display:flex;flex-direction:column;gap:.45rem}
.legend li{display:flex;align-items:center;gap:.5rem;font-size:.9rem}
.legend i{width:11px;height:11px;border-radius:50%;flex:none}
.legend b{margin-left:auto;font-variant-numeric:tabular-nums}
.hbar{margin-bottom:.75rem}
.hbar-top{display:flex;justify-content:space-between;font-size:.9rem;margin-bottom:.3rem}
.hbar-track{height:10px;background:var(--blue-soft);border-radius:99px;overflow:hidden}
.hbar-fill{height:100%;border-radius:99px;min-width:4px}
@media (max-width:900px){.dgrid{grid-template-columns:1fr}.ring,.donut{width:130px;height:130px}}
/* upload on today's sheet */
.sr,.autosubmit{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0 0 0 0)}
.inlineupload{margin:0} .inlineupload label{position:relative}
.inlineupload label:focus-within,.dropzone label:focus-within{outline:2px solid var(--blue);outline-offset:2px}
.dropzone{max-width:460px;margin:1.6rem auto 0}
.dropzone label{position:relative;display:flex;flex-direction:column;align-items:center;gap:.3rem;padding:2.4rem 1.5rem;border:2px dashed var(--line);border-radius:16px;background:var(--soft);cursor:pointer;transition:border-color .15s,background .15s}
.dropzone label:hover,.dropzone.over label{border-color:var(--blue);background:var(--blue-soft)}
.dropzone b{color:var(--blue-dark);font-size:1.05rem} .dropzone span{color:var(--muted);font-size:.9rem}
.busy{opacity:.6;pointer-events:none}
/* roles */
.role{border:1px solid var(--line);border-radius:14px;padding:1.1rem 1.2rem;margin:1rem 0;scroll-margin-top:1rem}
.role:target{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-soft)}
.rolehead{display:flex;gap:.9rem;align-items:center;flex-wrap:wrap;margin-bottom:.8rem}
.rolehead input{width:auto;flex:0 1 260px;font-weight:600}
.rolehead input[readonly]{background:var(--soft);border-color:transparent}
.perms{border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-bottom:.9rem}
.perm + .perm{border-top:1px solid var(--line-soft)}
.perm summary{list-style:none;display:flex;align-items:center;gap:.7rem;padding:.7rem 1rem;cursor:pointer;background:#FAFCFF;color:var(--ink);margin:0}
.perm summary::-webkit-details-marker{display:none}
.perm summary:hover{background:var(--soft)}
.perm summary::after{content:"";width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg) translateY(-2px);margin-left:.4rem;transition:transform .15s}
.perm[open] summary::after{transform:rotate(-135deg) translateY(-2px)}
.pname{font-weight:500} .pcount{margin-left:auto;font-size:.88rem;color:var(--muted);font-variant-numeric:tabular-nums}
.pico{width:18px;height:18px;flex:none;border-radius:50%;position:relative}
.pico[data-state=all]{background:var(--green)}
.pico[data-state=all]::after{content:"";position:absolute;left:6px;top:3px;width:4px;height:8px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.pico[data-state=some]{background:var(--blue)}
.pico[data-state=some]::after{content:"";position:absolute;left:4px;right:4px;top:8px;height:2px;background:#fff;border-radius:1px}
.pico[data-state=none]{border:2px solid #A9B3C9}
.pico[data-state=none]::after{content:"";position:absolute;left:50%;top:1px;bottom:1px;width:2px;margin-left:-1px;background:#A9B3C9;transform:rotate(45deg)}
.plist{display:flex;flex-direction:column;gap:.15rem;padding:.4rem 1rem .8rem 2.9rem;background:#fff}
.plist label{display:flex;align-items:center;gap:.55rem;padding:.3rem 0;font-size:.92rem;cursor:pointer}
.plist input{width:16px;height:16px;accent-color:var(--blue);flex:none}
.plist input:disabled + *,.plist label:has(input:disabled){cursor:default;color:var(--muted)}
.newrole > summary{list-style:none;display:inline-block} .newrole > summary::-webkit-details-marker{display:none}
.btn.ghost.danger{color:var(--red);border-color:#F6C9C6} .btn.ghost.danger:hover{background:var(--red-soft)}
/* team list (Shopify-style) */
.sechead{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:.9rem}.sechead h2{margin:0}
.ulist{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 1px 2px rgba(15,27,61,.04)}
.utabs{display:flex;align-items:center;gap:.3rem;padding:.6rem .7rem;border-bottom:1px solid var(--line-soft)}
.utab{font:inherit;font-size:.88rem;font-weight:500;color:var(--muted);background:none;border:0;border-radius:8px;padding:.35rem .75rem;cursor:pointer}
.utab:hover{background:var(--soft)} .utab.on{background:#E9EDF3;color:var(--ink);font-weight:600}
.usearch{margin-left:auto;width:200px;padding:.35rem .7rem;font-size:.88rem}
.utable{width:100%;border-collapse:collapse}
.utable th{text-align:left;font-size:.82rem;font-weight:600;color:var(--muted);background:#F7F8FA;padding:.55rem 1rem;border-bottom:1px solid var(--line-soft)}
.utable td{padding:.7rem 1rem;border-bottom:1px solid var(--line-soft);vertical-align:middle}
.utable tr:last-child td{border-bottom:0}
.urow{cursor:pointer} .urow:hover td{background:#F7FAFF}
.uname{font-weight:600;color:var(--ink);text-decoration:none;display:block} .umail{font-size:.84rem;color:var(--muted)}
.status{display:inline-block;font-size:.8rem;font-weight:600;padding:.12rem .55rem;border-radius:7px}
.status.on{background:#AFF5A0;color:#14532D} .status.off{background:#E9EDF3;color:var(--muted)}
.urole{display:inline-flex;align-items:center;gap:.5rem}
.shield{width:14px;height:16px;flex:none;background:var(--red);clip-path:polygon(50% 0,100% 18%,100% 55%,50% 100%,0 55%,0 18%)}
/* user page */
.backlink{display:inline-block;font-size:.88rem;text-decoration:none;color:var(--muted);margin-bottom:.4rem}.backlink:hover{color:var(--blue-dark)}
.pagehead .status{vertical-align:1px}
.userpage{max-width:760px}
.fgrid{display:grid;grid-template-columns:1fr 1fr;gap:.9rem 1rem;margin-top:.6rem}
.fgrid label{display:flex;flex-direction:column;gap:.35rem;font-size:.88rem;font-weight:500}
.chk.big{flex-direction:row!important;align-items:center;align-self:end;font-size:.92rem;color:var(--ink);padding-bottom:.6rem}
.rolepick{max-width:320px;font-weight:600}
.savebar{display:flex;justify-content:flex-end;gap:.6rem;margin:.4rem 0 2rem}
@media (max-width:700px){.fgrid{grid-template-columns:1fr}.usearch{width:120px}}
.panel > h2:first-child{margin-top:0}
/* date range picker (Shopify-style) */
.drp{position:relative}
.drp-btn{display:inline-flex;align-items:center;gap:.5rem;font:inherit;font-weight:600;font-size:.92rem;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:10px;padding:.5rem .9rem;cursor:pointer;box-shadow:0 1px 0 rgba(15,27,61,.05)}
.drp-btn:hover{background:var(--soft)}
.drp-ico{width:15px;height:15px;border:1.8px solid currentColor;border-radius:3px;position:relative;flex:none}
.drp-ico::before{content:"";position:absolute;left:-1.8px;right:-1.8px;top:2px;border-top:1.8px solid currentColor}
.drp-pop{position:absolute;right:0;top:calc(100% + 8px);z-index:50;background:#fff;border:1px solid #E3E6EC;border-radius:14px;box-shadow:0 12px 32px rgba(15,27,61,.16),0 2px 6px rgba(15,27,61,.06);width:max-content;max-width:calc(100vw - 2rem)}
.drp-body{display:flex}
.drp-presets{list-style:none;margin:0;padding:.7rem .5rem;border-right:1px solid #EEF0F3;min-width:150px}
.drp-presets button{display:block;width:100%;text-align:left;font:inherit;font-size:.9rem;color:var(--ink);background:none;border:0;border-radius:8px;padding:.45rem .7rem;cursor:pointer}
.drp-presets button:hover{background:#F3F4F6} .drp-presets button.on{background:#EEF0F3;font-weight:600}
.drp-main{padding:1rem 1rem .4rem}
.drp-inputs{display:flex;align-items:center;gap:.6rem;margin-bottom:1rem;color:var(--muted)}
.drp-in{width:200px;font-size:.92rem;padding:.5rem .8rem;border-color:#D7DBE2;border-radius:10px}
.drp-cals{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:1.6rem}
.drp-cals .drp-cal + .drp-cal{border-left:1px solid #EEF0F3;padding-left:1.6rem}
.drp-nav{position:absolute;top:0;width:28px;height:28px;border:0;background:none;border-radius:8px;cursor:pointer}
.drp-nav:hover{background:#F3F4F6} .drp-nav.prev{left:0} .drp-nav.next{right:0}
.drp-nav::after{content:"";position:absolute;left:50%;top:50%;width:7px;height:7px;border:solid var(--ink);border-width:0 0 2px 2px;transform:translate(-30%,-50%) rotate(45deg)}
.drp-nav.next::after{transform:translate(-70%,-50%) rotate(-135deg)}
.drp-title{text-align:center;font-weight:700;font-size:.95rem;height:28px;line-height:28px;margin-bottom:.5rem}
.drp-grid{display:grid;grid-template-columns:repeat(7,36px);row-gap:2px}
.drp-grid .dow{font-size:.78rem;color:var(--muted);text-align:center;padding:.3rem 0}
.drp-day{height:36px;font:inherit;font-size:.9rem;border:0;background:none;color:var(--ink);cursor:pointer;border-radius:9px;position:relative}
.drp-day:hover:not(:disabled){background:#F3F4F6}
.drp-day.inrange,.drp-day.inrange:hover:not(:disabled){background:#EEF0F3;border-radius:0}
.drp-day.edge,.drp-day.edge:hover:not(:disabled){background:#111827;color:#fff;font-weight:600;border-radius:9px}
.drp-day.today:not(.edge){box-shadow:inset 0 0 0 1px #C9CED8}
.drp-day:disabled{color:#C3C8D1;cursor:default}
.drp-foot{display:flex;justify-content:flex-end;gap:.5rem;padding:.75rem 1rem;border-top:1px solid #EEF0F3}
.drp-apply:disabled{opacity:.45;cursor:default}
@media (max-width:760px){.drp-body{flex-direction:column}.drp-presets{display:flex;flex-wrap:wrap;border-right:0;border-bottom:1px solid #EEF0F3}.drp-presets button{width:auto}
  .drp-cals{grid-template-columns:1fr}.drp-cals .drp-cal + .drp-cal{display:none}.drp-in{width:130px}.drp-pop{right:auto;left:0}}
.rolenote{margin:1rem 0 .5rem}
.newrolename{display:flex;flex-direction:column;gap:.35rem;font-size:.88rem;font-weight:500;margin-top:1rem;max-width:320px}
/* sidebar icons + settings dropdown */
.side a,.navtoggle{display:flex;align-items:center;gap:.65rem}
.ico{width:18px;height:18px;flex:none;opacity:.85}
.side a.on .ico,.navtoggle.here .ico{opacity:1}
.navtoggle{width:100%;font:inherit;font-weight:500;color:#D6DCF5;background:none;border:0;border-radius:9px;padding:.6rem .8rem;cursor:pointer;text-align:left}
.navtoggle:hover{background:var(--navy-2);color:#fff}
.navtoggle.here{color:#fff;font-weight:600}
.navtoggle .chev{margin-left:auto;width:15px;height:15px;transition:transform .2s}
.navgroup.open .chev{transform:rotate(180deg)}
.navsub{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease}
.navsub > div{min-height:0;display:flex;flex-direction:column}
.navgroup.open .navsub{grid-template-rows:1fr}
.navsub{overflow:hidden}
.navsub a{padding:.45rem .8rem .45rem 2.1rem;font-size:.9rem;margin-top:.1rem}
.navsub .ico{width:16px;height:16px}
.navgroup:not(.open) .navsub a{visibility:hidden}
h1.withico{display:flex;align-items:center;gap:.6rem} h1.withico .ico{width:26px;height:26px;color:var(--blue);opacity:1}
@media (max-width:900px){.navgroup{width:100%}.navsub a{padding-left:1.4rem}}
.rowactions{display:flex;gap:.4rem;flex-wrap:wrap}.rowactions form{margin:0}
/* orders overview */
a.utab{text-decoration:none;display:inline-flex;align-items:center;gap:.35rem}
.tabn{font-size:.75rem;font-weight:600;background:#E9EDF3;color:var(--muted);border-radius:99px;padding:.05rem .45rem}
.utab.on .tabn{background:#fff}
.ofilters{margin-left:auto;display:flex;gap:.4rem;align-items:center}
.ofilters select{width:auto;padding:.35rem .6rem;font-size:.88rem}
.ofilters .usearch{margin-left:0}
.otable td{font-size:.92rem}
.otable .num{text-align:center}
.ores{color:var(--muted);max-width:260px}
.ostatus{display:inline-block;font-size:.8rem;font-weight:600;padding:.12rem .6rem;border-radius:7px}
.ostatus.recovered{background:#AFF5A0;color:#14532D}
.ostatus.lost{background:#FED1D7;color:#8E1F0B}
.ostatus.pending{background:#FFE7A3;color:#5E4200}
.pager{display:flex;justify-content:center;align-items:center;gap:1rem;margin:1rem 0}
@media (max-width:900px){.utabs{flex-wrap:wrap}.ofilters{margin-left:0;width:100%}.otable{display:block;overflow-x:auto}}
.otable .umail{display:block}.otable .chip{white-space:normal}
.ophone{white-space:nowrap;font-variant-numeric:tabular-nums}
.callbtn{white-space:nowrap}
/* orders filter button */
.fpop-wrap{position:relative}
.fbtn{display:inline-flex;align-items:center;gap:.35rem}.fbtn .ico{width:15px;height:15px}
.tabn.on{background:var(--blue);color:#fff}
.fpop{position:absolute;right:0;top:calc(100% + 6px);z-index:40;background:#fff;border:1px solid #E3E6EC;border-radius:12px;box-shadow:0 12px 32px rgba(15,27,61,.16);padding:.9rem 1rem .4rem;min-width:260px;max-height:70vh;overflow:auto}
.fpop fieldset{border:0;margin:0 0 .8rem;padding:0}
.fpop legend{font-size:.8rem;font-weight:600;color:var(--muted);margin-bottom:.35rem}
.fpop label{display:flex;align-items:center;gap:.55rem;padding:.3rem 0;font-size:.92rem;cursor:pointer}
.fpop input[type=checkbox]{width:16px;height:16px;accent-color:var(--blue)}
.fpop-foot{display:flex;justify-content:space-between;gap:.5rem;border-top:1px solid #EEF0F3;margin:0 -1rem;padding:.7rem 1rem .5rem}
.fchips{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;padding:.55rem .8rem;border-bottom:1px solid var(--line-soft);background:#FBFCFE}
.fchip{display:inline-flex;align-items:center;gap:.35rem;font-size:.84rem;font-weight:500;color:var(--ink);background:#fff;border:1px solid #D7DBE2;border-radius:99px;padding:.15rem .4rem .15rem .7rem;text-decoration:none}
.fchip span{font-size:1rem;line-height:1;color:var(--muted)} .fchip:hover{border-color:var(--blue)}
.fclear{font-size:.84rem;margin-left:.3rem}
.osearch{margin:0}
.utabs .osearch{margin-left:auto}
.fbtn.active{border-color:var(--blue)} .fbtn .chev{width:14px;height:14px;margin-left:.1rem}
.fbtn .ostatus{padding:.02rem .45rem;font-size:.78rem}
.fmenu{left:0;right:auto;min-width:210px;padding:.4rem}
.fitem{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.5rem .6rem;border-radius:8px;text-decoration:none;color:var(--ink);font-size:.92rem}
.fitem:hover{background:#F3F4F6} .fitem.on{background:#EEF0F3;font-weight:600}
/* let dropdowns escape the list box instead of being cut off */
.ulist{overflow:visible}
.ulist .utable tr:last-child td:first-child{border-bottom-left-radius:14px}
.ulist .utable tr:last-child td:last-child{border-bottom-right-radius:14px}
.fpop{z-index:60}


.called{display:inline-block;white-space:nowrap;font-family:inherit;font-size:.8rem;font-weight:600;line-height:1.2;padding:.3rem .55rem;border-radius:7px;border:0}
select.called{min-width:7.4rem;appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:1.6rem;background-repeat:no-repeat;background-position:right .5rem center;background-size:10px}
.called.yes{background-color:#0B3D91;color:#fff}
select.called.yes{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")}
.called.no{background-color:#E6E8EC;color:#4A5262}
select.called.no{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%234A5262' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")}
select.called option{background:#fff;color:#1b2333}
select.called:disabled{opacity:.6}

select.ostatus.pick{appearance:none;-webkit-appearance:none;border:0;cursor:pointer;font-family:inherit;line-height:1.2;padding:.3rem 1.6rem .3rem .6rem;min-width:7.4rem;
  background-repeat:no-repeat;background-position:right .5rem center;background-size:10px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")}
select.ostatus.pick option{background:#fff;color:#1b2333}
select.ostatus.pick:disabled{opacity:.6}

.rep .facts{grid-template-columns:repeat(3,minmax(0,1fr))}
.rechead{margin:1.4rem 0 .6rem;font-size:1rem}
.tablewrap{overflow-x:auto}
.calllink{display:inline-flex;align-items:center;gap:.5rem;white-space:nowrap}
.calllink code{font-size:.85rem;background:#F2F4F7;padding:.2rem .45rem;border-radius:6px;user-select:all}

.otable-wrap{overflow-x:auto;border-radius:0 0 14px 14px}
.otable .calllink{gap:.35rem}
.otable .calllink code{font-size:.78rem;padding:.15rem .35rem}
.otable .calllink .copy{padding:.2rem .5rem;font-size:.75rem}
.otable td,.otable th{padding-left:.7rem;padding-right:.7rem}

.phonecopy{display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap}
.phonecopy .copy{padding:.2rem .5rem;font-size:.75rem}
.calllinkbox{width:9.5rem;font:inherit;font-size:.82rem;padding:.35rem .5rem;border:1px solid var(--line);border-radius:7px;background:#fff}
.calllinkbox:focus{outline:2px solid #00A2FF;outline-offset:0;border-color:transparent}
.calllinkbox.ok{border-color:#1E9E63}
.calllinkbox.err{border-color:#D6453D}

.zero{display:inline-block;font-weight:700;color:#8E1F0B;background:#FED1D7;padding:.1rem .5rem;border-radius:7px;font-variant-numeric:tabular-nums}
.errnote{width:100%;min-width:16rem;font:inherit;font-size:.86rem;padding:.4rem .55rem;border:1px solid var(--line);border-radius:7px;resize:vertical;background:#fff}
.errnote:focus{outline:2px solid #00A2FF;border-color:transparent}
.errnote.ok{border-color:#1E9E63} .errnote.err{border-color:#D6453D}
.notice.warn{background:#FFF6DB;border:1px solid #F3D27A;color:#5E4200;padding:.7rem 1rem;border-radius:10px;margin-bottom:1rem}

.tabrow{display:flex;gap:.25rem;flex-wrap:wrap}
.duptable .duphead td{background:#FFF8E6;font-size:.82rem;color:#5E4200;padding:.45rem 1rem;border-bottom:1px solid #F3E2B3}
.dupchip{display:inline-block;font-weight:700;background:#FFE7A3;color:#5E4200;padding:.08rem .5rem;border-radius:7px;margin-right:.35rem}
.duptable tbody.dupgroup + tbody.dupgroup .duphead td{border-top:6px solid #fff}

/* help chat */
.hc{position:fixed;right:22px;bottom:22px;z-index:200;font-size:.92rem}
.hc-fab{width:56px;height:56px;border-radius:50%;border:0;background:#0E1B33;color:#fff;cursor:pointer;display:grid;place-items:center;box-shadow:0 8px 24px rgba(14,27,51,.3)}
.hc-fab:hover{background:#00A2FF}
.hc-panel{position:absolute;right:0;bottom:70px;width:min(380px,calc(100vw - 32px));height:min(540px,calc(100vh - 120px));background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 50px rgba(14,27,51,.22);display:flex;flex-direction:column;overflow:hidden}
.hc-panel[hidden]{display:none}
.hc-head{display:flex;align-items:center;gap:.4rem;padding:.8rem 1rem;background:#0E1B33;color:#fff}
.hc-head div{flex:1;display:flex;flex-direction:column} .hc-head span{font-size:.78rem;color:#b9c7dd}
.hc-head button{background:none;border:0;color:#fff;font-size:1rem;cursor:pointer;padding:.2rem .4rem;border-radius:6px} .hc-head button:hover{background:rgba(255,255,255,.12)}
.hc-msgs{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.6rem;background:#F7F8FA}
.hc-msg{max-width:88%;padding:.55rem .8rem;border-radius:12px;line-height:1.45;white-space:normal;word-wrap:break-word}
.hc-msg.user{align-self:flex-end;background:#00A2FF;color:#fff;border-bottom-right-radius:4px}
.hc-msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}
.hc-msg.bot ol,.hc-msg.bot ul{margin:.3rem 0;padding-left:1.2rem}
.hc-msg.typing{color:var(--muted);font-style:italic}
.hc-form{display:flex;gap:.5rem;padding:.7rem;border-top:1px solid var(--line);background:#fff}
.hc-form textarea{flex:1;resize:none;font:inherit;padding:.5rem .65rem;border:1px solid var(--line);border-radius:10px;max-height:120px}
.hc-form textarea:focus{outline:2px solid #00A2FF;border-color:transparent}
@media print{.hc{display:none}}

.guidehead{margin-bottom:.8rem}
.guideframe{display:block;width:100%;height:calc(100vh - 170px);min-height:520px;border:1px solid var(--line);border-radius:14px;background:#fff}

.side a.navbottom{margin-top:auto}
.side a.navbottom + .me{margin-top:.5rem}

@media (max-width:900px){.side a.navbottom{margin-top:0}}

.otabs{flex-wrap:wrap}
tr.moving{opacity:.35;transition:opacity .3s}
td.movednote{color:var(--muted);font-size:.85rem;text-align:center;background:#F7F8FA}

.seen{display:flex;flex-direction:column;gap:.1rem;margin-top:.5rem;padding:.45rem .6rem;border-left:3px solid var(--amber);background:var(--amber-soft);border-radius:0 6px 6px 0;font-size:.8rem;color:var(--ink);text-decoration:none;max-width:22rem}
.seen b{font-weight:600}.seen span{color:var(--muted)}.seen:hover{filter:brightness(.97)}
.seencount{color:var(--amber)!important;font-weight:600}
.hc-form[hidden]{display:none}
