/* 📦 Supplies (supplies.js) */
.sup-tiles .tile { cursor: pointer; }
.sup-tabs { margin-bottom: 16px; }
.sup-tabs button { padding: 8px 16px; font-size: 13.5px; }
.sup-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.sup-bar input[type=search] { flex: 1; min-width: 200px; max-width: 420px; }
.sup-toggle { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sup-toggle input { width: auto; }
.sup-cats button .hint { font-weight: 500; opacity: .65; margin-left: 2px; }
.sup-cat-head { font-size: 14.5px; font-weight: 800; margin: 18px 0 10px; }
.sup-cat-head .hint { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.sup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 12px; }
.sup-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--sh-1); }
.sup-card.s-low { border-color: #ecd29b; }
.sup-card.s-out { border-color: #efb9b2; }
.sup-pic { position: relative; height: 128px; background: #fff; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line); cursor: pointer; }
.sup-pic img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.sup-noimg { font-size: 44px; opacity: .55; line-height: 1; }
.sup-flags { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.sup-body { padding: 10px 12px 4px; flex: 1; cursor: pointer; min-width: 0; }
.sup-name { font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.sup-qty { margin-top: 4px; font-size: 13px; }
.sup-qty b { font-family: 'Anton', sans-serif; font-weight: 400; font-size: 22px; margin-right: 2px; }
.sup-card.s-low .sup-qty b { color: var(--amber); }
.sup-card.s-out .sup-qty b { color: var(--red); }
.sup-last { font-size: 12px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-acts { display: flex; gap: 8px; padding: 10px 12px 12px; }
.sup-acts .sup-take { flex: 1; background: var(--black); border-color: var(--black); color: var(--lime); padding: 9px 10px; }
.sup-acts .sup-take:disabled { background: #edf0ea; border-color: var(--line); color: var(--ink-3); cursor: default; transform: none; box-shadow: none; }

/* item sheet */
.sup-modal { max-width: 520px; max-height: 92vh; overflow: auto; }
.sup-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.sup-thumb { width: 84px; height: 84px; flex: none; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sup-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.sup-thumb .sup-noimg { font-size: 34px; }
.sup-thumb.sm { width: 52px; height: 52px; cursor: pointer; }
.sup-thumb.sm .sup-noimg { font-size: 24px; }
.sup-onhand { margin-top: 4px; font-size: 13.5px; }
.sup-onhand b { font-family: 'Anton', sans-serif; font-weight: 400; font-size: 24px; }
.sup-modes { display: flex; width: 100%; }
.sup-modes button { flex: 1; padding: 10px 6px; font-size: 13.5px; }
#sup-mode-hint { margin: 8px 0 10px; min-height: 1.5em; }
.sup-step { display: flex; gap: 10px; align-items: stretch; justify-content: center; margin-bottom: 10px; }
.sup-step button { width: 64px; font-size: 26px; font-weight: 700; padding: 6px 0; }
.sup-step input { width: 120px; text-align: center; font: 400 30px 'Anton', sans-serif; padding: 6px; }
.sup-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sup-quick button { border: 1px solid var(--line) !important; border-radius: 99px; padding: 4px 11px; font-size: 12.5px; }
.sup-more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.sup-more summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.sup-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 10px; }
.sup-info span { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sup-notes { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--hover); border-radius: 9px; padding: 9px 11px; margin-top: 10px; font-size: 13px; }
.sup-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sup-hrow { display: flex; gap: 10px; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink); }
.sup-hrow > span:last-child { color: var(--ink-3); white-space: nowrap; font-size: 12px; }
.sup-form { display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px; }
.sup-form .wide { grid-column: 1 / -1; }

/* reorder + log */
.sup-rrow { align-items: flex-start; cursor: pointer; }
.sup-rrow.ordered { opacity: .72; }
.sup-rrow > button { align-self: center; white-space: nowrap; }
.sup-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; margin-bottom: 16px; }
.sup-filters select, .sup-filters input { width: auto; flex: 1; min-width: 130px; }
.sup-export { font-weight: 700; font-size: 13px; text-decoration: none; color: var(--ink); white-space: nowrap; padding: 6px 4px; }
.sup-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.sup-person { text-align: left; border-top: 3px solid var(--oc, var(--line)); padding: 12px 14px; cursor: pointer; }
.sup-person.on { box-shadow: 0 0 0 2px var(--lime-deep); }
.sup-pname { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; }
.sup-pnum { font: 400 28px 'Anton', sans-serif; line-height: 1.15; margin-top: 2px; }
.sup-lrow { align-items: flex-start; }
.sup-licon { width: 22px; text-align: center; flex: none; }
.sup-ltext.undone { text-decoration: line-through; color: var(--ink-3); }
.sup-lnote { color: var(--ink-2); font-style: italic; }
.sup-lrow a { color: inherit; text-decoration: underline; text-decoration-color: #c6cdc2; text-underline-offset: 2px; }

@media (max-width: 860px) {
  /* the phone top bar sits over the page: keep the sheet clear of it */
  .sup-modal { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
}
@media (max-width: 700px) {
  /* phone at the storage unit: one item per row, photo on the left, big Take button */
  .sup-sub { display: none; }
  .sup-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; margin-bottom: 12px; }
  .sup-tiles .tile { padding: 8px 10px; }
  .sup-tiles .tile .num { font-size: 22px; }
  .sup-tiles .tile .lbl { font-size: 10.5px; line-height: 1.25; }
  .sup-tiles .tile:nth-child(4) { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; }
  .sup-grid { grid-template-columns: 1fr; gap: 8px; }
  .sup-card { display: grid; grid-template-columns: 76px 1fr; grid-template-areas: "pic body" "acts acts"; }
  .sup-pic { grid-area: pic; height: auto; min-height: 76px; border-bottom: none; border-right: 1px solid var(--line); }
  .sup-pic img { position: absolute; inset: 0; }
  .sup-noimg { font-size: 30px; }
  .sup-flags { top: 4px; right: auto; left: 4px; align-items: flex-start; }
  .sup-flags .chip { font-size: 9.5px; padding: 1px 5px; }
  .sup-body { grid-area: body; padding: 8px 10px; }
  .sup-acts { grid-area: acts; padding: 8px 10px 10px; border-top: 1px solid var(--line); }
  .sup-acts button { padding: 11px 12px; font-size: 14px; }
  .sup-form { grid-template-columns: 1fr; }
  .sup-bar input[type=search] { max-width: none; }
  .sup-tabs { display: flex; width: 100%; }
  .sup-tabs button { flex: 1; padding: 9px 4px; }
  .sup-rrow { flex-wrap: wrap; }
  .sup-rrow > button { margin-left: 62px; }
  .sup-modal { padding: 16px; }
}
