/* after.css: the look of the after lane's screens (the Project screen, Final Measure And Release, The Job, Change Order, and the two customer screens).
   Tokens only, from shared/theme.css and quote-tokens.css. Every selector is under the lane's prefix, qa-. */

/* ---------- the shared page frame ---------- */
.qa-page{ padding:var(--space-3) 24px var(--space-5); max-width:1920px; margin:0 auto; }
.qa-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:var(--space-3); margin-bottom:var(--space-3); flex-wrap:wrap; }
.qa-head-actions{ flex-wrap:wrap; justify-content:flex-end; gap:var(--space-2); }
.qa-eyebrow{ font-size:12px; line-height:16px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); }
/* the page title takes the type token the customer page's h2 takes, one size on The Job, Change Order and Final Measure (the second audit, item 12) */
.qa-title{ margin:4px 0 0; font-size:var(--type-h2-size); line-height:var(--type-h2-lh); font-weight:650; letter-spacing:-.015em; }
.qa-title-sub{ font-size:16px; line-height:24px; font-weight:500; color:var(--text-muted); letter-spacing:0; }
.qa-sec-head{ display:flex; align-items:center; gap:var(--space-1); }
.qa-sec-line{ margin:4px 0 var(--space-2); color:var(--text-muted); }
.qa-locked{ max-width:720px; margin:96px auto; }
.qa-need{ color:var(--danger); min-height:18px; display:flex; align-items:center; gap:6px; margin:0; }
.qa-ok-line{ color:var(--ok); display:flex; align-items:center; gap:6px; margin:0; font-weight:600; }
.qa-dialog-lead{ margin:0 0 var(--space-2); }
.qa-dot{ width:4px; height:4px; border-radius:50%; background:currentColor; opacity:.5; display:inline-block; margin:0 10px; vertical-align:middle; }
.qa-ghost{ opacity:.5; cursor:not-allowed; }
.qa-off{ opacity:.6; }

/* ---------- the Project screen ---------- */
.qa-project{ position:relative; width:100%; min-height:560px; overflow:hidden; background:var(--surface-hi); isolation:isolate; }
.qa-project-still, .qa-project-live{ position:absolute; inset:0; }
.qa-project-still{ z-index:var(--layer-base); }
.qa-project-live{ z-index:var(--layer-step-1); opacity:0; transition:opacity 420ms ease; }
.qa-project[data-live="on"] .qa-project-live{ opacity:1; }
.qa-project-shade{ position:absolute; inset:auto 0 0 0; height:46%; z-index:var(--layer-step-2); pointer-events:none; background:linear-gradient(to top, color-mix(in srgb, var(--bg) 82%, transparent), transparent); }
.qa-glass{ background:color-mix(in srgb, var(--surface) 86%, transparent); border:1px solid color-mix(in srgb, var(--border) 80%, transparent); backdrop-filter:blur(14px) saturate(1.2); -webkit-backdrop-filter:blur(14px) saturate(1.2); box-shadow:var(--elev-2); }
.qa-project-card{ position:absolute; left:40px; bottom:40px; z-index:var(--layer-step-3); width:520px; padding:28px 32px 28px; border-radius:var(--radius-lg); }
.qa-project-eyebrow{ display:flex; align-items:center; font-size:12px; line-height:16px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); gap:0; flex-wrap:wrap; row-gap:8px; }
.qa-project-eyebrow .q-chip{ margin-left:12px; text-transform:none; letter-spacing:0; }
.qa-project-name{ margin:12px 0 4px; font-size:48px; line-height:52px; font-weight:680; letter-spacing:-.025em; }
.qa-project-facts{ margin:0; font-size:20px; line-height:28px; font-weight:600; display:flex; align-items:center; flex-wrap:wrap; }
.qa-project-facts .q-num{ margin-right:6px; }
.qa-project-who{ margin:6px 0 0; }
.qa-project-actions{ margin-top:24px; display:flex; flex-direction:column; align-items:flex-start; gap:14px; }
.qa-project-quote{ height:60px; min-width:220px; padding:0 30px; font-size:20px; border-radius:var(--radius-md); justify-content:space-between; box-shadow:var(--elev-2); }
.qa-project-all{ font-weight:500; color:var(--text-muted); }
.qa-project-all:hover{ color:var(--text); }
.qa-project-tools{ position:absolute; right:24px; top:24px; z-index:var(--layer-step-3); padding:12px 14px; border-radius:var(--radius-md); display:flex; flex-direction:column; gap:10px; align-items:flex-end; }
.qa-project-views{ display:flex; gap:8px; }
.qa-project-toolrow{ display:flex; align-items:center; gap:10px; }
.qa-project-switch{ display:inline-flex; align-items:center; gap:8px; font-weight:600; font-size:13px; cursor:pointer; }
.qa-project-hint{ position:absolute; right:24px; bottom:40px; z-index:var(--layer-step-3); padding:8px 14px; border-radius:var(--radius-pill); display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; }
.qa-project-hint-wait{ color:var(--text-muted); font-weight:500; padding-left:8px; border-left:1px solid var(--border); }
.qa-project[data-live="on"] .qa-project-hint-wait{ display:none; }
.qa-k3d-live canvas{ display:block; outline:none; }

