/* MSD Storage — scoped to #msdStorage.
 *
 * Everything is namespaced and every base-sheet style it inherits is reset here on purpose:
 * style.css gives every `th` a dark blue fill, every `button` a blue pill and every `input` a
 * 170px minimum, none of which belong on this page. Scoping means the rest of RMS is untouched.
 *
 * Palette is the catalogue redesign's violet, with ONE exception: MSD figures are blue. That
 * blue means a single thing — the stock is off-site and cannot be picked today — so it is used
 * only on the MSD stock column and the two stored-units headlines.
 */
#msdStorage{
  --m-paper:#FFFFFF; --m-ground:#F7F6FA; --m-sunk:#F1EFF5;
  --m-line:#E6E3EC; --m-line-soft:#F0EDF4;
  --m-ink:#1B1823; --m-mut:#625D70; --m-faint:#9892A5;
  --m-acc:#5B46B5; --m-acc-soft:#F0EDFA; --m-acc-line:#D5CCEF;
  --m-ok:#17694A; --m-ok-soft:#E8F3ED; --m-ok-line:#BFE0CF;
  --m-warn:#8A5A12; --m-warn-soft:#FBF2E4; --m-warn-line:#EAD4A8;
  --m-bad:#9C2F26; --m-bad-soft:#FAEDEB; --m-bad-line:#EEC5BF;
  --m-msd:#1B6CA8; --m-msd-ink:#12527F; --m-msd-soft:#E8F2F9; --m-msd-line:#B9D7EA;
  --m-display:"Bricolage Grotesque","Trebuchet MS",system-ui,sans-serif;
  --m-body:"Instrument Sans","Segoe UI",system-ui,sans-serif;
  font-family:var(--m-body); color:var(--m-ink);
}
#msdStorage .msd-wait{padding:40px 10px;text-align:center;color:var(--m-mut);font-size:14px}
#msdStorage .msd-wait.msd-bad{color:var(--m-bad)}

/* summary strip */
#msdStorage .msd-sum{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
  border:1px solid var(--m-line);border-radius:10px;background:var(--m-paper);overflow:hidden;margin-bottom:16px}
#msdStorage .msd-sum > div{padding:14px 17px;border-right:1px solid var(--m-line);min-width:0}
#msdStorage .msd-sum > div:last-child{border-right:0}
#msdStorage .msd-lbl{font-size:10.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--m-faint)}
#msdStorage .msd-v{font-family:var(--m-display);font-size:23px;font-weight:700;font-variant-numeric:tabular-nums;
  letter-spacing:-.025em;margin-top:6px;line-height:1}
#msdStorage .msd-v.is-msd{color:var(--m-msd)}
#msdStorage .msd-d{font-size:11.5px;color:var(--m-faint);margin-top:5px}

/* tabs */
#msdStorage .msd-tabs{display:flex;gap:2px;border-bottom:1px solid var(--m-line);margin-bottom:18px;overflow-x:auto}
#msdStorage .msd-tabs button{border:0;background:none;padding:10px 14px;font-size:13.5px;font-weight:500;
  color:var(--m-mut);border-bottom:2px solid transparent;white-space:nowrap;margin:0 0 -1px;border-radius:0;
  box-shadow:none;transition:.12s}
#msdStorage .msd-tabs button:hover{color:var(--m-ink);background:none;transform:none}
#msdStorage .msd-tabs button[aria-selected="true"]{color:var(--m-acc);border-bottom-color:var(--m-acc);font-weight:600}
#msdStorage .msd-cnt{font-family:var(--m-display);font-size:11px;color:var(--m-faint);margin-left:6px}

/* cards + grid */
#msdStorage .msd-grid{display:grid;gap:14px;align-items:start;margin-bottom:14px}
#msdStorage .msd-21{grid-template-columns:minmax(0,1.8fr) minmax(0,1fr)}
#msdStorage .msd-11{grid-template-columns:repeat(2,minmax(0,1fr))}
#msdStorage .msd-card{border:1px solid var(--m-line);border-radius:10px;background:var(--m-paper);
  min-width:0;overflow:hidden;margin-bottom:14px;box-shadow:none;padding:0}
#msdStorage .msd-grid .msd-card{margin-bottom:0}
#msdStorage .msd-card-h{display:flex;align-items:center;gap:12px;padding:15px 19px 0;flex-wrap:wrap}
#msdStorage .msd-card-h h3{font-family:var(--m-display);font-size:14px;font-weight:600;margin:0}
#msdStorage .msd-note{font-size:11.5px;color:var(--m-faint);margin-left:auto}
#msdStorage .msd-card-b{padding:14px 19px 18px}

/* rows */
#msdStorage .msd-row{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--m-line-soft)}
#msdStorage .msd-row:last-child{border-bottom:0}
#msdStorage .msd-row-t{min-width:0}
#msdStorage .msd-row-t b{font-size:13px;font-weight:600;display:block}
#msdStorage .msd-row-t span{font-size:11.5px;color:var(--m-faint)}
#msdStorage .msd-row-v{margin-left:auto;font-family:var(--m-display);font-weight:700;
  font-variant-numeric:tabular-nums;font-size:15px;white-space:nowrap}
#msdStorage .msd-big{font-family:var(--m-display);font-size:28px;font-weight:700;font-variant-numeric:tabular-nums;
  letter-spacing:-.025em;margin-bottom:6px}
#msdStorage .msd-big span{font-family:var(--m-body);font-size:12.5px;font-weight:400;color:var(--m-mut);margin-left:9px;letter-spacing:0}
#msdStorage .msd-p{margin:11px 0 0;font-size:12px;color:var(--m-mut)}
#msdStorage .msd-p.msd-bad{color:var(--m-bad);font-weight:600}
#msdStorage .msd-empty{margin:0;color:var(--m-mut);font-size:13px}
#msdStorage .msd-total{display:flex;align-items:center;gap:12px;padding:13px 0 0;margin-top:4px;border-top:2px solid var(--m-line)}
#msdStorage .msd-total b{font-size:13.5px}
#msdStorage .msd-total span{margin-left:auto;font-family:var(--m-display);font-weight:700;font-size:21px;font-variant-numeric:tabular-nums}

/* bars */
#msdStorage .msd-bar{display:flex;align-items:center;gap:11px;padding:9px 0;border-bottom:1px solid var(--m-line-soft)}
#msdStorage .msd-bar:last-of-type{border-bottom:0}
#msdStorage .msd-bar-nm{font-size:13px;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#msdStorage .msd-bar-t{flex:0 0 78px;height:8px;border-radius:4px;background:var(--m-sunk);overflow:hidden}
#msdStorage .msd-bar-t i{display:block;height:100%;border-radius:4px;background:var(--m-acc)}
#msdStorage .msd-bar-t i.t-ok{background:var(--m-ok)}
#msdStorage .msd-bar-t i.t-acc{background:var(--m-acc)}
#msdStorage .msd-bar-t i.t-warn{background:var(--m-warn)}
#msdStorage .msd-bar-t i.t-bad{background:var(--m-bad)}
#msdStorage .msd-bar-v{font-family:var(--m-display);font-weight:600;font-variant-numeric:tabular-nums;
  width:56px;text-align:right;flex:none;font-size:13px}
#msdStorage .msd-bar-c{font-size:11.5px;color:var(--m-faint);width:70px;text-align:right;flex:none}

/* tables — the base sheet's th/td are overridden wholesale */
#msdStorage .msd-x{overflow-x:auto}
#msdStorage table.msd-t{width:100%;border-collapse:separate;border-spacing:0;margin:0;border-radius:0;
  overflow:visible;font-size:13px}
