/* Food Business Portal: orders pages (Food Business Portal design, Oct 2026): Orders and tracking, order detail, track,
   lists, problems and refunds, recalls, approvals, sourcing and Spend and food cost. Scoped to body.fb and the fo-
   classes the fb/ order views use; colours only from the toned tokens. */

/* Page header extras and tabs */
/* app.css (shared with the shop pages) also has a .ph product-photo placeholder; undo it for the page header here. */
body.fb .fo > .ph { width: auto; height: auto; background: none; font-size: inherit; color: inherit; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
body.fb .fo .ph-a form { margin: 0; }
body.fb .fo-tabs { display: inline-flex; max-width: 100%; margin: 0 0 16px; }
body.fb .fo-tabs .ct, body.fb .fo .ct { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--shell2); color: var(--ink);
  font-size: 11.5px; font-weight: 700; text-align: center; }
body.fb .fo-tabs a.on .ct { background: var(--seashell); }
body.fb .fo .kpis { margin: 0 0 16px; }
body.fb .fo .kpi .v.fo-kv { font-size: 20px; }
body.fb .fo .kpi .v .pill { font-size: 13px; line-height: 1.3; align-self: flex-start; letter-spacing: 0; }
body.fb .fo .pill { white-space: nowrap; }
body.fb .fo details > summary { list-style: none; cursor: pointer; }
body.fb .fo details > summary::-webkit-details-marker { display: none; }
body.fb .fo .fo-part details > summary::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s var(--ease); }
body.fb .fo .fo-part details[open] > summary::before { transform: rotate(45deg); }
body.fb .fo > .card, body.fb .fo > section, body.fb .fo > form.card { margin-bottom: 16px; }
body.fb .fo .card-h h2 { font-size: 19px; }
body.fb .fo .card-h .hint { font-size: 13px; }
body.fb .fo h2.fo-h2 { margin: 6px 0 10px; font-size: 20px; }

/* Find orders: one row of fields over the table */
body.fb .fo-find { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 14px; }
body.fb .fo-find > div { display: flex; flex-direction: column; gap: 4px; flex: 1 1 150px; min-width: 0; }
body.fb .fo-find > div.fo-q { flex: 2 1 240px; }
body.fb .fo-find label { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
body.fb .fo-find input, body.fb .fo-find select { min-height: 40px; }
body.fb .fo-find .fo-go { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 10px; }

/* Tables (the design's .tbl): mono uppercase heads on a shell band, hairline rows */
body.fb .fo-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
body.fb .fo-tbl th { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-align: left;
  padding: 11px 10px; background: var(--shell2); white-space: nowrap; border: 0; }
body.fb .fo-tbl th:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); padding-left: 14px; }
body.fb .fo-tbl th:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; padding-right: 14px; }
body.fb .fo-tbl td { padding: 11px 10px; border: 0; border-bottom: 1px solid var(--hair); vertical-align: middle; background: none; }
body.fb .fo-tbl td:first-child { padding-left: 14px; }
body.fb .fo-tbl td:last-child { padding-right: 14px; }
body.fb .fo-tbl tbody tr:last-child td { border-bottom: 0; }
body.fb .fo-tbl tbody tr:hover td { background: var(--seashell); }
body.fb .fo-tbl .r, body.fb .fo-tbl .num { text-align: right; }
body.fb .fo-tbl td.num { white-space: nowrap; }
body.fb .fo-tbl a.fo-pn, body.fb .fo a.fo-pn { font-weight: 700; color: var(--ink); }
body.fb .fo-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
body.fb .fo-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
body.fb .fo-acts form { margin: 0; }
body.fb .fo-row { min-height: 34px; padding: 0 14px; font-size: 13px; display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
body.fb .fo .pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 0; }
body.fb .fo .pager a, body.fb .fo .pager span[aria-current] { display: inline-flex; min-width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 999px;
  border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); }
