/* Parâmetro único de inadimplência + indicadores de cobrança */
.inad-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px; white-space: nowrap; border: 1px solid transparent; }
.inad-badge.inad-tolerancia { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.inad-badge.inad-em_cobranca { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.inad-badge.inad-em_cobranca.inad-soon { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.inad-badge.inad-inadimplente { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
td .inad-badge { margin-top: 3px; }

.inad-muted { color: var(--text-muted, #64748b); font-size: 13px; margin: 0; }
.inad-error { color: #b91c1c; font-size: 13px; margin: 0; }

/* Parâmetros (tela Vencimentos) */
.inad-params-card { margin-top: 22px; border: 1px solid var(--border, #e2e8f0); border-radius: 14px; background: #fff; padding: 18px 20px; display: grid; gap: 14px; }
.inad-params-head h4 { margin: 0 0 4px; font-size: 15px; color: var(--text, #0f172a); }
.inad-params-head p { margin: 0; font-size: 13px; color: var(--text-muted, #64748b); max-width: 760px; }
.inad-params-form { display: grid; grid-template-columns: repeat(2, minmax(180px, 260px)) auto; gap: 14px 18px; align-items: start; }
.inad-params-form .field small { display: block; margin-top: 4px; font-size: 11px; color: var(--text-subtle, #94a3b8); font-weight: 400; }
.inad-params-form button { align-self: center; }
.inad-scale-row { display: flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--border, #e2e8f0); }
.inad-seg { flex: 1; padding: 9px 12px; display: grid; gap: 2px; font-size: 12px; }
.inad-seg b { font-weight: 600; }
.inad-seg small { color: inherit; opacity: .8; }
.inad-seg-ok { background: #ecfdf5; color: #065f46; }
.inad-seg-tol { background: #f1f5f9; color: #475569; }
.inad-seg-cob { background: #fef3c7; color: #92400e; }
.inad-seg-inad { background: #fee2e2; color: #991b1b; }
.inad-updated { font-size: 12px; }

/* Indicadores */
.inad-ind-loading, .inad-ind-error { padding: 12px 14px; border: 1px dashed var(--border, #e2e8f0); border-radius: 12px; color: var(--text-muted, #64748b); font-size: 13px; margin-bottom: 12px; background: #fff; }
.inad-ind-error { color: #b91c1c; }
.inad-ind { border: 1px solid var(--border, #e2e8f0); border-radius: 14px; background: #fff; padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 10px; }
.inad-ind-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.inad-ind-head strong { font-size: 14px; color: var(--text, #0f172a); margin-right: 10px; }
.inad-ind-head span { font-size: 12px; color: var(--text-muted, #64748b); }
.inad-ind-head small { font-size: 11px; color: var(--text-subtle, #94a3b8); }
.inad-cards { display: grid; grid-template-columns: repeat(7, minmax(132px, 1fr)); gap: 8px; }
.inad-card { text-align: left; border: 1px solid var(--border, #e2e8f0); border-left-width: 4px; border-radius: 11px; background: #fff; padding: 9px 11px; display: grid; gap: 2px; cursor: pointer; font: inherit; color: inherit; min-width: 0; transition: box-shadow .15s, transform .15s; }
.inad-card:hover { box-shadow: 0 6px 16px rgba(15, 23, 42, .08); transform: translateY(-1px); }
.inad-card:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 2px; }
.inad-card span { font-size: 11px; font-weight: 600; color: var(--text-muted, #64748b); text-transform: uppercase; letter-spacing: .02em; }
.inad-card strong { font-size: 16px; color: var(--text, #0f172a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inad-card small { font-size: 11px; color: var(--text-muted, #64748b); }
.inad-card em { font-style: normal; font-size: 10.5px; color: var(--text-subtle, #94a3b8); }
.inad-card-cob { border-left-color: #f59e0b; }
.inad-card-inad { border-left-color: #ef4444; }
.inad-card-none { border-left-color: #64748b; }
.inad-card-soon { border-left-color: #f97316; }
.inad-card-prom { border-left-color: #8b5cf6; }
.inad-card-broken { border-left-color: #be123c; }
.inad-card-legal { border-left-color: #0f172a; }
.inad-matrix-box summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--primary, #2563eb); }
.inad-matrix-wrap { overflow-x: auto; margin-top: 8px; }
.inad-matrix { width: 100%; border-collapse: collapse; font-size: 12px; }
.inad-matrix th, .inad-matrix td { border-bottom: 1px solid var(--border, #e2e8f0); padding: 6px 8px; text-align: right; white-space: nowrap; }
.inad-matrix th:first-child, .inad-matrix tbody th { text-align: left; }
.inad-matrix thead th { color: var(--text-muted, #64748b); font-weight: 600; }
.inad-matrix td small { display: block; color: var(--text-subtle, #94a3b8); font-size: 10.5px; }
.inad-matrix button { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; color: var(--text, #0f172a); text-align: right; }
.inad-matrix button:hover b { color: var(--primary, #2563eb); text-decoration: underline; }
.inad-zero { color: var(--text-subtle, #94a3b8); }

/* Lista (drill-down) */
.inad-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.inad-modal.hidden { display: none; }
.inad-modal-box { background: #fff; border-radius: 16px; width: min(1280px, 100%); max-height: 100%; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(15, 23, 42, .25); }
.inad-modal-box header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border, #e2e8f0); }
.inad-modal-box header strong { display: block; font-size: 15px; }
.inad-modal-sub { font-size: 12px; color: var(--text-muted, #64748b); }
.inad-modal-box header > div:last-child { display: flex; gap: 8px; align-items: center; }
.inad-close { border: 0; background: #f1f5f9; border-radius: 8px; width: 32px; height: 32px; font-size: 20px; cursor: pointer; }
.inad-modal-body { padding: 12px 18px 18px; overflow: auto; }
.inad-list-wrap { overflow: auto; }
.inad-list { width: 100%; border-collapse: collapse; font-size: 12px; }
.inad-list th, .inad-list td { padding: 7px 8px; border-bottom: 1px solid var(--border, #e2e8f0); text-align: left; white-space: nowrap; }
.inad-list thead th { position: sticky; top: 0; background: #f8fafc; color: var(--text-muted, #64748b); font-weight: 600; }
.inad-list .n { text-align: right; }
.inad-list td small { display: block; color: var(--text-subtle, #94a3b8); font-size: 10.5px; }

@media (max-width: 1400px) { .inad-cards { grid-template-columns: repeat(4, minmax(130px, 1fr)); } }
@media (max-width: 760px) {
  .inad-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inad-params-form { grid-template-columns: 1fr; }
  .inad-scale-row { flex-direction: column; }
  .inad-modal { padding: 0; }
  .inad-modal-box { border-radius: 0; height: 100%; }
}

/* Vendas: situação de pagamento dos contratos */
.sales-payment-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.sales-payment-list li { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; font-size: 12px; }
.sales-payment-list li span { color: var(--text-muted, #64748b); font-weight: 600; }
.sales-payment-list li i { display: block; height: 8px; border-radius: 999px; background: #10b981; }
.sales-payment-list li strong { font-size: 13px; white-space: nowrap; }
.sales-payment-list li strong small { font-weight: 400; color: var(--text-muted, #64748b); }
.sales-payment-list .sales-pay-tolerancia i { background: #94a3b8; }
.sales-payment-list .sales-pay-em_cobranca i { background: #f59e0b; }
.sales-payment-list .sales-pay-inadimplente i { background: #ef4444; }
.sales-early { width: 100%; text-align: left; border: 1px solid #fed7aa; background: #fff7ed; border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; cursor: pointer; font: inherit; color: inherit; }
.sales-early span { font-size: 11px; font-weight: 700; color: #9a3412; text-transform: uppercase; letter-spacing: .02em; }
.sales-early strong { font-size: 14px; }
.sales-early small { font-size: 11px; color: var(--text-muted, #64748b); }
.sales-bottom-grid .commercial-card.wide { grid-column: 1 / -1; }
