/* Saved Stitch catalog exports; tax/account values remain authoritative data. */
.tv-stitch-catalog {padding:24px;background:var(--tv-surface-muted,#f3f7fb);color:var(--tv-text,#122c46);}
.tv-stitch-catalog .workspace-hero {display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:24px;}
.tv-stitch-catalog .workspace-hero h2 {font-size:28px;letter-spacing:-.03em;margin:0 0 8px;}
.tv-stitch-catalog .workspace-hero p {color:var(--tv-text-muted,#4d6178);line-height:1.6;max-width:85ch;}
.tv-stitch-catalog .workspace-hero-actions {display:flex;gap:8px;flex-wrap:wrap;}
.tv-stitch-catalog .workspace-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0;}
.tv-stitch-catalog .workspace-stat {display:grid;gap:8px;padding:20px;background:#fff;border:1px solid var(--tv-border,#c7d4e2);border-radius:12px;min-width:0;}
.tv-stitch-catalog .workspace-stat strong {font-size:24px;}
.tv-stitch-catalog .workspace-stat :is(span,small) {font-size:12px;color:var(--tv-text-muted,#4d6178);line-height:1.6;}
.tv-stitch-catalog-grid {display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:24px;align-items:start;}
.tv-stitch-catalog :is(.table-card,.tv-stitch-catalog-inspection,.tv-stitch-catalog-overview) {border:1px solid var(--tv-border,#c7d4e2);background:#fff;border-radius:12px;overflow-x:auto;min-width:0;}
.tv-stitch-catalog-inspection {padding:20px;}
.tv-stitch-catalog-overview {display:grid;gap:16px;padding:16px;overflow:visible;}
.tv-stitch-catalog-overview .panel {margin:0;padding:16px;background:var(--tv-surface-muted,#f3f7fb);border:1px solid var(--tv-border,#c7d4e2);border-radius:8px;min-width:0;}
.tv-stitch-catalog-overview .info-line {display:flex;justify-content:space-between;gap:16px;padding:8px 0;overflow-wrap:anywhere;}
.tv-stitch-catalog-overview .btn {max-width:100%;white-space:normal;}
.tv-stitch-catalog-inspection > h3 {font-size:20px;margin:0 0 16px;}
.tv-stitch-catalog-inspection .info-line {display:flex;justify-content:space-between;gap:16px;padding:8px 0;overflow-wrap:anywhere;}
.tv-stitch-catalog-inspection .panel {margin:16px 0;padding:16px;background:var(--tv-surface-muted,#f3f7fb);border:1px solid var(--tv-border,#c7d4e2);border-radius:8px;}
.tv-stitch-catalog .filters {display:flex;flex-wrap:wrap;gap:12px;padding:16px;align-items:end;}
.tv-stitch-catalog .filters > label {display:grid;gap:8px;flex:1 1 150px;min-width:0;}
.tv-stitch-catalog .filters > label:first-child {flex:3 1 240px;}
.tv-stitch-catalog table {min-width:720px;}
.tv-stitch-catalog td {padding:14px;vertical-align:top;}
.tv-stitch-catalog td > div {display:grid;gap:6px;}
.tv-stitch-catalog td :is(small,.muted-cell) {font-size:12px;color:var(--tv-text-muted,#4d6178);line-height:1.5;}
.tv-stitch-catalog tbody tr:hover {background:var(--tv-brand-soft,#e8f3fc);}
.tv-stitch-catalog .register-result-count {padding:16px;color:var(--tv-text-muted,#4d6178);font-size:13px;}
.tv-stitch-catalog-detail {padding:20px;background:var(--tv-surface-muted,#f3f7fb);display:grid;gap:16px;}
.units-of-measure-register table {min-width:980px;}
.units-of-measure-register .row-actions {min-width:140px;white-space:nowrap;}
.units-of-measure-register[role="region"]:focus-visible {outline:3px solid var(--tv-focus,#1769aa);outline-offset:2px;}
@media(max-width:1100px){.tv-stitch-catalog-grid{grid-template-columns:1fr;}}
@media(max-width:900px){.tv-stitch-catalog .workspace-stats{grid-template-columns:repeat(2,minmax(0,1fr));}.tv-stitch-catalog .workspace-hero{flex-direction:column;}}
@media(max-width:540px){.tv-stitch-catalog{padding:12px;}.tv-stitch-catalog .workspace-stat{padding:12px;}}
.tv-stitch-catalog:is(
  [data-stitch-screen="45785df36e49424f9889629515ff5156"], [data-stitch-route-screen="45785df36e49424f9889629515ff5156"],
  [data-stitch-screen="98f4fca7edbc49ff92cba6972376fcb1"], [data-stitch-route-screen="98f4fca7edbc49ff92cba6972376fcb1"],
  [data-stitch-screen="8b524e418f4640cba88bfb93d6120c0a"], [data-stitch-route-screen="8b524e418f4640cba88bfb93d6120c0a"]
) > .tv-route-frame {display:grid;gap:18px;max-width:1600px;margin-inline:auto;}
.tv-stitch-catalog:is(
  [data-stitch-screen="45785df36e49424f9889629515ff5156"], [data-stitch-route-screen="45785df36e49424f9889629515ff5156"]
) .workspace-stats {gap:12px;margin-block:0;}
.tv-stitch-catalog:is(
  [data-stitch-screen="8b524e418f4640cba88bfb93d6120c0a"], [data-stitch-route-screen="8b524e418f4640cba88bfb93d6120c0a"]
) .workspace-stats {gap:12px;margin-block:0;}

/* Kits & Assemblies keeps the Stitch register and BOM review in one
   vertically scrolling workspace. All inventory availability stays sourced
   from its own endpoint and is never inferred from saved component rates. */
.tv-stitch-composite-items[data-stitch-screen="d66bf2a9e0834e1d9becdade4cb7c0e6"] > .tv-route-frame,
.tv-stitch-composite-items[data-stitch-route-screen="d66bf2a9e0834e1d9becdade4cb7c0e6"] > .tv-route-frame {
  display:grid;gap:18px;max-width:1600px;margin-inline:auto;
}
.tv-stitch-composite-items .workspace-stats {gap:12px;margin-block:0;}
.tv-stitch-composite-items .tv-composite-metric {box-shadow:none;}
.tv-stitch-composite-items .workspace-body {min-width:0;}
.tv-stitch-composite-items .workspace-main {display:grid;gap:16px;min-width:0;}
.tv-composite-workspace {display:grid;gap:12px;min-width:0;}
.tv-composite-filters {display:grid;grid-template-columns:minmax(220px,2fr) repeat(2,minmax(150px,1fr)) auto;gap:10px;align-items:end;padding:14px;background:#fff;border:1px solid var(--tv-border,#c7d4e2);border-radius:10px;}
.tv-composite-filters input,.tv-composite-filters select {width:100%;min-width:0;}
.tv-composite-filters .tv-composite-filter {display:grid;gap:5px;min-width:0;color:var(--tv-text-muted,#4d6178);font-size:12px;}
.tv-stitch-composite-items .tv-composite-register {max-width:100%;overflow-x:auto;}
.tv-stitch-composite-items .tv-composite-register table {min-width:980px;}
.tv-stitch-composite-items .tv-composite-register td {vertical-align:top;}
.tv-stitch-composite-items .tv-composite-register tbody tr[aria-selected="true"] {background:var(--tv-brand-soft,#e8f3fc);box-shadow:inset 3px 0 var(--tv-brand,#1b64d8);}
.tv-stitch-composite-items .tv-composite-register tbody tr[aria-selected="true"]:focus-visible {outline:2px solid var(--tv-focus,#1769aa);outline-offset:-2px;}
.tv-composite-name {display:grid;gap:4px;min-width:130px;overflow-wrap:anywhere;}
.tv-composite-name small,.tv-composite-muted {color:var(--tv-text-muted,#4d6178);font-size:12px;line-height:1.5;}
.tv-composite-result-count {margin:0;padding:10px 14px;color:var(--tv-text-muted,#4d6178);font-size:12px;}
.tv-composite-detail {display:grid;gap:16px;min-width:0;padding:20px;background:#fff;border:1px solid var(--tv-border,#c7d4e2);border-radius:10px;}
.tv-composite-detail-heading {display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--tv-border,#c7d4e2);}
.tv-composite-detail-heading h3 {margin:0;font-size:19px;overflow-wrap:anywhere;}
.tv-composite-detail-heading p {margin:6px 0 0;color:var(--tv-text-muted,#4d6178);font-size:13px;overflow-wrap:anywhere;}
.tv-composite-detail-actions {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;}
.tv-composite-operation-actions {display:flex;flex-wrap:wrap;gap:6px;min-width:180px;}
.tv-composite-editor-drawer {width:min(760px,100vw);max-width:calc(100vw - 24px);}
.tv-composite-definition-form {display:grid;gap:16px;min-width:0;}
.tv-composite-form-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.tv-composite-field {display:grid;gap:6px;min-width:0;color:var(--tv-text-muted,#4d6178);font-size:13px;}
.tv-composite-field :is(input,select,textarea) {width:100%;min-width:0;max-width:100%;}
.tv-composite-field textarea {min-height:84px;resize:vertical;}
.tv-composite-checkbox {display:flex;align-items:center;gap:9px;color:var(--tv-text,#122c46);}
.tv-composite-checkbox input {width:18px;height:18px;}
.tv-composite-item-search {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;padding:12px;background:var(--tv-surface-muted,#f3f7fb);border:1px solid var(--tv-border,#c7d4e2);border-radius:8px;}
.tv-composite-item-search p {grid-column:1/-1;margin:0;font-size:12px;}
.tv-composite-components-heading {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;}
.tv-composite-components-heading h3 {margin:0;font-size:16px;}
.tv-composite-components-heading span {flex:1 1 100%;order:2;color:var(--tv-text-muted,#4d6178);font-size:12px;}
.tv-composite-component-editor {display:grid;gap:10px;min-width:0;}
.tv-composite-component-line {display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:10px;min-width:0;padding:12px;border:1px solid var(--tv-border,#c7d4e2);border-radius:8px;}
.tv-composite-component-line legend {padding-inline:4px;color:var(--tv-text-muted,#4d6178);font-size:12px;}
.tv-composite-component-grid {grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(90px,1fr));gap:10px;}
.tv-composite-form-feedback {padding:10px 12px;border-radius:6px;background:var(--tv-surface-muted,#f3f7fb);color:var(--tv-text,#122c46);font-size:13px;line-height:1.45;}
.tv-composite-form-feedback:empty {display:none;}
.tv-composite-form-feedback.is-error {background:#fff4f2;color:#8c261b;border:1px solid #e7b4ad;}
.tv-composite-detail-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.tv-composite-detail-panel {display:grid;gap:8px;min-width:0;padding:14px;background:var(--tv-surface-muted,#f3f7fb);border:1px solid var(--tv-border,#c7d4e2);border-radius:8px;overflow-wrap:anywhere;}
.tv-composite-detail-panel h4 {margin:0 0 4px;font-size:14px;}
.tv-composite-detail-line {display:grid;grid-template-columns:minmax(110px,1fr) minmax(0,1fr);gap:12px;padding:5px 0;border-bottom:1px solid var(--tv-border,#c7d4e2);font-size:12px;}
.tv-composite-detail-line span {color:var(--tv-text-muted,#4d6178);}
.tv-composite-detail-line strong {text-align:right;overflow-wrap:anywhere;}
.tv-composite-unavailable {margin:0;color:var(--tv-text-muted,#4d6178);font-size:13px;line-height:1.55;}
.tv-composite-table-region {max-width:100%;overflow-x:auto;}
.tv-composite-table-region table {min-width:720px;}
.tv-composite-read-warning,.tv-composite-unavailable-state {display:grid;gap:5px;padding:14px 16px;background:#fff8e8;border:1px solid #ebd39d;border-radius:8px;color:var(--tv-text,#122c46);}
.tv-composite-read-warning span,.tv-composite-unavailable-state p {margin:0;color:var(--tv-text-muted,#4d6178);font-size:13px;line-height:1.5;}
.tv-composite-no-selection {min-height:120px;align-content:center;}
.tv-composite-no-selection h3,.tv-composite-no-selection p {margin:0;}
.tv-composite-no-selection p {color:var(--tv-text-muted,#4d6178);}
@media(max-width:900px){.tv-composite-filters{grid-template-columns:repeat(2,minmax(0,1fr));}.tv-composite-filters input[type="search"]{grid-column:1/-1;}.tv-composite-detail-grid{grid-template-columns:1fr;}}
@media(max-width:540px){.tv-composite-filters{grid-template-columns:1fr;padding:12px;}.tv-composite-filters input[type="search"]{grid-column:auto;}.tv-composite-detail{padding:12px;}.tv-composite-detail-heading{flex-direction:column;}.tv-composite-detail-actions{justify-content:flex-start;}.tv-composite-form-grid{grid-template-columns:1fr;}.tv-composite-component-line{grid-template-columns:1fr;}.tv-composite-component-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.tv-composite-editor-drawer{max-width:100vw;}.tv-composite-item-search{grid-template-columns:1fr;}}