#msdStorage table.msd-t th{background:transparent;color:var(--m-faint);text-align:left;font-size:10.5px;
  font-weight:600;letter-spacing:.09em;text-transform:uppercase;padding:0 10px 10px;
  border-bottom:1px solid var(--m-line);white-space:nowrap}
#msdStorage table.msd-t th.r,#msdStorage table.msd-t td.r{text-align:right}
#msdStorage table.msd-t th.sortable,#msdStorage table.msd-t th[data-msd="sort"]{cursor:pointer}
#msdStorage table.msd-t th[data-msd="sort"]:hover{color:var(--m-ink)}
#msdStorage .msd-ar{font-size:9px;margin-left:4px}
#msdStorage table.msd-t td{background:transparent;padding:10px;border-bottom:1px solid var(--m-line-soft);
  font-size:13px;vertical-align:middle}
#msdStorage table.msd-t tbody tr:last-child td{border-bottom:0}
#msdStorage table.msd-t tbody tr:hover td{background:var(--m-sunk)}
#msdStorage table.msd-t td.num,#msdStorage table.msd-t td.r.num{font-family:var(--m-display);
  font-variant-numeric:tabular-nums;font-weight:600}
#msdStorage .msd-mono{font-family:var(--m-display);font-size:11.5px;color:var(--m-faint);font-variant-numeric:tabular-nums}
#msdStorage .msd-mono b{color:var(--m-ink);font-weight:700}
#msdStorage .msd-sub{font-size:11.5px;color:var(--m-mut)}
#msdStorage .msd-faint{font-size:11px;color:var(--m-faint)}
#msdStorage .msd-dash{color:var(--m-faint)}
#msdStorage .msd-empty-td{padding:22px 10px;color:var(--m-mut)}

/* THE BLUE MSD COLUMN — closed at both ends so it reads as one object rather
   than a band that stops mid-table. The radius needs the separated border model,
   which table.msd-t already uses. */
#msdStorage table.msd-t th.is-msd,#msdStorage table.msd-t td.is-msd{
  background:var(--m-msd-soft);border-left:1px solid var(--m-msd-line);border-right:1px solid var(--m-msd-line)}
#msdStorage table.msd-t th.is-msd{color:var(--m-msd-ink);padding-top:9px;border-top:1px solid var(--m-msd-line);
  border-radius:9px 9px 0 0;border-bottom-color:var(--m-msd-line)}
#msdStorage table.msd-t td.is-msd{color:var(--m-msd-ink);font-family:var(--m-display);font-weight:700;
  font-variant-numeric:tabular-nums;border-bottom-color:var(--m-msd-line)}
#msdStorage table.msd-t tbody tr:last-child td.is-msd{border-bottom:1px solid var(--m-msd-line);border-radius:0 0 9px 9px}
#msdStorage table.msd-t tbody tr:hover td.is-msd{background:var(--m-msd-soft);filter:brightness(.97)}

/* chips */
#msdStorage .msd-chip{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;
  padding:3px 9px;border-radius:20px;border:1px solid var(--m-line);background:var(--m-sunk);color:var(--m-mut)}
#msdStorage .msd-chip.in{background:var(--m-ok-soft);color:var(--m-ok);border-color:var(--m-ok-line)}
#msdStorage .msd-chip.out{background:var(--m-warn-soft);color:var(--m-warn);border-color:var(--m-warn-line)}
#msdStorage .msd-chip.book{background:var(--m-acc-soft);color:var(--m-acc);border-color:var(--m-acc-line)}
#msdStorage .msd-chip.warn{background:var(--m-warn-soft);color:var(--m-warn);border-color:var(--m-warn-line)}
#msdStorage .msd-chip.done{background:var(--m-sunk);color:var(--m-mut);border-color:var(--m-line)}

/* filters */
#msdStorage .msd-filters{display:flex;gap:9px;flex-wrap:wrap;align-items:center;margin-bottom:13px}
#msdStorage .msd-filters input,#msdStorage .msd-filters select,
#msdStorage .msd-form input,#msdStorage .msd-form select,#msdStorage .msd-form textarea,
#msdStorage .msd-line input,#msdStorage .msd-line select{
  border:1px solid var(--m-line);background:var(--m-paper);border-radius:8px;padding:9px 11px;
  font-size:13px;min-width:0;box-shadow:none;font-family:var(--m-body);color:var(--m-ink)}
#msdStorage .msd-filters input[type="search"]{flex:1 1 240px;max-width:380px}
#msdStorage .msd-filters input:focus,#msdStorage .msd-form input:focus,
#msdStorage .msd-form select:focus,#msdStorage .msd-form textarea:focus{
  border-color:var(--m-acc);box-shadow:0 0 0 3px var(--m-acc-soft)}
#msdStorage .msd-pill{font-size:12px;color:var(--m-faint)}

/* booking form */
#msdStorage .msd-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
#msdStorage .msd-f{display:flex;flex-direction:column;gap:5px;min-width:0}
#msdStorage .msd-f.full{grid-column:1/-1}
#msdStorage .msd-f label{font-size:11.5px;font-weight:600;color:var(--m-mut)}
#msdStorage .msd-f input,#msdStorage .msd-f select,#msdStorage .msd-f textarea{width:100%}
#msdStorage .msd-radio{display:flex;gap:8px}
#msdStorage .msd-radio button{flex:1 1 0;border:1px solid var(--m-line);background:var(--m-paper);
  border-radius:8px;padding:9px 10px;font-size:12.5px;font-weight:600;color:var(--m-mut);margin:0;box-shadow:none}
#msdStorage .msd-radio button:hover{background:var(--m-sunk);transform:none}
#msdStorage .msd-radio button[aria-pressed="true"]{border-color:var(--m-acc);background:var(--m-acc-soft);color:var(--m-acc)}
#msdStorage .msd-line{display:flex;gap:8px}
#msdStorage .msd-line select{flex:1 1 auto}
#msdStorage .msd-line input{width:120px;flex:none}
#msdStorage .msd-formfoot{display:flex;gap:12px;align-items:center;margin-top:14px;flex-wrap:wrap}
#msdStorage .msd-btn{border:1px solid var(--m-line);background:var(--m-paper);border-radius:9px;
  padding:9px 14px;font-size:13px;font-weight:600;color:var(--m-mut);margin:0;box-shadow:none}
#msdStorage .msd-btn:hover{color:var(--m-ink);background:var(--m-sunk);transform:none}
#msdStorage .msd-btn.pri{background:var(--m-acc);border-color:var(--m-acc);color:#fff}
#msdStorage .msd-btn.pri:hover{background:#4A379C;color:#fff}
#msdStorage .msd-btn[disabled]{opacity:.6;cursor:default}
#msdStorage .msd-err{margin:12px 0 0;font-size:12.5px;color:var(--m-bad);font-weight:600}
#msdStorage .msd-ok{margin:12px 0 0;font-size:12.5px;color:var(--m-ok);font-weight:600}

/* booked list */
#msdStorage .msd-book{padding:12px 0;border-bottom:1px solid var(--m-line-soft)}
#msdStorage .msd-book:last-child{border-bottom:0}
#msdStorage .msd-book-h{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:4px}
#msdStorage .msd-book-p{margin-left:auto;font-family:var(--m-display);font-weight:600;font-variant-numeric:tabular-nums}

/* chart */
#msdStorage .msd-chart{display:block;width:100%;height:auto}
#msdStorage .msd-grid-l{stroke:var(--m-line-soft);stroke-width:1}
#msdStorage .msd-ax{font-size:11px;fill:var(--m-faint);font-family:"Instrument Sans",sans-serif}
#msdStorage .msd-barr{fill:var(--m-acc);opacity:.62}
#msdStorage .msd-barr.last{opacity:1}

