/* AQQ — visual comercial aprovado, aplicado em todas as telas.
   Refinamento orientado por unslop, Damir Sokolovsky (@heydamir), CC BY 4.0.
   Estrutura, dados, estados e navegação permanecem nos módulos originais. */

/* 1–3. Ritmo, superfícies e alinhamento da área de trabalho. */
html:root .list-toolbar {
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
html:root .list-toolbar .input-with-icon {
  height: 44px;
  max-width: 100%;
}
html:root .filter-select {
  height: 44px;
  gap: 8px;
  padding: 0 12px;
  border-color: #c3cdc7;
  border-radius: 8px;
  background: #fff;
}
html:root .filter-select select {
  font-size: 13px;
  color: #53615c;
}
html:root .list-caption {
  font-size: 12px;
  color: #65716b;
}
/* Emissão e filtros de pedidos. */
html:root .document-period-picker { max-width: 100%; }
html:root .document-period-picker .period-label { flex: none; }
html:root .document-period-form fieldset { min-width: 0; border: 0; padding: 0; }
html:root .document-period-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 20px 0;
}
html:root .document-period-scopes > label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #27332f;
  font-size: 14px;
  cursor: pointer;
}
html:root .document-period-scopes input { width: 16px; height: 16px; accent-color: #345b47; }
html:root .document-period-month { margin: 0; gap: 16px; }
html:root .document-period-month:disabled { opacity: .6; }
html:root .document-period-form .document-period-note {
  margin-top: 16px;
  color: #65716b;
  font-size: 12px;
  line-height: 1.6;
}
.order-state-picker { min-height: 44px; }
.order-state-cell { width: 1%; white-space: nowrap; }
.order-report-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 24px;
}
.order-report-bar [data-order-report-count] { flex: 1; }
.order-report-bar [data-order-sort-hint],
.order-report-bar [data-order-report-status] { flex-basis: 100%; }
.order-report-bar [data-order-report-status]:empty { display: none; }
.order-report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
html:root .order-sort select { max-width: none; min-width: 0; }
.record-approval time { white-space: nowrap; }
.order-filter-choices { max-height: min(300px, 36vh); overflow: auto; }
.order-period-fields:disabled { opacity: .6; }
.order-filter-year + .order-filter-year { margin-top: 12px; }
.order-filter-year legend { padding: 0; color: var(--muted); font-size: 12px; }
.order-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.order-filter-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 13px;
  cursor: pointer;
}
.order-filter-grid input { flex: none; width: 16px; height: 16px; accent-color: #345b47; }
.order-filter-grid small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.order-period-add { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 16px; }
.order-period-add .field { flex: 1 1 130px; min-width: 0; }
.order-period-add .button { min-height: 40px; }
.order-filter-clear { margin-top: 12px; }
html:root .overview-strip {
  gap: 24px;
  padding: 24px;
  margin-bottom: 24px;
  border-color: var(--line);
  background: #fff;
  border-radius: 12px;
}
html:root .overview-strip > div {
  padding-left: 0;
  border-color: var(--line);
}
html:root .overview-strip span {
  color: #53615c;
  font-size: 12px;
}
html:root .overview-strip strong {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: #27332f;
}
html:root table {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
html:root th {
  background: #f6f7f6;
  color: #53615c;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  border-color: var(--line);
}
html:root td { border-color: #e7ebe8; }
html:root tbody tr:hover { background: #fafbf9; }
html:root .table-person strong,
html:root .client-link,
html:root .document-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.5;
}
html:root .client-link { color: #27332f; }
html:root .document-link { color: #385f9d; }
html:root .table-person small,
html:root .table-sub,
html:root .record-number {
  margin-top: 4px;
  font-size: 12px;
  color: #65716b;
  letter-spacing: 0;
}
html:root .amount {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}
html:root .table-footer { padding: 16px 24px; font-size: 12px; }

/* 4–6. Rótulos legíveis, seleção explícita e fluxo Cliente / Produtos / Condições. */
html:root .field,
html:root .field-label {
  color: #27332f;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
}
html:root .field-label .optional,
html:root .field-label small,
html:root .field-hint,
html:root .field .field-hint {
  color: #65716b;
  font-size: 12px;
  font-weight: 400;
}
html:root .field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html:root .field select,
html:root .field textarea {
  border-color: #98a69e;
  color: #27332f;
  font-size: 14px;
}
html:root .field input:focus,
html:root .field select:focus,
html:root .field textarea:focus,
html:root .input-with-icon:focus-within {
  border-color: #385f9d;
  box-shadow: none;
}
html:root .field input:focus-visible,
html:root .field select:focus-visible,
html:root .field textarea:focus-visible {
  outline-color: #385f9d;
}
html:root .input-with-icon { border-color: #98a69e; }
html:root .input-with-icon input { color: #27332f; font-size: 14px; }
html:root .input-with-icon > .icon { color: #65716b; }
html:root .field input::placeholder,
html:root .field textarea::placeholder,
html:root .input-with-icon input::placeholder { color: #65716b; }
html:root .quote-editor .quote-form { padding: 24px; }
html:root .quote-section-heading { gap: 12px; margin-bottom: 20px; }
html:root .quote-section-heading h2 {
  color: #27332f;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
}
html:root .quote-section-heading > span:first-child:not(.optional) {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #f5f6f5;
  color: #53615c;
  font-weight: 500;
}
html:root .quote-section-heading > .optional { font-size: 12px; color: #65716b; }
html:root .quote-section + .quote-section {
  padding-top: 28px;
  margin-top: 28px;
  border-color: var(--line);
}
html:root .quote-fields,
html:root .quote-terms { gap: 20px; }
html:root .quote-customer-modes,
html:root .quote-discount-modes {
  gap: 4px;
  padding: 4px;
  background: #f3f5f3;
  border-color: #d4dcd6;
  border-radius: 10px;
}
html:root .quote-customer-modes button,
html:root .quote-discount-modes .button {
  height: 36px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #53615c;
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
}
html:root .quote-customer-modes button[aria-pressed="true"],
html:root .quote-discount-modes .button[aria-pressed="true"] {
  background: #fff;
  color: #385f9d;
  border-color: #bdcbdc;
  box-shadow: 0 1px 2px #27332f0a;
  font-weight: 600;
}
html:root .customer-search,
html:root [data-product-search="standard"] .product-autocomplete { gap: 12px; border-color: #98a69e; }
html:root .customer-search input,
html:root .field .customer-search input,
html:root [data-product-search="standard"] .product-autocomplete input,
html:root :is(.quote-editor,[data-product-search="standard"]) .field .input-with-icon input[type="search"] {
  border: 0;
  font-size: 14px;
  color: #27332f;
  box-shadow: none;
}
html:root .customer-search:focus-within,
html:root [data-product-search="standard"] .product-autocomplete:focus-within {
  border-color: #385f9d;
  outline: 2px solid #385f9d;
  outline-offset: 2px;
  box-shadow: none;
}
html:root .customer-search kbd,
html:root [data-product-search="standard"] .product-autocomplete kbd {
  padding: 2px 4px;
  border: 1px solid #d4dcd6;
  border-radius: 4px;
  color: #65716b;
  background: #fafbf9;
  font-size: 11px;
}
html:root #customer-suggestions,
html:root [data-product-search="standard"] .product-suggestions {
  padding: 4px;
  border-color: #c3cdc7;
  border-radius: 12px;
  box-shadow: 0 8px 24px #27332f14;
}
html:root .customer-suggestion,
html:root [data-product-search="standard"] .product-suggestions .suggestion {
  gap: 12px;
  padding: 12px;
  min-height: 64px;
  border-radius: 8px;
}
html:root .customer-suggestion:hover,
html:root .customer-suggestion[aria-selected="true"],
html:root .customer-suggestion.selected,
html:root [data-product-search="standard"] .product-suggestions .suggestion:hover,
html:root [data-product-search="standard"] .product-suggestions .suggestion.selected,
html:root [data-product-search="standard"] .product-suggestions .suggestion[aria-selected="true"] { background: #edf2f8; }
html:root .customer-suggestion strong,
html:root [data-product-search="standard"] .product-suggestions .suggestion strong,
html:root [data-product-search="standard"] .product-suggestions .suggestion b { color: #27332f; font-size: 13px; font-weight: 500; }
html:root .customer-suggestion small,
html:root .customer-option-meta,
html:root [data-product-search="standard"] .product-suggestions .suggestion small { margin-top: 4px; font-size: 12px; color: #65716b; }
html:root .selected-customer-card { border-color: #d4dcd6; background: #f7f9f6; border-radius: 12px; }
html:root .selected-customer-copy strong { color: #27332f; font-weight: 500; }
html:root .selected-customer-copy small,
html:root .selected-customer-copy p,
html:root .customer-change-note { color: #53615c; font-size: 12px; }
html:root .selected-customer-actions { gap: 8px; }
html:root .selected-customer-actions .button { height: 36px; font-size: 12px; }
html:root .quote-stock-meta { gap: 4px 12px; margin-top: 12px; color: #65716b; font-size: 12px; }
html:root .quote-stock-meta small { color: #65716b; font-size: 11px; }
html:root .quote-stock-meta .text-button { font-size: 12px; }
html:root .quote-discount-input { gap: 4px; }
html:root .quote-editor .quote-discount-input select,
html:root .quote-editor .quote-discount-input input[type="number"],
html:root .quote-editor .field .quote-discount-input input[type="number"],
html:root .quote-editor .editor-items .number-input {
  border-color: #98a69e;
  border-radius: 8px;
  color: #27332f;
  font-variant-numeric: tabular-nums;
}
html:root .quote-editor .editor-items th { font-size: 12px; font-weight: 500; color: #53615c; padding: 12px 8px; }
html:root .quote-editor .editor-items td { padding: 16px 8px; font-size: 13px; }
html:root .quote-editor .editor-items .amount { font-size: 13px; }
html:root .quote-line-discount { font-size: 11px; color: #65716b; margin-top: 4px; }
html:root .quote-editor .empty-items { padding: 32px 16px; background: #fafbf9; border-color: #c3cdc7; }
html:root .quote-editor .empty-items p { font-size: 13px; color: #65716b; }
html:root .quote-editor .quote-summary { top: 24px; padding: 24px; background: #fafbf9; border-color: #d4dcd6; }
html:root .quote-editor .quote-summary h2 { font-size: 18px; font-weight: 500; color: #27332f; letter-spacing: 0; }
html:root .quote-editor .quote-summary .summary-row { margin: 12px 0; font-size: 13px; color: #53615c; }
html:root .quote-editor .quote-summary .summary-row strong { font-size: 13px; font-weight: 500; color: #27332f; }
html:root .quote-summary-amounts { margin-top: 20px; padding-top: 8px; border-color: #d4dcd6; }
html:root .quote-editor .quote-summary .summary-total { padding: 20px 0; margin: 20px 0 16px; border-color: #d4dcd6; }
html:root .quote-editor .quote-summary .summary-total span { color: #53615c; font-size: 12px; }
html:root .quote-editor .quote-summary .summary-total strong { font-size: 32px; font-weight: 500; letter-spacing: -.02em; color: #27332f; }
html:root .quote-editor .summary-hint { font-size: 12px; color: #65716b; margin-top: 16px; }

/* 7. Consulta comercial: documento como conteúdo, molduras discretas. */
html:root dialog.commercial-dialog { border-color: #d4dcd6; border-radius: 16px; box-shadow: 0 24px 80px #1d292f29; }
html:root .commercial-dialog .modal-heading { padding: 20px 24px; }
html:root .commercial-dialog .modal-heading h2 { font-size: 16px; font-weight: 500; letter-spacing: 0; }
html:root .commercial-scroll { padding: 24px; background: #f5f6f5; }
html:root .commercial-footer { padding: 16px 24px; }
html:root .commercial-footer > span { font-size: 12px; color: #65716b; }
html:root .client-heading > .avatar { width: 56px; height: 56px; border-radius: 12px; font-size: 20px; }
html:root .client-heading h2,
html:root .document-title h2 { font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
html:root .client-heading .eyebrow,
html:root .document-hero .eyebrow { color: #65716b; font-size: 12px; letter-spacing: 0; }
html:root .client-heading p,
html:root .client-identification,
html:root .document-hero p,
html:root .client-contact-strip { color: #53615c; font-size: 12px; }
html:root .client-contact-strip { gap: 24px; margin: 16px 0 24px; }
html:root .customer-stats { border-color: #d4dcd6; }
html:root .customer-stats > div { padding: 20px; border-color: var(--line); }
html:root .customer-stats span { color: #65716b; font-size: 12px; }
html:root .customer-stats strong { font-size: 24px; font-weight: 500; color: #27332f; letter-spacing: -.02em; }
html:root .detail-tabs { gap: 24px; border-color: #d4dcd6; }
html:root .detail-tabs button { font-size: 13px; font-weight: 500; padding: 12px 0; color: #53615c; }
html:root .detail-tabs button.active { font-weight: 600; border-bottom-color: #385f9d; color: #385f9d; }
html:root .detail-tabs button > span { padding: 2px 4px; font-size: 11px; background: #edf0ed; }
html:root .detail-tabs button.active > span { color: #385f9d; background: #edf2f8; }
html:root .history-toolbar { gap: 16px; margin-bottom: 16px; }
html:root .history-toolbar > span,
html:root .history-pagination,
html:root .data-scope { font-size: 12px; color: #65716b; }
html:root .history-pagination { margin-top: 16px; }
html:root .detail-section { border-color: #d4dcd6; padding: 24px; margin-bottom: 20px; }
html:root .detail-section h3 { color: #27332f; font-size: 16px; font-weight: 500; letter-spacing: 0; }
html:root .detail-section h3 .icon { color: #65716b; width: 18px; height: 18px; }
html:root .section-heading p,
html:root .section-heading > span { font-size: 12px; color: #65716b; }
html:root .registration-layout { gap: 20px; }
html:root .registration-grid { gap: 20px 16px; margin-top: 24px; }
html:root .registration-grid dt,
html:root .document-summary dt { font-size: 12px; color: #65716b; margin-bottom: 4px; }
html:root .registration-grid dd,
html:root .document-summary dd { font-size: 13px; font-weight: 500; color: #27332f; }
html:root .document-summary { padding: 24px; background: #fff; border-color: #d4dcd6; }
html:root .document-summary .eyebrow { color: #65716b; letter-spacing: 0; font-size: 12px; }
html:root .summary-amount { color: #27332f; font-size: 32px; font-weight: 500; letter-spacing: -.02em; margin: 16px 0 8px; font-variant-numeric: tabular-nums; }
html:root .document-summary dl { border-color: var(--line); padding: 20px 0; }
html:root .document-origin > span,
html:root .customer-quick-info p { font-size: 12px; color: #65716b; }
html:root .document-customer { padding: 16px; border-color: #d4dcd6; margin-bottom: 20px; border-radius: 12px; }
html:root .document-customer:hover { background: #fafbf9; border-color: #98a69e; }
html:root .document-customer strong { font-weight: 500; }
html:root .document-customer small,
html:root .document-customer > span:nth-child(2) > span { color: #65716b; font-size: 12px; }
html:root .document-items-table td,
html:root .document-items-table .amount,
html:root .item-name strong { font-size: 13px; }
html:root .item-name > span { font-size: 11px; color: #65716b; background: #f3f5f3; }
html:root .observations-section { background: #fffefa; border-color: #ded8c8; }
html:root .related-documents { gap: 12px; }
html:root .related-documents > button { padding: 16px 12px; gap: 8px; background: #fafbf9; border-color: #d4dcd6; }
html:root .related-documents > button:hover { background: #edf2f8; border-color: #bdcbdc; }
html:root .related-documents small { font-size: 12px; }
html:root .reuse-notice { padding: 16px 20px; background: #f5f7fa; border-color: #cbd5e0; color: #385f9d; }
html:root .preliminary-notice { padding: 16px 20px; }

/* 8. O catálogo preserva as peças e as ilustrações, sem movimento decorativo. */
html:root .catalog-grid { gap: 24px; padding: 24px; }
html:root .catalog-card { padding-bottom: 16px; border-color: var(--line); }
html:root .catalog-art { background-image: none; border-radius: 12px; transition: background-color 160ms ease-out; }
html:root .catalog-card:hover .catalog-art { transform: none; }
html:root .catalog-card h3 { font-size: 14px; line-height: 1.5; font-weight: 500; letter-spacing: 0; }
html:root .catalog-card p { color: #65716b; font-size: 12px; margin: 4px 0 16px; }
html:root .product-category { font-size: 12px; color: #65716b; letter-spacing: 0; }
html:root .catalog-card > div strong { font-size: 16px; color: #27332f; font-weight: 500; }
html:root .product-detail-info p,
html:root .product-detail-info small { font-size: 13px; color: #53615c; }
html:root .product-detail-info > strong { font-size: 32px; font-weight: 500; color: #27332f; }

/* CRM: o valor ponderado orienta a leitura, com as demais superfícies discretas. */
html:root .crm-summary { gap: 16px; }
html:root .crm-stat { padding: 24px; border-radius: 12px; }
html:root .crm-stat-label { color: #53615c; font-size: 13px; font-weight: 400; }
html:root .crm-stat-label > .icon { display: none; }
html:root .crm-stat > strong { font-size: 28px; font-weight: 500; letter-spacing: -.02em; margin-top: 16px; color: #27332f; }
html:root .crm-stat > p { font-size: 12px; color: #65716b; }
html:root .crm-stat-weighted { background: #f2f6f2; border-color: #c5d3c8; }
html:root .crm-stat-weighted > strong { color: #315e4d; }
html:root .crm-summary-scope { font-size: 12px; color: #65716b; margin: 12px 0 24px; }
html:root .crm-review-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: -8px 0 24px; padding: 12px 16px; border: 1px solid #ead29c; border-radius: 8px; background: #fff8eb; color: #855e22; font-size: 12px; }
html:root .crm-history-label { color: #65716b; font-size: 12px; }
html:root .crm-result-count { font-size: 12px; color: #65716b; padding: 12px 24px; }
html:root .crm-table thead th { padding: 12px 16px; font-size: 12px; white-space: nowrap; }
html:root .crm-table td { padding: 20px 16px; font-size: 13px; }
html:root .crm-identity .client-link { font-size: 13px; font-weight: 500; }
html:root .crm-identity .document-link { font-size: 12px; }
html:root .crm-preliminary { margin-top: 8px; font-size: 11px; padding: 2px 8px; }
html:root .crm-deadline > small,
html:root .crm-unknown { font-size: 12px; }
html:root .crm-unknown { white-space: nowrap; }
html:root .crm-probability > strong { font-size: 13px; font-weight: 500; }
html:root .crm-stage { font-size: 12px; font-weight: 500; padding: 4px 8px; }
html:root .quote-status-button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border-radius: 6px; white-space: nowrap; }
html:root .quote-status-button > .icon { width: 12px; height: 12px; color: #65716b; }
html:root .quote-status-button:hover .badge { border-color: #81958b; }
html:root .badge.quote-status-draft,
html:root .badge.quote-status-unknown { background: #eef1f3; color: #53616c; border-color: #d6dde2; }
html:root .badge.quote-status-negotiating { background: #edf2fb; color: #345e9b; border-color: #cbd8ef; }
html:root .badge.quote-status-awaiting { background: #fff4df; color: #855e22; border-color: #ead29c; }
html:root .badge.quote-status-won { background: #eaf4ee; color: #2b704d; border-color: #c9dfd2; }
html:root .badge.quote-status-lost { background: #f5e9e8; color: #914d47; border-color: #e3c7c3; }
html:root .quote-situation-dialog .field-hint { margin-top: 12px; line-height: 1.6; color: #65716b; font-size: 12px; }
html:root .crm-edit-button { height: 36px; padding: 0 12px; font-size: 12px; gap: 8px; }
html:root .crm-pagination { padding: 16px 24px; font-size: 12px; color: #65716b; }
html:root .crm-editor-context { padding: 20px; margin-bottom: 24px; background: #f5f7f4; border-color: #d4dcd6; }
html:root .crm-editor-context > .eyebrow { font-size: 12px; letter-spacing: 0; color: #65716b; }
html:root .crm-editor-context > h3 { font-size: 20px; font-weight: 500; letter-spacing: 0; }
html:root .crm-editor-context > p { font-size: 12px; color: #65716b; }
html:root .crm-editor-context > div { margin-top: 16px; padding-top: 16px; border-color: var(--line); color: #53615c; }
html:root .crm-editor-context > div > strong { color: #27332f; font-size: 20px; font-weight: 500; letter-spacing: 0; }
html:root .crm-form-grid { gap: 20px; }
html:root .crm-weighted-preview { padding: 12px 16px; background: #f5f7f4; border-color: #d4dcd6; }
html:root .crm-weighted-preview > strong { font-weight: 500; font-size: 24px; letter-spacing: 0; }
html:root .crm-weighted-preview > span,
html:root .crm-weighted-preview > .field-hint,
html:root .crm-editor-note { color: #65716b; font-size: 12px; }
html:root .crm-editor-footer { margin-top: 20px; padding-top: 20px; }

@media (min-width: 761px) {
  html:root .crm-table { min-width: 1424px; }
  html:root .crm-table th:nth-child(1) { width: 208px; }
  html:root .crm-table th:nth-child(2),
  html:root .crm-table th:nth-child(5) { width: 152px; }
  html:root .crm-table th:nth-child(3) { width: 136px; }
  html:root .crm-table th:nth-child(4),
  html:root .crm-table th:nth-child(7) { width: 144px; }
  html:root .crm-table th:nth-child(6) { width: 112px; }
  html:root .crm-table th:nth-child(8) { width: 208px; }
  html:root .crm-table th:last-child { width: 160px; }
  html:root .crm-table th:last-child,
  html:root .crm-table .crm-row-action {
    position: sticky;
    right: 0;
    z-index: 1;
    border-left: 1px solid var(--line);
    box-shadow: -1px 0 0 var(--line);
    background: #fff;
  }
  html:root .crm-table th:last-child { background: #f6f7f6; }
  html:root .crm-table tbody tr:hover .crm-row-action { background: #fafbf9; }
}

/* 9. A mesma hierarquia no celular, com alvos de toque e rolagem contida. */
@media (max-width: 1120px) {
  html:root .quote-editor .quote-form,
  html:root .quote-editor .quote-summary { padding: 20px; }
  html:root .document-summary { padding: 20px; }
  html:root .crm-stat { padding: 20px; }
}
@media (max-width: 760px) {
  html:root .list-toolbar { padding: 16px; }
  html:root .list-toolbar .input-with-icon { flex-basis: 100%; min-width: 0; }
  html:root .filter-select { max-width: 100%; }
  html:root .filter-select select { font-size: 14px; max-width: 100%; }
  html:root .overview-strip { gap: 12px; padding: 16px; }
  html:root .overview-strip span { font-size: 12px; }
  html:root .overview-strip strong { font-size: 20px; }
  html:root .table-footer { padding: 16px; font-size: 12px; flex-wrap: wrap; gap: 8px; }
  html:root .quote-editor .quote-form,
  html:root .quote-editor .quote-summary { padding: 16px; }
  html:root .quote-fields,
  html:root .quote-terms { gap: 20px; }
  html:root .quote-section + .quote-section { margin-top: 24px; padding-top: 24px; }
  html:root .quote-section-heading h2 { font-size: 16px; }
  html:root .quote-section-heading > .optional { font-size: 11px; }
  html:root .field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  html:root .field select,
  html:root .field textarea,
  html:root .input-with-icon input,
  html:root .customer-search input,
  html:root .field .customer-search input,
  html:root [data-product-search="standard"] .product-autocomplete input,
  html:root :is(.quote-editor,[data-product-search="standard"]) .field .input-with-icon input[type="search"],
  html:root .quote-editor .quote-discount-input select,
  html:root .quote-editor .quote-discount-input input[type="number"],
  html:root .quote-editor .field .quote-discount-input input[type="number"] { font-size: 16px; }
  html:root .quote-customer-modes button,
  html:root .quote-discount-modes .button { min-height: 40px; height: 40px; padding: 8px; }
  html:root .quote-discount-modes .button { font-size: 11px; }
  html:root .selected-customer-card { padding: 12px; }
  html:root .selected-customer-actions .button { height: 40px; }
  html:root .customer-suggestion,
  html:root [data-product-search="standard"] .product-suggestions .suggestion { padding: 12px 8px; gap: 8px; }
  html:root .quote-editor .quote-summary .summary-total strong { font-size: 28px; }
  html:root .quote-editor .quote-summary .summary-row { width: 100%; margin: 8px 0; display: flex; }
  html:root .quote-editor .quote-summary .summary-total { gap: 12px; flex-wrap: wrap; }
  html:root dialog.commercial-dialog { max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  html:root .commercial-dialog .modal-heading,
  html:root .commercial-scroll,
  html:root .commercial-footer { padding: 16px; }
  html:root .commercial-footer > div { gap: 8px; }
  html:root .commercial-footer .button { font-size: 12px; padding: 0 12px; }
  html:root .client-heading h2,
  html:root .document-title h2 { font-size: 24px; }
  html:root .client-heading > .avatar { width: 48px; height: 48px; font-size: 18px; }
  html:root .customer-stats > div { padding: 16px; }
  html:root .customer-stats strong { font-size: 20px; }
  html:root .client-contact-strip { gap: 12px; }
  html:root .detail-tabs { gap: 16px; }
  html:root .detail-tabs button { font-size: 12px; }
  html:root .detail-section,
  html:root .document-summary { padding: 16px; }
  html:root .registration-grid { gap: 16px; }
  html:root .document-summary .summary-amount { font-size: 28px; }
  html:root .catalog-grid { gap: 20px 16px; padding: 16px; }
  html:root .catalog-art { height: 128px; }
  html:root .catalog-card h3 { font-size: 13px; }
  html:root .catalog-card p { font-size: 12px; }
  html:root .catalog-card > div strong { font-size: 15px; }
  html:root .crm-summary { gap: 12px; }
  html:root .crm-stat { padding: 16px; }
  html:root .crm-stat-label { font-size: 12px; }
  html:root .crm-stat > strong { font-size: 22px; margin-top: 12px; }
  html:root .crm-stat > p { font-size: 12px; }
  html:root .crm-summary-scope { font-size: 12px; }
  html:root .crm-table tr { padding: 20px 16px; gap: 16px; }
  html:root .crm-table td { font-size: 13px; }
  html:root .crm-table td::before { font-size: 12px; margin-bottom: 4px; color: #65716b; }
  html:root .crm-table td:nth-child(8) { grid-column: 1 / -1; }
  html:root .crm-identity .client-link { font-size: 15px; }
  html:root .crm-identity .document-link { font-size: 12px; }
  html:root .crm-row-action > .button { height: 40px; font-size: 12px; }
  html:root .crm-pagination { padding: 16px; flex-wrap: wrap; gap: 12px; }
  html:root .crm-editor-context { padding: 16px; }
  html:root .crm-editor-context > div { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html:root .catalog-art { transition: none; }
}
/* Vendedor é projetado da conta pelo backend; mantém o ritmo da identidade comercial. */
html:root .record-seller{display:block;font-size:11px;line-height:1.4;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}
html:root .crm-stat>strong{white-space:nowrap;overflow-wrap:normal}
@media(max-width:1400px){html:root .crm-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 html:root .crm-summary{grid-template-columns:1fr}
 html:root .crm-stat{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:center}
 html:root .crm-stat>strong{margin-top:0}
 html:root .crm-stat>p{grid-column:1/-1}
}