body.fb .fo .pager span[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--seashell); font-weight: 700; }
body.fb .fo-foot { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* One supplier's part of an order (the design's tracking panel) */
body.fb .fo-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; margin: 0 0 16px; }
body.fb .fo-part { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); margin: 0 0 14px; }
body.fb .fo-parts .fo-part { margin: 0; }
body.fb .fo-part.live { border: var(--bw) solid var(--ink); }
body.fb .fo-part.done { border-color: var(--line); }
body.fb .fo-part p { margin: 0; }
body.fb .fo-part-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -14px -14px 2px; padding: 10px 14px; border-radius: 12px 12px 0 0; background: var(--seashell); }
body.fb .fo-part-h h2, body.fb .fo-part-h h3 { margin: 0; font-size: 17px; display: inline-flex; align-items: center; gap: 8px; }
body.fb .fo-part-m { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
body.fb .fo-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--teal); }
body.fb .fo-part.done .fo-dot { background: var(--green); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--green); }
body.fb .fo-part.off .fo-dot { background: var(--line); box-shadow: none; }
body.fb .fo-trk { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0; padding: 0; list-style: none; }
body.fb .fo-trk li { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
body.fb .fo-trk li::before { content: ""; display: block; height: 6px; border-radius: 999px; background: var(--shell2); }
body.fb .fo-trk li.on { color: var(--ink); font-weight: 600; }
body.fb .fo-trk li.on::before { background: var(--ink); }
body.fb .fo-trk.bad li.on:last-child::before { background: var(--pink); }
body.fb .fo-part details > summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; min-height: 32px; display: flex; align-items: center; }
body.fb .fo-tl { margin: 4px 0 0; padding: 0; list-style: none; }
body.fb .fo-tl li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--hair); font-size: 13px; }
body.fb .fo-tl li:first-child { border-top: 0; }
body.fb .fo-tl li span { color: var(--muted); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
body.fb .fo-part .fo-acts { justify-content: flex-start; }
body.fb .fo-sum { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--hair); padding-top: 8px; }

/* Lines inside a part */
body.fb .fo-lines { display: flex; flex-direction: column; }
body.fb .fo-line { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 9px 4px; border-top: 1px solid var(--hair); }
body.fb .fo-line:first-child { border-top: 0; }
body.fb .fo-line > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.fb .fo-line b { font-weight: 600; }
body.fb .fo-line.gone b { color: var(--muted); text-decoration: line-through; }
body.fb .fo-line form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 0; }
body.fb .fo-line .fo-l-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
body.fb .fo-line input[name=qty] { width: 74px !important; min-height: 34px; }
body.fb .fo-warn { color: var(--att-fg); font-weight: 600; font-size: 13px; }
body.fb .fo-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--hair); }
body.fb .fo-add > div { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; }
body.fb .fo-add > div.fo-aq { flex: 0 0 80px; }
body.fb .fo-add label { margin: 0; font-size: 12.5px; font-weight: 600; }
body.fb .fo-add input { min-height: 38px; }

/* Answers needed (new delivery date, substitute) */
body.fb .fo-ask { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: var(--bw) solid var(--pink); border-radius: var(--r); background: #fff; margin: 0 0 14px; box-shadow: 3px 3px 0 var(--pink); }
body.fb .fo-ask h2 { margin: 0; font-size: 17px; }
body.fb .fo-ask p { margin: 0; }
body.fb .fo-ask form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 0; }

/* Order detail header actions and total */
body.fb .fo-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
body.fb .fo-bar form { margin: 0; }
body.fb .fo-bar details { position: relative; }
body.fb .fo-bar details > summary { list-style: none; cursor: pointer; }
body.fb .fo-bar details > summary::-webkit-details-marker { display: none; }
body.fb .fo-bar details[open] > form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
body.fb .fo-bar details[open] input { width: auto !important; min-height: 40px; }
body.fb .fo-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
body.fb .fo-total .fo-big { font-family: var(--display); font-size: 26px; font-weight: 700; margin: 0; }
body.fb .fo-total p { margin: 0; }
body.fb .fo-cols { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 16px; align-items: start; }
body.fb .fo-cols > div > section, body.fb .fo-cols > div > .card { margin-bottom: 16px; }
@media (max-width: 1100px) { body.fb .fo-cols { grid-template-columns: 1fr; } }
body.fb .fo-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; }
body.fb .fo-dl dt { color: var(--muted); font-weight: 500; }
body.fb .fo-dl dd { margin: 0; }