@media (max-width:1100px){
  #msdStorage .msd-sum{grid-template-columns:repeat(3,minmax(0,1fr))}
  #msdStorage .msd-sum > div:nth-child(3){border-right:0}
  #msdStorage .msd-sum > div:nth-child(-n+3){border-bottom:1px solid var(--m-line)}
  #msdStorage .msd-21,#msdStorage .msd-11{grid-template-columns:1fr}
}
@media (max-width:620px){
  #msdStorage .msd-sum{grid-template-columns:repeat(2,minmax(0,1fr))}
  #msdStorage .msd-sum > div{border-right:1px solid var(--m-line)}
  #msdStorage .msd-sum > div:nth-child(2n){border-right:0}
  #msdStorage .msd-form{grid-template-columns:1fr}
}

/* ══════════════════════════════════════════════════════════════════════════════════════════
   THE BOOKING DESK
   ══════════════════════════════════════════════════════════════════════════════════════════ */

/* the product search hangs below the card it sits in, and .msd-card clips to keep its corners */
#msdStorage .msd-card.msd-nocrop{overflow:visible}
#msdStorage .msd-pick{position:relative;z-index:20;margin-bottom:13px}
#msdStorage .msd-pick input{width:100%;border:1px solid var(--m-line);background:var(--m-paper);
  border-radius:9px;padding:10px 12px;font-size:13px;color:var(--m-ink)}
#msdStorage .msd-pick input:focus{outline:0;border-color:var(--m-acc);box-shadow:0 0 0 3px var(--m-acc-soft)}
#msdStorage .msd-res{position:absolute;z-index:21;left:0;right:0;top:calc(100% + 4px);
  background:var(--m-paper);border:1px solid var(--m-line);border-radius:9px;
  box-shadow:0 14px 30px rgba(27,21,39,.16);overflow:hidden auto;max-height:310px}
#msdStorage .msd-res button{display:flex;width:100%;gap:11px;align-items:center;text-align:left;
  border:0;background:none;padding:9px 12px;border-bottom:1px solid var(--m-line-soft);
  color:var(--m-ink);cursor:pointer;font:inherit}
#msdStorage .msd-res button:last-child{border-bottom:0}
#msdStorage .msd-res button:hover{background:var(--m-acc-soft)}
#msdStorage .msd-res-t{min-width:0}
#msdStorage .msd-res-t b{font-weight:600;font-size:13px;display:block}
#msdStorage .msd-res-m{margin-left:auto;text-align:right;flex:none}
#msdStorage .msd-res-m b{font-family:var(--m-display);font-weight:700;font-variant-numeric:tabular-nums}
#msdStorage .msd-res-no{padding:13px;color:var(--m-mut);font-size:12.5px}

/* product thumbnails: the variant's own image, falling back to its initials */
#msdStorage .msd-thumb{flex:none;width:38px;height:38px;border-radius:9px;object-fit:contain;
  background:var(--m-sunk);border:1px solid var(--m-line)}
#msdStorage .msd-thumb.sm{width:30px;height:30px;border-radius:8px}
#msdStorage .msd-thumb.is-none{display:grid;place-items:center;font-family:var(--m-display);
  font-size:12px;font-weight:700;color:var(--m-faint);letter-spacing:.02em}
#msdStorage .msd-thumb.sm.is-none{font-size:10.5px}

/* ── one line of the load ────────────────────────────────────────────────────────────────
   Two tiers, not five columns: what the product is and how many pallets of it on top, the
   boxes for each pallet on a tinted strip beneath. The split is the one in the job itself,
   and it holds its shape at twelve pallets where columns would burst. */
#msdStorage .msd-lrows{display:flex;flex-direction:column;gap:11px}
#msdStorage .msd-lr{border:1px solid var(--m-line);border-radius:11px;background:var(--m-paper);
  overflow:hidden;transition:border-color .12s}
#msdStorage .msd-lr:hover{border-color:var(--m-acc-line)}
#msdStorage .msd-lr-top{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto 28px;
  gap:18px;align-items:center;padding:13px 14px}
#msdStorage .msd-pname{display:flex;align-items:center;gap:11px;min-width:0}
#msdStorage .msd-pn{min-width:0}
#msdStorage .msd-pn b{font-weight:600;font-size:13.5px;display:block;line-height:1.3}
#msdStorage .msd-cap{display:block;font-size:10px;font-weight:600;letter-spacing:.1em;
  text-transform:uppercase;color:var(--m-faint);margin-bottom:6px;white-space:nowrap}
#msdStorage .msd-ppalwrap{padding:12px 14px 13px;border-top:1px solid var(--m-line-soft);
  background:var(--m-sunk)}

/* the native spinners are the main thing that makes a row of these look unfinished */
#msdStorage .msd-lr input[type=number]{-moz-appearance:textfield;appearance:textfield}
#msdStorage .msd-lr input[type=number]::-webkit-outer-spin-button,
#msdStorage .msd-lr input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

#msdStorage .msd-step{display:inline-flex;align-items:stretch;border:1px solid var(--m-line);
  border-radius:9px;overflow:hidden;background:var(--m-paper)}
#msdStorage .msd-step:focus-within{border-color:var(--m-acc);box-shadow:0 0 0 3px var(--m-acc-soft)}
#msdStorage .msd-step button{width:30px;border:0;background:var(--m-sunk);color:var(--m-mut);
  font-family:var(--m-display);font-size:15px;font-weight:600;line-height:1;cursor:pointer}
#msdStorage .msd-step button:hover{background:var(--m-acc-soft);color:var(--m-acc)}
#msdStorage .msd-step input{width:50px;border:0;border-left:1px solid var(--m-line);
  border-right:1px solid var(--m-line);background:transparent;text-align:center;padding:8px 2px;
  font-family:var(--m-display);font-size:13.5px;font-weight:700;font-variant-numeric:tabular-nums;
  color:var(--m-ink)}
#msdStorage .msd-step input:focus{outline:0}
#msdStorage .msd-upb{width:82px;border:1px solid var(--m-line);background:var(--m-paper);
  border-radius:9px;padding:8px 10px;font-family:var(--m-display);font-size:13.5px;font-weight:700;
  font-variant-numeric:tabular-nums;color:var(--m-ink)}
#msdStorage .msd-upb:focus{outline:0;border-color:var(--m-acc);box-shadow:0 0 0 3px var(--m-acc-soft)}

#msdStorage .msd-ppal{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#msdStorage .msd-pp{display:inline-flex;align-items:stretch;border:1px solid var(--m-line);
  border-radius:8px;overflow:hidden;background:var(--m-paper);flex:0 0 auto}
#msdStorage .msd-pp:focus-within{border-color:var(--m-acc);box-shadow:0 0 0 3px var(--m-acc-soft)}
#msdStorage .msd-ppn{display:grid;place-items:center;width:25px;flex:none;background:var(--m-sunk);
  border-right:1px solid var(--m-line);color:var(--m-faint);
  font-family:var(--m-display);font-size:11px;font-weight:700}
#msdStorage .msd-pp:focus-within .msd-ppn{background:var(--m-acc-soft);color:var(--m-acc)}
#msdStorage .msd-pp input{width:58px;border:0;background:transparent;text-align:right;
  padding:8px 10px;font-family:var(--m-display);font-size:13px;font-weight:600;
  font-variant-numeric:tabular-nums;color:var(--m-ink)}
#msdStorage .msd-pp input:focus{outline:0}

#msdStorage .msd-fill{border:1px dashed var(--m-line);background:transparent;border-radius:8px;
  height:35px;padding:0 12px;font-size:11.5px;font-weight:600;color:var(--m-mut);cursor:pointer}