/* ---------- Final Measure And Release ---------- */
.qa-fm-grid{ display:grid; grid-template-columns:minmax(0, 1fr) 560px; gap:var(--space-3); align-items:start; }
.qa-fm-left, .qa-fm-right, .qa-job-items, .qa-job-records, .qa-co-what, .qa-co-grid, .qa-co-statement{ padding:var(--space-3); }
.qa-fm-buttons{ display:flex; gap:var(--space-2); flex-wrap:wrap; margin-bottom:var(--space-2); }
.qa-fm-table td{ padding-top:10px; padding-bottom:10px; height:auto; }
.qa-fm-empty{ border:1px dashed var(--border); border-radius:var(--radius-md); min-height:188px; }
.qa-fm-reason{ margin-top:6px; }
.qa-diff{ display:flex; flex-direction:column; gap:6px; }
.qa-diff-line{ display:flex; align-items:center; gap:8px; }
.qa-diff-tag{ display:inline-flex; align-items:center; gap:4px; width:58px; flex:none; font-size:12px; font-weight:600; }
.qa-diff-tag-was{ color:var(--danger); }
.qa-diff-tag-now{ color:var(--ok); }
.qa-fm-running{ margin:var(--space-2) 0 0; padding:14px 16px; border-radius:var(--radius-sm); background:var(--surface-hi); border:1px solid var(--border); font-size:16px; line-height:26px; }
.qa-fm-band{ margin-top:var(--space-2); display:flex; align-items:center; gap:10px; }
.qa-fm-band > span{ flex:1 1 auto; }
.qa-fm-send{ margin-top:var(--space-3); padding-top:var(--space-2); border-top:1px solid var(--border); display:flex; align-items:center; gap:var(--space-2); flex-wrap:wrap; }
.qa-lights{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
/* a light is one card of a fixed least height: lamp, words, chip, and under the words what turns it on. On or waiting it stands as tall, so Start Job never moves. */
.qa-light{ display:grid; grid-template-columns:40px minmax(0, 1fr) auto; column-gap:14px; row-gap:8px; align-items:center; align-content:center; min-height:116px; padding:14px 16px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface); }
.qa-light-text{ min-width:0; }
.qa-light-acts{ grid-column:2 / -1; display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; }
.qa-light-link{ font-size:13px; line-height:18px; }
.qa-light[data-on="true"]{ border-color:var(--ok); background:var(--ok-soft); }
.qa-light-lamp{ width:40px; height:40px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center; background:var(--surface-hi); color:var(--text-muted); border:1px solid var(--border-strong); }
.qa-light[data-on="true"] .qa-light-lamp{ background:var(--ok); border-color:var(--ok); color:var(--surface); }
.qa-light-name{ font-size:16px; line-height:22px; font-weight:600; }
.qa-light-evidence{ margin-top:2px; }
.qa-rel-start{ margin-top:var(--space-3); padding-top:var(--space-2); border-top:1px solid var(--border); display:flex; flex-direction:column; gap:10px; align-items:stretch; }
.qa-rel-under{ min-height:44px; display:flex; flex-direction:column; gap:4px; }
.qa-rel-under p{ margin:0; }
.qa-rel-next{ display:flex; align-items:center; gap:6px; font-weight:600; }
.qa-makes{ margin:0; padding-left:20px; display:flex; flex-direction:column; gap:10px; }
/* a measured difference still open as a Change Order: under Start Job, in its dialog, and on a held purchase order line */
.qa-held-line{ margin:0; display:block; line-height:20px; }
.qa-held-line .q-icon{ vertical-align:-2px; }
.qa-held-under{ margin-top:6px; padding:10px 12px; border-radius:var(--radius-sm); background:var(--warn-soft); border:1px solid var(--warn); color:var(--accent-contrast); }
.qa-held-band{ margin-top:var(--space-2); display:block; }
.qa-po-held td{ color:var(--text-muted); }
.qa-po-hold{ display:flex; align-items:center; gap:8px; margin-top:4px; flex-wrap:wrap; }

