/* Sales Hub UI clean-up m1 (2026-10-08): Payment Terms, Bank Fees, Recurring Supplies in the Invoice Calculator look.
   Additions on top of the already-served billing-engine.css (the calculator's own stylesheet), mirroring calc.css.
   Everything is scoped under .billing-engine.sh-clean, so no other page can change. */
.billing-engine.sh-clean { gap: 16px; }
.billing-engine.sh-clean .sh-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.billing-engine.sh-clean .calc-spacer { flex: 1; }

/* Native selects and month/date inputs: same look as the calculator's .be-native-select. */
.billing-engine.sh-clean .be-native-select,
.billing-engine.sh-clean .sh-input {
  height: 36px; min-width: 160px; border: 1px solid var(--input); border-radius: 6px; padding: 0 12px;
  background: var(--background); box-shadow: var(--be-control-shadow); color: var(--foreground); font: inherit; font-size: 14px;
}
.billing-engine.sh-clean .sh-input[type="month"], .billing-engine.sh-clean .sh-input[type="date"] { min-width: 0; width: 170px; }
.billing-engine.sh-clean .be-search { min-width: 200px; }
.billing-engine.sh-clean .be-search > input { background: var(--background); }

/* Segmented choice (payment terms, bank-fee policy): the calculator's muted tab bar with a raised selected item. */
.billing-engine.sh-clean .sh-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 8px; background: var(--muted); }
.billing-engine.sh-clean .sh-seg > button {
  height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted-foreground);
  font-size: 13px; line-height: 16px; font-weight: 500; white-space: nowrap;
}
.billing-engine.sh-clean .sh-seg > button:hover:not(:disabled) { background: color-mix(in oklab, var(--background) 70%, transparent); color: var(--foreground); }
.billing-engine.sh-clean .sh-seg > button[aria-pressed="true"] { background: var(--background); color: var(--foreground); box-shadow: var(--be-control-shadow); font-weight: 600; }
.billing-engine.sh-clean .sh-seg > button[aria-pressed="true"]:disabled { opacity: 1; cursor: default; }
.billing-engine.sh-clean .sh-seg > button.sh-tone-green[aria-pressed="true"] { color: oklch(50.8% 0.118 165.612); }
.billing-engine.sh-clean .sh-seg > button.sh-tone-blue[aria-pressed="true"] { color: oklch(48.8% 0.243 264.376); }
.billing-engine.sh-clean .sh-seg > button.sh-tone-indigo[aria-pressed="true"] { color: oklch(45.7% 0.24 277.023); }
.billing-engine.sh-clean .sh-seg > button.sh-tone-muted[aria-pressed="true"] { color: var(--foreground); }
.billing-engine.sh-clean .sh-seg > button.sh-draft { outline: 2px dashed var(--ring); outline-offset: -2px; }

/* Tables: the calculator card/table, fitted to two-to-six columns. */
.billing-engine.sh-clean table.sh-fit { min-width: 640px; }
.billing-engine.sh-clean td.sh-name { font-weight: 500; }
.billing-engine.sh-clean td.sh-name .be-xs { font-weight: 400; }
.billing-engine.sh-clean .sh-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.billing-engine.sh-clean .sh-pager > span:first-child { margin-right: auto; }

/* Bank fees: one <article> per customer laid out like a calculator table row (sticky header, separators, hover). */
.billing-engine.sh-clean .sh-list { max-height: 560px; overflow: auto; }
.billing-engine.sh-clean .sh-grid { display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(170px, 1fr) minmax(260px, 1.2fr); align-items: center; column-gap: 8px; }
.billing-engine.sh-clean .sh-grid-head { position: sticky; top: 0; z-index: 1; height: 40px; padding: 0 8px; background: var(--background); color: var(--muted-foreground); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; }
.billing-engine.sh-clean .sh-grid-row { border-bottom: 1px solid var(--border); }
.billing-engine.sh-clean .sh-grid-row:last-child { border-bottom: 0; }
.billing-engine.sh-clean .sh-grid-main { min-height: 52px; padding: 8px; }
.billing-engine.sh-clean .sh-grid-row:hover > .sh-grid-main { background: color-mix(in oklab, var(--muted) 50%, transparent); }
.billing-engine.sh-clean .sh-grid .sh-name { font-weight: 500; overflow-wrap: anywhere; }
.billing-engine.sh-clean .sh-grid .sh-name .be-xs { font-weight: 400; }
.billing-engine.sh-clean .sh-grid-detail { padding: 0 8px 12px; }
.billing-engine.sh-clean .sh-empty { padding: 40px 8px; text-align: center; color: var(--muted-foreground); }

/* Review / in-progress bars (replace the unstyled rb-review-note blocks). */
.billing-engine.sh-clean .be-bulk { justify-content: space-between; }
.billing-engine.sh-clean .be-bulk > .sh-bar-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.billing-engine.sh-clean .be-bulk > .sh-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.billing-engine.sh-clean .be-details-row > td { padding: 12px 16px; }
.billing-engine.sh-clean .sh-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.billing-engine.sh-clean fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Recurring supplies: On/Off switch as a pill button; the edit dialog in the calculator's dialog style. */
.billing-engine.sh-clean button.sh-switch { cursor: pointer; min-width: 44px; justify-content: center; }
.billing-engine.sh-clean .sh-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgb(0 0 0 / 0.5); }
.billing-engine.sh-clean .sh-modal { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--background); padding: 24px; box-shadow: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a; }
.billing-engine.sh-clean .sh-modal-grid { margin-top: 16px; }
.billing-engine.sh-clean .sh-modal .sh-input[inputmode="decimal"] { width: 140px; min-width: 0; text-align: right; }

@media (max-width: 639px) {
  .billing-engine.sh-clean .be-native-select, .billing-engine.sh-clean .sh-input { min-width: 0; width: 100%; }
  .billing-engine.sh-clean .be-filters > * { flex: 1 1 100%; }
  .billing-engine.sh-clean .calc-spacer { display: none; }
  .billing-engine.sh-clean .sh-grid { grid-template-columns: 1fr; row-gap: 8px; }
  .billing-engine.sh-clean .sh-grid-head { display: none; }
}
