/* WORK-603 — TTB Line 17b physical inventory worksheet.
 *
 * All styling for ttb-physical-inventory.js lives here as classes: the
 * WORK-283 Track B CSP gate forbids inline `style="…"` attributes in shipped
 * static files (CSP nonces cannot cover style attributes; the policy sets
 * `style-src-attr 'none'`). Web Awesome color tokens use the two-digit tint
 * scale (05,10,…,95), never Tailwind-style 100–900, and `brand` not `primary`.
 */

.tpi-mb16 { margin-bottom: 16px; }
.tpi-mb12 { margin-bottom: 12px; }
.tpi-h3 { margin: 0 0 10px; }
.tpi-h3-tight { margin: 0 0 8px; }
.tpi-h3-6 { margin: 0 0 6px; }
.tpi-m0 { margin: 0; }
.tpi-hint { margin: 6px 0 0; }
.tpi-hint-2 { margin: 4px 0 0; }
.tpi-hint-sm { margin: 4px 0 0; font-size: 12px; }
.tpi-hidden { display: none; }
.tpi-flex1 { flex: 1; }
.tpi-w100 { width: 100%; }
.tpi-nowrap { white-space: nowrap; }
.tpi-clickable { cursor: pointer; }
.tpi-fs13 { font-size: 13px; }

.tpi-header-meta { display: flex; gap: 12px; align-items: center; margin-top: 4px; }

/* Actions bar */
.tpi-actions { margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

/* D10 close-window notice */
.tpi-notice { border-left: 4px solid var(--wa-color-warning-40); margin-bottom: 16px; }
.tpi-notice-inner { display: flex; gap: 10px; align-items: flex-start; }
.tpi-notice-icon { color: var(--wa-color-warning-40); font-size: 20px; }

/* Eligibility */
.tpi-eligible {
  display: flex; gap: 8px; align-items: center;
  color: var(--wa-color-success-30);
  background: var(--wa-color-success-95);
  border: 1px solid var(--wa-color-success-80);
  border-radius: 6px; padding: 10px 12px;
}
.tpi-alert-body { margin: 6px 0 0; }

/* Conflict panel runbook */
.tpi-runbook { margin: 6px 0 12px 20px; padding: 0; }
.tpi-runbook li { margin-bottom: 4px; }
.tpi-runbook-body { margin: 6px 0; }

/* Line tables */
.tpi-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

/* Attested summary */
.tpi-attested { margin-bottom: 16px; border-left: 4px solid var(--wa-color-success-40); }
.tpi-attested-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }

/* Found-stock / 17a entry */
.tpi-fs { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--wa-color-neutral-80); }
.tpi-fs-grid-17a {
  display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr auto;
  gap: 8px; align-items: end; margin-top: 8px;
}
.tpi-fs-grid-17b {
  display: grid; grid-template-columns: 1.2fr 0.6fr 0.7fr 1.2fr auto;
  gap: 8px; align-items: end; margin-top: 8px;
}
.tpi-fs-zero { margin-top: 8px; }

/* Dialogs */
.tpi-dialog-w480 { --width: 480px; }
.tpi-dialog-w560 { --width: 560px; }
.tpi-dialog-w460 { --width: 460px; }
.tpi-dialog-w900 { --width: min(900px, calc(100vw - 32px)); }
.tpi-dialog-body-12 { display: flex; flex-direction: column; gap: 12px; }
.tpi-dialog-body-14 { display: flex; flex-direction: column; gap: 14px; }
.tpi-dialog-body-16 { display: flex; flex-direction: column; gap: 16px; }
.tpi-dialog-footer { display: flex; gap: 8px; justify-content: flex-end; }
.tpi-field-row { display: flex; gap: 12px; }

/* Attestation dialog */
.tpi-signer { padding: 8px 10px; background: var(--wa-color-neutral-90); border-radius: 6px; }
.tpi-decl {
  border: 1px solid var(--wa-color-neutral-80); border-radius: 6px;
  padding: 12px; background: var(--wa-color-neutral-50);
}
.tpi-decl-ver { font-size: 12px; margin-bottom: 6px; }
.tpi-decl-text { margin: 0; font-size: 13px; }
.tpi-accept { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.tpi-accept-box { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--wa-color-brand-40); }

/* WORK-630 correction preview / routing / apply */
.tpi-prop-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--wa-color-neutral-80);
  border-radius: 6px;
  background: var(--wa-color-neutral-95);
  font-size: 13px;
}
.tpi-prop-summary code { word-break: break-all; }
.tpi-prop-evidence {
  border: 1px solid var(--wa-color-neutral-80);
  border-radius: 6px;
  padding: 10px 12px 12px;
}
.tpi-prop-evidence summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.tpi-prop-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.tpi-prop-routing {
  border-left: 4px solid var(--wa-color-warning-40);
  background: var(--wa-color-warning-95);
  padding: 12px;
}
.tpi-prop-allocation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: center;
  margin: 8px 0;
}
.tpi-prop-plan-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

@media (max-width: 760px) {
  .tpi-prop-summary,
  .tpi-prop-evidence-grid { grid-template-columns: 1fr; }
  .tpi-prop-allocation { grid-template-columns: 1fr; }
  .tpi-prop-plan-head { flex-direction: column; }
}