/* ---------- The Job ---------- */
.qa-job-grid{ display:grid; grid-template-columns:minmax(0, 46fr) minmax(0, 54fr); gap:var(--space-3); align-items:start; }
.qa-stage{ cursor:pointer; }
.qa-stage[aria-disabled="true"]{ cursor:default; }
.qa-stage:hover{ border-color:var(--border-strong); }
.qa-removed td{ color:var(--text-muted); }
.qa-tabs{ display:flex; gap:4px; border-bottom:1px solid var(--border); margin:-4px 0 var(--space-2); }
.qa-tab{ height:40px; padding:0 16px; border:0; background:transparent; color:var(--text-muted); font:600 14px/20px var(--font); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; }
.qa-tab[aria-selected="true"]{ color:var(--text); border-bottom-color:var(--accent-deep); }
.qa-tab:focus-visible{ outline:2px solid var(--accent); outline-offset:-2px; }
.qa-tab-note{ margin-bottom:var(--space-1); gap:10px; }
.qa-po + .qa-po{ margin-top:var(--space-3); padding-top:var(--space-3); border-top:1px solid var(--border); }
.qa-po-total{ font:600 20px/24px var(--font-num); }
.qa-po-table{ margin-top:var(--space-1); }

/* ---------- Change Order, the shop's side ---------- */
.qa-co-layout{ display:grid; grid-template-columns:minmax(0, 1fr) 560px; gap:var(--space-3); align-items:start; }
.qa-co-main{ display:flex; flex-direction:column; gap:var(--space-3); min-width:0; }
.qa-co-toggles{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--space-2); }
.qa-co-toggle{ display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface); }
.qa-co-toggle[data-on="true"]{ border-color:var(--accent-deep); background:var(--accent-soft); }
.qa-co-warn{ display:flex; align-items:center; gap:10px; margin-bottom:var(--space-2); }
.qa-co-table td{ height:auto; padding-top:10px; padding-bottom:10px; }
.qa-co-item{ display:inline-flex; align-items:flex-start; gap:8px; }
.qa-co-item .q-icon{ margin-top:4px; }
.qa-co-reason{ min-width:220px; }
.qa-st-line{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-2); padding:9px 0; border-bottom:1px solid var(--border); }
.qa-st-line > span:first-child{ min-width:0; }
.qa-st-total{ font-size:16px; font-weight:600; padding:14px 0; }
.qa-st-pair{ display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.qa-st-group{ margin-top:var(--space-2); }
.qa-st-fields{ margin-top:var(--space-2); display:grid; grid-template-columns:1fr 1fr; gap:var(--space-2); align-items:end; }
.qa-st-fields .qa-st-line{ border:1px solid var(--border); border-radius:var(--radius-sm); padding:0 12px; height:36px; margin-bottom:22px; }
.qa-st-shop, .qa-st-waive{ margin-top:var(--space-2); padding:12px 14px 4px; border-radius:var(--radius-md); border:1px solid var(--border); background:var(--surface-hi); }
.qa-st-shop .qa-st-line:last-child, .qa-st-waive .qa-st-line:last-child{ border-bottom:0; }
.qa-st-shop-head{ gap:8px; margin-bottom:4px; }
.qa-st-waive{ border-style:dashed; background:transparent; }
.qa-st-action{ margin-top:var(--space-3); display:flex; flex-direction:column; align-items:stretch; }

/* ---------- the customer's two screens (light paper) ---------- */
.qa-c{ max-width:1440px; margin:0 auto; padding:40px 48px 72px; font-size:16px; line-height:26px; }
.qa-c-head{ margin-bottom:var(--space-3); }
.qa-c-eyebrow{ font-size:13px; line-height:18px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); }
.qa-c-title{ margin:6px 0 0; font-size:40px; line-height:48px; font-weight:680; letter-spacing:-.02em; }
.qa-c-sub{ margin:8px 0 0; font-size:18px; line-height:28px; color:var(--text-muted); max-width:760px; }
.qa-c-grid{ display:grid; grid-template-columns:minmax(0, 1fr) 440px; gap:var(--space-3); align-items:start; }
.qa-c-grid-even{ grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); margin-top:var(--space-3); }
.qa-c-side{ display:flex; flex-direction:column; gap:var(--space-3); }
.qa-c-card{ padding:var(--space-3); }
.qa-c-card > .q-h-lg{ margin-bottom:var(--space-2); }
.qa-c-chips{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:var(--space-2); }
.qa-c-chips .q-chip{ height:32px; padding:0 14px; font-size:14px; }
/* The count on a drawing's chip and the number beside each adjustment are the same mark the drawing itself carries: a true circle, dark with its number, ringed in the field adjustment color.
   The customer page gives every figure a reserved width (customer.css, .qc .q-num), which stretched both into ovals and cut the number; a count in a circle is not a money figure, so that width is put back here. */