#msdStorage .msd-fill:hover{color:var(--m-acc);border-color:var(--m-acc-line);background:var(--m-acc-soft)}
#msdStorage .msd-fill.danger:hover{color:var(--m-bad);border-color:var(--m-bad);background:transparent}

#msdStorage .msd-tot{text-align:right}
#msdStorage .msd-tot b{display:block;font-family:var(--m-display);font-size:19px;font-weight:700;
  line-height:1.1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
#msdStorage .msd-tot em{font-style:normal;font-size:11px;color:var(--m-faint)}
/* renamed off .msd-x: that is the table's scroll wrapper, and these rules were squashing
   every table on the tab into a 28px box */
#msdStorage .msd-del{width:28px;height:28px;justify-self:end;display:grid;place-items:center;
  border:1px solid transparent;border-radius:8px;background:none;color:var(--m-faint);
  font-size:15px;line-height:1;cursor:pointer}
#msdStorage .msd-del:hover{color:var(--m-bad);border-color:var(--m-bad)}
#msdStorage .msd-empty{border:1px dashed var(--m-line);border-radius:10px;padding:28px 16px;
  text-align:center;color:var(--m-mut);font-size:13px}

/* coming back: products on the left, that product's pallets on the right.
   Both panes scroll on their own and the whole thing stacks under 900px, because the one
   place this is used on a phone is standing in front of the pallets. */
#msdStorage .msd-two{display:grid;grid-template-columns:minmax(0,370px) minmax(0,1fr);
  gap:13px;align-items:start}
#msdStorage .msd-two-l,#msdStorage .msd-two-r{border:1px solid var(--m-line);border-radius:11px;
  background:var(--m-paper);overflow:hidden}
#msdStorage .msd-two-h{display:flex;justify-content:space-between;align-items:baseline;gap:8px;
  padding:10px 13px;border-bottom:1px solid var(--m-line);background:var(--m-sunk)}
#msdStorage .msd-two-h b{font-size:12.5px;font-weight:600}
#msdStorage .msd-two-h span{font-size:11.5px;color:var(--m-faint)}
#msdStorage .msd-plist{max-height:560px;overflow-y:auto;overflow-x:hidden}
/* EVERY base-sheet button style is undone here on purpose: style.css paints button
   { background:#03658e; color:white; font-weight:900; margin:3px; box-shadow; } and
   :hover { transform }. Resetting the background but not the colour is what left the
   product name white on white — rendered, selectable and invisible. */
#msdStorage .msd-prow{display:grid;grid-template-columns:30px minmax(0,1fr) auto;
  width:100%;gap:11px;align-items:center;text-align:left;
  padding:9px 13px;margin:0;border:0;border-bottom:1px solid var(--m-line-soft);
  background:none;box-shadow:none;cursor:pointer;
  color:var(--m-ink);font:400 12.5px/1.35 var(--m-body)}
#msdStorage .msd-prow:last-child{border-bottom:0}
#msdStorage .msd-prow:hover{background:var(--m-sunk);transform:none}
#msdStorage .msd-prow.on{background:var(--m-acc-soft);box-shadow:inset 3px 0 0 var(--m-acc)}
#msdStorage .msd-prow-t{min-width:0}
#msdStorage .msd-prow-t b{display:block;font-size:12.5px;font-weight:600;line-height:1.35;
  color:var(--m-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#msdStorage .msd-prow-t small{display:block;margin-top:1px;font-size:11px;color:var(--m-faint);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* the count never wraps: "0/13" over two lines reads as two numbers */
#msdStorage .msd-prow-m{text-align:right;color:var(--m-faint);white-space:nowrap}
#msdStorage .msd-prow-m b{display:block;font-family:var(--m-display);font-weight:700;font-size:13px;
  font-variant-numeric:tabular-nums;color:var(--m-mut);white-space:nowrap}
#msdStorage .msd-prow-m.on b{color:var(--m-acc)}
#msdStorage .msd-prow-m small{font-size:10px;letter-spacing:.02em}

#msdStorage .msd-two-r{padding:0}

/* the header is the product, said once and properly: what it is, what it is called in the
   catalogue, and the three numbers that decide whether it is worth bringing back */
#msdStorage .msd-two-hh{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:16px;
  align-items:center;padding:13px 16px;border-bottom:1px solid var(--m-line);
  background:linear-gradient(180deg,var(--m-paper),var(--m-sunk))}
#msdStorage .msd-two-ht{display:flex;gap:12px;align-items:center;min-width:0}
#msdStorage .msd-two-ht > div{min-width:0}
#msdStorage .msd-prow .msd-th,#msdStorage .msd-two-ht .msd-th{flex:none}
#msdStorage .msd-two-ht b{display:block;font:600 14.5px/1.3 var(--m-body);color:var(--m-ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#msdStorage .msd-two-ht small{display:block;margin-top:2px;font-size:11.5px;color:var(--m-faint);
  font-variant-numeric:tabular-nums}
#msdStorage .msd-two-st{display:flex;gap:18px;flex:none}
#msdStorage .msd-two-st span{display:block;font-size:10.5px;color:var(--m-faint);
  letter-spacing:.04em;text-align:right}
#msdStorage .msd-two-st b{display:block;margin-bottom:3px;font:700 17px/1 var(--m-display);
  color:var(--m-ink);font-variant-numeric:tabular-nums;letter-spacing:-.02em}
/* amber here is the tab's own "over 12 weeks" band, so it means what it means on Storage */
#msdStorage .msd-two-st .warn b{color:var(--m-warn)}
#msdStorage .msd-tickall{flex:none;margin:0;border:1px solid var(--m-acc-line);
  background:var(--m-acc-soft);color:var(--m-acc);border-radius:9px;height:36px;padding:0 15px;
  box-shadow:none;font:600 12px var(--m-body);cursor:pointer}
#msdStorage .msd-tickall:hover{background:#E7E0F7;transform:none}

/* columns are labelled once, so seven figures a row read as columns and not as a sentence */
#msdStorage .msd-plcols,#msdStorage .msd-plrow{display:grid;
  grid-template-columns:18px 88px minmax(96px,1fr) minmax(80px,.85fr) minmax(70px,.6fr)
    minmax(100px,.9fr) minmax(116px,1fr) minmax(0,1.15fr);
  gap:12px;align-items:center;padding:0 16px}
#msdStorage .msd-plcols{height:28px;background:var(--m-sunk);border-bottom:1px solid var(--m-line);
  font:600 9.5px/1 var(--m-body);letter-spacing:.1em;text-transform:uppercase;color:var(--m-faint)}
#msdStorage .msd-plnote{text-transform:none;letter-spacing:.02em;font-size:10.5px;font-weight:600;
  color:var(--m-warn);white-space:nowrap}
#msdStorage .msd-plrows{max-height:520px;overflow-y:auto;overflow-x:hidden}
#msdStorage .msd-plrow{min-height:40px;border-bottom:1px solid var(--m-line-soft);
  font-size:12.5px;cursor:pointer}
#msdStorage .msd-plrow:last-child{border-bottom:0}
#msdStorage .msd-plrow:hover{background:var(--m-sunk)}
#msdStorage .msd-plrow:has(input:checked){background:var(--m-acc-soft);
  box-shadow:inset 3px 0 0 var(--m-acc)}
#msdStorage .msd-plrow.is-taken{opacity:.5;cursor:not-allowed}
#msdStorage .msd-plrow input{width:auto;min-width:0;margin:0;accent-color:var(--m-acc)}
#msdStorage .msd-plref{font:700 13px var(--m-display);font-variant-numeric:tabular-nums;
  color:var(--m-ink)}
#msdStorage .msd-plu{color:var(--m-mut);font-variant-numeric:tabular-nums;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#msdStorage .msd-plu b{font-weight:600;color:var(--m-ink)}
#msdStorage .msd-plb{color:var(--m-faint);font-variant-numeric:tabular-nums;white-space:nowrap}
/* a chip only where the size is NOT the usual one: a column of forty "Full"s hides the four
   that say something else */
