/* [2026-10-13, SPEC 169] THE PACKING-LIST CHECKS: the PL pill's orange state
   on the Orders row and the Packing list QC dialog's six checks with their
   photos. Linked by `_base.html` after due-overdue.css on every console page
   (srm.css is byte-pinned; nothing here touches it).

   ORANGE IS `--ag-prio-high` AND NOTHING ELSE: no new hue, no hex. The washes
   are that token mixed into the page ground (the `crm-aftersales.css`
   color-mix shape). Square corners except the pill shapes the app already
   draws round (`--radius-pill`). */

/* ---- the PL pill: same 44px, same shape, orange with a warning glyph ---- */
a.srm-doc.is-on.is-warn {
  color: var(--ag-prio-high);
  border-color: var(--ag-prio-high);
  background: color-mix(in srgb, var(--ag-prio-high) 12%, var(--bg-page));
}
a.srm-doc.is-on.is-warn:hover,
a.srm-doc.is-on.is-warn:active {
  color: var(--ag-prio-high);
  border-color: var(--ag-prio-high);
  background: color-mix(in srgb, var(--ag-prio-high) 20%, var(--bg-page));
}

/* ---- the six checks ---- */
.c169-checks { border: 1px solid var(--border-strong); margin: var(--sp-3) 0; }
.c169-ck {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: var(--sp-3); align-items: start;
  padding: var(--sp-3); border-bottom: 1px solid var(--border-soft);
}
.c169-ck.is-warn { background: color-mix(in srgb, var(--ag-prio-high) 8%, var(--bg-page)); }
.c169-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: 1px solid var(--border-strong);
  font-family: var(--ff-ui); font-size: var(--fs-2xs); color: var(--fg-2);
}
.c169-ck.is-warn .c169-num { border-color: var(--ag-prio-high); color: var(--ag-prio-high); }
.c169-body { min-width: 0; }
.c169-t {
  font-family: var(--ff-ui); font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--fg-1);
}
.c169-d { margin-top: var(--sp-1); font-size: var(--fs-sm); line-height: 1.45; color: var(--fg-1); }
.c169-flag { color: var(--ag-prio-high); }
.c169-tick { margin-top: var(--sp-2); }
.c169-badge {
  font-family: var(--ff-ui); font-size: var(--fs-2xs); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; white-space: nowrap; padding: 2px 9px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  color: var(--fg-2); background: var(--bg-section);
}
.c169-badge.is-ok { color: var(--ag-sage); background: var(--ag-sage-10); }
.c169-badge.is-you { color: var(--ag-pending-fg); background: var(--ag-pending-bg); }
.c169-badge.is-warn {
  color: var(--ag-prio-high); border-color: var(--ag-prio-high);
  background: color-mix(in srgb, var(--ag-prio-high) 14%, var(--bg-page));
}
.c169-foot { margin: 0; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); color: var(--fg-2); }

/* ---- photos: website + QC side by side; crates large; a click opens full size ---- */
.c169-photos { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.c169-ph { margin: 0; width: 150px; }
.c169-ph a { display: block; }
.c169-ph img {
  display: block; width: 100%; height: 112px; object-fit: cover;
  border: 1px solid var(--border-soft); background: var(--bg-section);
}
.c169-ph.is-web { width: 200px; }
.c169-ph.is-web img { height: 150px; object-fit: contain; }
.c169-photos.is-crates .c169-ph { width: calc(50% - var(--sp-2) / 2); max-width: 310px; }
.c169-ph.is-crate img { height: 232px; object-fit: contain; }
.c169-ph figcaption {
  margin-top: var(--sp-1); font-family: var(--ff-ui); font-size: var(--fs-2xs);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--fg-2);
}
.c169-nophoto {
  display: flex; align-items: center; justify-content: center; height: 150px;
  border: 1px dashed var(--border-strong); color: var(--fg-2); font-size: var(--fs-xs);
}
.c169-ph a:focus-visible img { outline: 2px solid var(--ag-sage); outline-offset: 2px; }

/* the Alata uppercase rule's Chinese carve-out, for this sheet's own labels */
:lang(zh) .c169-t, :lang(zh) .c169-badge, :lang(zh) .c169-ph figcaption {
  text-transform: none; letter-spacing: normal;
}

@media (max-width: 560px) {
  .c169-ck { grid-template-columns: 24px minmax(0, 1fr); }
  .c169-badge { grid-column: 2; justify-self: start; }
  .c169-ph.is-web, .c169-photos.is-crates .c169-ph { width: 100%; }
}

/* ---- Finance: BlueBull's bill against our rates ---- */
.c169-fee table { width: 100%; }
.c169-fee td.c169-num-cell, .c169-fee th.c169-num-cell { text-align: right; white-space: nowrap; }
.c169-fee tr.is-warn td { background: color-mix(in srgb, var(--ag-prio-high) 10%, var(--bg-page)); }
.srm-status.c169-feechip {
  color: var(--ag-prio-high); border: 1px solid var(--ag-prio-high);
  background: color-mix(in srgb, var(--ag-prio-high) 12%, var(--bg-page));
}

/* ---- [2026-10-15, SPEC 178] the delivery check: SPEC 169's rows, a head
   per section, the counter, and the order row's "still open" note (4A). ---- */
.dlv-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--border-soft);
  background: var(--bg-section);
}
.dlv-head .srm-label { margin: 0; color: var(--ag-sage); }
.dlv-warn { color: var(--ag-prio-high); }
.dlv-count { margin: 0; padding: var(--sp-2) var(--sp-3); }
.dlv-agent .srm-field, .dlv-agent .srm-check { margin: var(--sp-2) var(--sp-3); }
.dlv-agent .srm-warnbar { margin: var(--sp-2) var(--sp-3); }
.dlv-agent > .srm-stepline { display: block; margin: 0 var(--sp-3) var(--sp-3); }
/* [SPEC 271h part 2] on a phone the line's chip and Change press sit under its words, not in the 24px number column */
@media (max-width: 560px) {
  .dlv-check > .c169-ck > .dlv-side { grid-column: 2; flex-direction: row; justify-content: flex-start; align-items: center; flex-wrap: wrap; }
}
.dlv-agent > .srm-hint { margin: var(--sp-2) var(--sp-3) 0; }
.srm-kv .dlv-open-note {
  flex: 1 0 100%; padding: var(--sp-1) var(--sp-2);
  border: 1px solid var(--ag-pending-fg); background: var(--ag-pending-bg);
  color: var(--ag-pending-fg); font-size: var(--fs-xs); line-height: 1.4;
}
/* [2026-10-15, SPEC 178b] each line's Change at its bottom right (A's 9A),
   the line to look at again after a change (10A), step 3's plan brought into
   view (11A). */
.dlv-side {
  display: flex; flex-direction: column; justify-content: space-between;
  align-items: flex-end; gap: var(--sp-2); align-self: stretch;
}
.dlv-change { white-space: nowrap; }
.c169-ck.dlv-recheck { background: var(--ag-pending-bg); }
.dlv-recheck-note { color: var(--ag-pending-fg); font-weight: 600; }
.dlv-flash { outline: 2px solid var(--ag-pending-fg); outline-offset: 4px; }
