.customer-documents, .related-records { margin-block: 24px; padding-block: 20px; border-top: 1px solid var(--line-strong); min-width: 0; }
.customer-documents h2, .related-records h2 { margin: 0 0 12px; font-size: 1.25rem; }
.customer-record-tabs, .customer-record-pagination, .related-records__header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.related-records__header { justify-content: space-between; }
.customer-record-tabs a, .customer-record-pagination a, .related-records__header a, .customer-file-jump { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-underline-offset: .2em; }
.customer-record-tabs a { gap: 8px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; text-decoration: none; }
.customer-record-tabs a[aria-current] { color: #fff; background: #414b35; font-weight: 700; }
.customer-record-tabs a:hover, .customer-record-list a:hover strong, .related-records__list a:hover strong { text-decoration: underline; }
.customer-record-list, .related-records__list { list-style: none; padding: 0; margin: 16px 0; }
.customer-record-list li + li { border-top: 1px solid var(--line-strong); }
.customer-record-list a { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 12px; align-items: center; min-height: 52px; padding: 12px 4px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.customer-record-list strong { color: #111; text-decoration: underline; text-underline-offset: .2em; }
.customer-record-list bdi { font-variant-numeric: tabular-nums; }
.related-records__list { display: flex; flex-wrap: wrap; gap: 12px; }
.related-records__list li { flex: 1 1 175px; min-width: 0; }
.related-records__list a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 12px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.related-records__list a[aria-current] { background: #e8eddf; border-color: #596341; color: #384627; }
.related-records__list strong { text-decoration: underline; text-underline-offset: .2em; }
.related-records small { font-size: .8rem; }
.customer-documents a:focus-visible, .related-records a:focus-visible, .customer-file-jump:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.quote-stock-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; }
.quote-stock-tools p { flex-basis: 100%; margin: 0; color: #545048; font-size: .875rem; max-width: 70ch; }
.quote-stock-tools button { min-height: 44px; }
.quote-stock { padding: 8px; margin: 8px 0 0; max-width: 28rem; font-size: .875rem; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; border-radius: 6px; color: #545048; }
.quote-stock[data-state="available"] { background: #e8eddf; color: #384627; }
.quote-stock[data-state="low"] { background: #f4ead6; color: #70501e; }
.quote-stock[data-state="out"] { background: #f4e2dd; color: #823c2f; }
@media (min-width: 761px) {
    .quote-editor--stock .quote-editor__lines { table-layout: fixed; min-width: 0; width: 100%; }
    .quote-editor--stock .quote-editor__lines :is(th, td) { padding: 12px 6px; overflow-wrap: anywhere; }
    .quote-editor--stock .quote-editor__lines th:nth-child(1) { width: 8%; }
    .quote-editor--stock .quote-editor__lines th:nth-child(2) { width: 28%; }
    .quote-editor--stock .quote-editor__lines th:nth-child(3) { width: 10%; }
    .quote-editor--stock .quote-editor__lines th:nth-child(4) { width: 12%; }
    .quote-editor--stock .quote-editor__lines th:nth-child(5) { width: 14%; }
    .quote-editor--stock .quote-editor__lines th:nth-child(6) { width: 16%; }
    .quote-editor--stock .quote-editor__lines th:nth-child(7) { width: 12%; }
    .quote-editor--stock .quote-editor__lines :is(select, input:not([type=checkbox]):not([type=hidden])) { min-width: 0; width: 100%; padding-inline: 8px; }
    .quote-editor--stock .quote-editor__lines output { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 760px) {
    .customer-record-list a { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .customer-record-tabs { gap: 8px; }
    .customer-record-tabs a { flex: 1 1 125px; }
    .related-records__list li { flex-basis: 135px; }
    .quote-stock { grid-column: 1 / -1; max-width: 100%; }
    .quote-stock-tools button { width: 100%; }
}
@media print { .related-records, .customer-file-jump { display: none !important; } }
