/* Shared parts across engines (Fits check, Kris Oct 30). Loaded last, so it wins.
   #1: the main bottom button is 52px tall, 17pt semibold, radius 14, in every engine. */
html body :is(.calm-dock .act.primary, .calm-dock .act.ov-go, .ov-go, .act.pc-big, .sp-bar .act.primary, .pc3-bar .act.primary, .pk2-bar .act.primary, .sv-paybar .act.primary){
  min-height:52px !important; font-size:17px !important; font-weight:600 !important; border-radius:14px !important;
  padding-top:12px !important; padding-bottom:12px !important; line-height:22px !important; justify-content:center; }

/* #6 / #7 / #20: one list top for Buy, Sell, Inventory, People (Sell's is the standard) */
html body :is(#ordersView,#salesView,#inventoryView,#profilesView) header.top{border-bottom:1px solid #E3DED3 !important;padding-bottom:20px !important}
html body :is(#ordersView,#salesView,#inventoryView,#profilesView) header.top .brand{letter-spacing:-.84px !important}
html body :is(#ordersView,#salesView,#inventoryView,#profilesView) header.top .brand small{font-size:15px !important;margin-top:2px !important;text-transform:none !important;letter-spacing:normal !important;line-height:23px}
/* "+ New" / "+ Add": drawn 40px, 44px to tap */
html body :is(#ordersView,#salesView,#profilesView) .list-top{align-items:center}
html body :is(#ordersView,#salesView,#profilesView) .list-top .act.primary, html body :is(#ordersView,#salesView,#profilesView) .list-top > .act{height:40px !important;min-height:40px !important;font-size:15px !important;padding-top:0 !important;padding-bottom:0 !important;position:relative;background-clip:border-box !important}
html body :is(#ordersView,#salesView,#profilesView) .list-top .act.primary::after, html body :is(#ordersView,#salesView,#profilesView) .list-top > .act::after{content:'';position:absolute;left:0;right:0;top:-2px;bottom:-2px}

/* #8: every back link is 17px, the accent colour (Sell's "‹ Sale Orders" is the standard) */
html body :is(.calm-back, .pc-back){font-size:17px !important}
html body .calm-back span{font-size:24px}
/* #9: a sheet's Save matches its Cancel */
html body #esSave{font-size:17px !important;font-weight:600 !important}
/* #10: Edit phone is a bottom sheet over the phone page (grab, rounded top, the page dimmed behind) */
@media (max-width:760px){
  html body #phoneModal.pu-card:has(.inv-edit){background:rgba(20,25,30,.42) !important}
  html body #phoneModal.pu-card:has(.inv-edit) .modal-box{margin-top:44px !important;height:calc(100dvh - 44px) !important;max-height:calc(100dvh - 44px) !important;border-radius:16px 16px 0 0 !important}
  html body #phoneModal.pu-card:has(.inv-edit) #phoneModalBody::before{content:'';display:block;width:36px;height:5px;border-radius:3px;background:#D9D3C6;margin:0 auto 4px}
}

/* #11: list rows look the same everywhere (Sell's is the standard): names in regular weight, a light ›, money 16px */
html body .bf-row-t b{font-weight:400}
html body .bf-chev{color:#C4BEB1 !important;font-size:20px}
html body .calm-row .cr-r .chev{color:#C4BEB1;font-size:20px}
html body #profilesView .pp-v{font-size:16px}
/* #12: detail-page rows are 16px everywhere */
html body .calm-row .cr-t{font-size:16px;font-weight:400}

/* Fits small: a selected chip is ink everywhere (the Sell pay sheet and Count used green) */
html body #spSheet .nq-chip.on, html body .ic5-fr .pc-chip.on{background:#16202B !important;border-color:#16202B !important;color:#fff !important}
/* Money in tabular figures everywhere (Money module stress test, Nov 3k) */
.nq-chip, .sp-line, .sp-amt input, .sl-grn, .sl-red, .bf-tt, .cr-v, .pe-big, .ov-big, .ldg-amt, #svPaySheet .cr-t, #ppSheet .bf-psh ~ .calm-list .cr-t{font-variant-numeric:tabular-nums}
/* Privacy (build Nov 8i): the eye next to "Dashboard" */
#dashView header.top{display:flex;align-items:center;justify-content:space-between}
.priv-eye{width:44px;height:44px;border-radius:22px;border:0;background:var(--fill,#EEEAE1);color:var(--ink,#16202B);display:flex;align-items:center;justify-content:center;padding:0;flex:none}
.priv-eye.on{background:var(--accent,#11694F);color:#fff}
.pv-m{font-variant-numeric:tabular-nums}
#dashBody .pv-m.h{color:var(--ink,#16202B) !important}   /* hidden: no green/red hint either */

/* Grading module (Nov 9): the line under the grade picker and the two damage groups */
.gr-note{margin:8px 2px 0;font-size:15px;line-height:1.35;color:var(--ink)}
.gr-note b{font-weight:600}
.gr-mut{color:var(--muted)}
.gr-note.gr-mut,.gr-def{font-size:14px}
.gr-def{margin-top:2px}
.gr-amb{color:#9A5B00;font-size:14px}
.gr-amb .inv-link{color:var(--accent);font-weight:600}
.gr-sub{font-size:13px;color:var(--muted);margin:2px 2px 6px}
.gr-chips{margin-bottom:10px}
.pc3-open .gr-note{margin:8px 0 2px}
/* Inventory To check (Nov 9): the missing check, amber, starting line 3 */
.ivwhy{color:#9A5B00;font-weight:600}
/* Quick test at Buy now (Nov 9) */
.qt-seg{display:flex;gap:6px}
.qt-b{border:1px solid var(--line);background:var(--card,#fff);color:var(--ink);border-radius:999px;padding:7px 14px;font:inherit;font-size:14px;min-height:36px}
.qt-b.qt-on{background:var(--ink);border-color:var(--ink);color:#fff}
.qt-b.qt-bad{background:#A12B21;border-color:#A12B21;color:#fff}
.qt-note{margin:4px 2px 14px}
.qt-note.amb{color:#9A5B00}
/* Device Check in a Later check (Nov 9) */
.dch-run{color:var(--accent);font-weight:600;margin-left:8px}
.dch-bad{color:#A12B21}
.dch-found{color:#9A5B00;font-size:14px}
/* IMEI check on a quote (Nov 9) */
.qi-box{display:flex;align-items:center;gap:12px;justify-content:space-between;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:12px 0;background:var(--card,#fff)}
.qi-l{display:flex;flex-direction:column;min-width:0}
.qi-l b{font-weight:600}
.qi-l span{font-size:13px;color:var(--muted)}
.qi-go{white-space:nowrap}
.qi-tag{display:block;font-size:13px;margin-top:2px}
.qi-ok{color:var(--accent)} .qi-red{color:#A12B21} .qi-amb{color:#9A5B00} .qi-mut{color:var(--muted)}
.qi-chip{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;margin:2px 2px 0 0;border:1px solid #D9D3C6;border-radius:22px;background:#fff;color:#16202B;font:600 14px -apple-system,system-ui,sans-serif;vertical-align:middle}

/* Automatic grading (Nov 9d): the grade line, "· was B", and the Change sheet */
.gr-line{cursor:pointer}
.calm-list .calm-row.gr-line .cr-t{font-weight:600}
.gr-chg{color:var(--muted);font-size:14px}
.gr-was{color:#9A5B00;font-weight:400;font-size:14px}
#calmSheet .cs-item.gr-cs{min-height:56px;padding:9px 14px;text-align:left}
.gr-cs-t{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.gr-cs-t>span{font-weight:600;color:var(--ink)}
.gr-cs-t>small{font-size:13px;color:var(--muted);line-height:1.3;font-weight:400}
.gr-cs-auto{font-size:13px;color:var(--muted);font-weight:400}
.gr-cs-ck{color:var(--accent);font-weight:700;flex:none}
.sp-gr{font-weight:600;color:var(--ink)}
.sp-said{font-size:13px}

/* Device Check in the check card (Nov 9f) */
.dcf{padding:12px 16px;border-top:1px solid var(--line)}
.dcf[role=button]{cursor:pointer}
.dcf-h{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:16px}
.dcf-h .k{color:var(--muted)}
.dcf .grn{color:#0F6B53}.dcf .red{color:#A12B21}.dcf .amb{color:#9A5B00}.dcf .mut{color:var(--muted)}
.dcf-s{font-size:13px;color:var(--muted);margin-top:2px}
.dcf-qr{display:flex;justify-content:center;margin:12px auto 6px;min-height:180px}
.dcf-qr img,.dcf-qr canvas{background:#fff;padding:8px;border:1px solid var(--line);border-radius:8px}
.dcf-cap{text-align:center;font-weight:600;font-size:15px}
.dcf-back{display:block;margin:4px auto 0;min-height:44px}
.dcf-bar{height:4px;border-radius:2px;background:#E3DED3;margin:8px 0 6px}.dcf-bar i{display:block;height:4px;border-radius:2px;background:#0F6B53}
.dcf-tl{font-size:15px}.dcf-tl div{display:flex;justify-content:space-between;padding:6px 0;border-top:1px solid #F3F0E9}.dcf-tl div:first-child{border-top:0}
.dcf-photos .v{white-space:nowrap}
.dcf-ph{color:#0F6B53;font-weight:600;cursor:pointer;display:inline-block;min-height:44px;line-height:44px;padding:0 4px}
.pl-dcf{color:var(--muted,#6D6A60)}
/* Test phones screen (Nov 9f): same frame as the check */
#phoneModal.pu-card #dctShell{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}

/* Build Nov 9h: Test row, QR sheet, grade last */
.dcf-row .v{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:2px}
.dcf-grn{color:#0F6B53}.dcf-red{color:#A12B21}.dcf-amb{color:#9A5B00}
.dcf-sub{font-size:13px;color:var(--muted)}
.dcf-row .dcf-bar{display:block;width:100%;max-width:180px;margin:4px 0 0}
.pc3-grade{background:#FAF8F3}.pc3-grade .k{color:var(--ink);font-weight:600}.pc3-grade .v{font-weight:600}
.dcf-tag{display:inline-block;background:#FBF1E0;color:#9A5B00;font-size:12px;font-weight:600;border-radius:8px;padding:1px 7px;vertical-align:2px}
#dcfSheet{position:fixed;inset:0;z-index:120}
#dcfSheet .dcf-back2{position:absolute;inset:0;background:rgba(22,32,43,.28);opacity:0;transition:opacity .2s}
#dcfSheet .dcf-sheet{position:absolute;left:0;right:0;bottom:0;background:var(--paper,#F7F5EF);border-radius:16px 16px 0 0;padding:8px 16px calc(20px + env(safe-area-inset-bottom));transform:translateY(100%);transition:transform .28s cubic-bezier(.2,.8,.2,1)}
#dcfSheet.open .dcf-back2{opacity:1}#dcfSheet.open .dcf-sheet{transform:none}
@media (min-width:761px){ #dcfSheet .dcf-sheet{left:50%;right:auto;width:420px;margin-left:-210px;bottom:24px;border-radius:16px} }
@media (prefers-reduced-motion:reduce){ #dcfSheet .dcf-back2,#dcfSheet .dcf-sheet{transition:none} }
#dcfSheet .cs-grab{width:38px;height:5px;border-radius:3px;background:#d8d3c7;margin:2px auto 6px}
.dcf-sh{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:44px}.dcf-sh b{font-size:17px}.dcf-sh .inv-link{justify-self:start;min-height:44px}
.dcf-steps{display:flex;gap:6px;justify-content:center;margin:2px 0 8px}.dcf-steps i{width:24px;height:4px;border-radius:2px;background:#D9D3C6}.dcf-steps i.on{background:#0F6B53}
#dcfSheet .dcf-qr{min-height:236px}
#dcfSheet .pc-big{margin-top:14px;width:100%;font-family:inherit}
#dcfSheet{font-family:inherit}

/* Check card step by step (build Nov 9k): Battery → Look over → Test → Photos → Save */
.dcs .pc3-row .k{width:116px;display:flex;align-items:center;gap:10px;color:var(--ink,#16202B)}
.dcs .pc3-row.dcs-next .k{color:var(--muted,#6D6A60)}
.dcs .pc3-grade .k{padding-left:32px}
.dcs-d{width:22px;height:22px;border-radius:11px;flex:none;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;line-height:1}
.dcs-d.done{background:#0F6B53;color:#fff}.dcs-d.now{background:#16202B;color:#fff}.dcs-d.next{border:1.5px solid #D9D3C6;color:#9C978C}
.dcs-spots{display:flex;gap:8px;padding:6px 0}
.dcs-spot{min-height:44px;padding:0 14px;border:1.5px dashed #D9D3C6;border-radius:12px;display:inline-flex;align-items:center;color:#0F6B53;font-weight:600;font-size:15px;cursor:pointer}
.dcs-spot.on{border:1.5px solid #0F6B53;background:#E6F0EC}
.pc3-bar .pc-big.dcs-prog,.pc3-bar .pc-big.dcs-prog:disabled{opacity:1 !important;color:#fff !important;background:linear-gradient(90deg,#0F6B53 var(--p),#6E9C8E var(--p)) !important}
.pc3-bar label.dcs-lbl{display:flex;align-items:center;justify-content:center;width:100%;box-sizing:border-box;cursor:pointer}

/* ---- Design review (Kris, Nov 9, build Nov 9n) ---- */
/* New sale: the list label says whose price the rows show, on the right */
.ov-sec.ns-sec{display:flex;justify-content:space-between;gap:12px}
/* Inventory rows take the Buy and Sell row spacing, so a phone row is one height everywhere */
.pl-r.iv-row{padding:9px 16px}
.pl-r.iv-row .l small{line-height:1.45;margin-top:2px}

/* ---- Owner screens review (Kris, Nov 9, build Nov 9p) ---- */
/* privacy covers the sheets the Dashboard opens: no colour hint there either */
#ppSheet .pv-m.h{color:var(--ink,#16202B) !important}
/* running tab: a sale's lines open in place under its row, on cream like Prices' storages */
.pp-tab .pp-tabx{background:#FAF8F3;border-bottom:1px solid #EFEBE2}
.pp-tab .pp-tabx:last-child{border-bottom:0}
.pp-tab .pp-tabx .calm-row{background:transparent !important}
.pp-tab .pp-tabx.pp-tabc{background:#fff}
.pp-tab .pp-code{font-family:ui-monospace,"SF Mono",Menlo,monospace;font-size:14px;font-weight:600;letter-spacing:.5px}

/* Nov 9u: check card damage, one line per kind */
.pc3-row .v .pc3-dv{display:flex;flex-direction:column;min-width:0}
/* Nov 10b: the step's links — one on the left, More on the right; More lays its choices out in a row */
.pc3-bar .dcs-more{flex-wrap:wrap;justify-content:space-between;gap:4px 12px}
.pc3-bar .dcs-more .dcs-cancel{color:var(--muted,#6D6A60)}
.pc3-bar .dcs-cant{text-align:center;margin-top:6px}
/* Nov 10c: nothing under the check card's button. ⋯ replaces the ✕; an action sheet for the rare actions */
#phoneModal:has(.pu-more) .modal-close{display:none}
.pc3-nav .pu-more{justify-self:end;min-width:44px;min-height:44px;border:0;background:none;color:var(--accent,#0F6B53);font-size:24px;font-weight:700;line-height:1;cursor:pointer}
.pu-as-dim{position:fixed;inset:0;background:rgba(22,32,43,.35);z-index:200}
.pu-as{position:fixed;left:8px;right:8px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:201;max-width:520px;margin:0 auto}
.pu-as-g{background:#fff;border-radius:14px;overflow:hidden;margin-bottom:8px}
.pu-as-t{font-size:13px;color:var(--muted,#6D6A60);text-align:center;padding:12px 16px 10px}
.pu-as-o{display:block;width:100%;min-height:52px;border:0;border-top:1px solid #EFEBE2;background:#fff;color:var(--accent,#0F6B53);font-size:17px;cursor:pointer}
.pu-as-g .pu-as-o:first-child{border-top:0}.pu-as-o.b{font-weight:600}
.pc3-row .dcs-rlink{border:0;background:none;color:var(--accent,#0F6B53);font-size:15px;font-weight:600;min-height:44px;padding:0;white-space:nowrap;cursor:pointer}
.pc3-row .dcs-chip{margin-left:auto;min-height:36px;padding:0 10px;border:1px solid #D9D3C6;border-radius:18px;background:#fff;font-size:14px;color:var(--ink,#16202B);white-space:nowrap;cursor:pointer}
.pc3-nav:has(.pu-more){margin-right:0}
.pc3-nav .pu-more{margin-right:-8px}
.pc3-row .v:has(.dcs-chip){flex-wrap:nowrap}
.pc3-row .v:has(.dcs-chip) .pc3-inp{width:64px}
.pc3-row .dcs-rlink{margin-left:auto;flex:none}
/* Nov 10g: View check (read only) */
.vc-hero{padding:8px 16px 4px}
.vc-big{font-size:40px;font-weight:700;letter-spacing:-1px;line-height:1.1;font-variant-numeric:tabular-nums}
.vc-big.red{color:#A12B21}
.vc .pl-r .vc-p{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.vc .pl-r .vc-p s{display:block;font-size:13px;color:#9C978C}
.vc .pl-r .l small.amb{color:#9A5B00}.vc .pl-r .l small.red{color:#A12B21}.vc .pl-r .l small.mut{color:var(--muted,#6D6A60)}
.vc-r{align-items:flex-start}.vc-r .l{width:92px;flex:none;color:var(--muted,#6D6A60)}.vc-r .v{flex:1;min-width:0}
.vc-sub{display:block;font-size:13px;color:var(--muted,#6D6A60)}
.vc-ph{display:flex;flex-wrap:wrap;gap:8px}
.vc-t{width:64px;height:64px;border-radius:10px;border:0;background:#E3DED3 center/cover no-repeat;cursor:pointer}
.vc-r .v{font-weight:400;white-space:normal;text-align:left}
.vc-r .v .mut{color:var(--muted,#6D6A60)}
.vc .amb{color:#9A5B00}.vc .red{color:#A12B21}.vc .grn{color:#0F6B53}.vc .vc-big.rdb-grn{color:#0F6B53}
/* Nov 10i: New quote tightened */
#mainView .nq-sec.qt-sec{display:flex;justify-content:space-between;align-items:center;gap:8px}
#mainView .qt-chk{border:0;background:none;padding:0 0 0 8px;min-height:44px;margin:-14px 0;color:var(--accent,#0F6B53);font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;cursor:pointer}
#mainView .qt-chk:disabled{color:var(--muted,#6D6A60)}
#mainView .qt-done{text-transform:none;letter-spacing:0;color:var(--muted,#6D6A60)}
#mainView .np-sum-s .qt-grn{color:#0F6B53}#mainView .np-sum-s .qt-amb{color:#9A5B00}#mainView .np-sum-s .qt-red{color:#A12B21}#mainView .np-sum-s .qt-mut{color:var(--muted,#6D6A60)}
#mainView .nq-bar .qt-need{text-align:center;font-size:13px;color:#9A5B00;margin-top:8px}
#mainView #flags:empty{display:none}
/* Buy order · Payments, payments only (build Nov 10k) */
.bp-hand{font-size:13px;color:var(--muted,rgba(60,60,67,.6));padding:7px 16px 0}
.bp-hand b{color:var(--ink,#111);font-weight:600}
/* Online quotes on a person's page (build Nov 10r) */
.oq-sec{display:flex;justify-content:space-between;align-items:center}
.oq-sec .oq-all{font-size:15px;text-transform:none;letter-spacing:0;min-height:44px}
.oq-pill{display:inline-block;font-size:13px;font-weight:600;border-radius:10px;padding:2px 8px;margin-left:6px;background:#ECE9E1;color:#6D6A60;vertical-align:1px}
.oq-pill.oq-g{background:#E6F0EC;color:#0F6B53}
.oq-box .pp-v small,#ppSheet .pp-v small{display:block;font-size:13px;font-weight:400;color:#6D6A60;text-align:right}
.oq-pp{display:inline-flex;align-items:center;white-space:nowrap}
html body .pp-v.oq-v,html body #ppSheet .pp-v.oq-v{color:#16202B;font-weight:600}
html body .pp-v.oq-v small{font-weight:400;color:#6D6A60}
/* Price checks sheet, aligned to the design system (Nov 10): one height, a hero on the check, red text links */
#ppSheet .pp-sheet.oq-tall{height:78vh}
.oq-hero{padding:12px 0 4px}
.oq-cap{font-size:13px;line-height:18px;letter-spacing:.04em;text-transform:uppercase;color:#6D6A60}
.oq-num{font-size:40px;line-height:44px;font-weight:700;letter-spacing:-1px;font-variant-numeric:tabular-nums}
.oq-line{font-size:15px;line-height:20px;color:#6D6A60;margin-top:2px}
.oq-dlink{display:block;width:100%;min-height:44px;margin:22px 0 6px;padding:12px;border:0;background:none;color:var(--danger);font-size:16px;font-family:inherit;cursor:pointer}

/* Groups and rates (Nov 10): the note under Buying terms and the group sheets */
.gr-note{font-size:13px;line-height:18px;color:#6D6A60;padding:6px 16px 0}
.gr-cap{font-size:13px;line-height:18px;color:#6D6A60;text-align:center;padding:10px 0 12px}
.gr-top{margin-top:16px}
.gr-pct{font-size:40px;font-weight:700;color:#6D6A60;margin-left:2px}
#ppSheet .gr-rates .pp-v{color:#16202B;font-weight:600}
/* People › ⋯ (Nov 10): same place as Inventory's */
#profilesView header.top .pp-meta{width:auto !important;display:flex;justify-content:flex-end}
#profilesView header.top{flex-wrap:nowrap !important;align-items:flex-start}
body.role-employee #profilesView .pp-meta{display:none}
/* Rates by grade (Nov 11i) */
#ppSheet .rt-seg{margin:12px 0 4px}
#ppSheet .rt-min{display:flex;align-items:center;justify-content:space-between;min-height:50px;padding:8px 16px;cursor:text}
#ppSheet .rt-minv{font-size:16px;color:#16202B;font-weight:600;display:flex;align-items:center;gap:0}
#ppSheet .rt-minv input{width:2.3ch;text-align:left;border:0;background:transparent;font:inherit;font-size:16px;font-weight:600;color:#16202B;padding:0;outline:none}
/* Nov 11 · damage photos in the check card's Photos step */
.dcs-phs{display:flex;flex-direction:column;gap:2px;padding:4px 0 8px}
.dcs-phs .dcs-spots{flex-wrap:wrap}
.dcs-cap{font-size:13px;color:#6D6A60;margin-top:4px}
.dcs-spot.need{border-color:#9A5B00;color:#9A5B00}
.pc3-row.dcs-now:has(.dcs-phs){align-items:flex-start;padding-top:10px}

/* Phone notifications sheet (build Nov 14f, tcspush.js) */
.tp-hero{padding:4px 16px 4px}
.tp-cap{font-size:13px;line-height:18px;letter-spacing:.4px;text-transform:uppercase;color:#6D6A60}
.tp-big{font-size:28px;line-height:34px;font-weight:700;letter-spacing:-.4px;color:#16202B;margin-top:2px}
.tp-line{font-size:15px;line-height:20px;color:#6D6A60;margin-top:2px}
.tp-gap{margin-top:18px}
.tp-acc{color:#0F6B53}
.tp-err{color:#A12B21;font-size:13px;line-height:18px;padding:8px 16px 0;min-height:4px}
.tp-off{display:block;margin:18px auto 8px;min-height:44px;padding:0 16px;background:none;border:0;color:#A12B21;font-size:17px;cursor:pointer}
.tp-note{font-size:13px;line-height:18px;color:#6D6A60;text-align:center;margin-top:8px}