#msdStorage .msd-plchip{font-style:normal;font-size:10.5px;font-weight:600;padding:2px 7px;
  border-radius:999px;background:var(--m-warn-soft);color:var(--m-warn);
  border:1px solid var(--m-warn-line);white-space:nowrap}
#msdStorage .msd-plin{color:var(--m-faint);font-variant-numeric:tabular-nums;white-space:nowrap}
/* how long it has been standing, drawn as well as counted: storage is billed by the week, so
   the longest-standing pallet is the one worth bringing back first */
#msdStorage .msd-plage{display:flex;align-items:center;gap:8px;color:var(--m-mut);
  font-variant-numeric:tabular-nums;white-space:nowrap}
#msdStorage .msd-plage i{flex:none;width:46px;height:4px;border-radius:999px;
  background:var(--m-line);position:relative}
#msdStorage .msd-plage i:after{content:'';position:absolute;inset:0 auto 0 0;width:var(--w);
  border-radius:999px;background:var(--m-acc-line)}
#msdStorage .msd-plage.long{color:var(--m-warn);font-weight:600}
#msdStorage .msd-plage.long i:after{background:var(--m-warn)}
#msdStorage .msd-pltaken{font-size:11px;color:var(--m-warn);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}

/* the running total: the number that answers "is that enough coming back" */
#msdStorage .msd-plfoot{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;
  padding:11px 16px;border-top:1px solid var(--m-line);background:var(--m-sunk)}
#msdStorage .msd-plfoot b{font-size:12.5px;font-weight:600;color:var(--m-mut)}
#msdStorage .msd-plfoot span{font-size:11.5px;color:var(--m-faint)}
#msdStorage .msd-plfoot.on{background:var(--m-acc-soft);border-top-color:var(--m-acc-line)}
#msdStorage .msd-plfoot.on b{color:var(--m-acc)}
#msdStorage .msd-plfoot.on span{color:var(--m-mut)}

@media (max-width:1200px){
  #msdStorage .msd-plcols,#msdStorage .msd-plrow{
    grid-template-columns:18px 88px minmax(96px,1.1fr) minmax(70px,.6fr)
      minmax(116px,1fr) minmax(0,1.1fr)}
  #msdStorage .msd-plb,#msdStorage .msd-plin{display:none}
}
@media (max-width:900px){
  #msdStorage .msd-two{grid-template-columns:minmax(0,1fr)}
  #msdStorage .msd-plist{max-height:240px}
  /* On a phone the columns that are nice to have go, and the three that decide anything
     stay: which pallet, what is on it, and the reason a row cannot be ticked. A greyed row
     with no explanation is a row somebody taps at. */
  #msdStorage .msd-plcols{display:none}
  #msdStorage .msd-plrow{grid-template-columns:18px auto minmax(0,1fr) auto;
    padding:9px 13px;row-gap:2px;column-gap:10px}
  #msdStorage .msd-plrow input{grid-area:1/1}
  #msdStorage .msd-plref{grid-area:1/2}
  #msdStorage .msd-plu{grid-area:1/3}
  #msdStorage .msd-plsz{grid-area:1/4;justify-self:end}
  #msdStorage .msd-plage{grid-area:2/2/2/3}
  #msdStorage .msd-pltaken{grid-area:2/3/2/5;text-align:left}
  /* the boxes and the date are the two a thumb can do without */
  #msdStorage .msd-plb,#msdStorage .msd-plin{display:none}
  #msdStorage .msd-plage i{display:none}
  #msdStorage .msd-two-hh{grid-template-columns:minmax(0,1fr);gap:11px}
  #msdStorage .msd-two-st{justify-content:space-between}
  #msdStorage .msd-two-st span{text-align:left}
}

/* one surcharge, so one checkbox rather than a list of eleven */
#msdStorage .msd-check{display:flex;gap:9px;align-items:center;font-size:12.5px;
  border:1px solid var(--m-line);border-radius:9px;padding:9px 11px;background:var(--m-paper);
  cursor:pointer}
#msdStorage .msd-check input{width:auto;min-width:0;margin:0}

/* ── the summary, read back before anything is sent ────────────────────────────────────── */
#msdStorage .msd-sumline{border-bottom:1px solid var(--m-line-soft);padding:13px 0}
#msdStorage .msd-sumline:last-of-type{border-bottom:0}
/* renamed off .msd-t: that is the table element, and display:flex was collapsing every
   table on the tab into its flex items */
#msdStorage .msd-sumrow{display:flex;gap:11px;align-items:center;flex-wrap:wrap}
#msdStorage .msd-sumrow b{font-weight:600;font-size:13.5px}
#msdStorage .msd-m{margin-left:auto;font-family:var(--m-display);font-weight:700;
  font-variant-numeric:tabular-nums;white-space:nowrap}
#msdStorage .msd-pids{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
#msdStorage .msd-pid{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--m-msd-line);
  background:var(--m-msd-soft);color:var(--m-msd-ink);border-radius:7px;padding:4px 9px;font-size:11.5px}
#msdStorage .msd-pid b{font-family:var(--m-display);font-weight:700}
#msdStorage .msd-pid i{font-style:normal;opacity:.78;font-variant-numeric:tabular-nums}
#msdStorage .msd-grand{display:flex;gap:20px;align-items:flex-end;padding-top:14px;margin-top:4px;
  border-top:2px solid var(--m-line);flex-wrap:wrap}
#msdStorage .msd-g{min-width:0}
#msdStorage .msd-g b{display:block;font-family:var(--m-display);font-size:20px;font-weight:700;
  line-height:1.1;font-variant-numeric:tabular-nums}
#msdStorage .msd-g b.ids{font-size:15px}
#msdStorage .msd-g span{font-size:11.5px;color:var(--m-faint)}
#msdStorage .msd-warn{margin:11px 0 0;font-size:12px;color:var(--m-warn);font-weight:600}

/* editing an existing booking */
#msdStorage .msd-editbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px;
  border:1px solid var(--m-acc-line);background:var(--m-acc-soft);border-radius:9px;
  padding:9px 12px;font-size:12.5px}
#msdStorage .msd-editbar b{color:var(--m-acc);font-weight:600}
#msdStorage .msd-editbar span{color:var(--m-mut)}
#msdStorage .msd-editbar button{margin-left:auto}

/* booked list */
#msdStorage .msd-book-f{display:flex;align-items:center;gap:8px;margin-top:5px;flex-wrap:wrap}
#msdStorage .msd-book-acts{margin-left:auto;display:flex;gap:7px;flex:none;flex-wrap:wrap}
#msdStorage .msd-book-acts .msd-fill{height:26px;padding:0 10px}
#msdStorage .msd-filters{margin-bottom:6px}
#msdStorage .msd-filters input{width:100%;border:1px solid var(--m-line);background:var(--m-paper);
  border-radius:8px;padding:8px 11px;font-size:13px;color:var(--m-ink)}
#msdStorage .msd-filters input:focus{outline:0;border-color:var(--m-acc);box-shadow:0 0 0 3px var(--m-acc-soft)}

/* ── settings ──────────────────────────────────────────────────────────────────────────── */
#msdStorage .msd-addr{border:1px solid var(--m-line);border-radius:10px;padding:13px 14px;
  background:var(--m-paper);margin-bottom:11px}