/* Option cards (radio choices: what went wrong) */
body.fb .fo-fs { border: 0; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
body.fb .fo-fs > legend { font-family: var(--display); font-weight: 700; font-size: 16px; margin: 0 0 6px; padding: 0; float: none; width: auto; }
body.fb .fo-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
body.fb .fo-po { display: flex; gap: 10px; align-items: center; margin: 0; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 600; }
body.fb .fo-po:has(input:checked) { border: var(--bw) solid var(--ink); box-shadow: var(--sh-pri); }
body.fb .fo-po input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex: none; }
body.fb .fo-form label { font-weight: 600; }
body.fb .fo-form textarea, body.fb .fo-form input[type=text], body.fb .fo-form input[type=file] { width: 100%; }
body.fb .fo-form .fo-fs input[type=number] { width: 96px !important; min-height: 36px; }
body.fb .fo-why { color: var(--pink-d); font-weight: 600; margin: 4px 0 0; }

/* Problems and refunds: deliveries to check, case progress */
body.fb .fo-cdl { display: flex; flex-direction: column; gap: 8px; }
body.fb .fo-cdr { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--seashell); }
body.fb .fo-cdr > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.fb .fo-cdr b.fo-sn { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 700px) { body.fb .fo-cdr { grid-template-columns: 1fr; } }
body.fb .fo-cpg { display: inline-flex; gap: 3px; margin-right: 8px; vertical-align: middle; }
body.fb .fo-cpg i { width: 16px; height: 6px; border-radius: 3px; background: var(--shell3); }
body.fb .fo-cpg i.on { background: var(--ink); }

