/* Procurement: current lot stages, next actions, and the evidence behind them. */
.procurement-workspace { --procurement-soft:color-mix(in srgb,var(--surface) 94%,var(--brand) 6%); min-width:0; }
.procurement-workspace .procurement-icon { width:20px; height:20px; flex:none; }
.procurement-workspace :is(button,a,summary):focus-visible { outline:3px solid var(--brand); outline-offset:3px; }
.procurement-workspace h2,.procurement-workspace h3 { font-family:var(--sans); }
.procurement-section-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; }
.procurement-section-head h2 { margin:5px 0 0; font-size:20px; font-weight:600; letter-spacing:-.5px; }
.procurement-eyebrow { font-size:12px; font-weight:600; letter-spacing:.1em; color:var(--text-3); }
.procurement-section-head > span { font-size:12px; color:var(--text-3); }
.procurement-pipeline { margin-bottom:30px; }
.procurement-stages { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:10px; }
.procurement-stage { display:flex; flex-direction:column; align-items:stretch; gap:15px; min-width:0; padding:17px 16px; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--text); font-family:var(--sans); text-align:left; cursor:pointer; transition:border-color .15s,background .15s; }
.procurement-stage:hover { border-color:var(--brand); }
.procurement-stage[aria-pressed=true] { border-color:var(--brand); background:var(--procurement-soft); box-shadow:inset 0 -3px var(--brand); }
.procurement-stage-top { display:flex; align-items:center; justify-content:space-between; color:var(--text-3); gap:10px; font-size:12px; }
.procurement-stage-top .procurement-icon { color:var(--brand); width:19px; height:19px; }
.procurement-stage strong { font-size:29px; line-height:1; font-weight:550; letter-spacing:-1px; font-variant-numeric:tabular-nums; }
.procurement-stage-name { font-size:12px; font-weight:550; }
/* The stages read as one flow: a chevron between each pair, and a bar for
   each stage's share of the lots in the flow. An empty stage dims its
   count and draws no bar. */
