/* Utility classes — extracted from inline `style="..."` attributes during the
 * TD-000 #4 CSP-tightening refactor (Pass 1, v0.7).
 *
 * Goal: replace inline `style="..."` attributes (forbidden once CSP drops
 * `'unsafe-inline'` from `style-src-attr`) with semantic / atomic classes.
 *
 * Naming convention:
 *   u-*   atomic utility (single property)
 *   c-*   small composed pattern (multi-property cluster appearing >=5 times)
 *   is-*  state modifier (hidden, etc.)
 *
 * See Doc/TECH_DEBT.md TD-000 #4 for refactor progress.
 */

/* --- Visibility ---------------------------------------------------------- */
.u-hidden,
.is-hidden { display: none !important; }

/* --- Text colour --------------------------------------------------------- */
.u-text-destructive { color: var(--destructive); }
.u-text-danger      { color: var(--danger); }
.u-text-muted       { color: var(--muted-foreground); }
.u-text-primary     { color: var(--primary); }

/* --- Text alignment ------------------------------------------------------ */
.u-text-center { text-align: center; }
.u-text-left   { text-align: left; }
.u-text-right  { text-align: right; }

/* --- Font size ----------------------------------------------------------- */
.u-fs-12 { font-size: 12px; }
.u-fs-13 { font-size: 13px; }
.u-fs-14 { font-size: 14px; }
.u-fs-18 { font-size: 18px; }
.u-fs-1rem { font-size: 1rem; }

/* --- Font weight --------------------------------------------------------- */
.u-fw-500 { font-weight: 500; }
.u-fw-600 { font-weight: 600; }

/* --- Cursor / vertical align -------------------------------------------- */
.u-cursor-pointer { cursor: pointer; }
.u-vmid           { vertical-align: middle; }

/* --- Spacing ------------------------------------------------------------- */
.u-mt-1   { margin-top: 1rem; }
.u-mb-1   { margin-bottom: 1rem; }
.u-mb-075 { margin-bottom: 0.75rem; }
.u-p-0    { padding: 0; }
.u-p-2    { padding: 2rem; }