/* Lists */
body.fb .fo-new { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
body.fb .fo-new > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
body.fb .fo-new label { margin: 0; font-weight: 600; font-size: 13px; }
body.fb .fo-new input { min-height: 42px; }
body.fb .fo-li-q { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
body.fb .fo-li-q input[name=qty] { width: 76px !important; flex: none; min-height: 36px; }
body.fb .fo-li-q input[name=note] { flex: 1 1 120px; width: auto !important; min-width: 0; min-height: 36px; }
body.fb .fo-li-m { display: flex; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; align-items: center; }
body.fb .fo-li-m form { margin: 0; }
body.fb .fo-li-m button.secondary { min-height: 34px; min-width: 34px; padding: 0 8px; }
body.fb .fo-li-no { color: var(--pink-d); font-weight: 600; font-size: 12.5px; }

/* Recall */
body.fb .fo .callout { margin: 0 0 16px; }
body.fb .fo-ack { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
body.fb .fo-ack p { margin: 0; }
body.fb .fo-rl { list-style: none; margin: 0; padding: 0; }
body.fb .fo-rl li > a, body.fb .fo-rl li > div { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-top: 1px solid var(--hair); text-decoration: none; color: var(--ink); }
body.fb .fo-rl li:first-child > a, body.fb .fo-rl li:first-child > div { border-top: 0; }
body.fb .fo-rl li a:hover { background: var(--seashell); }
body.fb .fo-rl .fo-rl-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

/* Approvals */
body.fb .fo-appr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px 20px; align-items: end; padding: 14px 0; border-top: 1px solid var(--hair); }
body.fb .fo-appr:first-of-type { border-top: 0; padding-top: 0; }
body.fb .fo-appr p { margin: 0; }
body.fb .fo-appr form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
body.fb .fo-appr form > div { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; }
body.fb .fo-appr label { margin: 0; font-size: 12.5px; font-weight: 600; }
@media (max-width: 800px) { body.fb .fo-appr { grid-template-columns: 1fr; } }

/* Sourcing: the request form beside your requests */
body.fb .fo-form .fo-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0 14px; }

/* Spend and food cost: monthly bars */
body.fb .fo-bars { display: flex; align-items: flex-end; gap: 10px; height: 220px; padding: 26px 4px 0; border-bottom: 1.5px solid var(--line); }
body.fb .fo-bar-c { flex: 1 1 0; min-width: 28px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
body.fb .fo-bar-c i { position: relative; display: block; width: 100%; max-width: 64px; min-height: 2px; border-radius: 8px 8px 0 0; background: #5b5b5b; }
body.fb .fo-bar-c:last-child i { background: var(--pink); }
body.fb .fo-bar-c i b { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; white-space: nowrap; font-style: normal; }
body.fb .fo-bars-x { display: flex; gap: 10px; padding: 6px 4px 0; }
body.fb .fo-bars-x span { flex: 1 1 0; min-width: 28px; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }
body.fb .fo-share { display: block; height: 8px; min-width: 2px; border-radius: 999px; background: var(--teal); }
body.fb .fo-period { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
body.fb .fo-period > div { display: flex; flex-direction: column; gap: 2px; }
body.fb .fo-period label { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
body.fb .fo-period input { min-height: 40px; width: auto !important; }

/* Filter buttons on a segmented control (shown by fb-orders.js) */
body.fb .fo [hidden] { display: none !important; }
body.fb .fo .seg button { padding: 6px 14px; border: 0; border-radius: 999px; background: none; color: var(--ink); font-weight: 700; font-size: 13px; min-height: 32px; box-shadow: none; }
body.fb .fo .seg button:hover { background: var(--seashell); color: var(--ink); }
body.fb .fo .seg button.on { background: var(--ink); color: var(--seashell); }
body.fb .fo .seg button.on .ct { background: var(--seashell); }

/* toned.css also has an .att attention card (later in the file than .pill), which turns "pill att" into a padded box;
   keep it a pill on these pages. */
body.fb .fo .pill.att { display: inline-flex; flex-direction: row; gap: 0; padding: 3px 10px; border-radius: 999px; min-width: 0; }
body.fb .fo .seg a { text-transform: none; letter-spacing: 0; font-style: normal; }

/* Lists and favourites (Food Business Portal design, Orders--lists) */
body.fb .fbl .ph-a { display: flex; gap: 8px; align-items: flex-start; }
body.fb .fbl-new { position: relative; }
body.fb .fbl-new > summary { list-style: none; cursor: pointer; }
body.fb .fbl-new > summary::-webkit-details-marker { display: none; }
body.fb .fbl-new-f { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 300px; display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #fff; border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: var(--sh-pop); }
body.fb .fbl-new-f label { margin: 0; font-weight: 700; font-size: 13px; }
body.fb .fbl .kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
body.fb .fbl a.kpi { color: var(--ink) !important; text-decoration: none; }
body.fb .fbl-dots { display: inline-flex; margin-right: 6px; vertical-align: middle; }
body.fb .fbl-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; margin-left: -4px; box-shadow: 0 0 0 1px var(--line); }
body.fb .fbl-dots i:first-child { margin-left: 0; }
body.fb .fbl-sn { font-size: 13px; }
body.fb .fbl-tbl td { vertical-align: middle; }

/* Track deliveries, grouped by order (Food Business Portal design, Orders--orders "Track") */
body.fb .fbt-order { margin: 0 0 14px; padding: 16px !important; }
body.fb .fbt-oh { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
body.fb .fbt-oh h3 { margin: 0; font-size: 17px; }
body.fb .fbt-oh .btn { margin-left: auto; }
body.fb .fbt-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
body.fb .fbt-part { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
body.fb .fbt-part:not(.done) { border-color: var(--ink); }
body.fb .fbt-ph { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -14px -14px 0; padding: 10px 14px; border-radius: 12px 12px 0 0; background: #DDF6F6; }
body.fb .fbt-part.done .fbt-ph { background: var(--shell2); }
body.fb .fbt-ph h4 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 6px; }
body.fb .fbt-sub { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
body.fb .fbt-proof { margin: 0; font-size: 13px; }
body.fb .fbt-lines ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
body.fb .fbt-lines li { padding: 8px 10px; border: 1px solid var(--hair); border-radius: 10px; }
body.fb .fbt-lines li b { display: block; font-size: 13.5px; }
body.fb .fbt-lines .hint { font-size: 12px; }
