/* Sales Hub B96: "Invoice & notification emails" (customer page, Finance tab) and its summary (Sales tab).
   House tokens only (B98 section 12): theme variables, 14/20 body, 12/16 secondary, 16/24 card title, 36 px controls,
   6 px control radius, 12 px card radius (the Card component's own). Every rule is scoped to .b96c-* classes. */
/* Long names, labels and history emails must wrap within the card's grid and flex items. */
.b96c-card { overflow-wrap: anywhere; }
.b96c-card .b96c-card-head { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 12px; }
.b96c-card .b96c-card-head > * + * { margin-top: 0; }
.b96c-card .b96c-card-head p { margin-top: 4px; }
.b96c-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.b96c-span { grid-column: 1 / -1; }
.b96c-main { min-width: 0; }
.b96c-side { display: grid; gap: 24px; align-content: start; min-width: 0; }
@media (min-width: 1100px) {
  .b96c-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}
.b96c-section { display: grid; gap: 12px; align-content: start; min-width: 0; }
.b96c-section + .b96c-section { border-top: 1px solid var(--border); padding-top: 16px; }
.b96c-history { border-top: 1px solid var(--border); padding-top: 16px; }
.b96c-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.b96c-h { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--foreground); margin: 0; }
.b96c-label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--foreground); }
.b96c-muted { font-size: 14px; line-height: 20px; color: var(--muted-foreground); margin: 0; }
.b96c-small { font-size: 12px; line-height: 16px; }
.b96c-strong { font-weight: 600; color: var(--foreground); }
.b96c-fields { display: grid; gap: 16px; }
.b96c-field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
fieldset.b96c-field > legend { padding: 0; margin-bottom: 6px; }
.b96c-addresses { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.b96c-addresses li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.b96c-address { font-size: 14px; line-height: 20px; color: var(--foreground); overflow-wrap: anywhere; }
.b96c-facts { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }

/* the QuickBooks field meter: what one BillEmail / BillEmailCc field will carry, against its 100-character limit */
.b96c-meter { display: flex; align-items: center; gap: 10px; max-width: 420px; }
.b96c-meter-track { flex: 1 1 auto; height: 4px; border-radius: 999px; background: var(--muted); overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.b96c-meter-fill { height: 100%; border-radius: 999px; background: var(--primary); transition: width 160ms ease-out; }
.b96c-meter-ok .b96c-meter-fill { background: var(--primary); }
.b96c-meter-near .b96c-meter-fill { background: var(--warning); }
.b96c-meter-over .b96c-meter-fill { background: var(--destructive); }
.b96c-meter-text { flex: none; font-size: 12px; line-height: 16px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.b96c-meter-over .b96c-meter-text { color: var(--destructive); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .b96c-meter-fill { transition: none; } }

.b96c-pill { display: inline-flex; align-items: center; flex: none; border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 10px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; background: var(--card); }
.b96c-tone-ok { color: var(--success); border-color: color-mix(in oklch, var(--success) 40%, transparent); }
.b96c-tone-warn { color: var(--warning-foreground); background: color-mix(in oklch, var(--warning) 22%, var(--card)); border-color: color-mix(in oklch, var(--warning) 55%, transparent); }
.b96c-tone-over { color: var(--destructive); border-color: color-mix(in oklch, var(--destructive) 45%, transparent); }
.b96c-tone-muted { color: var(--muted-foreground); background: var(--muted); }

.b96c-notice { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 12px; font-size: 14px; line-height: 20px; color: var(--foreground); background: var(--card); }
.b96c-notice-body { display: grid; gap: 4px; min-width: 0; }
.b96c-notice-body p { margin: 0; }
.b96c-notice-success { border-color: color-mix(in oklch, var(--success) 45%, transparent); background: color-mix(in oklch, var(--success) 8%, var(--card)); }
.b96c-notice-warning { border-color: color-mix(in oklch, var(--warning) 60%, transparent); background: color-mix(in oklch, var(--warning) 14%, var(--card)); }
.b96c-notice-error { border-color: color-mix(in oklch, var(--destructive) 45%, transparent); background: color-mix(in oklch, var(--destructive) 7%, var(--card)); }
.b96c-notice-info { background: var(--muted); }
.b96c-hint { margin: 0; font-size: 12px; line-height: 16px; color: var(--warning-foreground); background: color-mix(in oklch, var(--warning) 14%, var(--card));
  border-radius: 6px; padding: 6px 10px; }
.b96c-error { margin: 0; font-size: 12px; line-height: 16px; color: var(--destructive); grid-column: 1 / -1; }

.b96c-codes { border-collapse: collapse; font-size: 12px; line-height: 16px; width: 100%; }
.b96c-codes th { text-align: left; font-weight: 500; color: var(--muted-foreground); padding: 4px 8px 4px 0; }
.b96c-codes td { padding: 4px 8px 4px 0; vertical-align: top; overflow-wrap: anywhere; }

.b96c-edit { display: grid; gap: 16px; }
.b96c-rows { display: grid; gap: 8px; }
.b96c-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) auto; gap: 8px; align-items: center; }
.b96c-input { height: 36px; width: 100%; min-width: 0; border: 1px solid var(--input); border-radius: 6px; background: var(--background);
  color: var(--foreground); padding: 0 10px; font-size: 14px; line-height: 20px; }
.b96c-input::placeholder { color: var(--muted-foreground); }
.b96c-input:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 1px var(--ring); }
.b96c-input:disabled { opacity: 0.6; }
.b96c-invalid { border-color: var(--destructive); }
.b96c-wide { max-width: 560px; }
.b96c-add { justify-self: start; }
.b96c-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.b96c-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; }
.b96c-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.b96c-category { display: grid; gap: 8px; }
.b96c-category + .b96c-category { border-top: 1px dashed var(--border); padding-top: 12px; }
.b96c-details > summary { cursor: pointer; font-size: 14px; line-height: 20px; color: var(--primary); width: fit-content; }
.b96c-details > summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
.b96c-details[open] > summary { margin-bottom: 8px; }
.b96c-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.b96c-timeline li { display: grid; gap: 2px; font-size: 14px; line-height: 20px; border-left: 2px solid var(--border); padding-left: 10px; }
.b96c-when { font-size: 12px; line-height: 16px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.b96c-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-top: 16px; }
.b96c-summary-text { margin: 0; font-size: 14px; line-height: 20px; color: var(--foreground); min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .b96c-row { grid-template-columns: minmax(0, 1fr) auto; }
  .b96c-row .b96c-name { grid-column: 1 / 2; grid-row: 2; }
  .b96c-section-head { flex-direction: column; }
  .b96c-card .b96c-card-head { flex-direction: column; }
}
.b96c-address-block { font-style: normal; font-size: 0.875rem; line-height: 1.5; overflow-wrap: anywhere; }

.b96c-address-field { display: grid; gap: 0.35rem; margin-bottom: 0.75rem; min-width: 0; }