/* --- Flex / Grid layouts ------------------------------------------------- */
.u-flex            { display: flex; }
.u-flex-1          { flex: 1; }
.u-flex-gap-05     { display: flex; gap: 0.5rem; }
.u-flex-gap-075    { display: flex; gap: 0.75rem; align-items: center; }
.u-flex-between    { display: flex; justify-content: space-between; align-items: center; }
.u-flex-fit        { display: flex; align-items: center; gap: 0.75rem; width: fit-content; }
.u-grid-2          { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.u-grid-2-2        { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

/* --- Composed patterns --------------------------------------------------- */
/* Centred placeholder / loading text inside a container */
.c-placeholder {
  text-align: center;
  padding: 2rem;
  color: var(--muted-foreground);
}

/* Caption / hint paragraphs (small + muted) */
.c-caption {
  font-size: 12px;
  color: var(--muted-foreground);
}

.c-caption-13 {
  font-size: 13px;
  color: var(--muted-foreground);
}

/* Inline badge-icon pairs (e.g. "$1,234 USD") */
.c-amount-line {
  font-size: 1rem;
  vertical-align: middle;
}

/* Section heading inside cards */
.c-section-title {
  font-size: 18px;
  font-weight: 600;
}

/* --- Pass 1 sweep additions --------------------------------------------- */

/* Width helpers */
.u-w-240  { width: 240px; }
.u-w-auto { width: auto; }
.u-mw-640 { max-width: 640px; }

/* Position helper */
.u-pos-rel { position: relative; }

/* Margin helpers */
.u-ml-auto    { margin-left: auto; }
.u-mb-025     { margin-bottom: 0.25rem; }
.u-mt-15      { margin-top: 1.5rem; }

/* Semantic text colours (used in help-page status examples) */
.u-text-success { color: green; }
.u-text-warn    { color: orange; }
.u-text-error   { color: red; }

/* Foreground (used in shipment list small-meta line) */
.u-text-fg { color: var(--foreground); }

/* Form error message (login screen) */
.c-form-error {
  display: none;
  color: #dc3545;
  margin-bottom: 1rem;
}
.c-form-error.is-shown { display: block; }

/* Trades stats summary grid */
.c-stats-grid {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* Empty-state cell that spans a grid */
.c-empty-cell {
  padding: 3rem;
  grid-column: 1 / -1;
}

/* Big empty-state block (notifications page) */
.c-empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--muted-foreground);
}
.c-empty-state-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* Centre + small top margin block */
.c-center-mt {
  text-align: center;
  margin-top: 1.5rem;
}

/* Loading spinner glyph */
.c-spinner-icon {
  animation: spin 1s linear infinite;
  font-size: 24px;
}

/* Help-page demo category-icon variants */
.c-demo-icon-pink   { background: oklch(0.92 0.08 330); color: oklch(0.45 0.10 330); }
.c-demo-icon-yellow { background: oklch(0.92 0.08 100); color: oklch(0.45 0.10 100); }
.c-demo-icon-orange { background: oklch(0.92 0.08 60);  color: oklch(0.45 0.10 60); }

/* --- Pass 2 sweep additions --------------------------------------------- */

/* Font sizes */
.u-fs-10      { font-size: 10px; }
.u-fs-11      { font-size: 11px; }
.u-fs-16      { font-size: 16px; }
.u-fs-0875rem { font-size: 0.875rem; }
.u-fs-1-1rem  { font-size: 1.1rem; }

/* Table layout helpers (lists with sticky-ish chrome around <table>) */
.u-w-48        { width: 48px; }
.c-table-card    { padding: 0; overflow: hidden; }
.c-table-scroll  { overflow-x: auto; }
.c-table-footer  {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

/* Grid helpers */
.u-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* Padding helpers */
.u-p-3       { padding: 3rem; }
.u-p-05      { padding: 0.5rem; }
.u-py-05     { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.u-pt-0375   { padding-top: 0.375rem; }

/* Empty cell that just needs padding (no grid spanning) */
.c-empty-pad { padding: 3rem; }

/* Generic flex / sizing */
.u-flex-shrink-0 { flex-shrink: 0; }
.u-min-w-0       { min-width: 0; }
.u-truncate      { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-w-28          { width: 28px; height: 28px; min-width: 28px; }

/* Section heading at 16px */
.c-section-title-16 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Reports — chart legend swatches */
.c-legend-primary { background: var(--primary); }
.c-legend-green   { background: oklch(0.5 0.15 150); }
.c-legend-amber   { background: oklch(0.5 0.15 50); }
.c-legend-purple  { background: oklch(0.5 0.15 280); }

/* Invoice list — colour-coded summary tile icons */
.c-tile-icon-primary { background: oklch(0.52 0.14 264 / 0.1); color: var(--primary); }
.c-tile-icon-green   { background: oklch(0.7 0.15 150 / 0.15); color: oklch(0.5 0.15 150); }
.c-tile-icon-amber   { background: oklch(0.75 0.15 60 / 0.15);  color: oklch(0.52 0.08 65); }
.c-tile-icon-danger  { background: oklch(0.60 0.12 25 / 0.15); color: var(--danger); }

/* Invoice list — payment progress bar */
.c-pay-progress      { display: flex; align-items: center; gap: 0.5rem; }
.c-pay-progress-rail { flex: 1; height: 6px; background: var(--secondary); border-radius: 3px; overflow: hidden; }
.c-pay-progress-fill { height: 100%; background: var(--success); border-radius: 3px; }

/* Dashboard — actionable list rows, link-styled */
.c-link-row  { text-decoration: none; color: inherit; cursor: pointer; }
.u-opacity-7 { opacity: 0.7; }

/* Dashboard — alert / activity feed row */
.c-feed-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.c-feed-icon { font-size: 1.1rem; color: var(--primary); flex-shrink: 0; }
.c-feed-body { flex: 1; min-width: 0; }
.c-feed-title-line {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c-feed-meta { font-size: 11px; }
.c-feed-aside { text-align: right; flex-shrink: 0; }
.c-feed-amount { font-size: 13px; font-weight: 600; }

/* Dashboard — flush card body + transparent panel */
.c-card-flat {
  margin: 0;
  background: transparent;
  padding: 0;
}

/* Dashboard — colour helpers for inline emphasis */
.u-text-destructive-strong { color: var(--destructive); font-weight: 600; }

/* invoice-pdf — print-flavour colour helpers (hex by design — these
 * survive the print stylesheet that other tokens don't reach) */
.u-c-slate-400 { color: #94a3b8; }
.u-c-slate-500 { color: #64748b; }
.u-c-slate-600 { color: #475569; }
.u-c-slate-800 { color: #1e293b; }
.u-bg-slate-400 { background: #94a3b8; }

/* invoice-pdf — terms / footer caption */
.c-pdf-terms-caption {
  margin-top: 12px;
  font-size: 12px;
  color: #475569;
}
.c-pdf-tagline {
  margin-top: 8px;
  font-size: 12px;
  color: #94a3b8;
}
.c-pdf-empty-row {
  padding: 8px 0;
  color: #94a3b8;
  font-size: 12px;
}
.c-pdf-empty-block {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
}
.c-pdf-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}
.c-pdf-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 2px;
}
.c-pdf-meta-value {
  font-size: 12.5px;
  color: #1e293b;
  font-weight: 500;
}
.c-pdf-mt-12 { margin-top: 12px; }
.c-pdf-mt-16 { margin-top: 16px; }
.c-pdf-w-38  { width: 38%; }

/* --- Pass 3 sweep additions --------------------------------------------- */

/* Margin / padding helpers */
.u-mt-025   { margin-top: 0.25rem; }
.u-mt-05    { margin-top: 0.5rem; }
.u-mt-075   { margin-top: 0.75rem; }
.u-mb-05    { margin-bottom: 0.5rem; }
.u-mb-125   { margin-bottom: 1.25rem; }
.u-mb-15    { margin-bottom: 1.5rem; }
.u-mr-0375  { margin-right: 0.375rem; }
.u-p-1      { padding: 1rem; }
.u-p-15     { padding: 1.5rem; }
.u-p-4      { padding: 4rem 2rem; }

/* Sizes */
.u-w-280    { width: 280px; }
.u-w-100p   { width: 100%; }
.u-w-auto-sel { width: auto; }
.u-min-h-52 { min-height: 52px; }
.u-mw-480   { max-width: 480px; }
.u-mw-520   { max-width: 520px; }
.u-mw-560   { max-width: 560px; }
.u-mw-600   { max-width: 600px; }

/* Borders */
.u-border-none { border: none; }

/* Font sizes / weights */
.u-fs-15    { font-size: 15px; }
.u-fs-20    { font-size: 20px; }
.u-fs-24    { font-size: 24px; }
.u-fs-085rem { font-size: 0.85rem; }
.u-fs-095rem { font-size: 0.95rem; }
.u-fs-2rem  { font-size: 2rem; }
.u-fs-3rem  { font-size: 3rem; }
.u-fs-4rem  { font-size: 4rem; }

/* Opacity */
.u-opacity-04 { opacity: 0.4; }
.u-opacity-05 { opacity: 0.5; }

/* Text helpers */
.u-uppercase { text-transform: uppercase; }
.u-capitalize { text-transform: capitalize; }
.u-italic    { font-style: italic; }
.u-mono      { font-family: var(--font-mono); }

/* Backgrounds */
.u-bg-secondary { background: var(--secondary); }

/* Composed: icon at 1rem with vertical-align middle (very common) */
.c-icon-1rem      { font-size: 1rem; vertical-align: middle; }
.c-icon-1rem-pri  { font-size: 1rem; color: var(--primary); }
.c-icon-1rem-mu   { font-size: 1rem; color: var(--muted-foreground); }
.c-icon-1rem-dgr  { font-size: 1rem; color: var(--danger); }

/* Form required-asterisk */
.c-required { color: var(--danger); }

/* Breadcrumb nav row at 14px */
.c-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
}
.c-breadcrumb-link {
  color: var(--primary);
  text-decoration: none;
}

/* Sidebar partner small heading + tight info-grid gap */
.c-side-name { font-weight: 600; margin-bottom: 0.25rem; }
.c-info-grid-tight { gap: 0.75rem; }

/* Section header row with title + action */
.c-section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.c-head-icon-15 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.c-head-icon-16 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Grid empty-state spanning row */
.c-empty-grid-cell {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted-foreground);
}

/* Secondary-bg tile (partner detail panels) */
.c-bg-tile {
  background: var(--secondary);
  padding: 1rem;
  border-radius: var(--radius-lg);
}
.c-tile-head {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}
.c-tile-head-tight {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

/* Avatar 64px partner header */
.c-avatar-64 { width: 64px; height: 64px; font-size: 24px; }

/* Status row (detail page list rows) */
.c-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

/* Icon-text inline rows */
.c-icon-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.c-icon-row-top {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Doc tab counts */
.c-doctab-count        { border-radius: var(--radius-full); }
.c-doctab-count-active { background: oklch(0.52 0.14 264 / 0.15); border-radius: var(--radius-full); }

/* Doc tabs row chrome */
.c-doctabs-row {
  margin: 0 0 1rem 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.c-doctab-active {
  flex: none;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  border-bottom: 2px solid var(--primary);
  color: var(--primary);
}
.c-doctab-inactive {
  flex: none;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
}

/* Split-info banner (contract-detail) */
.c-split-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  background: oklch(0.52 0.14 264 / 0.06);
  border: 1px solid oklch(0.52 0.14 264 / 0.12);
  font-size: 12px;
  color: var(--foreground);
}

/* Dialog max-width sizes */
.c-dialog-480 { max-width: 480px; }
.c-dialog-520 { max-width: 520px; }
.c-dialog-560 { max-width: 560px; }
.c-dialog-600 { max-width: 600px; }
.c-dialog-640 { max-width: 640px; }

/* Upload doc helpers */
.c-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.c-dropzone-filename {
  margin-top: 0.5rem;
  font-size: 13px;
}
.c-upload-rail {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.c-upload-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.3s;
  border-radius: 3px;
}
.c-upload-entity-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: oklch(0.97 0 0);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  font-size: 14px;
  margin-bottom: 0.75rem;
}

/* Caption variants */
.c-caption-11 { font-size: 11px; color: var(--muted-foreground); }
.c-caption-14 { font-size: 14px; color: var(--muted-foreground); }

/* Italic muted small caption */
.c-caption-italic-11 {
  font-size: 11px;
  color: var(--muted-foreground);
  font-style: italic;
}

/* Deal modal — buy/sell legs */
.c-leg-buy {
  background: oklch(0.95 0.05 145 / 0.35);
  border: 1px solid oklch(0.85 0.08 145 / 0.5);
  border-radius: var(--radius-lg);
  padding: 0.875rem;
}
.c-leg-sell {
  background: oklch(0.95 0.05 25 / 0.35);
  border: 1px solid oklch(0.85 0.08 25 / 0.5);
  border-radius: var(--radius-lg);
  padding: 0.875rem;
}
.c-leg-label-buy {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: oklch(0.38 0.15 145);
  margin-bottom: 0.5rem;
}
.c-leg-label-sell {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: oklch(0.38 0.15 25);
  margin-bottom: 0.5rem;
}
.c-grid-2-tight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.c-grid-2-legs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-top: 0.25rem;
}

/* Hr-style separator (form section divider) */
.c-form-section {
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
  padding-top: 1.25rem;
}
.c-form-subhead {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--muted-foreground);
}

/* Filter-bar inline group */
.c-filter-row {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

/* Text-color helpers used in trade-detail */
.u-text-warn-soft     { color: rgba(255, 200, 100, 0.85); }
.u-text-warn-stronger { color: rgba(255, 220, 130, 0.95); }
.u-text-white-75      { color: rgba(255, 255, 255, 0.75); }
.u-vmid-3             { vertical-align: -3px; }

/* Off-template notice block (trade-detail) */
.c-offtmpl-notice {
  font-size: 11px;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.4rem;
  background: rgba(255, 200, 100, 0.12);
  border: 1px solid rgba(255, 200, 100, 0.3);
  border-radius: var(--radius-sm);
  color: rgba(255, 220, 130, 0.95);
}

/* Workflow leg label colors */
.u-text-leg-buy   { color: oklch(0.4 0.15 145); }
.u-text-leg-sell  { color: oklch(0.45 0.15 25); }
.u-text-leg-buy-strong  { color: oklch(0.38 0.15 145); }
.u-text-leg-sell-strong { color: oklch(0.38 0.15 25); }

/* trade-detail outline button on dark bg */
.c-btn-outline-on-dark {
  width: 100%;
  justify-content: center;
  gap: 0.375rem;
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
}

/* trade-detail link button row */
.c-link-btn-row {
  width: 100%;
  margin-bottom: 0.5rem;
  justify-content: flex-start;
  gap: 0.5rem;
}
.c-link-btn-row-last {
  width: 100%;
  justify-content: flex-start;
  gap: 0.5rem;
}


/* Loading spinner state full block */
.c-loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  flex-direction: column;
  gap: 1rem;
  color: var(--muted-foreground);
}
.c-error-block {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}
.c-error-block.is-shown { display: flex; }

/* "trending" status pill (trade-detail status) */
.c-status-pill {
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

/* Tag for status text in dark hero */
.c-hero-status-text {
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
  color: rgba(255, 255, 255, 0.75);
}

/* Letter-spaced tiny caps label */
.c-caps-meta {
  color: var(--muted-foreground);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* td helpers used in trade-detail tables */
.u-td-mono-12 { font-family: var(--font-mono); font-size: 12px; }
.u-td-meta-12 { font-size: 12px; color: var(--muted-foreground); }

/* Pass 3 — addendum (shipment-detail/contract-detail) */
.c-doc-icon-verified { color: oklch(0.5 0.15 150); }
.c-bordered-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.c-icon-callsplit { color: oklch(0.45 0.12 220); }
.c-dropzone-prompt { margin: 0.5rem 0 0.25rem; font-size: 14px; }

/* Pass 3 — partners addendum */
.c-grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.c-partner-name { font-size: 20px; font-weight: 600; margin: 0; }
.c-partner-sub { color: var(--muted-foreground); margin: 0.25rem 0; }
.u-ml-05 { margin-left: 0.5rem; }
.c-detail-grid { display: grid; gap: 1rem; }
.c-tile-head-tighter { font-size: 12px; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 0.5rem; }
.c-icon-row-last { display: flex; align-items: center; gap: 0.5rem; }
.c-deal-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }

/* Pass 3 — trade-detail addendum */
.c-icon-tab { font-size: 1rem; vertical-align: middle; margin-right: 0.375rem; }
.c-leg-head { font-weight: 600; margin-bottom: 0.75rem; }
.c-notes-head { font-weight: 600; margin-bottom: 0.5rem; }
.c-spinner-3rem { font-size: 3rem; opacity: 0.4; animation: spin 1s linear infinite; }
.c-status-caption { font-size: 11px; font-weight: 500; text-transform: capitalize; color: rgba(255,255,255,0.75); }
.c-caption-12 { font-size: 12px; color: var(--muted-foreground); }
.u-text-warn-soft-strong { color: rgba(255,200,100,0.9); }

/* Pass 3 — deal-detail addendum */
.c-icon-1-25-pri { color: var(--primary); font-size: 1.25rem; }
.u-mb-125 { margin-bottom: 1.25rem; }
.c-btn-block-mt-125 { width: 100%; margin-top: 1.25rem; }
.u-mb-075 { margin-bottom: 0.75rem; }
.c-wf-instructions { margin-bottom: 0.75rem; padding: 0.5rem 0.75rem; background: oklch(0.52 0.14 264 / 0.08); border-radius: var(--radius-md); font-size: 12px; }
.c-icon-14-vmid { font-size: 14px; vertical-align: middle; }
.c-flex-between-mb-05 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.c-req-head { font-size: 12px; font-weight: 600; }
.c-progress-thin { height: 4px; margin-bottom: 0.5rem; }
.c-textarea-12-noresize { font-size: 12px; resize: none; }
.c-wf-actions { margin-top: 0.5rem; flex-wrap: wrap; gap: 0.5rem; }
.c-noaction { text-align: center; padding: 0.75rem 0; }
.c-icon-15rem-block { font-size: 1.5rem; color: var(--muted-foreground); display: block; margin-bottom: 0.25rem; }
.c-cp-block { margin-bottom: 0.875rem; }
.c-cp-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-foreground); margin-bottom: 0.25rem; }
.c-cp-partner { font-weight: 600; font-size: 15px; margin-bottom: 0.125rem; }
.c-cp-deal { font-size: 12px; color: var(--muted-foreground); font-family: var(--font-mono); }
.c-info-grid-tighter { gap: 0.5rem; }
.c-mono-13 { font-size: 13px; font-family: var(--font-mono); }
.c-bold-13 { font-size: 13px; font-weight: 600; }
.c-dialog-360 { max-width: 360px; }
.c-stepback-options { display: flex; flex-direction: column; gap: 0.5rem; }
.c-input-readonly { background: var(--muted); font-weight: 600; }
.u-text-warning { color: var(--warning); }
.c-lew-msg { font-size: 0.8125rem; color: var(--muted-foreground); margin-bottom: 1rem; }
.u-mb-0 { margin-bottom: 0; }

/* Pass 4 — documents.html addendum */
.u-w-40 { width: 40px; }
.u-w-50 { width: 50px; }
.u-w-140 { width: 140px; }
.u-w-160 { width: 160px; }
.u-fwrap { flex-wrap: wrap; }
.u-bg-warning { background: var(--warning); color: #000; }
.c-fs-18-bold { font-size: 18px; font-weight: 600; }
.c-fs-088 { font-size: 0.875rem; }
.c-fs-088-mr { font-size: 0.875rem; margin-right: 0.25rem; }
.c-fs-12-mu { font-size: 12px; color: var(--muted-foreground); }
.c-modal-400 { max-width: 400px; }
.c-modal-450 { max-width: 450px; }
.c-flex-between-mb-1 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.c-bulk-export-banner { margin-bottom: 1.5rem; }
.c-warn-modal-head { background: var(--warning); color: #000; }
.c-warn-modal-close { color: #000; }
.c-empty-state-3rem { text-align: center; padding: 3rem; }
.c-empty-state-2rem { text-align: center; padding: 2rem; }
.c-empty-state-2rem-danger { text-align: center; padding: 2rem; color: var(--danger); }
.c-empty-state-2rem-muted { text-align: center; padding: 2rem; color: var(--muted-foreground); }
.c-empty-state-grid-cell { grid-column: 1 / -1; text-align: center; padding: 3rem; }
.c-empty-icon-3rem { font-size: 3rem; color: var(--muted-foreground); opacity: 0.5; }
.c-empty-icon-4rem { font-size: 4rem; opacity: 0.5; }
.c-empty-icon-2rem { font-size: 2rem; opacity: 0.5; }
.c-empty-msg-mt { margin-top: 1rem; color: var(--muted-foreground); }
.c-empty-msg-mt-plain { margin-top: 1rem; }
.c-empty-msg-mt-05 { margin-top: 0.5rem; }
.c-icon-warn-corner { position: absolute; top: 0.5rem; right: 0.5rem; color: var(--warning); font-size: 1.25rem; }
.c-icon-warn-1-1 { color: var(--warning); font-size: 1.1rem; vertical-align: middle; margin-right: 0.25rem; }
.c-fileinfo-tile { padding: 0.625rem; background: oklch(0.98 0 0); border-radius: var(--radius-md); }
.c-export-summary { margin-top: 1rem; padding: 1rem; background: oklch(0.98 0 0); border-radius: var(--radius-lg); }
.c-version-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; border-bottom: 1px solid var(--border); }
.c-version-actions { display: flex; gap: 0.5rem; }
.c-version-comment { margin: 0.25rem 0 0; color: var(--muted-foreground); font-size: 14px; }
.c-search-result-row { padding: 0.5rem; cursor: pointer; border-bottom: 1px solid var(--border); }
.c-search-result-empty { padding: 0.5rem; color: var(--muted-foreground); }
.c-search-result-label { font-weight: 500; }
.c-file-chip { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; background: oklch(0.97 0 0); border-radius: var(--radius-md); font-size: 13px; }
.c-file-chip-close { background: none; border: none; cursor: pointer; padding: 0; display: flex; }
.c-icon-1rem-pri { font-size: 1rem; color: var(--primary); }
.c-iframe-preview { width: 100%; height: 100%; border: none; }
.c-preview-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: white; text-align: center; }
.c-modal-head-primary { background: var(--primary); color: white; }
.c-modal-close-white { color: white; }
.c-loader-center { text-align: center; padding: 2rem; }
.c-version-pad { padding: 0; }
.c-files-row { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.c-checkbox-label-row { display: flex; align-items: center; gap: 0.375rem; cursor: pointer; }
.c-export-bottom-flex { display: flex; flex-wrap: wrap; gap: 1rem; }
.c-fwt-600-mb-025 { font-weight: 600; margin-bottom: 0.25rem; }
.c-margin-tight { margin: 0; }
.c-doc-title-h4 { font-weight: 600; margin-bottom: 0.25rem; }
.c-dz-prompt { margin: 0.5rem 0 0.25rem; }
.c-entity-search-results { margin-top: 0.5rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); max-height: 200px; overflow-y: auto; }
.c-selected-entity { margin-top: 0.5rem; align-items: center; }
.c-selected-entity:not(.is-hidden) { display: flex; }
.c-badge-inline-flex { display: inline-flex; align-items: center; }
.u-ml-025 { margin-left: 0.25rem; }
.u-items-center { align-items: center; }

/* Pass 4 — invoice-detail.html addendum */
.c-card-flat { padding: 0; }
.c-card-pad-15 { padding: 1.5rem; }
.c-fs-13 { font-size: 13px; }
.c-fs-14 { font-size: 14px; }
.c-fs-16-bold { font-size: 16px; font-weight: 600; margin: 0; }
.c-fs-13-mu { font-size: 13px; color: var(--muted-foreground); }
.c-status-pad-md { font-size: 14px; padding: 0.5rem 1rem; }
.c-counter-badge { background: oklch(0.52 0.14 264 / 0.12); color: oklch(0.52 0.14 264); font-size: 11px; font-weight: 600; padding: 0.125rem 0.5rem; border-radius: var(--radius-full); margin-left: 0.25rem; }
.c-add-btn-sm { font-size: 12px; display: flex; align-items: center; gap: 0.375rem; }
.c-th-right { text-align: right; }
.u-w-60 { width: 60px; }
.c-totals-primary { color: var(--primary); }
.c-section-bordered { border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 1.5rem; }
.c-totals-plan-summary { display: none; border-top: 1px solid var(--border); margin-top: 0.5rem; padding-top: 0.5rem; }
.c-totals-plan-summary.is-shown { display: block; }
.c-totals-success { color: var(--success, #16a34a); }
.c-totals-icon-row { display: flex; align-items: center; gap: 0.3rem; }
.c-icon-14 { font-size: 14px; }
.c-section-head-tile { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: var(--card); cursor: pointer; user-select: none; }
.c-section-head-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 0.5rem; }
.c-icon-1-1-pri { color: var(--primary); font-size: 1.1rem; }
.c-chevron-mu { color: var(--muted-foreground); }
.c-collapsible-body { display: none; border-top: 1px solid var(--border); padding: 1rem; }
.c-collapsible-body.is-shown { display: block; }
.c-loading-row { text-align: center; padding: 1rem; color: var(--muted-foreground); font-size: 13px; }
.c-notes-tight { margin-top: 0; border-top: none; padding-top: 0; }
.u-mb-075 { margin-bottom: 0.75rem; }
.c-doctabs-tight { margin: 0 0 1rem 0; padding: 0; }
.c-card-head-row { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.c-card-head-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.c-icon-pri { color: var(--primary); }
.c-btn-fs-12 { font-size: 12px; }
.c-side-name { font-weight: 600; margin-bottom: 0.25rem; }
.c-empty-row-mu { text-align: center; padding: 1rem 0; color: var(--muted-foreground); }
.c-empty-icon-2rem-mb { font-size: 2rem; opacity: 0.5; margin-bottom: 0.5rem; }
.c-empty-line { font-size: 13px; margin: 0; }
.c-dialog-520 { max-width: 520px; }
.c-dialog-title-row { display: flex; align-items: center; gap: 0.5rem; }
.c-summary-tile { background: oklch(0.97 0 0); border-radius: var(--radius-lg); padding: 1rem; margin-bottom: 1.25rem; }
.c-flex-between-mb-05 { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.c-flex-between-row { display: flex; justify-content: space-between; }
.u-fw-600 { font-weight: 600; }
.c-amount-success { font-weight: 500; color: var(--success-color, oklch(0.55 0.15 150)); }
.c-amount-primary { font-weight: 600; color: var(--primary); }
.c-form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 0.375rem; }
.c-required-asterisk { color: oklch(0.55 0.12 25); }
.c-form-input-full { width: 100%; padding: 0.625rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); font-size: 14px; }
.c-form-input-full-padded { width: 100%; padding: 0.625rem 0.75rem 0.625rem 1.75rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); font-size: 14px; }
.c-form-input-full.c-resize-v, textarea.c-form-input-full { resize: vertical; }
.c-currency-prefix { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); font-size: 14px; }
.c-input-wrap-rel { position: relative; }
.c-form-hint-mt { font-size: 12px; color: var(--muted-foreground); margin-top: 0.25rem; }
.c-form-group-hidden { margin-bottom: 1rem; display: none; }
.c-form-group-hidden.is-shown { display: block; }
.c-warn-banner { display: none; background: oklch(0.85 0.1 80 / 0.3); border: 1px solid oklch(0.7 0.15 80); border-radius: var(--radius-lg); padding: 0.75rem; margin-top: 0.75rem; }
.c-warn-banner.is-shown { display: block; }
.c-warn-banner-row { display: flex; align-items: start; gap: 0.5rem; }
.c-warn-icon { color: oklch(0.6 0.15 80); font-size: 1.125rem; margin-top: 0.125rem; }
.c-warn-title { font-weight: 500; font-size: 13px; margin-bottom: 0.25rem; }
.c-warn-list { font-size: 12px; color: var(--muted-foreground); }
.c-icon-1-125 { font-size: 1.125rem; }
.c-fs-16 { font-size: 16px; }
.c-side-link-small { color: var(--muted-foreground); font-size: 11px; }
.c-modal-overlay-fixed { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 9000; align-items: center; justify-content: center; }
.c-modal-overlay-fixed.is-shown { display: flex; }
.c-modal-card-380 { background: var(--card); border-radius: var(--radius-xl); padding: 1.5rem; width: 380px; max-width: 95vw; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); }
.c-modal-card-460 { background: var(--card); border-radius: var(--radius-xl); padding: 1.5rem; width: 460px; max-width: 95vw; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); }
.c-modal-card-600 { background: var(--card); border-radius: var(--radius-xl); padding: 1.5rem; width: 600px; max-width: 95vw; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); }
.c-modal-head-flex { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.c-form-label-13 { font-size: 13px; }
.c-modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.c-modal-actions-mt { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
.c-table-overflow { overflow-x: auto; }
.c-modal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.c-modal-thead-row { border-bottom: 1px solid var(--border); color: var(--muted-foreground); font-size: 11px; text-transform: uppercase; }
.c-modal-th { padding: 0.375rem 0.5rem; }
.c-btn-mt-05 { margin-top: 0.5rem; }
.c-diff-msg { font-size: 12px; margin: 0.75rem 0; }

/* Pass 4 — invoice-detail addendum (cont) */
.c-link-pri-plain { color: var(--primary); text-decoration: none; }
.c-clickable { cursor: pointer; }
.c-icon-1rem-vmid { font-size: 1rem; vertical-align: middle; }
.c-progress-fill-dyn { /* width set via JS from data-progress */ }
.c-breadcrumb-row { display: flex; align-items: center; gap: 0.5rem; font-size: 14px; }
.u-m-0 { margin: 0; }
.u-gap-075 { gap: 0.75rem; }

/* === Pass 5 (settings.html) addendum =================================== */

/* Width / max-width */
.u-mw-700 { max-width: 700px; }
.u-mw-800 { max-width: 800px; }
.u-w-100  { width: 100px; }
.u-w-180  { width: 180px; }
.u-w-200  { width: 200px; }
.u-min-w-140 { min-width: 140px; }
.u-h-38   { height: 38px; }

/* Spacing helpers */
.u-mt-0125 { margin-top: 0.125rem; }
.u-pt-0    { padding-top: 0; }
.u-flex-2  { flex: 2; }
.u-inline-flex { display: inline-flex; }
.u-flex-gap-025 { display: flex; gap: 0.25rem; }

/* HR styling */
.c-hr-1   { margin: 1rem 0; border-color: var(--border); }
.c-hr-15  { margin: 1.5rem 0; border-color: var(--border); }
.c-hr-mt-15-green { margin-top: 1.5rem; border-color: oklch(0.8 0.08 150); }
.c-hr-mt-15-blue  { margin-top: 1.5rem; border-color: oklch(0.8 0.1 200); }

/* Section spacing */
.c-section-top-bordered { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* Text variants */
.c-mu-center { color: var(--muted-foreground); text-align: center; }
.c-mu-center-05 { color: var(--muted-foreground); text-align: center; padding: 0.5rem; }
.c-mu-14 { color: var(--muted-foreground); font-size: 14px; }
.c-pad-2rem-mu { padding: 2rem; color: var(--muted-foreground); }
.c-bold-fg { font-weight: 600; color: var(--foreground); }
.c-text-aqua { color: oklch(0.4 0.15 200); }
.c-text-mint { color: oklch(0.4 0.12 150); }

/* Error / empty states */
.c-error-state { color: var(--destructive); text-align: center; padding: 1rem; }
.c-empty-dashed {
  text-align: center;
  padding: 2rem;
  color: var(--muted-foreground);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* List helpers */
.c-list-12-mu  { font-size: 12px; margin: 0; padding-left: 1rem; color: var(--muted-foreground); }
.c-list-mu-125 { margin: 0; padding-left: 1.25rem; color: var(--muted-foreground); }
.c-m0-nowrap   { margin: 0; white-space: nowrap; }

/* Drag handle */
.c-drag-handle { cursor: grab; color: var(--muted-foreground); }

/* Backgrounds (oklch tiles) */
.c-bg-098 { background: oklch(0.98 0 0); }
.c-bg-097 { background: oklch(0.97 0 0); }
.c-bg-099 { background: oklch(0.99 0 0); }
.c-bg-blue-tile   { background: oklch(0.96 0.04 240); }
.c-bg-aqua-tile   { background: oklch(0.95 0.05 200); }
.c-bg-aqua-tile-2 { background: oklch(0.9 0.1 200); }
.c-bg-mint-tile   { background: oklch(0.95 0.04 150); }
.c-bg-violet-tile { background: oklch(0.9 0.1 290); }

/* Badges with text colour */
.c-bg-info   { background: oklch(0.55 0.10 240); color: white; }
.c-bg-violet { background: oklch(0.55 0.15 290); color: white; }
.c-bg-pri    { background: var(--primary); color: white; }
.c-bg-warn-ml{ background: var(--warning); color: black; margin-left: 0.25rem; }

/* Info / list tiles */
.c-info-tile {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  background: oklch(0.98 0 0); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.c-info-tile-top {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem;
  background: oklch(0.98 0 0); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.c-tile-muted {
  padding: 0.75rem; border-radius: 8px;
  background: var(--muted); border: 1px solid var(--border);
}
.c-tile-info-mb {
  padding: 0.75rem; background: oklch(0.95 0.02 220);
  border-radius: var(--radius-lg); margin-bottom: 1rem;
}
.c-list-row-tile {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0.75rem; background: oklch(0.99 0 0);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.c-bordered-tile-1 {
  padding: 1rem; background: oklch(0.98 0 0);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

/* Grids */
.c-grid-cols-3      { grid-template-columns: repeat(3, 1fr); }
.c-grid-cols-1-1-1  { grid-template-columns: 1fr 1fr 1fr; }
.c-grid-cols-1-1-2  { grid-template-columns: 1fr 1fr 2fr; }
.c-grid-cols-2-1-2  { grid-template-columns: 2fr 1fr 2fr; }
.c-grid-180-af { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; }
.c-grid-200-af { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem; }
.c-grid-3-15  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* Flex utilities */
.c-flex-gap-1     { display: flex; align-items: center; gap: 1rem; }
.c-flex-center-gap-05 { display: flex; align-items: center; gap: 0.5rem; }
.c-flex-col-075  { display: flex; flex-direction: column; gap: 0.75rem; }
.c-flex-col-05   { display: flex; flex-direction: column; gap: 0.5rem; }
.c-flex-05-mt-1  { display: flex; gap: 0.5rem; margin-top: 1rem; }
.c-flex-05-mb-1  { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.c-flex-wrap-0375{ display: flex; flex-wrap: wrap; gap: 0.375rem; }
.c-flex-top-075  { display: flex; align-items: flex-start; gap: 0.75rem; }
.c-flex-top-05-clickable { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; }
.c-flex-end      { display: flex; align-items: flex-end; }
.c-flex-jc-end-mb-1 { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.c-flex-1-min-0  { flex: 1; min-width: 0; }

/* Step circle (numbered indicator) */
.c-step-circle {
  width: 32px; height: 32px; background: var(--primary);
  color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; flex-shrink: 0;
}
.c-step-circle.is-last,
.c-step-circle-success { background: var(--success); }

/* Spinner */
.c-spin { animation: spin 1s linear infinite; }

/* Card titles in coloured tiles */
.c-card-title-13-pri { font-size: 13px; font-weight: 600; color: var(--primary);   margin-bottom: 0.75rem; }
.c-card-title-13-succ{ font-size: 13px; font-weight: 600; color: var(--success);   margin-bottom: 0.75rem; }
.c-card-title-13-dgr { font-size: 13px; font-weight: 600; color: var(--danger);    margin-bottom: 0.75rem; }
.c-card-title-13-amb { font-size: 13px; font-weight: 600; color: oklch(0.52 0.08 65); margin-bottom: 0.75rem; }
.c-card-title-14-mb  { font-size: 14px; font-weight: 600; margin-bottom: 0.75rem; }
.c-card-title-14-mb-1{ font-size: 14px; font-weight: 600; margin-bottom: 1rem; }

/* Metadata */
.c-meta-12-mu-mb   { font-size: 12px; color: var(--muted-foreground); margin-bottom: 0.25rem; }
.c-meta-12-mu-mt   { font-size: 12px; color: var(--muted-foreground); margin-top: 0.5rem; }
.c-caps-meta-mb-05 {
  font-size: 12px; text-transform: uppercase;
  color: var(--muted-foreground); margin-bottom: 0.5rem;
}
.c-caps-meta-bordered {
  font-size: 12px; text-transform: uppercase;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.375rem; margin-bottom: 0.75rem;
}
.c-fs-13-mb { font-size: 13px; margin: 1rem 0 0.5rem; }
.c-fs-14-mb-1 { font-size: 14px; margin-bottom: 1rem; }
.c-hint-block { display: block; margin-top: 0.25rem; color: var(--muted-foreground); font-size: 12px; }

/* Icon variants */
.c-icon-0875-vmid { font-size: 0.875rem; vertical-align: middle; }
.c-icon-125-vmid  { font-size: 1.25rem; vertical-align: middle; }
.c-icon-075-vmid  { font-size: 0.75rem; vertical-align: middle; }
.c-icon-25-faded  { font-size: 2.5rem; opacity: 0.5; }
.c-icon-3rem-faded{ font-size: 3rem; opacity: 0.5; }

/* Scroll boxes */
.c-scroll-box-200 {
  max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem;
}
.c-scroll-60vh { max-height: 60vh; overflow-y: auto; }
.c-scroll-70vh { max-height: 70vh; overflow-y: auto; }

/* Avatar / image circle */
.c-avatar-text-28 { font-size: 28px; font-weight: 600; color: #fff; }
.c-img-circle-cover { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Type badge (dynamic colour set via JS) */
.c-type-badge { color: white; }


/* Requirement-type badges (settings.html) */
.c-req-type-field                { background: var(--primary); color: white; }
.c-req-type-document             { background: var(--success); color: white; }
.c-req-type-entity               { background: var(--info); color: white; }
.c-req-type-entity-status        { background: oklch(0.25 0 0); color: white; }
.c-req-type-entity-workflow      { background: oklch(0.50 0.10 300); color: white; }
.c-req-type-multi-entity-status  { background: oklch(0.25 0 0); color: white; }
.c-req-type-checklist            { background: var(--warning); color: white; }
.c-req-type-cross-entity-step    { background: oklch(0.50 0.10 300); color: white; }
.c-req-type-default              { background: var(--muted); color: white; }


/* Requirement-type badges (settings.html) */
.c-req-type-field                { background: var(--primary); color: white; }
.c-req-type-document             { background: var(--success); color: white; }
.c-req-type-entity               { background: var(--info); color: white; }
.c-req-type-entity-status        { background: oklch(0.25 0 0); color: white; }
.c-req-type-entity-workflow      { background: oklch(0.50 0.10 300); color: white; }
.c-req-type-multi-entity-status  { background: oklch(0.25 0 0); color: white; }
.c-req-type-checklist            { background: var(--warning); color: white; }
.c-req-type-cross-entity-step    { background: oklch(0.50 0.10 300); color: white; }
.c-req-type-default              { background: var(--muted); color: white; }


/* === Pass 6 (innerHTML templates in public/js/*.js) ==================== */
.u-fs-0625      { font-size: 0.625rem; }
.u-fs-065       { font-size: 0.65rem; }
.u-fs-0875      { font-size: 0.875rem; }
.u-fs-09        { font-size: 0.9rem; }
.u-fs-0937      { font-size: 0.9375rem; }
.u-fs-08125     { font-size: 0.8125rem; }
.u-fs-07        { font-size: 0.7rem; }
.u-fs-075       { font-size: 0.75rem; }
.u-fs-1125      { font-size: 1.125rem; }
.u-fs-125rem    { font-size: 1.25rem; }
.u-fs-16px      { font-size: 16px; }
.u-fs-18px      { font-size: 18px; }
.u-fs-11        { font-size: 11px; }
.u-pad-025      { padding: .25rem; }
.u-pad-05       { padding: 0.5rem; }
.u-mw-36        { max-width: 36px; }
.u-mw-500       { max-width: 500px; }
.u-pos-rel-explicit { position: relative; }
.u-w-1rem-1rem  { width: 1rem; height: 1rem; }
.u-h-025rem     { height: 0.25rem; }
.u-text-decoration-none { text-decoration: none; }
.u-overflow-x   { overflow-x: auto; }
.u-opacity-06   { opacity: 0.6; cursor: default; }
.u-w-full-jc-start { width: 100%; justify-content: flex-start; }

.c-cell-rt        { padding: .375rem .5rem; text-align: right; }
.c-cell-lt        { padding: .375rem .5rem; text-align: left; }
.c-cell-tight-lt  { padding: .25rem .5rem; text-align: left; }
.c-cell-tight-rt  { padding: .25rem .5rem; text-align: right; }
.c-cell-tight     { padding: .375rem .5rem; }

.c-empty-loose    { text-align: center; color: var(--muted-foreground); padding: 2rem 1rem; }
.c-empty-tiny     { text-align: center; padding: 1rem 0; color: var(--muted-foreground); font-size: 0.8125rem; }
.c-empty-2rem-mu  { text-align: center; padding: 2rem; color: var(--muted-foreground); }
.c-empty-2rem     { text-align: center; padding: 2rem; }
.c-empty-tight-mu { text-align: center; padding: 1.5rem 1rem; color: var(--muted-foreground); }

.c-icon-faded-block-mb { font-size: 2.5rem; opacity: .4; display: block; margin-bottom: .75rem; }
.c-spin-1125 { font-size: 1.125rem; animation: spin 1s linear infinite; }

.c-table-12-mt   { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: .75rem; }
.c-table-13-row  { width: 100%; border-collapse: collapse; font-size: 13px; }
.c-thead-uppercase { border-bottom: 1px solid var(--border); color: var(--muted-foreground); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.c-thead-mu      { border-bottom: 1px solid var(--border); color: var(--muted-foreground); }

.c-progress-rail { height: 6px; border-radius: 100px; background: var(--border); overflow: hidden; }
.c-progress-bar  { height: 100%; border-radius: 100px; background: var(--primary); transition: width .4s; }

.c-flex-row-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted-foreground); margin-bottom: .375rem; }
.c-flex-end-075  { display: flex; gap: .5rem; margin-top: .75rem; justify-content: flex-end; }
.c-flex-center-wrap { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }

.c-fs-13-mb-1    { font-size: 13px; margin: 0 0 1rem; }
.c-meta-11-mt    { font-size: 11px; color: var(--muted-foreground); margin: .5rem 0 0; }
.c-mu-11         { color: var(--muted-foreground); font-size: 11px; }
.c-mu-12         { color: var(--muted-foreground); font-size: 12px; }
.c-meta-11       { font-size: 11px; color: var(--muted-foreground); margin-bottom: 0.375rem; }
.c-fs-11-flex    { flex: 1; font-size: 11px; }
.c-pri-1rem      { font-size: 1rem; color: var(--primary); }
.c-mu-1rem       { font-size: 1rem; color: var(--muted-foreground); }
.c-pri-125rem    { color: var(--primary); font-size: 1.25rem; }

.c-icon-1rem-vmid-2 { font-size: 1rem; vertical-align: middle; }
.c-icon-14-vmid-2   { font-size: 14px; vertical-align: middle; }
.c-w-40 { width: 40px; }

.c-bordered-tile-noinset { border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; }
.c-mark-info-pill  { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; background: oklch(0.95 0.03 264); border-radius: var(--radius); font-size: 13px; }
.c-info-row-bordered { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem; background: oklch(0.97 0 0); border-radius: var(--radius-lg); border: 1px solid var(--border); font-size: 14px; }
.c-row-bordered    { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-bottom: 1px solid var(--border); }
.c-amber-warn-tile { width: 100%; padding: 0.375rem 0.5rem; background: oklch(0.85 0.1 85 / 0.2); border-radius: var(--radius-md); font-size: 11px; color: oklch(0.45 0.1 85); margin-top: 0.25rem; }

.c-flex-1-min-0-2 { flex: 1; min-width: 0; }
.c-flex-1-danger  { flex: 1; color: var(--danger); border-color: var(--danger); }

.c-btn-icon-bare  { background: none; border: none; cursor: pointer; padding: 0; display: flex; }
.c-hr-025         { margin: 0.25rem 0; border-color: var(--border); }

.c-pill-pri       { font-size: 0.65rem; background: var(--primary); color: white; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.c-block-7-meta   { display: block; opacity: 0.75; font-size: 11px; }

.c-grid-2-tight-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.c-flex-wrap-mt   { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.c-meta-mb-025    { margin-bottom: 0.25rem; }
.c-meta-mt-05     { margin-top: 0.5rem; }
.c-margin-tight-2 { margin: 0.5rem 0 0.25rem; }
.c-fs-075-pad     { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
.c-fs-075-pad-dgr { font-size: 0.75rem; padding: 0.25rem 0.5rem; color: var(--danger); }


/* === Pass 6 (continued) ============================================== */
.u-cursor-pointer { cursor: pointer; }
.u-fs-10 { font-size: 10px; }
.u-fs-14 { font-size: 14px; }
.u-fs-3rem { font-size: 3rem; }
.u-fs-2rem { font-size: 2rem; }
.u-w-48 { width: 48px; }
.u-py-15 { padding: 1.5rem 0; }
.u-py-1 { padding: 1rem 0; }
.u-p-1 { padding: 1rem; }
.u-p-20 { padding: 20px; }
.u-mt-05 { margin-top: 0.5rem; }
.u-fw-500 { font-weight: 500; }
.u-fw-600 { font-weight: 600; }
.u-flex-1 { flex: 1; }
.u-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.u-text-center { text-align: center; }
.u-text-left { text-align: left; }
.u-text-danger { color: var(--danger); }
.u-text-muted { color: var(--muted-foreground); }
.u-text-primary { color: var(--primary); }
.c-w-40 { width: 40px; }

.c-text-destructive-12 { color: var(--destructive); font-size: 12px; }
.c-empty-2-1     { text-align: center; padding: 2rem 1rem; }
.c-empty-15-mu   { text-align: center; padding: 1.5rem; color: var(--muted-foreground); }
.c-empty-15-dgr  { text-align: center; padding: 1.5rem; color: var(--destructive); }
.c-flex-1-min-0  { flex: 1; min-width: 0; }
.c-fw600-fs0813  { font-weight: 600; font-size: 0.8125rem; }
.c-fw600-fs0937  { font-weight: 600; font-size: 0.9375rem; }
.c-fs075-mu      { font-size: 0.75rem; color: var(--muted-foreground); }
.c-fs13-mu       { font-size: 13px; color: var(--muted-foreground); }
.c-fs13-mu-mb1   { font-size: 13px; color: var(--muted-foreground); margin-bottom: 1rem; }
.c-fw500-14      { font-weight: 500; font-size: 14px; }
.c-pad-20-center { padding: 20px; text-align: center; }
.c-img-contain-75vh { max-width: 100%; max-height: 75vh; object-fit: contain; }
.c-modal-pre-wrap { padding: 20px; width: 100%; max-height: 70vh; overflow: auto; }
.c-pre-content   { color: #e0e0e0; margin: 0; white-space: pre-wrap; word-break: break-word; }
.c-divider-top   { width: 100%; border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.25rem; }
.c-divider-dashed-mt { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--border); }
.c-icon-12-vmid  { font-size: 12px; vertical-align: middle; }
.c-icon-1rem-vmid { font-size: 1rem; vertical-align: middle; }
.c-icon-14-vmid  { font-size: 14px; vertical-align: middle; }
.c-icon-125rem-vmid { font-size: 1.25rem; vertical-align: middle; }
.c-icon-2rem-block { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.c-flex-gap-05   { display: flex; gap: 0.5rem; }
.c-flex-center-gap-05 { display: flex; align-items: center; gap: 0.5rem; }
.c-pri-pill-right { float: right; font-size: 10px; background: oklch(0.52 0.14 264 / 0.1); color: var(--primary); padding: 0.125rem 0.375rem; border-radius: var(--radius-md); }
.c-spin-20       { animation: spin 1s linear infinite; font-size: 20px; }
.c-tile-pri-soft { background: oklch(0.52 0.14 264 / 0.15); color: var(--primary); }
.c-pri-fw500     { color: var(--primary); font-weight: 500; }
.c-label-caps-10 { font-size: 10px; text-transform: uppercase; font-weight: 600; color: var(--muted-foreground); margin-bottom: 0.375rem; }
.c-doc-info-row  { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; background: oklch(0.97 0 0); border-radius: var(--radius-md); font-size: 13px; }
.c-notif-badge-abs { position: absolute; top: 4px; right: 4px; background: var(--warning); color: #fff; font-size: 0.625rem; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; font-weight: 600; }

/* progress bar with JS-set width via data-progress (CSP-safe) */
.c-progress-bar-rail { height: 6px; border-radius: 100px; background: var(--border); overflow: hidden; }
.c-progress-bar-fill { height: 100%; border-radius: 100px; background: var(--primary); transition: width .4s; width: 0%; }
.c-progress-zero     { width: 0%; }


/* === Pass 6 (continued) ============================================== */
.u-cursor-pointer { cursor: pointer; }
.u-fs-10 { font-size: 10px; }
.u-fs-14 { font-size: 14px; }
.u-fs-3rem { font-size: 3rem; }
.u-fs-2rem { font-size: 2rem; }
.u-w-48 { width: 48px; }
.u-py-15 { padding: 1.5rem 0; }
.u-py-1 { padding: 1rem 0; }
.u-p-1 { padding: 1rem; }
.u-p-20 { padding: 20px; }
.u-mt-05-r { margin-top: 0.5rem; }
.u-fw-500 { font-weight: 500; }
.u-fw-600 { font-weight: 600; }
.u-flex-1 { flex: 1; }
.u-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.u-text-center { text-align: center; }
.u-text-left { text-align: left; }
.u-text-danger { color: var(--danger); }
.u-text-muted { color: var(--muted-foreground); }
.u-text-primary { color: var(--primary); }
.c-w-40 { width: 40px; }

.c-text-destructive-12 { color: var(--destructive); font-size: 12px; }
.c-empty-2-1     { text-align: center; padding: 2rem 1rem; }
.c-empty-15-mu   { text-align: center; padding: 1.5rem; color: var(--muted-foreground); }
.c-empty-15-dgr  { text-align: center; padding: 1.5rem; color: var(--destructive); }
.c-flex-1-min-0  { flex: 1; min-width: 0; }
.c-fw600-fs0813  { font-weight: 600; font-size: 0.8125rem; }
.c-fw600-fs0937  { font-weight: 600; font-size: 0.9375rem; }
.c-fs075-mu      { font-size: 0.75rem; color: var(--muted-foreground); }
.c-fs13-mu       { font-size: 13px; color: var(--muted-foreground); }
.c-fs13-mu-mb1   { font-size: 13px; color: var(--muted-foreground); margin-bottom: 1rem; }
.c-fw500-14      { font-weight: 500; font-size: 14px; }
.c-pad-20-center { padding: 20px; text-align: center; }
.c-img-contain-75vh { max-width: 100%; max-height: 75vh; object-fit: contain; }
.c-modal-pre-wrap { padding: 20px; width: 100%; max-height: 70vh; overflow: auto; }
.c-pre-content   { color: #e0e0e0; margin: 0; white-space: pre-wrap; word-break: break-word; }
.c-divider-top   { width: 100%; border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.25rem; }
.c-divider-dashed-mt { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--border); }
.c-icon-12-vmid  { font-size: 12px; vertical-align: middle; }
.c-icon-1rem-vmid { font-size: 1rem; vertical-align: middle; }
.c-icon-14-vmid  { font-size: 14px; vertical-align: middle; }
.c-icon-125rem-vmid { font-size: 1.25rem; vertical-align: middle; }
.c-icon-2rem-block { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.c-flex-gap-05-r { display: flex; gap: 0.5rem; }
.c-flex-center-gap-05-r { display: flex; align-items: center; gap: 0.5rem; }
.c-pri-pill-right { float: right; font-size: 10px; background: oklch(0.52 0.14 264 / 0.1); color: var(--primary); padding: 0.125rem 0.375rem; border-radius: var(--radius-md); }
.c-spin-20       { animation: spin 1s linear infinite; font-size: 20px; }
.c-tile-pri-soft { background: oklch(0.52 0.14 264 / 0.15); color: var(--primary); }
.c-pri-fw500     { color: var(--primary); font-weight: 500; }
.c-label-caps-10 { font-size: 10px; text-transform: uppercase; font-weight: 600; color: var(--muted-foreground); margin-bottom: 0.375rem; }
.c-doc-info-row  { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; background: oklch(0.97 0 0); border-radius: var(--radius-md); font-size: 13px; }
.c-notif-badge-abs { position: absolute; top: 4px; right: 4px; background: var(--warning); color: #fff; font-size: 0.625rem; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; font-weight: 600; }

/* progress bar with JS-set width via data-progress (CSP-safe) */
.c-progress-bar-rail { height: 6px; border-radius: 100px; background: var(--border); overflow: hidden; }
.c-progress-bar-fill { height: 100%; border-radius: 100px; background: var(--primary); transition: width .4s; width: 0%; }
.c-progress-zero     { width: 0%; }


/* === Pass 6 dynamic-template fixes ============================== */
.c-notif-badge-700 { position: absolute; top: 4px; right: 4px; background: var(--warning); color: #fff; font-size: 0.625rem; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.c-linked-entity-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.5rem; background: var(--sidebar-bg, var(--card-bg)); }
.c-step-btn-prev { border-color: var(--primary); color: var(--primary); }
.c-progress-fill-dyn { height: 100%; border-radius: 100px; background: var(--primary); transition: width .4s; }


.u-w-full { width: 100%; }


/* Split-chain badge variants */
.c-split-badge-parent  { background: oklch(0.55 0.10 280 / 0.10); color: oklch(0.45 0.10 280); }
.c-split-badge-child   { background: oklch(0.55 0.15 220 / 0.10); color: oklch(0.45 0.12 220); }
.c-split-badge-current { background: oklch(0.52 0.14 264 / 0.10); color: oklch(0.52 0.14 264); }