.procurement-stage { position:relative; }
.procurement-stage + .procurement-stage::before { content:""; position:absolute; left:-7px; top:50%; width:5px; height:5px; border-top:1.5px solid var(--text-3); border-right:1.5px solid var(--text-3); transform:translate(-1px,-50%) rotate(45deg); pointer-events:none; }
.procurement-stage-none strong { color:var(--text-3); }
.procurement-stage-share { display:block; height:4px; margin-top:-7px; border-radius:2px; background:var(--line); overflow:hidden; }
.procurement-stage-share i { display:block; height:100%; border-radius:2px; background:var(--brand); }
.procurement-stage:active { transform:translateY(1px); }
@media (prefers-reduced-motion: reduce) { .procurement-stage:active { transform:none; } }
.procurement-register { min-width:0; }
.procurement-register-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; }
.procurement-register-heading h2 { display:flex; align-items:center; gap:10px; margin:0; font-size:21px; letter-spacing:-.5px; font-weight:600; }
.procurement-register-heading h2 > span { display:inline-grid; place-items:center; min-width:25px; height:25px; padding:0 7px; border-radius:7px; color:var(--brand); background:var(--procurement-soft); font-size:12px; letter-spacing:0; }
.procurement-register-heading p { color:var(--text-3); font-size:12px; margin:5px 0 0; }
.procurement-layout { display:flex; gap:3px; padding:4px; border:1px solid var(--line); border-radius:9px; background:var(--surface); flex:none; }
.procurement-layout button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:33px; padding:7px 10px; border:0; border-radius:6px; background:transparent; color:var(--text-3); font:500 12px var(--sans); cursor:pointer; }
.procurement-layout button[aria-pressed=true] { background:var(--procurement-soft); color:var(--brand); }
.procurement-layout .procurement-icon { width:16px; height:16px; }
.procurement-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); margin-bottom:22px; }
.procurement-search { display:flex; align-items:center; gap:9px; flex:1 1 260px; min-width:210px; padding:0 12px; border:1px solid var(--line-strong); border-radius:8px; background:var(--field); color:var(--text-3); }
.procurement-search .procurement-icon { width:17px; height:17px; }
.workspace .procurement-search input { width:100%; min-width:0; padding:10px 0; background:transparent; border:0; border-radius:0!important; box-shadow:none; font-size:12px; }
.procurement-search:focus-within { outline:2px solid var(--brand); outline-offset:2px; }
.workspace .procurement-search input:focus { outline:none; }
.procurement-filters { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.procurement-workspace .procurement-filters .fb-chip { display:flex; align-items:center; gap:7px; min-height:36px; padding:8px 10px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--text-2); font:500 12px var(--sans); cursor:pointer; }
.procurement-workspace .procurement-filters .fb-chip:hover { background:var(--surface-2); }
.procurement-workspace .procurement-filters .fb-chip[aria-pressed=true] { color:var(--brand); background:var(--procurement-soft); border-color:var(--line-strong); }
.procurement-filters .fb-chip > span { font-variant-numeric:tabular-nums; color:var(--text-3); }
.procurement-result-count { width:100%; font-size:12px; color:var(--text-3); }
.procurement-visit-filters { position:relative; margin:0; padding:0; border:0; background:none; }
.procurement-visit-filters > summary { padding:8px 10px; min-height:36px; font-size:12px; color:var(--text-2); cursor:pointer; }
.procurement-visit-filters > div { position:absolute; right:0; top:100%; z-index:8; width:220px; padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:var(--e-2); }
.procurement-workspace .procurement-visit-filters .fb-chip { width:100%; }
.procurement-workspace #lots-list > .procurement-stage-group { margin:0 0 27px; padding:0; border:0; border-radius:0; background:transparent; }
.procurement-group-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 0 13px; }
.procurement-group-head h3 { display:flex; align-items:center; gap:9px; margin:0; font-size:14px; font-weight:600; }
.procurement-group-head h3 > span { color:var(--text-3); font-size:12px; font-weight:400; }
.procurement-group-head p { font-size:12px; color:var(--text-3); margin:0; }
.procurement-lot-grid { display:grid; gap:12px; }
.procurement-lot { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; column-gap:22px; padding:20px 20px 0; border:1px solid var(--line); border-radius:13px; background:var(--surface); min-width:0; }
.procurement-lot-main { min-width:0; display:flex; flex-direction:column; align-items:stretch; gap:12px; padding-bottom:16px; }
.procurement-lot-heading { display:flex; align-items:center; gap:12px; min-width:0; }
.procurement-crop-icon { width:38px; height:38px; border-radius:11px; background:var(--procurement-soft); color:var(--brand); display:grid; place-items:center; flex:none; }
.procurement-lot-heading > div { min-width:0; }
.procurement-lot-heading h3 { margin:0 0 4px; font-size:14px; line-height:1.45; font-weight:600; overflow-wrap:anywhere; }
.procurement-lot-heading h3 a { color:var(--text); text-decoration:none; }
.procurement-lot-heading h3 a:hover { color:var(--brand); text-decoration:underline; }
.procurement-lot-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; font-size:12px; color:var(--text-3); }
.procurement-ref { font-variant-numeric:tabular-nums; padding-left:10px; border-left:1px solid var(--line); overflow-wrap:anywhere; }
.procurement-lot-status { display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.procurement-lot-status:empty { display:none; }
.procurement-lot-status .tag { font-size:12px; }
.procurement-market { font-size:12px; color:var(--text-3); }
.procurement-figure-groups { display:flex; flex-wrap:wrap; gap:12px 32px; }
.procurement-figure-group { min-width:0; display:flex; flex-direction:column; gap:6px; }
.procurement-figure-head { margin:6px 0 2px; font-size:12px; font-weight:600; color:var(--text-2); }
.procurement-figure-group .procurement-figure-head { margin:0; }
.procurement-figures { display:flex; flex-wrap:wrap; gap:12px 26px; margin:0; }
.procurement-figures > div { min-width:0; }
.procurement-figures dt { color:var(--text-3); font-size:12px; margin:0 0 3px; }
.procurement-figures dd { margin:0; font-size:13px; font-weight:550; color:var(--text); overflow-wrap:anywhere; }
.procurement-next { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 9px; font-size:12px; }
.procurement-next > span:first-child { color:var(--text-3); }
.procurement-next > strong { font-weight:500; color:var(--text-2); }
.procurement-owner { color:var(--text-3); border-left:1px solid var(--line); padding-left:9px; }
.procurement-lot-actions { display:flex; align-items:center; justify-content:flex-end; padding-top:3px; min-width:0; }
.procurement-lot-actions .lot-acts { display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.procurement-lot-actions .ui-overflow-menu { min-width:205px; }
.procurement-record { grid-column:1 / -1; margin:0 -20px; padding:0; border:0; border-top:1px solid var(--line); border-radius:0; background:none; }
.procurement-record > summary { display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:39px; padding:10px 20px; font-size:12px; color:var(--text-3); cursor:pointer; list-style:none; }
.procurement-record > summary::-webkit-details-marker { display:none; }
.procurement-record[open] > summary { color:var(--brand); }
.procurement-record[open] > summary > span { transform:rotate(180deg); }
.procurement-record-body { display:flex; flex-direction:column; align-items:stretch; gap:12px; padding:4px 20px 18px; }
.procurement-record-date { font-size:12px; color:var(--text-3); margin:0; }
.procurement-record-body > .small { flex-wrap:wrap; }
.procurement-record-body .small { font-size:12px; }
.procurement-record-body p { margin-top:0; margin-bottom:0; }
.procurement-action-output { grid-column:1 / -1; padding:18px 0; border-top:1px solid var(--line); min-width:0; }
.procurement-action-output:empty { display:none; }
.procurement-action-output .card { margin-bottom:0; }
.procurement-workspace[data-layout=cards] .procurement-lot-grid { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
.procurement-workspace[data-layout=cards] .procurement-lot { grid-template-columns:minmax(0,1fr); }
.procurement-workspace[data-layout=cards] .procurement-lot-actions { justify-content:flex-start; padding:0 0 16px; }
.procurement-no-matches { padding:34px 20px; text-align:center; border:1px dashed var(--line-strong); border-radius:13px; margin-bottom:24px; }
.procurement-no-matches h3 { font-size:16px; margin:0 0 7px; }
.procurement-no-matches p { color:var(--text-3); font-size:13px; margin:0 0 16px; }
.procurement-operations { margin-top:40px; }
.procurement-operations > .procurement-section-head { margin-bottom:18px; }
.procurement-operations .card { box-shadow:none; }
.procurement-operations details.card > summary { list-style:none; cursor:pointer; }
.procurement-operations details.card > summary::-webkit-details-marker { display:none; }
.procurement-operations details.card > summary::after { content:"⌄"; color:var(--text-3); margin-left:auto; }
.procurement-operations details.card[open] > summary::after { transform:rotate(180deg); }
.procurement-operations .scroll { max-width:100%; }
.procurement-weekly { padding:0; border:1px solid var(--line); border-radius:12px; background:var(--surface); margin-top:12px; }
.procurement-weekly > summary { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; list-style:none; cursor:pointer; padding:17px 20px; font-size:13px; }
.procurement-weekly > summary::-webkit-details-marker { display:none; }
.procurement-weekly > summary > span { display:flex; align-items:center; gap:10px; }
.procurement-weekly > summary > span:last-child { color:var(--text-3); font-size:12px; }
.procurement-weekly-content { padding:0 20px 20px; }
.procurement-weekly-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.procurement-weekly-grid .ui-kpi { box-shadow:none; }
@media (max-width:1200px) {
  .procurement-stages { gap:7px; }
  .procurement-stage { padding:15px 12px; }
  .procurement-group-head { align-items:baseline; flex-wrap:wrap; gap:5px; }
  .procurement-lot { column-gap:16px; }
}
@media (max-width:900px) {
  .procurement-stages { gap:8px; }
  .procurement-stage { padding:14px 12px; }
  .procurement-lot-actions .lot-acts { max-width:220px; }
  .procurement-weekly-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:700px) {
  .procurement-stages { display:flex; overflow-x:auto; padding:3px 2px 10px; margin:0 -2px; scroll-snap-type:x proximity; }
  .procurement-stage { flex:0 0 115px; scroll-snap-align:start; min-height:135px; }
  .procurement-section-head > span { max-width:110px; text-align:right; }
  .procurement-register-heading { align-items:flex-start; }
  .procurement-register-heading h2 { font-size:20px; }
  .procurement-register-heading p { max-width:250px; }
  .procurement-layout button { min-width:38px; min-height:38px; padding:8px; }
  .procurement-layout button span { display:none; }
  .procurement-lot { grid-template-columns:minmax(0,1fr); padding:18px 18px 0; }
  .procurement-lot-actions { justify-content:flex-start; padding:0 0 16px; }
  .procurement-lot-actions .lot-acts { max-width:100%; }
  .procurement-workspace[data-layout=cards] .procurement-lot-grid { grid-template-columns:minmax(0,1fr); }
  .procurement-record { margin-left:-18px; margin-right:-18px; }
  .procurement-record > summary { min-height:44px; padding:12px 18px; }
  .procurement-record-body { padding-left:18px; padding-right:18px; }
  .procurement-toolbar { padding:13px; gap:12px; }
  .procurement-search { min-width:100%; }
  .procurement-workspace .procurement-filters .fb-chip { min-height:42px; padding:9px 10px; }
  .procurement-visit-filters > summary { min-height:42px; padding:11px 10px; }
  .procurement-visit-filters > div { left:0; right:auto; }
  .procurement-filters { gap:4px; }
  .procurement-read-warning { flex-wrap:wrap; }
  .procurement-read-warning > span { flex-basis:calc(100% - 40px); }
  .procurement-read-warning > button { margin-left:32px; }
}
@media (prefers-reduced-motion:reduce) { .procurement-stage { transition:none; } }

/* A lot's history as a step timeline: one dot per move on a rail, the
   newest at the top and filled, the earlier ones hollow. */
.lot-moves { list-style:none; margin:0; padding:0; }
.lot-move { position:relative; display:flex; gap:12px; padding:0 0 16px 22px; }
.lot-move:last-child { padding-bottom:0; }
.lot-move::before { content:""; position:absolute; left:5px; top:14px; bottom:-2px; border-left:2px solid var(--line-strong); }
.lot-move:last-child::before { display:none; }
.lot-move-dot { position:absolute; left:0; top:3px; width:12px; height:12px; box-sizing:border-box; border:2px solid var(--brand); border-radius:50%; background:var(--surface); }
.lot-move:first-child .lot-move-dot { background:var(--brand); }
.lot-move .what { display:flex; flex-direction:column; gap:3px; min-width:0; overflow-wrap:anywhere; }
.lot-move time { font-variant-numeric:tabular-nums; }
/* On a phone every filter and layout switch is a 44 px target. */
@media (max-width:600px) {
  .procurement-workspace .procurement-filters .fb-chip { min-height:44px; }
  .procurement-layout button { min-height:44px; min-width:44px; }
}
