/* VOICE work: a plain productivity tool
   IDEA a classic Bootstrap admin app, desktop layout, scaled to fit a phone
   PICTURE the Needs action list itself
   COLOUR Bootstrap defaults: white, dark navbar, blue primary, red/amber only for late
   TYPE system font stack (Bootstrap)
   LAYOUT fills the window, never narrower than 1280px; below that the whole page is zoomed to fit */
html,body{background:var(--bs-body-bg)}
body{overflow-x:auto}
#app{min-width:1280px;min-height:100vh}
.from-list{position:absolute;z-index:10;left:0;right:0;top:calc(100% + 2px);background:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-radius:6px;max-height:320px;overflow:auto;padding:4px 0;box-shadow:0 4px 12px rgba(0,0,0,.08)}
.from-opt{display:flex;gap:12px;align-items:baseline;padding:6px 12px;cursor:pointer;white-space:nowrap}
.from-opt .nm{overflow:hidden;text-overflow:ellipsis;min-width:0}
.from-opt.active{background:var(--bs-tertiary-bg)}
.from-opt.off{color:var(--bs-secondary-color);cursor:default}
.from-opt .meta{margin-left:auto;font-size:.8rem;color:var(--bs-secondary-color);white-space:nowrap}
.stars{white-space:nowrap;letter-spacing:1px}.stars .on{color:#e8a200}.stars .off{color:#ced4da}
.stars-jump{all:unset;cursor:pointer;font-size:1rem;font-weight:400;display:inline-flex;align-items:center;gap:6px}.stars-jump:hover{text-decoration:underline}
.from-sep{border-top:1px solid var(--bs-border-color);margin:4px 0}
.rep{--series-1:#0d6efd}
.rep-tile{flex:1 1 0;min-width:0;padding:1rem 1.25rem}.rep-tile+.rep-tile{border-left:1px solid var(--bs-border-color)}
.rep-val{font-size:1.5rem;font-weight:600;line-height:1.3;white-space:nowrap}
.rep-chart{position:relative;height:240px}.rep-chart svg:focus-visible{outline:2px solid var(--bs-primary);outline-offset:2px;border-radius:4px}
.rep-ax{font-size:12px;fill:var(--bs-secondary-color);font-variant-numeric:tabular-nums}
.rep-tip{position:absolute;pointer-events:none;background:#fff;border:1px solid var(--bs-border-color);border-radius:6px;box-shadow:0 2px 8px rgba(0,0,0,.12);padding:6px 10px;font-size:.85rem;white-space:nowrap;z-index:2}
.rep-bar{height:8px;border-radius:0 4px 4px 0;background:var(--series-1)}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px}
.gphoto{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:8px;border:1px solid var(--bs-border-color);display:block}
.side{width:410px}
.thumb{width:40px;height:40px;border-radius:6px;flex:none;display:block;object-fit:cover}
.thumb-lg{width:56px;height:56px}
.thumb-sm{width:28px;height:28px;border-radius:4px}
.thumb-md{width:32px;height:32px;border-radius:5px}
.proof{width:64px;height:64px;object-fit:cover;border-radius:6px;border:1px solid var(--bs-border-color)}
.nowrap{white-space:nowrap}
.tbl td,.tbl th{vertical-align:middle}
.tbl tr.align-top>td{vertical-align:top}
.tbl tr.clickable{cursor:pointer}
/* Orders list: Status, With and Since are stacked lines of one height, so each line reads across the three cells */
.ol-line{display:flex;align-items:center;gap:.375rem;height:30px;white-space:nowrap}
.next-late{color:var(--bs-danger);font-weight:600}
/* Click-to-copy text: plain at rest; on hover a soft tint and a tooltip in words */
.copyable{all:unset;cursor:pointer;position:relative;border-radius:4px;padding:1px 4px;margin:-1px -4px;font:inherit;color:inherit}
.copyable:hover,.copyable:focus-visible{background:var(--bs-body-bg);color:var(--bs-emphasis-color);box-shadow:inset 0 0 0 1px var(--bs-border-color)}
.copyable:focus-visible{outline:2px solid var(--bs-primary);outline-offset:1px}
#copiedTip{position:fixed;z-index:2000;pointer-events:none;background:var(--bs-emphasis-color);color:var(--bs-body-bg);font-size:12px;line-height:1.3;padding:3px 8px;border-radius:4px}
.next-soon{color:#b35c00;font-weight:600}
.st-new{background:#efe7fc;color:#4c1d95}
/* Strong labels: solid colour, white text (contrast 4.5:1 or more) for the Statuses where the team acts now */
.st-new-strong{background:#6f42c1;color:#fff}.st-pack-strong{background:#b45309;color:#fff}.st-ready-strong{background:#0e7490;color:#fff}
/* Packing: Bootstrap's orange (--bs-orange), as a pale tint with dark text like the other badges */
.st-pack{background:#ffe5d0;color:#7a3500}
.more-parts{all:unset;cursor:pointer;color:var(--bs-primary);text-decoration:underline;white-space:nowrap;font-size:inherit}
.more-parts:focus-visible{outline:2px solid var(--bs-primary);outline-offset:1px}
.small-muted{font-size:.8rem;color:var(--bs-secondary-color)}
.navbar .nav-link.active{font-weight:600}
.ladder td:last-child{text-align:right;font-variant-numeric:tabular-nums;padding-right:1rem}
.ladder td:first-child{padding-left:1rem}
.ladder tr.total td{font-weight:700;border-top:2px solid var(--bs-border-color)}
.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.toast-wrap{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:2000}
.chip{cursor:pointer;border:1px solid transparent}
/* the chosen pill: a dark ring just outside it, which shows on pale and solid pills alike */
.chip:not(.chip-on):hover{outline:1px solid var(--bs-secondary-color);outline-offset:2px}
.chip-on{outline:2px solid var(--bs-emphasis-color);outline-offset:2px;font-weight:600!important}
/* Work log: a plain message thread. The composer is one box: a growing text field, waiting attachments, Attach and Post */
.composer{border:1px solid var(--bs-border-color);border-radius:var(--bs-border-radius);padding:4px 8px 8px}
.composer:focus-within{border-color:#86b7fe;box-shadow:0 0 0 .2rem rgba(13,110,253,.15)}
.composer.over{border-color:var(--bs-primary);background:var(--bs-primary-bg-subtle)}
.composer textarea{display:block;width:100%;border:0;outline:0;resize:none;background:transparent;padding:4px 0;line-height:1.5;max-height:9.5em;overflow-y:auto;color:inherit}
#pending:empty{display:none}
.pend{position:relative}
.pend-x{position:absolute;top:-6px;right:-6px;width:18px;height:18px;border-radius:50%;border:0;padding:0;background:#495057;color:#fff;font-size:13px;line-height:18px;text-align:center}
.avatar{width:32px;height:32px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:600}
.act-dot{width:32px;flex:none;display:flex;justify-content:center}
.act-dot::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--bs-secondary-color);opacity:.6}
.msg-text{white-space:pre-wrap;overflow-wrap:anywhere}
/* Money statement */
.recon td{border:0;padding:.2rem .5rem}
/* An Order's profit page: a statement, every line with its date, its source and its amount in both currencies */
.stmt td,.stmt th{vertical-align:baseline}
.stmt tr.grp td{font-weight:600;padding-top:.75rem}
.stmt tr.tot td{font-weight:700;border-top:2px solid var(--bs-border-color)}
.stmt td.ln{padding-left:1.5rem}
/* The two amount columns keep apart, and a long title wraps instead of an amount */
.stmt .num{padding-left:2.5rem}
.chk{font-size:.8rem;font-weight:600}
/* A note shown where it matters: beside the item in Add fulfilment. A warning is yellow */
.note-in{font-size:.8125rem;margin-top:.35rem;padding:.3rem .6rem;border-left:3px solid var(--bs-border-color);background:var(--bs-tertiary-bg);border-radius:0 .25rem .25rem 0;white-space:normal;max-width:440px;color:var(--bs-body-color)}
.note-in.warn{border-left-color:var(--bs-warning);background:var(--bs-warning-bg-subtle)}
@keyframes hl{from{background:var(--bs-warning-bg-subtle)}to{background:transparent}}
.hl{animation:hl 3s ease-out}
.big{width:min(60vh,520px);height:min(60vh,520px)}
.pickgrid{max-height:340px;overflow:auto}
.pick{position:relative;width:96px;cursor:pointer}
.pick input[type=checkbox]{position:absolute;top:6px;left:6px;margin:0}
/* The Order page (layout F): every rule below is under .op, its wrapper, so no other screen changes.
   The page sits on a pale grey, so its white boxes read as boxes */
#app:has(.op){background:#f4f5f7}
.op{--ink:#212529;--ink-2:#495057;--line:#dee2e6;--line-strong:#adb5bd;--orange:#b35c00;max-width:1376px;margin:0 auto;color:var(--ink);font-size:16px}
.op a{text-underline-offset:2px}
.op .op-back{font-size:15px;display:inline-block;margin-bottom:10px}
.op .op-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.op .op-head h1{font-size:28px;font-weight:600;margin:0;line-height:1.2;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.op .op-st{font-size:15px;font-weight:600;padding:5px 10px;border-radius:6px;line-height:1.3}
.op .op-why{font-size:16px;font-weight:400;color:var(--ink-2)}
.op .op-facts{display:grid;grid-template-columns:1.25fr 1fr 1fr 1.1fr;background:#fff;border:1px solid var(--line-strong);border-radius:10px;margin-top:16px}
.op .op-facts.op-facts-3{grid-template-columns:repeat(3,1fr)}
.op .op-facts>div{padding:14px 24px;min-width:0}
.op .op-facts>div+div{border-left:1px solid var(--line)}
.op .op-facts .op-k{font-size:14px;color:var(--ink-2);margin-bottom:2px}
.op .op-facts .op-v{font-size:17px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-height:27px}
.op .op-facts .op-v b{font-weight:600}
.op .op-facts .op-due{font-size:14px;font-weight:600;padding:3px 9px;border-radius:6px;white-space:nowrap}
.op .op-facts .op-due.late{background:var(--bs-danger);color:#fff}
.op .op-facts .op-due.soon{background:var(--bs-warning-bg-subtle);color:var(--bs-warning-text-emphasis);border:1px solid var(--bs-warning-border-subtle);padding:2px 8px}
.op .op-facts .op-in{font-size:15px;color:var(--ink-2)}
.op .op-actions{display:flex;gap:10px;padding-top:2px;flex:none}
.op .op-sub{font-size:14px;color:var(--ink-2);margin-top:2px}
.op .op-sub a:not(.link-secondary){color:var(--ink-2)}
.op .op-dash{color:var(--ink-2)}
.op .op-late{color:var(--orange);font-weight:600}
.op .op-aside{font-size:14px;font-weight:400;color:var(--ink-2)}
.op .op-pic-sm{width:36px;height:36px;flex:none;display:block}
/* two columns */
.op .op-cols{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:24px;margin-top:32px;align-items:start}
.op .op-stack>*+*{margin-top:24px}
.op .op-box{background:#fff;border:1px solid var(--line-strong);border-radius:10px;overflow:hidden}
.op .op-tabs{display:flex;align-items:flex-end;gap:2px;padding:10px 16px 0;background:#f1f3f5;border-bottom:1px solid var(--line-strong)}
.op .op-tab{all:unset;cursor:pointer;padding:10px 16px;font-size:16px;font-weight:500;color:#0b5ed7;border:1px solid transparent;border-bottom:0;border-radius:8px 8px 0 0;margin-bottom:-1px;display:flex;align-items:center;gap:8px}
.op .op-tab:not(.on):hover{text-decoration:underline;text-underline-offset:3px}
.op .op-tab:focus-visible{outline:2px solid var(--bs-primary);outline-offset:-2px}
.op .op-tab.on{background:#fff;color:var(--ink);font-weight:600;border-color:var(--line-strong);cursor:default}
.op .op-c{font-size:14px;font-weight:600;background:#e2e6ea;color:var(--ink-2);border-radius:10px;padding:0 8px;line-height:20px}
.op .op-tab.on .op-c{background:#e9ecef}
.op .op-band{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:58px;padding:8px 20px;background:#f1f3f5;border-bottom:1px solid var(--line-strong)}
.op .op-box>.op-band:last-child{border-bottom:0}
.op .op-bt{display:flex;align-items:center;gap:10px}
.op .op-band h3{font-size:17px;font-weight:600;margin:0}
.op .op-tbody{padding:20px}
.op .op-empty{padding:12px 0;color:var(--ink-2)}
.op .op-recs{display:flex;flex-direction:column;gap:14px}
.op .op-rec{border:1px solid var(--line-strong);border-radius:8px;overflow:hidden}
.op .op-rec-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.op .op-rec-who{font-size:17px;font-weight:600;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.op .op-rec-who .op-sub{font-weight:400;margin:0}
.op .op-rec-st{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.op .op-rec-st .op-late{font-size:15px}
.op .op-rec-st .op-n{font-size:15px;color:var(--ink-2)}
.op .op-trk{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.op .op-rec-vals{display:grid;grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr));gap:16px;padding:14px 16px 16px}
.op .op-rec-vals.op-rec-one{grid-template-columns:minmax(0,1fr)}
.op .op-rec-vals.op-rec-two{grid-template-columns:minmax(0,1.2fr) minmax(0,2fr)}
.op .op-rec-vals .op-sub{margin-top:4px}
.op .op-rec-k{font-size:14px;color:var(--ink-2);margin-bottom:4px}
.op .op-rec-foot{display:flex;gap:22px;align-items:center;padding:10px 16px;background:#f8f9fa;border-top:1px solid var(--line)}
.op .op-rec-foot .op-btn{font-size:15px;font-weight:600;padding:5px 14px;white-space:nowrap}
.op .op-a{all:unset;cursor:pointer;font-size:15px;color:var(--bs-link-color);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.op .op-a:hover{color:var(--bs-link-hover-color)}
.op .op-a:focus-visible{outline:2px solid var(--bs-primary);outline-offset:2px;border-radius:2px}
.op .op-rec-foot .op-end{margin-left:auto}
.op .op-rec-foot .op-end+.op-end{margin-left:0}
.op .op-rec-foot .op-a.op-end{color:var(--ink-2)}
.op .op-rec-foot .op-a.op-end:hover{color:var(--ink)}
.op .op-pitem{display:flex;gap:10px;align-items:flex-start}
.op .op-pitem+.op-pitem{margin-top:10px}
.op .op-pitem>div{min-width:180px}
.op .op-files{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:4px}
.op .op-struck{color:var(--ink-2);text-decoration:line-through}
.op .op-struck .op-pic-sm{opacity:.6}
.op .op-struck a{color:var(--ink-2)}
/* A Fulfilment's defect: a strip of its own under the values, its columns lined up with theirs */
.op .op-defect{display:grid;grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr));gap:16px;padding:12px 16px 14px;border-top:1px solid var(--line)}
.op .op-rec-foot .op-a.op-q{color:var(--ink-2)}
.op .op-rec-foot .op-a.op-q:hover{color:var(--ink)}
.op .op-dl{font-size:14px;font-weight:600;padding:4px 8px;border-radius:6px}
.op .op-defect .op-n{font-size:15px;color:var(--ink-2);margin-left:6px}
#trackFixed .op-st{font-size:15px;font-weight:600;padding:5px 10px;border-radius:6px;line-height:1.3}
#trackFixed .op-fv{min-height:31px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.op .small-muted{font-size:14px;color:var(--ink-2)}
/* the Work log */
.op .op-cbody{padding:16px 20px 8px}
.op .composer{border-color:var(--line-strong);border-radius:8px;padding:8px 12px 10px}
.op .composer textarea{min-height:52px;font-size:16px}
.op .op-thread{margin-top:12px}
.op .op-thread>div{margin:0!important;padding:14px 0;border-top:1px solid #edf0f2}
.op .op-thread>:first-child{border-top:0}
.op .op-thread .avatar{width:34px;height:34px;font-size:13px;font-weight:700}
.op .op-thread .act-dot{width:34px}
.op .op-thread>.small-muted{font-size:15px}
.op .op-pacts{display:inline-flex;gap:14px;margin-left:12px}
.op .op-pacts .op-a{font-size:14px}
.op .op-pedit textarea{font-size:16px;min-height:52px}
.op .op-pedit .op-pedit-b{display:flex;gap:8px;margin-top:8px}
.op .op-filters{display:flex;align-items:center;gap:8px;padding:12px 20px}
/* the side: Ship to, Profit */
.op .op-cp{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink-2);cursor:pointer;vertical-align:middle}
.op .op-cp svg{width:16px;height:16px}
.op .op-cp:hover{color:var(--bs-emphasis-color);border-color:var(--ink-2)}
.op .op-cp:focus-visible{outline:2px solid var(--bs-primary);outline-offset:2px}
.op .op-cp-corner{position:absolute;top:12px;right:14px}
.op .op-sbox{position:relative;background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px 20px 18px}
.op .op-sbox+.op-sbox{margin-top:24px}
.op .op-sbox h3{font-size:16px;font-weight:600;margin:0 0 10px;display:flex;justify-content:space-between;align-items:baseline}
.op .op-addr{line-height:1.5}
.op .op-pf{width:100%;border-collapse:collapse}
.op .op-pf td{padding:8px 0;border-bottom:1px solid var(--line);vertical-align:top}
.op .op-pf td:last-child{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.op .op-pf .op-why2{font-size:14px;color:var(--ink-2);font-weight:400;white-space:normal}
.op .op-pf tr.op-total td{font-weight:600;font-size:18px;border-bottom:0;padding-top:12px}
.op .op-pf tr:last-child td{border-bottom:0}
.op .op-pfoot{display:flex;align-items:center;justify-content:space-between;margin-top:12px}
.op .op-pfoot .chk{font-size:14px;padding:5px 10px}
/* From the buyer: messages, help requests, reviews and the note with the Order, newest first */
.op .op-buyer .op-bbody{padding:4px 20px 16px}
.op .op-buyer .op-e{padding:12px 0;border-top:1px solid var(--line)}
.op .op-buyer .op-e:first-child{border-top:0}
.op .op-buyer .op-e:last-child{padding-bottom:0}
.op .op-buyer .op-eh{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.op .op-buyer .op-eh b{font-weight:600}
.op .op-buyer .op-et{color:var(--ink-2);font-size:15px}
.op .op-buyer .op-eq{margin-top:4px}
.op .op-buyer .op-es{margin-top:4px;font-size:14px;color:var(--ink-2)}
.op .op-buyer .op-es a{color:var(--ink-2)}
.op .op-buyer .op-ep{margin-top:8px}
.op .op-buyer .op-eacts{display:flex;gap:18px;margin-top:8px}
.op .op-buyer .op-eacts a{font-size:15px;text-underline-offset:3px;white-space:nowrap}
.op .op-buyer .op-done{margin-left:auto;font-size:14px;color:var(--ink-2)}
/* The footer sits at the end of the window on a short page */
#app{display:flex;flex-direction:column}
#view{flex:1 0 auto}
/* The way in: one narrow box in the page */
.entry{max-width:440px;margin:3rem auto 0}
.entry+.entry{margin-top:1rem}
.alert.entry{margin-bottom:0}
.legal{max-width:760px;margin:0 auto}
/* A page's title takes the focus when the page changes under the person; it shows no ring for that */
#entryTitle:focus{outline:none}
/* An email moves to the next line whole rather than breaking at its hyphen */
.email-whole{display:inline-block;max-width:100%;overflow-wrap:anywhere}
/* Settings: the two cards' title bands are one height, with or without a button; the Role column has one width, so rows line up */
.set-head{min-height:3.125rem}
.set-role{width:90px}
/* An Order's money page: the statement, then Reconciliation and Exchange rates under it */
.om{max-width:1040px}
.om-side{display:grid;gap:24px;max-width:640px}
.om .recon td:first-child{width:200px}
.om .om-rates td{white-space:nowrap}
.om .om-rates td:first-child{width:auto}
/* An upload on its way: a thin bar of how far it has got; red when it was refused. In the composer it lies along the tile's foot */
.up-bar{display:block;height:4px;border-radius:2px;background:var(--bs-secondary-bg);overflow:hidden;margin-top:4px}
.up-bar>span{display:block;height:100%;background:var(--bs-primary);transition:width .2s}
.up-err .up-bar>span{background:var(--bs-danger)}
.pend .up-bar{position:absolute;left:3px;right:3px;bottom:3px;margin:0}
.up-chip .up-pct{font-variant-numeric:tabular-nums;color:var(--bs-secondary-color)}
.up-err .up-pct{color:var(--bs-danger)}
