/* UniCirc Workspace 2 — returns and recycling loop screens (ws2-loop.js, prefix "lp-").
   Only the existing ws2.css tokens and look: no new colours, fonts, button styles or themes.
   lp-flow (who does what, with handoffs) · lp-ws (shared recycling workspace) · lp-bar / lp-big / lp-branch (grade C batch) ·
   lp-proc / lp-part / lp-steps (the recycling department's 13 steps, each approved; lp-lnk = "Approve with a note") · lp-mini / lp-mini-p (13 dots in three parts) ·
   lp-nx (its next step to approve) · lp-method / lp-mt-* (WS.methodCard: how we recycle) · lp-tl (journey timeline) · lp-sum / lp-lane (garment record) · lp-res / lp-test (lab results) ·
   lp-find (garment lookup) · form bits (lp-cb, lp-read, lp-grid3) */

/* small text bits */
.lp-gl { display: grid; gap: 2px; }
.lp-gl small { color: var(--ink-3); font-size: 13px; font-weight: 400; }
.lp-n { font: 500 13px/1.3 var(--mono); color: var(--ink-2); }
.lp-mono, .lp-id { font-family: var(--mono); font-size: .92em; letter-spacing: .01em; overflow-wrap: anywhere; }
a.lp-id { color: inherit; }
.lp-h3 { font: 600 14px/1.3 var(--sans); color: var(--ink-2); margin-top: 4px; }
.lp-what { color: var(--ink-2); }
.lp-hand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.lp-ho-tag { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lp-ho-t { font-weight: 600; color: var(--ink); }
.lp-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.lp-where b { font-weight: 600; }
/* a long status chip in the page header wraps instead of pushing the page sideways on phones */
.lp-subc { display: inline-flex; min-width: 0; max-width: 100%; }
.lp-subc .chip { white-space: normal; }

/* who does what: the diagram's lane for this screen, handoffs between the boxes (a vertical list like the diagram; one row on wide screens) */
.lp-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lp-st { min-width: 0; display: flex; }
.lp-st > a, .lp-st > div { flex: 1; display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); text-decoration: none; color: inherit; }
.lp-st > a:hover { border-color: var(--ink-3); }
.lp-st.lp-here > div { border-color: var(--glow); box-shadow: inset 0 0 0 1px var(--glow); background: var(--surface-2); }
.lp-st-r { font: 600 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
html[data-lang="zh"] .lp-st-r { font-family: var(--sans); letter-spacing: .02em; font-size: 12.5px; text-transform: none; }
.lp-st b { font-size: 15px; line-height: 1.3; }
.lp-st-s { color: var(--ink-2); font-size: 13.5px; }
.lp-st .chip { justify-self: start; margin-top: 2px; }
.lp-ho { display: flex; align-items: center; min-height: 32px; padding-left: 14px; }
.lp-ho .lp-ho-t { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.lp-arr { color: var(--ink-3); font-size: 18px; line-height: 1; }
@media (min-width: 1180px) {
  .lp-flow { display: flex; align-items: stretch; gap: 8px; }
  .lp-st { flex: 1 1 0; }
  .lp-ho { flex: 0 0 auto; max-width: 116px; justify-content: center; padding: 0; text-align: center; }
  .lp-ho .lp-ho-tag { flex-direction: column; gap: 4px; }
  .lp-ho .lp-ho-t { font-size: 12.5px; }
  .lp-arr { display: inline-block; transform: rotate(-90deg); }
}

/* shared recycling workspace: two accounts, one place */
.lp-ws { gap: 10px; }
.lp-ws-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.lp-ws-h b { font: 600 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
html[data-lang="zh"] .lp-ws-h b { font-family: var(--sans); letter-spacing: .04em; font-size: 14px; text-transform: none; }
.lp-ws-n { color: var(--ink-2); font-size: 14px; }
.lp-ws-r { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lp-ws-r li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.lp-ws-r li.lp-on { border-color: var(--glow); }
.lp-ws-r .ic { color: var(--glow); }
.lp-ws-t { display: grid; gap: 2px; min-width: 0; }
.lp-ws-r small { color: var(--ink-2); font-size: 13px; }

/* grade C held for a full batch */
.lp-big { display: flex; align-items: baseline; gap: 10px; }
.lp-big b { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-big-u { color: var(--ink-2); }
.lp-bar { height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); overflow: hidden; }
.lp-bar i { display: block; height: 100%; border-radius: 999px; background: var(--wait); }
.lp-bar.lp-full i { background: var(--ok); }
.lp-q { font-weight: 600; }
.lp-branch .card { gap: 4px; }
.lp-branch small, .lp-lane small { color: var(--ink-2); font-size: 13.5px; }
.lp-now { box-shadow: inset 0 0 0 1px var(--ink-3); }
.lp-off { opacity: .55; }
.lp-size { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.lp-quick { gap: 6px; }

/* garment ID lists */
.lp-ids { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.lp-ids li { min-height: 32px; display: flex; align-items: center; }
.lp-per { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink-2); }

/* the recycling department's 13 steps in three labelled parts (A accept · B mechanical recycling · C fabric batch), each approved */
.lp-proc { display: grid; gap: 18px; }
.lp-part { display: grid; gap: 8px; min-width: 0; }
.lp-part-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.lp-part-l { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; font: 700 13.5px/1 var(--mono); color: var(--glow); border: 1px solid var(--glow); }
.lp-part-h h3 { font: 600 15.5px/1.3 var(--sans); margin: 0; }
.lp-part-h small { margin-left: auto; color: var(--ink-3); font-size: 13px; }
ol.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ol.lp-steps > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
ol.lp-steps .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); font: 700 13px/1 var(--mono); color: var(--ink-3); }
ol.lp-steps li.done .n { background: var(--ok); border-color: var(--ok); color: var(--bg); }
ol.lp-steps li.now { border-color: var(--glow); box-shadow: inset 0 0 0 1px var(--glow); background: var(--surface-2); }
ol.lp-steps li.now .n { background: var(--ink); border-color: var(--ink); color: var(--bg); }
ol.lp-steps li.todo { background: transparent; }
ol.lp-steps li.todo .lp-sb b, ol.lp-steps li.todo .lp-sb p { color: var(--ink-3); }
.lp-sb { display: grid; gap: 4px; min-width: 0; padding-top: 3px; }
.lp-sb b { font-weight: 600; line-height: 1.35; }
.lp-sb p { color: var(--ink-2); font-size: 14.5px; }
.lp-ref { color: var(--ink-3); font-size: 13px; }
.lp-sb .lp-okl { color: var(--ok); font-size: 14px; font-weight: 600; }
.lp-sb .lp-det, .lp-sb .lp-wait { color: var(--ink-2); font-size: 13.5px; }
.lp-act { margin-top: 4px; gap: 6px 16px; }
.lp-lnk { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: 14.5px; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.lp-lnk:hover { color: var(--ink); text-decoration-color: var(--ink); }
.lp-part-x { display: grid; gap: 10px; margin-top: 4px; }
.lp-compact ol.lp-steps > li { padding: 8px 12px; }
.lp-compact .lp-part-h h3 { font-size: 14.5px; }
/* the 13 dots in three parts (A · B · C): each part stays on one line, so a narrow row wraps only between parts */
.lp-mini { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.lp-mini-p { display: inline-flex; flex-wrap: nowrap; gap: 6px; }
.lp-mini-p > span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 12.5px/1 var(--mono); border: 1.5px solid var(--line); color: var(--ink-3); }
.lp-mini-p > span.done { background: var(--ok-tint); border-color: var(--ok); color: var(--ok); }
.lp-mini-p > span.now { border-color: var(--ink); color: var(--ink); }
@media (max-width: 420px) {
  .lp-mini { gap: 6px 10px; }
  .lp-mini-p { gap: 4px; }
  .lp-mini-p > span { width: 24px; height: 24px; font-size: 11.5px; }
}
.lp-nx .next-t { gap: 4px; }
.lp-nx .lp-mini { margin-top: 6px; }
.lp-nx .next-t .lp-ref, .lp-nx .next-t .lp-ref span { font-size: 13px; color: var(--ink-3); }
.lp-nx .next-t .lp-nx-more, .lp-nx .next-t .lp-nx-more span { font-size: 13.5px; }

/* how we recycle: the method card (WS.methodCard) */
.lp-mt { display: grid; gap: 16px; }
.lp-mt-lead b { font-weight: 600; }
.lp-mt-s { display: grid; gap: 6px; }
.lp-mt-s h3 { font: 600 14px/1.3 var(--sans); color: var(--ink-2); margin: 0; }
.lp-mt-s p { max-width: 72ch; }
.lp-mt-f { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 72ch; }
ol.lp-mt-g { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
ol.lp-mt-g li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
ol.lp-mt-g .lp-mt-n { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font: 600 11.5px/1 var(--mono); color: var(--ink-3); }
.lp-mt-l, .lp-mt-l ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lp-mt-l { gap: 10px; }
.lp-mt-l small { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.lp-mt-l a { display: inline-flex; min-height: 32px; align-items: center; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-3); overflow-wrap: anywhere; }
.lp-mt-l a:hover { text-decoration-color: var(--ink); }

/* forms */
.lp-cb { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.lp-cb input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
.fld.bad .lp-cb { border-color: var(--bad); }
.lp-read .inline { gap: 8px 12px; }
.lp-ids-in { font-family: var(--mono); font-size: 14.5px !important; }
.lp-live { font-weight: 600; color: var(--ink-2); }
.lp-grid3 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.lp-gh { font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.lp-spec { gap: 6px; }
.lp-spec-l { color: var(--ink-2); font-size: 14.5px; }
.lp-file input[type=file] { min-height: 44px; font-size: 14.5px; color: var(--ink-2); }
.lp-props { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* lab results (add-only) */
.lp-res { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.lp-res li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 32px; }
.lp-tests { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lp-test { gap: 10px; }
.lp-test-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.lp-test-h time { margin-left: auto; color: var(--ink-3); font-size: 13.5px; }
ol.lp-adds { list-style: none; margin: 0; padding: 0 0 0 12px; display: grid; gap: 8px; border-left: 2px solid var(--line); }
ol.lp-adds small { color: var(--ink-3); font-size: 13px; }

/* the done panel's buttons: outline first, the white main button last */
.lp-done:focus { outline: none; }
.lp-done-act { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.lp-done .lp-hand { justify-content: center; }

/* the journey timeline */
ol.lp-tl { list-style: none; margin: 0; padding: 0; display: grid; }
.lp-tl-i { display: grid; grid-template-columns: 86px 18px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 14px; }
.lp-tl-i > time { color: var(--ink-3); font-size: 13.5px; text-align: right; padding-top: 1px; white-space: nowrap; }
.lp-tl-dot { position: relative; display: block; }
.lp-tl-dot::before { content: ""; position: absolute; left: 4px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); }
.lp-tl-dot::after { content: ""; position: absolute; left: 8px; top: 19px; bottom: -14px; width: 2px; background: var(--line); }
.lp-tl-i:last-child .lp-tl-dot::after { display: none; }
.lp-tl-b { display: grid; gap: 2px; min-width: 0; }
.lp-tl-b small { color: var(--ink-3); font-size: 13px; }
.lp-tl-b small .org { color: var(--ink-3); }
.lp-tl-i.lp-gA .lp-tl-dot::before, .lp-tl-i.lp-gB .lp-tl-dot::before { background: var(--ok); }
.lp-tl-i.lp-gC .lp-tl-dot::before { background: var(--wait); }
.lp-tl-i.lp-warn .lp-tl-dot::before { background: var(--bad); }
.lp-tl-more .lp-tl-dot::before { background: var(--line); }
.lp-tl-more details.more ol.lp-tl { margin: 12px 14px; }

/* the RFID garment record */
.lp-find-r { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-find-r input { flex: 1 1 220px; font-family: var(--mono); }
.lp-find-r .bw { flex: 0 0 auto; }
.lp-scan { gap: 6px 12px; }
ol.lp-sum { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
ol.lp-sum li { position: relative; display: grid; gap: 2px; justify-items: center; text-align: center; padding: 12px 10px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3); }
ol.lp-sum li.done { color: var(--ink); border-color: var(--line); }
ol.lp-sum li b { font-weight: 700; }
ol.lp-sum .lp-sum-d { font-size: 13.5px; color: var(--ink-2); }
ol.lp-sum li + li::before { content: "→"; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.lp-lane { gap: 8px; }
ol.lp-lane-s { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
ol.lp-lane-s li { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
ol.lp-lane-s li.done { color: var(--ok); border-color: var(--ok); }
ol.lp-lane-s li.now { color: var(--ink); border-color: var(--ink); font-weight: 600; }
ol.lp-lane-s li.bad { color: var(--bad); border-color: var(--bad); }
.lp-follow p, .lp-lanes + .card p { color: var(--ink-2); }

/* phones */
@media (max-width: 860px) {
  .lp-ws-r, .lp-res { grid-template-columns: minmax(0, 1fr); }
  ol.lp-sum { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  ol.lp-sum li + li::before { content: "↓"; left: 50%; top: -16px; transform: translateX(-50%); }
  .lp-tl-i { grid-template-columns: 64px 18px minmax(0, 1fr); gap: 8px; }
  /* long Approve / hand-over labels wrap instead of running off the screen (same as the done panel's buttons below) */
  .b[data-act^="lp-"] { white-space: normal; text-align: center; line-height: 1.3; padding-top: 8px; padding-bottom: 8px; }
  ol.lp-steps > li { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
  ol.lp-steps .n { width: 28px; height: 28px; }
  .lp-part-h small { margin-left: 38px; flex-basis: 100%; }
  .lp-nx { grid-template-columns: auto minmax(0, 1fr); }
  .lp-nx > .b, .lp-nx > .bw { grid-column: 1 / -1; justify-self: start; }
  .lp-grid3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 80px; }
  /* long status words wrap instead of pushing the page sideways at 390 px (same as .ro-rows) */
  .lp-rows .row-side { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
  .lp-rows .chip { white-space: normal; }
}
/* phones: the done panel's buttons take the full width and long labels wrap (same as .hm-done-acts) */
@media (max-width: 560px) {
  .lp-done-act { width: 100%; }
  .lp-done-act > .b, .lp-done-act > .bw { flex: 1 1 100%; }
  .lp-done-act .b { white-space: normal; text-align: center; }
}