#msdStorage .msd-addr.on{border-color:var(--m-acc-line);background:var(--m-acc-soft)}
#msdStorage .msd-addr.editing{border-color:var(--m-acc);background:var(--m-paper)}
#msdStorage .msd-addr-h{display:flex;align-items:center;gap:9px;margin-bottom:8px}
#msdStorage .msd-addr-h b{font-size:13px;font-weight:600}
#msdStorage .msd-addr-h .msd-chip{margin-left:auto;flex:none}
#msdStorage .msd-addr-b{font-size:12.5px;color:var(--m-mut);white-space:pre-line;line-height:1.55}
#msdStorage .msd-addr-a{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}
#msdStorage .msd-addr-a .msd-fill{height:26px;padding:0 10px}
#msdStorage .msd-setlist{margin-top:14px}
#msdStorage .msd-taglist{display:flex;flex-wrap:wrap;gap:7px;margin-top:6px}
#msdStorage .msd-tag{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--m-line);
  background:var(--m-sunk);border-radius:20px;padding:4px 10px;font-size:12px}
#msdStorage .msd-tag button{border:0;background:none;color:var(--m-faint);font-size:14px;
  line-height:1;padding:0;cursor:pointer}
#msdStorage .msd-tag button:hover{color:var(--m-bad)}
#msdStorage .msd-tag.add{color:var(--m-acc);font-weight:600;cursor:pointer}
#msdStorage .msd-lbl{font-size:10.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  color:var(--m-faint)}
#msdStorage .msd-hint{font-size:11px;color:var(--m-faint)}

@media (max-width:980px){
  #msdStorage .msd-lr-top{grid-template-columns:minmax(0,1fr) auto auto 28px;gap:12px;row-gap:14px}
  #msdStorage .msd-lr-top .msd-pname{grid-column:1/-1}
}
@media (max-width:620px){
  #msdStorage .msd-lr-top{grid-template-columns:1fr auto;gap:12px;row-gap:12px}
  #msdStorage .msd-lr-top .msd-pname{grid-column:1/-1}
  #msdStorage .msd-tot{text-align:left}
}

/* pallet size, inside the pallet chip: MSD count full, half, quarter and oversize separately */
#msdStorage .msd-psize{border:0;border-left:1px solid var(--m-line);background:var(--m-sunk);
  color:var(--m-mut);font-family:var(--m-display);font-size:11.5px;font-weight:700;
  padding:0 4px;cursor:pointer;-webkit-appearance:none;appearance:none;text-align:center;width:28px}
#msdStorage .msd-psize:focus{outline:0;background:var(--m-acc-soft);color:var(--m-acc)}
#msdStorage .msd-sizekey{margin:9px 0 0;font-size:11px;color:var(--m-faint)}

/* MSD's Load Criteria block */
#msdStorage .msd-criteria{margin-top:16px;border:1px solid var(--m-line);border-radius:10px;
  padding:13px 14px;background:var(--m-sunk)}
#msdStorage .msd-crit-h{display:flex;gap:10px;align-items:baseline;margin-bottom:11px}
#msdStorage .msd-crit-h b{font-size:13px;font-weight:600}
#msdStorage .msd-crit-h span{font-size:11.5px;color:var(--m-faint)}
#msdStorage .msd-crit-g{display:flex;gap:10px;flex-wrap:wrap}
#msdStorage .msd-crit{flex:1 1 110px;border:1px solid var(--m-line);border-radius:9px;
  background:var(--m-paper);padding:9px 11px}
#msdStorage .msd-crit b{display:block;font-family:var(--m-display);font-size:19px;font-weight:700;
  line-height:1.1;font-variant-numeric:tabular-nums}
#msdStorage .msd-crit span{font-size:11px;color:var(--m-faint)}
#msdStorage .msd-criteria .msd-form{grid-template-columns:repeat(2,minmax(0,1fr))}

/* the reference is generated, so it is shown rather than typed into */
#msdStorage .msd-autoref{border:1px solid var(--m-line);background:var(--m-sunk);border-radius:8px;
  padding:9px 11px;font-family:var(--m-display);font-weight:700;font-size:13px;
  color:var(--m-ink);letter-spacing:-.01em}

/* writing down stock already at MSD: the pallet reference is typed, so the chip is wider */
#msdStorage .msd-backshut{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:14px;
  padding:12px 14px;border:1px dashed var(--m-line);border-radius:10px;background:var(--m-sunk)}
#msdStorage .msd-backshut span{font-size:12.5px;color:var(--m-mut)}
#msdStorage .msd-backshut button{margin-left:auto}
#msdStorage .msd-bp{display:inline-flex;align-items:stretch;border:1px solid var(--m-line);
  border-radius:8px;overflow:hidden;background:var(--m-paper);flex:0 0 auto}
#msdStorage .msd-bp:focus-within{border-color:var(--m-acc);box-shadow:0 0 0 3px var(--m-acc-soft)}
#msdStorage .msd-bp .msd-ppn{display:grid;place-items:center;width:25px;flex:none;
  background:var(--m-sunk);border-right:1px solid var(--m-line);color:var(--m-faint);
  font-family:var(--m-display);font-size:11px;font-weight:700}
#msdStorage .msd-bref{width:104px;border:0;border-right:1px solid var(--m-line);background:transparent;
  padding:8px 9px;font-family:var(--m-display);font-size:12.5px;font-weight:700;
  color:var(--m-ink);text-transform:uppercase}
#msdStorage .msd-bbox{width:54px;border:0;background:transparent;text-align:right;padding:8px 8px;
  font-family:var(--m-display);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;
  color:var(--m-ink);-moz-appearance:textfield;appearance:textfield}
#msdStorage .msd-bbox::-webkit-outer-spin-button,
#msdStorage .msd-bbox::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
#msdStorage .msd-bref:focus,#msdStorage .msd-bbox:focus{outline:0}

#msdStorage .msd-rateform{margin-top:14px;border-top:1px solid var(--m-line);padding-top:14px}
#msdStorage table.msd-t .msd-del{width:22px;height:22px;font-size:13px}

#msdStorage tr.msd-editing td{background:var(--m-acc-soft);vertical-align:middle}
#msdStorage tr.msd-editing .msd-bref,#msdStorage tr.msd-editing .msd-bbox{
  border:1px solid var(--m-line);border-radius:6px;background:var(--m-paper)}
#msdStorage .msd-pedate{border:1px solid var(--m-line);background:var(--m-paper);border-radius:6px;
  padding:5px 8px;font-size:12.5px;color:var(--m-ink)}
#msdStorage tr.msd-editing .msd-psize{border:1px solid var(--m-line);border-radius:6px;height:30px}
#msdStorage .msd-rowacts{display:inline-flex;gap:6px;align-items:center;justify-content:flex-end}

/* ── which barcode goes on the label ─────────────────────────────────────────
   Deliberately quiet: the primary is pre-picked and right most of the time, so
   this is a correction, not a decision the row should shout about. It only
   becomes a control at all when the product actually wears more than one. */
#msdStorage .msd-eanone,#msdStorage .msd-eannone{font-family:var(--m-display);font-size:11.5px;
  color:var(--m-faint);font-variant-numeric:tabular-nums;margin-top:2px}
#msdStorage .msd-eannone{font-style:italic}
#msdStorage .msd-eanmany{display:inline-block;margin-left:6px;padding:0 5px;border-radius:4px;
  background:var(--m-acc-soft);color:var(--m-acc);font-size:10.5px;font-weight:700;
  font-family:var(--m-display);vertical-align:1px}
#msdStorage .msd-eanpick{display:flex;align-items:center;gap:7px;margin-top:5px;min-width:0}
#msdStorage .msd-eanpick>span{font-size:10.5px;font-weight:700;letter-spacing:.055em;
  text-transform:uppercase;color:var(--m-faint);flex:0 0 auto}