.qa-c-count{ display:inline-flex; align-items:center; justify-content:center; flex:none; width:20px; min-width:20px; height:20px; padding:0; border-radius:50%; background:var(--text); color:var(--bg); box-shadow:0 0 0 2px var(--warn); font-size:12px; line-height:1; font-weight:700; text-align:center; }
.qa-c-chips .qa-c-count.q-num{ display:inline-flex; width:20px; min-width:20px; margin-left:4px; }
.qa-c-stage{ min-height:520px; display:flex; flex-direction:column; align-items:center; justify-content:center; background:var(--surface-hi); border-radius:var(--radius-md); overflow:hidden; }
/* the measured run beside the drawn one, over the wall it was measured on; and the same pair beside its adjustment in the list */
.qa-c-measured{ align-self:stretch; display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 16px; border-bottom:1px solid var(--border); background:var(--surface); font-size:14px; }
.qa-c-measured .qa-c-pin{ margin:0; }
.qa-c-measured .qa-diff-tag{ width:auto; margin-left:6px; }
.qa-c-sizes{ display:inline-flex; align-items:center; gap:6px; margin-left:8px; font-size:14px; white-space:nowrap; }
.qa-c-swatch-open{ display:inline-flex; align-items:center; justify-content:center; border-style:dashed; color:var(--text-muted); background:transparent; }
.qa-c-drawing{ max-width:100%; }
.qa-c-drawing svg{ max-width:100%; height:auto; }
.qa-c-adjust{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.qa-c-adjust li{ display:flex; align-items:flex-start; gap:12px; }
.qa-c-pin{ width:26px; min-width:26px; height:26px; padding:0; border-radius:50%; flex:none; display:inline-flex; align-items:center; justify-content:center; background:var(--text); color:var(--bg); box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--warn); font-weight:700; font-size:13px; line-height:1; text-align:center; margin:4px 4px 0; }
.qa-c-adjust .qa-c-pin.q-num{ display:inline-flex; width:26px; min-width:26px; }
.qa-c-total{ margin-top:var(--space-2); padding-top:var(--space-2); border-top:1px solid var(--border); display:flex; align-items:center; gap:12px; flex-wrap:wrap; font-weight:600; }
.qa-c-total .q-num{ font-size:24px; line-height:32px; }
.qa-c-finishes{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.qa-c-finishes li{ display:flex; align-items:center; gap:12px; }
.qa-c-swatch{ width:44px; height:44px; border-radius:var(--radius-sm); border:1px solid var(--border-strong); flex:none; }
.qa-c-band{ display:flex; align-items:center; gap:10px; margin-bottom:var(--space-3); }
.qa-c-actions{ margin-top:var(--space-4); display:flex; align-items:center; gap:var(--space-2); flex-wrap:wrap; }
.qa-c-actions .q-btn-lg{ height:56px; padding:0 28px; font-size:18px; }
.qa-c-ba{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-3); }
.qa-c-fig{ margin:0; }
.qa-c-fig figcaption{ display:flex; align-items:center; gap:10px; margin-bottom:10px; font-size:14px; }
.qa-c-rows{ list-style:none; margin:0; padding:0; }
.qa-c-row{ display:flex; align-items:flex-start; gap:12px; padding:12px 0; border-bottom:1px solid var(--border); }
.qa-c-row:last-child{ border-bottom:0; }
.qa-c-note{ color:var(--text-muted); font-size:14px; display:inline-flex; align-items:center; gap:6px; margin-left:10px; }
.qa-c-fig .qa-c-drawing svg{ width:100%; height:auto; }
.qa-c-totals .qa-st-line:last-child{ border-bottom:0; }
/* a payment's old and new amount stay on one line, side by side; the words beside them take the wrap (the Final Payment's pair broke in two under its long event words) */
.qa-c-totals .qa-st-pair{ flex:none; flex-wrap:nowrap; white-space:nowrap; }
/* the band that closes a signed page stands clear of the cards above it */
.qa-c-grid + .qa-c-band{ margin-top:var(--space-3); }

