.commercial-workspace { max-width: 1500px; }
.commercial-metrics-band { border-bottom: 1px solid var(--border,#e2e8f0); padding: 0 0 24px; margin-bottom: 24px; }
.commercial-metrics-band h3 { margin-bottom: 6px; }
.commercial-metrics-band .metrics-grid { margin: 20px 0; }
.commercial-metrics-band .metric-card { min-width: 0; }
.commercial-metrics-band .metric-card small { line-height: 1.5; overflow-wrap: anywhere; }
.crm-app .commercial-priority { text-align: left; background: #fff; color: var(--text,#0f172a); white-space: normal; border-radius: 6px; }
.crm-app .commercial-priority[aria-pressed=true] { border-color: #28745c; background: #eaf5ef; }
.commercial-confirmation-fields { display: grid; grid-template-columns: minmax(180px,1fr) minmax(0,2fr); align-items: start; gap: 14px; margin: 16px 0; }
.commercial-confirmation-fields label { display: grid; gap: 8px; font-size: 13px; }
.commercial-confirmation-fields .commercial-check { grid-column: 1 / -1; }
.commercial-confirmation-fields .btn { justify-self: start; white-space: normal; }
.commercial-payment-choice { min-width: 0; border: 0; border-bottom: 1px solid var(--border,#e2e8f0); margin: 16px 0; padding: 0 0 12px; }
.commercial-payment-choice legend { font-size: 13px; font-weight: 600; }
.commercial-payment-choice .commercial-check { align-items: start; }
.commercial-payment-choice span { min-width: 0; overflow-wrap: anywhere; }
.commercial-kpis:empty { display: none; }
.commercial-workspace > *, .commercial-workspace [data-commercial-table], .commercial-workspace .table-scroll { min-width: 0; max-width: 100%; }
.commercial-workspace [hidden], .commercial-form [hidden] { display: none !important; }
.commercial-workspace h3, .commercial-section h3 { font-size: 16px; line-height: 1.4; margin: 0 0 16px; overflow-wrap: anywhere; }
.commercial-kpis { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); border-block: 1px solid var(--border,#e2e8f0); margin: 20px 0; }
.crm-app .commercial-kpi { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 68px; border: 0; border-radius: 0; padding: 12px 16px; background: transparent; color: var(--text,#0f172a); text-align: left; box-shadow: none; }
.commercial-kpi span { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.commercial-kpi strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.commercial-kpi svg { width: 19px; height: 19px; }
.crm-app .commercial-kpi[aria-pressed=true] { background: #eaf5ef; color: #215d49; box-shadow: inset 0 -3px #28745c; }
.crm-app .commercial-kpi:hover { background: #f0f7f3; }
.commercial-kpi[data-commercial-kpi=quente] svg { color: #b42318; }
.commercial-kpi[data-commercial-kpi=atrasado] svg { color: #a42530; }
.commercial-filters { display: grid; grid-template-columns: minmax(200px,2fr) repeat(3,minmax(135px,1fr)); gap: 16px; align-items: end; margin-bottom: 20px; }
.commercial-filters label, .commercial-fields label, .commercial-section > label { display: grid; gap: 8px; min-width: 0; font-size: 13px; }
.commercial-filters :is(input,select), .commercial-form :is(input,textarea,select) { width: 100%; min-width: 0; }
.commercial-filters .btn-icon { align-self: end; justify-self: start; width: 40px; height: 40px; }
.commercial-filter-end { display: grid; grid-template-columns: minmax(0,1fr) 40px; gap: 8px; align-items: end; min-width: 0; }
.commercial-workspace .dossier-table { min-width: 920px; }
.commercial-workspace .dossier-table td { padding-block: 12px; vertical-align: top; max-width: 340px; overflow-wrap: anywhere; }
.commercial-workspace .dossier-table td:first-child { min-width: 200px; }
.commercial-workspace tr[data-commercial-temperature=quente] > td { background: #fff7f5; }
.commercial-workspace tr[data-commercial-temperature=quente] > td:first-child { border-left: 3px solid #c3372c; }
.commercial-workspace tr[data-commercial-temperature=quente]:hover > td { background: #fff0ed; }
.crm-app .commercial-name { background: transparent; color: var(--primary-dark,#215d49); border: 0; padding: 0; border-radius: 0; font-size: 14px; font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; white-space: normal; overflow-wrap: anywhere; }
.commercial-secondary { display: block; font-size: 12px; color: var(--text-secondary,#526071); white-space: normal; margin-top: 4px; max-width: 320px; }
.commercial-handoff { display: block; font-size: 12px; font-weight: 600; color: #805400; margin-top: 5px; }
.commercial-overdue { color: #a42530; font-weight: 600; white-space: nowrap; }
.commercial-badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 28px; min-width: 76px; padding: 3px 9px; border: 1px solid transparent; border-radius: 5px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.commercial-badge svg, .commercial-badge i { width: 15px; height: 15px; flex: 0 0 15px; }
.commercial-badge-quente { color: #a31e18; background: #fff0ed; border-color: #f3b6ae; }
.commercial-badge-frio { color: #175b98; background: #edf6ff; border-color: #b0d2ee; }
.commercial-badge-neutral { color: #526071; background: #f1f4f7; border-color: #dce2e8; }
.commercial-section { padding: 24px 0; border-bottom: 1px solid var(--border,#e2e8f0); }
.commercial-section h4 { font-size: 14px; }
.commercial-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 16px; }
.commercial-fields .commercial-wide { grid-column: span 2; }
.commercial-form textarea { resize: vertical; min-height: 82px; }
.commercial-temperature { border: 0; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.commercial-temperature legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.crm-app .commercial-temperature label, .crm-app .commercial-check { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; cursor: pointer; }
.crm-app .commercial-temperature input[type=radio], .crm-app .commercial-check input[type=checkbox] { flex: 0 0 16px; width: 16px; min-width: 16px; height: 16px; min-height: 16px; padding: 0; box-shadow: none; }
.commercial-temperature label:has(input:checked) .commercial-badge { outline: 2px solid currentColor; outline-offset: 2px; }
.commercial-provenance { font-size: 12px; margin: 16px 0 0; }
.commercial-provenance:empty, .commercial-message:empty { display: none; }
.commercial-message { padding: 12px 0; font-size: 13px; overflow-wrap: anywhere; }
.commercial-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 0; }
.commercial-actions .btn { min-height: 40px; white-space: normal; }
.commercial-history-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.commercial-accept { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border,#e2e8f0); }
.commercial-accept p { flex-basis: 100%; margin: 0; font-size: 13px; }
.commercial-workspace [data-commercial-detail] > .workspace-toolbar h3 { font-size: 20px; margin-bottom: 6px; }
.commercial-registration { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; }
.commercial-registration dt { font-size: 12px; color: var(--text-secondary); }
.commercial-registration dd { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-commercial-reconcile] { padding: 16px 0; }
[data-commercial-reconcile] .dossier-table { min-width: 520px; table-layout: fixed; }
[data-commercial-reconcile] td { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width:1000px) { .commercial-filters { grid-template-columns: repeat(3,minmax(0,1fr)); } .commercial-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) {
  .commercial-confirmation-fields { grid-template-columns: minmax(0,1fr); }
  .commercial-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-app .commercial-kpi { padding: 12px 8px; gap: 6px; min-height: 80px; }
  .commercial-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .commercial-search { grid-column: 1 / -1; }
  .commercial-fields { grid-template-columns: minmax(0,1fr); }
  .commercial-fields .commercial-wide { grid-column: auto; }
  .commercial-workspace .workspace-toolbar { align-items: start; gap: 12px; flex-wrap: wrap; }
}