#msdStorage .msd-eanpick select{min-width:0;max-width:100%;border:1px solid var(--m-line);
  border-radius:6px;background:var(--m-paper);color:var(--m-ink);padding:4px 7px;
  font-family:var(--m-display);font-size:11.5px;font-variant-numeric:tabular-nums}
#msdStorage .msd-eanpick select:focus{outline:0;border-color:var(--m-acc);
  box-shadow:0 0 0 3px var(--m-acc-soft)}
#msdStorage tr.msd-editing .msd-eanpick{margin-top:6px}

/* ── what the dashboard is reporting on ──────────────────────────────────────
   A segmented control, not four buttons: these are four readings of the same
   thing, and only one can be on. */
#msdStorage .msd-periods{display:flex;align-items:center;gap:4px;flex-wrap:wrap;
  margin:0 0 14px;padding:4px;border:1px solid var(--m-line);border-radius:10px;
  background:var(--m-sunk);width:max-content;max-width:100%}
#msdStorage .msd-periods button{border:0;background:transparent;border-radius:7px;
  padding:7px 14px;font-size:12.5px;font-weight:600;color:var(--m-mut);box-shadow:none;
  white-space:nowrap;transition:.12s}
#msdStorage .msd-periods button:hover{background:var(--m-paper);color:var(--m-ink);transform:none}
#msdStorage .msd-periods button[aria-pressed="true"]{background:var(--m-paper);color:var(--m-acc);
  box-shadow:0 1px 2px rgba(27,24,35,.07)}
#msdStorage .msd-periods .msd-hint{margin-left:8px;padding-right:8px}

/* ── age bands, across the top of the pallet list ────────────────────────────
   Four bands side by side rather than stacked down a column, because the list
   they describe now runs the full width underneath them. */
#msdStorage .msd-ages{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
#msdStorage .msd-age{border:1px solid var(--m-line);border-radius:9px;padding:12px 13px;min-width:0}
#msdStorage .msd-age-n{display:block;font-family:var(--m-display);font-size:24px;font-weight:700;
  line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.025em}
#msdStorage .msd-age-b{display:block;font-size:11.5px;color:var(--m-mut);margin-top:5px}
#msdStorage .msd-age-c{display:block;font-family:var(--m-display);font-size:12.5px;font-weight:600;
  color:var(--m-faint);font-variant-numeric:tabular-nums;margin-top:2px}
#msdStorage .msd-age-t{display:block;height:4px;border-radius:2px;background:var(--m-sunk);margin-top:9px;overflow:hidden}
#msdStorage .msd-age-t i{display:block;height:100%;border-radius:2px;background:var(--m-acc)}
#msdStorage .msd-age.t-ok .msd-age-n{color:var(--m-ok)}
#msdStorage .msd-age.t-ok .msd-age-t i{background:var(--m-ok)}
#msdStorage .msd-age.t-acc .msd-age-n{color:var(--m-acc)}
#msdStorage .msd-age.t-warn .msd-age-n{color:var(--m-warn)}
#msdStorage .msd-age.t-warn .msd-age-t i{background:var(--m-warn)}
#msdStorage .msd-age.t-bad{border-color:var(--m-bad-line);background:var(--m-bad-soft)}
#msdStorage .msd-age.t-bad .msd-age-n{color:var(--m-bad)}
#msdStorage .msd-age.t-bad .msd-age-t i{background:var(--m-bad)}

/* ── dropdowns ───────────────────────────────────────────────────────────────
   style.css leaves a select as the browser drew it, which beside these inputs
   reads as something half-finished. Same border, same height, same type. */
#msdStorage .msd-sel,#msdStorage .msd-form select,#msdStorage .msd-filters select{
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  width:100%;min-width:0;border:1px solid var(--m-line);border-radius:8px;
  background:var(--m-paper);color:var(--m-ink);
  padding:9px 32px 9px 11px;font-family:var(--m-body);font-size:13px;line-height:1.3;
  background-image:linear-gradient(45deg,transparent 50%,var(--m-faint) 50%),
    linear-gradient(135deg,var(--m-faint) 50%,transparent 50%);
  background-position:calc(100% - 17px) calc(50% + 1px),calc(100% - 12px) calc(50% + 1px);
  background-size:5px 5px,5px 5px;background-repeat:no-repeat}
#msdStorage .msd-sel:hover,#msdStorage .msd-form select:hover{border-color:var(--m-acc-line)}
#msdStorage .msd-sel:focus,#msdStorage .msd-form select:focus,#msdStorage .msd-filters select:focus{
  outline:0;border-color:var(--m-acc);box-shadow:0 0 0 3px var(--m-acc-soft)}
#msdStorage .msd-filters select{width:auto;min-width:150px}
/* the two that are deliberately not full-width form controls keep their own sizing */
#msdStorage .msd-form select.msd-psize,#msdStorage .msd-eanpick select{background-image:none;padding-right:11px}

/* ── the address behind the name ─────────────────────────────────────────── */
#msdStorage .msd-addrpick{margin-top:9px;border:1px solid var(--m-line);border-left:3px solid var(--m-acc);
  border-radius:8px;background:var(--m-acc-soft);padding:11px 13px}
#msdStorage .msd-addrpick .msd-addr-b{white-space:pre-line;font-size:12.5px;color:var(--m-ink);margin:0}
#msdStorage .msd-addrpick-a{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:9px}

/* a button that reads as a sentence, for an offer inside a hint */
#msdStorage .msd-link{border:0;background:none;padding:0;font:inherit;color:var(--m-acc);
  font-weight:600;text-decoration:underline;text-underline-offset:2px;box-shadow:none;border-radius:0}
#msdStorage .msd-link:hover{background:none;transform:none;color:var(--m-ink)}

/* the product thumbnail inside a table cell sits beside its text, not above it */
#msdStorage table.msd-t .msd-pname{display:flex;align-items:center;gap:10px;min-width:0}
#msdStorage table.msd-t .msd-pn{min-width:0}

/* the summary strip folds rather than squeezing five numbers into a phone width */
@media (max-width:1100px){
  #msdStorage .msd-sum{grid-template-columns:repeat(3,minmax(0,1fr))}
  #msdStorage .msd-sum > div{border-bottom:1px solid var(--m-line)}
  #msdStorage .msd-sum > div:nth-child(3n){border-right:0}
}
@media (max-width:620px){
  #msdStorage .msd-sum{grid-template-columns:repeat(2,minmax(0,1fr))}
  #msdStorage .msd-sum > div:nth-child(3n){border-right:1px solid var(--m-line)}
  #msdStorage .msd-sum > div:nth-child(2n){border-right:0}
  #msdStorage .msd-periods{width:100%}
  #msdStorage .msd-periods button{flex:1 1 auto}
}

/* ── nothing here may make the PAGE scroll sideways ──────────────────────────
   The sidebar is position:fixed. A page that can scroll right therefore slides
   its own content underneath the sidebar and clips the first 200px of every
   line — which is what the glitch on the booking tab was. Anything genuinely
   too wide scrolls inside its own card instead of taking the page with it.

   msd-nocrop exists so the product-search dropdown can hang below its card, so
   it cannot use overflow:hidden. overflow-x:clip is the one that clips a single
   axis: 'hidden' on one axis silently forces the other to 'auto' and would put
   a scrollbar under the dropdown. */
#msdStorage{min-width:0;max-width:100%}
#msdStorage .msd-body,#msdStorage .msd-grid,#msdStorage .msd-card{min-width:0;max-width:100%}
#msdStorage .msd-card.msd-nocrop{overflow-x:clip;overflow-y:visible}
#msdStorage .msd-lr-top > *,#msdStorage .msd-form > *,#msdStorage .msd-f{min-width:0}
#msdStorage .msd-autoref{overflow-wrap:anywhere}

