/* ============================================================
   COBRANÇAS
   Janela "Gerar cobrança", aba Cobranças do Financeiro, cartão
   "Cobranças" da ficha e do painel do cliente.
   ============================================================ */
.cf-pick { margin-top: 6px; border: 1px solid #2a2a2a; border-radius: 8px; background: #141414; max-height: 240px; overflow-y: auto; }
.cf-pick button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid #1f1f1f; color: inherit; padding: 9px 12px; cursor: pointer; font-size: 13px; }
.cf-pick button:last-child { border-bottom: 0; }
.cf-pick button:hover { background: rgba(201,168,76,.08); }
.cf-pick small { display: block; color: #888; font-size: 11px; margin-top: 2px; }

.cf-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.cf-seg label { flex: 1 1 160px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid #2a2a2a; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.cf-seg label:has(input:checked) { border-color: #c9a84c; background: rgba(201,168,76,.08); color: #e0c070; }
.cf-seg input { accent-color: #c9a84c; }

.cf-insts { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.cf-inst { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid #2a2a2a; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 1.45; }
.cf-inst:has(input:checked) { border-color: #c9a84c; background: rgba(201,168,76,.06); }
.cf-inst input { accent-color: #c9a84c; margin-top: 3px; flex-shrink: 0; }
.cf-inst small { color: #999; }

.cf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }
.cf-row { display: flex; gap: 6px; }
.cf-row select { flex: 0 0 auto; width: auto; min-width: 0; max-width: 58%; }
.cf-row input { flex: 1; min-width: 0; }
.cf-link { display: inline-block; margin-top: 4px; font-size: 12px; color: #c9a84c; }

.cf-sum { border: 1px solid #2a2a2a; border-radius: 10px; padding: 10px 12px; background: #161616; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.cf-sum > div { display: flex; justify-content: space-between; gap: 10px; }
.cf-sum span { color: #999; }
.cf-sum .cf-total { border-top: 1px solid #2a2a2a; padding-top: 6px; margin-top: 2px; font-size: 15px; }
.cf-sum .cf-total strong { color: #c9a84c; font-size: 18px; }

/* lista de cobranças (Financeiro / ficha) */
.chg-list { display: flex; flex-direction: column; }
.chg-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 12px 16px; border-bottom: 1px solid #1e1e1e; }
.chg-row:last-child { border-bottom: 0; }
.chg-main { flex: 1 1 220px; min-width: 0; }
.chg-main .t { font-size: 13px; font-weight: 600; }
.chg-main .s { font-size: 11.5px; color: #888; margin-top: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.chg-amt { text-align: right; font-weight: 700; white-space: nowrap; }
.chg-amt small { display: block; font-weight: 400; color: #888; font-size: 11px; }
.chg-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chg-late { color: #ef4444; font-weight: 600; }
.chg-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #1e1e1e; }
.chg-filters input { flex: 1 1 200px; min-width: 0; }
.chg-filters select { flex: 0 1 190px; }

/* painel do cliente */
.cli-chg-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #1e1e1e; cursor: pointer; }
.cli-chg-item:last-child { border-bottom: 0; }
.cli-chg-item .ic { font-size: 22px; flex-shrink: 0; }
.cli-chg-item .info { flex: 1; min-width: 0; }
.cli-chg-item .info .t { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-chg-item .info .d { font-size: 12px; color: #888; margin-top: 2px; }
.cli-chg-item .right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.cli-chg-item .right .v { font-weight: 700; color: #c9a84c; }
.cli-chg-item.late .right .v { color: #ef4444; }
.cli-chg-break { background: #161616; border: 1px solid #2a2a2a; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.cli-chg-break > div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.cli-chg-break span { color: #999; }

/* aviso "conta pendente" no painel do cliente */
.cli-activate { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.55); border-radius: 12px; padding: 16px; margin: 12px 0; }
.cli-activate .h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.cli-activate .h .i { font-size: 24px; line-height: 1; }
.cli-activate .h strong { display: block; color: #f5c26b; font-size: 14px; line-height: 1.4; }
.cli-activate .h small { display: block; color: #999; font-size: 12px; margin-top: 4px; line-height: 1.5; }
.cli-activate button { width: 100%; background: #c9a84c; color: #000; border: 0; padding: 13px; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; }
.cli-later { display: block; width: 100%; background: none; border: 1px solid #3a3226; color: #e0c070; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 12px; }

@media (max-width: 600px) {
  .chg-row { padding: 12px; }
  .chg-amt { text-align: left; }
  .chg-actions { width: 100%; }
  .chg-actions .btn { flex: 1 1 auto; }
  .cli-chg-item { padding: 12px 14px; }
}

/* ── Multa/juros automáticos, lembretes, "Em análise" ── */
.cf-box { border: 1px solid #2a2a2a; border-radius: 10px; padding: 12px; margin: 4px 0 14px; background: #151515; }
.cf-box-t { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #f0f0f0; }
.cf-box-check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 13px; line-height: 1.4; margin-bottom: 8px; }
.cf-box-check input { accent-color: #c9a84c; margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; }
.cf-box-check small { color: #888; }
.cf-warn { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.4); color: #f5c26b; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin-top: 8px; line-height: 1.45; }
.cf-plan { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 8px; }
.cf-plan-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid #262626; border-radius: 8px; font-size: 13px; }
.cf-plan-row label { display: flex; align-items: center; gap: 5px; cursor: pointer; color: #ccc; }
.cf-plan-row input { accent-color: #c9a84c; }
.cf-plan-d { flex: 1 1 150px; font-weight: 600; min-width: 0; }
.cf-plan-del { background: none; border: 0; color: #777; cursor: pointer; font-size: 14px; padding: 2px 4px; }
.cf-plan-del:hover { color: #f87171; }
.cf-plan-add { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cf-plan-add select { width: auto; flex: 0 1 auto; min-width: 0; }
.chg-review-st { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.45); color: #f5c26b; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; line-height: 1.45; }
.chg-row.chg-draft { background: rgba(245,158,11,.04); border-left: 3px solid #f59e0b; }
.cli-chg-paid { opacity: .85; }
.cli-chg-break > div > span:first-child { flex-shrink: 0; max-width: 60%; }
.cli-chg-break > div > strong { text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* Empréstimo avulso: limite do cliente */
.cf-room { margin-top: 8px; border: 1px solid #2a2a2a; border-radius: 10px; padding: 8px 12px; background: #161616; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.cf-room > div { display: flex; justify-content: space-between; gap: 10px; }
.cf-room > div span { color: #999; }
.cf-room-over { border-color: rgba(239,68,68,.5); }
.cf-room .cf-room-msg { display: block; color: #f5c26b; font-size: 12px; line-height: 1.45; margin-top: 4px; }
.cf-room .cf-over { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; color: #f0f0f0; cursor: pointer; }
.cf-room .cf-over input { accent-color: #ef4444; margin-top: 2px; }
.chg-kind-loan { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(34,197,94,.12); color: #4ade80; border: 1px solid rgba(34,197,94,.35); vertical-align: middle; }

.cf-link[hidden], .pix-copy-hint[hidden], .cf-room[hidden] { display: none !important; }

/* ── Rodada 81: crédito estimado (cliente sem ativação) e limite (ativo) ── */
.cli-est { background: #141414; border: 1px solid #2a2a2a; border-radius: 16px; padding: 18px; margin: 12px 0; text-align: left; }
.cli-est .tag { display: inline-block; font-size: 11px; color: #c9a84c; background: rgba(201,168,76,.1); border-radius: 999px; padding: 4px 10px; margin-bottom: 12px; }
.cli-est .lbl { font-size: 13px; color: #9a9a9a; font-weight: 600; }
.cli-est .val { font-size: 30px; font-weight: 800; color: #f0f0f0; line-height: 1.15; margin: 2px 0; }
.cli-est .sub { font-size: 10px; color: #777; }
.cli-est hr { border: 0; border-top: 1px solid #262626; margin: 12px 0; }
.cli-est .desc { font-size: 13px; color: #a5a5a5; line-height: 1.5; margin-bottom: 12px; }
.cli-est .go { display: block; width: 100%; background: #c9a84c; color: #000; border: 0; border-radius: 12px; padding: 13px; font-weight: 700; font-size: 15px; cursor: pointer; }
.cli-est .go:disabled { opacity: .55; cursor: default; }
.cli-est .go.out { background: none; color: #c9a84c; border: 1px solid #c9a84c; margin-top: 8px; }
.cli-est .more { display: block; width: 100%; background: none; border: 0; color: #c9a84c; font-weight: 700; font-size: 13px; padding: 10px 0 0; cursor: pointer; }
.cli-est .det { font-size: 11px; color: #888; line-height: 1.6; margin-top: 8px; }
.cli-est .row2 { display: flex; gap: 16px; margin-top: 6px; font-size: 12px; color: #9a9a9a; }
.cli-est .row2 strong { color: #f0f0f0; }
