/* owner-quotes v4 — WS19-P P1 (+ Codex R1: desktop-only widths, the pinned column above the fade, the status pill wraps). v3's bytes are pinned.
   owner-quotes v3 — WS19-P P1: the register fits 1440 (compact cells, headers and names wrap); what still does not fit scrolls with the Code
   column pinned and the hidden edge faded (owner-quotes v5.js sets oq-more-r / oq-more-l). v2 below, unchanged. Tokens only. */
/* ===== Owner Quotes (WS10) — the owner's register of every quote. Visibility follows the one section list
   (body.view-<name>, app-shell SECTIONS); the strip and table reuse the Leaderboard's KPI and .qt vocabulary. */
body:not(.view-ownerquotes) #ownerquotessec{display:none !important}
body.view-ownerquotes #ownerquotessec{display:block !important}
body.view-ownerquotes #pending-banner,body.view-ownerquotes .onb{display:none !important}
/* WS15-C C2: the KPI strip's grid and card box are the one owner KPI rule (app-features v3), not a copy here */
#ownerquotessec .d-kpi .v{animation:none}
#ownerquotessec .d-kpi .v.neg,#ownerquotessec .qt td.neg{color:var(--danger)}
#ownerquotessec .qt th,#ownerquotessec .qt td{white-space:nowrap}
/* WS19-P P1: compact — tighter side padding, headers wrap (Distributor profit / Company cut / Invoice #), names wrap within a measure */
@media (min-width:768px){
  /* WS19-P P1 (Codex R1: the widths are the DESKTOP table's — phone cards keep their full-width label / value rows) */
  #ownerquotessec .oq-t th,#ownerquotessec .oq-t td{padding-left:var(--s2);padding-right:var(--s2)}
  #ownerquotessec .oq-t th{white-space:normal;vertical-align:bottom;line-height:var(--lh-ui)}
  #ownerquotessec .oq-t td[data-label="Distributor"],#ownerquotessec .oq-t td[data-label="Customer"]{white-space:normal;min-width:14ch;max-width:20ch;overflow-wrap:break-word}   /* words wrap; an address breaks only if it cannot fit */
  #ownerquotessec .oq-t td[data-label="Status"]{white-space:normal;min-width:10ch}
  #ownerquotessec .oq-t td[data-label="Status"] .qstat{white-space:normal}   /* "Pending approval" / "Paid · 1d ago" may take two lines (CI fonts are wider) */
  #ownerquotessec .oq-t .oq-note{width:auto;max-width:14ch}   /* "No cost recorded" (the why is its title) — never a 21ch column */
  #oq-rows{position:relative}
  /* the pinned Code column sits ABOVE the edge fade (Codex R1): body cells z 2, the fade z 1, the header corner z 4 (th are sticky-top z 3) */
  #ownerquotessec .oq-t thead th:first-child,#ownerquotessec .oq-t tbody td:first-child{position:sticky;left:0;z-index:2;background:var(--card)}
  #ownerquotessec .oq-t thead th:first-child{background:var(--band);z-index:4}
  #oq-rows.oq-more-r::after,#oq-rows.oq-more-l::before{content:'';position:absolute;top:0;bottom:0;width:56px;pointer-events:none;z-index:1}
  #oq-rows.oq-more-r::after{right:0;background:linear-gradient(to left,var(--card) 20%,transparent);box-shadow:inset -1px 0 0 var(--line)}
  #oq-rows.oq-more-l::before{left:0;background:linear-gradient(to right,color-mix(in srgb,var(--card) 60%,transparent),transparent)}
}
#ownerquotessec .qt td[data-label]::before{font-size:var(--fs-fine)}
/* the expiry reads as the flag: red once expired, the warning hue inside the seven-day window */
#ownerquotessec tr[data-expired="1"] .oq-exp{color:var(--danger);font-weight:var(--fw-bold)}   /* WS15-C C2: the system's bold (500), not 600 */
#ownerquotessec tr[data-sev="warn"] .oq-exp{color:var(--c-warn)}
/* WS10: a quote without a recorded PQB cost (it predates cost-plus) says so under its dash; the strip's footnote counts them */
#ownerquotessec .oq-note{display:block;width:21ch;margin-left:auto;font-size:var(--fs-fine);line-height:var(--lh-text);color:var(--muted);font-weight:400;white-space:normal;text-align:right}
#ownerquotessec .oq-foot{margin:calc(var(--s2) * -1) 0 var(--panel-gap);font-size:var(--fs-fine);color:var(--muted)}