/* ── a booking waiting to be approved says so ────────────────────────────────
   Requesting numbers and labels the pallets; approving is what lets them count
   as stored. Nobody should have to work that out from a chip reading
   "requested" while the stock figure looks short. */
#msdStorage .msd-await,#msdStorage .msd-ok-s{display:block;font-size:11.5px;margin-top:5px}
#msdStorage .msd-await{color:var(--m-warn);font-weight:600}
#msdStorage .msd-ok-s{color:var(--m-ok)}
#msdStorage .msd-fill.go{border-style:solid;border-color:var(--m-acc);color:var(--m-acc);
  background:var(--m-acc-soft);font-weight:700}
#msdStorage .msd-fill.go:hover{background:var(--m-acc);color:#fff;border-color:var(--m-acc)}

/* units in a box, under the box count on the correction row */
#msdStorage .msd-peupb{margin-top:5px;white-space:nowrap}

/* ── charts you can ask a question of ────────────────────────────────────────
   A bar on its own only says "bigger than the one before it". Pointing at one
   gives the figures it is made of. The hit area is the whole column, because
   chasing a 42px bar with the mouse is a game, not a chart. */
#msdStorage .msd-chartwrap{position:relative}
#msdStorage .msd-hit{fill:transparent;cursor:crosshair}
#msdStorage .msd-barr{transition:fill .1s}
#msdStorage .msd-barr.on{fill:var(--m-acc)}
#msdStorage .msd-tip{position:absolute;z-index:30;pointer-events:none;
  min-width:148px;max-width:230px;padding:9px 11px;border-radius:9px;
  background:var(--m-ink);color:#fff;box-shadow:0 8px 22px rgba(27,24,35,.22);
  font-size:12px;line-height:1.45}
#msdStorage .msd-tip b{display:block;font-family:var(--m-display);font-size:12.5px;
  font-weight:700;margin-bottom:5px;color:#fff}
#msdStorage .msd-tip span{display:flex;gap:12px;align-items:baseline}
#msdStorage .msd-tip i{font-style:normal;color:#CFC9DD;white-space:nowrap}
#msdStorage .msd-tip em{font-style:normal;margin-left:auto;font-family:var(--m-display);
  font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
#msdStorage .msd-tip span.is-total{margin-top:5px;padding-top:5px;
  border-top:1px solid rgba(255,255,255,.18)}
#msdStorage .msd-tip span.is-total em{font-size:13.5px;font-weight:700}

/* ── the arithmetic, laid out as arithmetic ──────────────────────────────────
   The question this answers is "how is that figure worked out", so it is set
   as a worked sum with a rule above the total, not as another list of cards. */
#msdStorage .msd-sum-lines{display:grid;gap:0}
#msdStorage .msd-sl{display:grid;grid-template-columns:minmax(120px,auto) minmax(0,1fr) auto;
  gap:14px;align-items:baseline;padding:10px 0;border-bottom:1px solid var(--m-line-soft)}
#msdStorage .msd-sl-w{font-size:13px;font-weight:600}
#msdStorage .msd-sl-b{font-size:11.5px;color:var(--m-faint);min-width:0}
#msdStorage .msd-sl-a{font-family:var(--m-display);font-size:15px;font-weight:600;
  font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
#msdStorage .msd-sl.is-total{border-bottom:0;border-top:2px solid var(--m-line);
  margin-top:2px;padding-top:12px}
#msdStorage .msd-sl.is-total .msd-sl-w{font-family:var(--m-display);font-size:14px;font-weight:700}
#msdStorage .msd-sl.is-total .msd-sl-a{font-size:21px;font-weight:700;letter-spacing:-.02em}

/* ── what costs money if it is left ────────────────────────────────────────── */
#msdStorage .msd-dec{display:flex;align-items:center;gap:14px;padding:12px 13px;
  border:1px solid var(--m-line);border-radius:10px;margin-bottom:10px}
#msdStorage .msd-dec.is-warn{border-color:var(--m-warn-line);background:var(--m-warn-soft)}
#msdStorage .msd-dec-n{font-family:var(--m-display);font-size:27px;font-weight:700;line-height:1;
  font-variant-numeric:tabular-nums;letter-spacing:-.03em;flex:none;min-width:42px}
#msdStorage .msd-dec.is-warn .msd-dec-n{color:var(--m-warn)}
#msdStorage .msd-dec-t{min-width:0}
#msdStorage .msd-dec-t b{display:block;font-size:13px;font-weight:600}
#msdStorage .msd-dec-t span{font-size:11.5px;color:var(--m-mut)}
#msdStorage .msd-dec-list{margin-top:4px;border-top:1px solid var(--m-line-soft);padding-top:4px}
#msdStorage .msd-seen{margin-top:10px;padding-top:6px;border-top:1px dashed var(--m-line)}

/* ── the line that can go down ───────────────────────────────────────────────
   Bars and line answer different questions at different sizes, so they get
   their own axes, and they must not be the same colour or a crossing point
   reads as meaning something.

   The line is BLUE, which on this tab means one thing and has meant it since
   the Stock column: stock that is off-site at MSD. That is exactly what the
   line measures — the money standing in their yard — so it takes the colour
   rather than inventing one. */
#msdStorage .msd-line{fill:none;stroke:var(--m-msd);stroke-width:2.5;
  stroke-linejoin:round;stroke-linecap:round}
#msdStorage .msd-dot{fill:var(--m-paper);stroke:var(--m-msd);stroke-width:2}
#msdStorage .msd-ax.is-line{fill:var(--m-msd-ink)}
#msdStorage .msd-legend{display:flex;gap:16px;flex-wrap:wrap;margin:0 0 8px;padding:0 2px}
#msdStorage .msd-key{display:inline-flex;align-items:center;gap:7px;font-size:11.5px;color:var(--m-mut)}
#msdStorage .msd-key::before{content:"";width:13px;height:13px;border-radius:3px;flex:none}
#msdStorage .msd-key.is-bar::before{background:var(--m-acc);opacity:.62}
#msdStorage .msd-key.is-line::before{height:3px;border-radius:2px;background:var(--m-msd)}

/* ── why the figure has not moved ────────────────────────────────────────────
   Two things make a pallet count as stored, and only one of them is a button.
   Somebody who has just approved a load and come here to look for it deserves
   to be told which of the two is outstanding, rather than left to work it out
   from a number that has not changed. */
#msdStorage .msd-pending{border:1px solid var(--m-acc-line);border-left:3px solid var(--m-acc);
  border-radius:10px;background:var(--m-acc-soft);padding:12px 15px;margin-bottom:14px}
#msdStorage .msd-pending p{margin:0;font-size:12.5px;color:var(--m-mut);line-height:1.5}
#msdStorage .msd-pending p + p{margin-top:8px;padding-top:8px;border-top:1px solid var(--m-acc-line)}
#msdStorage .msd-pending b{color:var(--m-ink);font-weight:600}
#msdStorage .msd-pending p.is-warn{color:var(--m-warn)}
#msdStorage .msd-pending p.is-warn b{color:var(--m-warn)}
#msdStorage .msd-pending .msd-link{margin-left:4px}

/* A pallet with a lorry booked for it, or one only requested in: tagged under its reference. */
#msdStorage .msd-paltag{display:inline-flex;margin-top:4px;font-family:var(--m-body);font-size:10.5px}
#msdStorage td.msd-mono .msd-paltag{display:flex;width:max-content}
/* Requested in: not at MSD and in no total, so it reads as a step back from the rows that are. */
#msdStorage tr.msd-reqrow td{background:var(--m-sunk);color:var(--m-mut)}
#msdStorage tr.msd-reqrow .msd-thumb{opacity:.6}
#msdStorage .msd-lockline{display:block;font-size:11.5px;margin-top:5px}