/* ---------- ink on a soft fill ----------
   The soft fills of shared/theme.css stay light in both themes, so anything written on one takes the theme's dark ink token, never the page's text color. */
.qa-page .q-chip-ok, .qa-page .q-chip-warn, .qa-page .q-chip-danger, .qa-page .q-chip-accent, .qa-page .q-was, .qa-page .q-now, .qa-page .q-band,
.qa-page .q-seg button[aria-pressed="true"], .qa-page button.q-chip[aria-pressed="true"], .qa-project button.q-chip[aria-pressed="true"], .qa-project .q-seg button[aria-pressed="true"],
.qa-light[data-on="true"], .qa-co-toggle[data-on="true"]{ color:var(--accent-contrast); }
.qa-light[data-on="true"] .q-muted, .qa-co-toggle[data-on="true"] .q-muted{ color:var(--accent-contrast); opacity:.76; }
.qa-page .q-band .q-link{ color:var(--accent-contrast); }
/* a Figure Chip in a sentence: the figure in the number face with its dotted rule, and no button chrome */
.qa-page .q-fig, .qa-c .q-fig{ border:0; border-bottom:1px dotted var(--text-muted); background:none; color:inherit; font-size:inherit; line-height:inherit; font-weight:600; padding:0 2px; }
.qa-page .q-fig:hover{ border-bottom-style:solid; }
.qa-nowrap{ white-space:nowrap; }

@media (prefers-reduced-motion: reduce){
  .qa-project-live{ transition:none; }
}
