/* Acerto A × B: saldo bilateral, histórico e fechamentos. */
.ab-view{display:flex;flex-direction:column;gap:12px}
.ab-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ab-top h2{font-size:21px;margin:4px 0 0}
.ab-top h2 span{color:var(--accent);font-size:17px;padding:0 4px}
.ab-balance{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 20px;background:linear-gradient(110deg,#ebf7f1,#fff);border-radius:12px;border:1px solid #d3e6da;border-left:4px solid #21896c}
.ab-balance>div{display:flex;flex-direction:column;gap:7px;min-width:0}
.ab-balance small{font-size:11px;letter-spacing:.6px;font-weight:800;color:#668174}
.ab-balance p{margin:0;font-size:16px;line-height:1.5;color:#123e32}
.ab-balance span{font-size:11px;color:#688174}
.ab-balance>strong{font-size:clamp(23px,3vw,34px);font-variant-numeric:tabular-nums;white-space:nowrap;color:#147353}
.ab-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ab-stats>div{padding:13px 15px;background:#fff;border:1px solid var(--line);border-radius:10px;display:flex;flex-direction:column;gap:7px;min-width:0}
.ab-stats small{font-size:11px;color:#698394;overflow-wrap:anywhere}
.ab-stats strong{font-size:18px;color:#253f54;font-variant-numeric:tabular-nums}
.ab-tabs{display:flex;gap:5px;border-bottom:1px solid var(--line);margin:3px 0 1px}
.ab-tab{font-size:12px;font-weight:750;background:transparent;border:0;border-bottom:2px solid transparent;color:#6b7d8c;padding:10px 16px}
.ab-tab:hover{color:var(--accent)}
.ab-tab.active{color:var(--accent);border-bottom-color:var(--accent)}
.ab-row-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:0}
.ab-row-head h3,.ab-close-section>h3{font-size:14px;margin:0}
.ab-row-head small{font-size:11px;color:#7c8b96}
.ab-row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ab-table th,.ab-table td{font-size:12px}
.ab-table td:nth-child(1),.ab-table td.numeric{white-space:nowrap}
.ab-table td:nth-child(2){min-width:170px}
.ab-table th.numeric,.ab-table td.numeric{text-align:right;font-variant-numeric:tabular-nums}
.ab-table th:last-child,.ab-table td:last-child{text-align:center}
.ab-table td:last-child .table-actions{justify-content:center}
.ab-note{font-size:11px;color:#7d8d9d;display:block;margin-top:5px}
.ab-arrow{color:#218c6b;padding:0 3px;font-weight:850}
.ab-frozen{font-size:11px;color:#687d8e;display:inline-flex;align-items:center;gap:5px}
.ab-form{width:min(100%,630px)}
.ab-hint{font-size:11px;color:#658073;line-height:1.6;padding:10px 12px;background:#edf7f2;border-radius:8px;margin:12px 0 0}
.ab-close-section,.ab-section{display:flex;flex-direction:column;gap:12px}
.ab-section-body{padding:16px}
.ab-section .panel-header{display:flex;justify-content:space-between;align-items:center;gap:9px;flex-wrap:wrap}
.ab-date-row{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px}
.ab-date-row label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:750;color:#677e8d}
.ab-date-row input{min-height:38px;padding:7px 9px;background:#fff;border:1px solid var(--line);border-radius:8px}
.ab-date-row button{min-height:38px}
.ab-preview{border-top:1px solid var(--line);margin-top:15px;padding-top:14px}
.ab-preview-line{display:flex;justify-content:space-between;align-items:center;gap:8px}
.ab-preview-line small{font-size:11px;color:#657e8e;font-weight:750}
.ab-preview-line strong{font-size:26px;color:#127157;font-variant-numeric:tabular-nums}
.ab-preview>p{font-size:15px;margin:10px 0}
.ab-bits{display:flex;gap:8px;flex-wrap:wrap}
.ab-bits span{background:#f2f7f5;border:1px solid #dceae5;border-radius:8px;padding:7px 9px;font-size:11px;color:#5e756b}
.ab-archive-line{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.ab-archive-line:last-child{border-bottom:0}
.ab-archive-line>div:first-child{display:flex;flex-direction:column;gap:5px;min-width:0}
.ab-archive-line strong{font-size:12px}
.ab-archive-line small{font-size:11px;color:#7990a0}
@media(max-width:850px){.ab-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.ab-stats>div:last-child{grid-column:1/-1}}
@media(max-width:590px){.ab-balance{flex-direction:column;align-items:flex-start;padding:14px}.ab-stats{grid-template-columns:1fr}.ab-stats>div:last-child{grid-column:auto}.ab-date-row label{flex:1;min-width:120px}.ab-date-row input{width:100%}.ab-date-row button{width:100%}.ab-archive-line{align-items:flex-start;flex-wrap:wrap}}

/* Os dois tipos de lançamento permanecem identificáveis no histórico. */
.ab-kind{display:inline-flex;align-items:center;max-width:100%;white-space:normal;
 font-size:10px;font-weight:750;letter-spacing:.1px;line-height:1.5!important;
 padding:3px 8px;border-radius:6px;margin:0 8px 5px 0;border:1px solid transparent}
.ab-kind-payment{background:#e5f5ed;border-color:#bde2ce;color:#137047}
.ab-kind-debt{background:#eff3fb;border-color:#dbe3f5;color:#475e8a}
.ab-direction{display:block;margin-bottom:5px;color:var(--muted);font-size:10px}
.ab-table td:nth-child(2) b{overflow-wrap:anywhere}
.ab-stats{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.ab-form select[name="kind"]{font-weight:650}
.ab-row-actions .btn{white-space:normal}
@media(max-width:640px){
 .ab-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ab-kind{margin:0 4px 4px 0}
}
@media(max-width:420px){
 .ab-stats{grid-template-columns:1fr}
}

/* Totais detalhados isolados da tela de lançamentos. */
.ab-summary-section{display:flex;flex-direction:column;gap:12px;margin-top:3px}
.ab-summary-heading{display:flex;flex-direction:column;gap:5px;min-width:0}
.ab-summary-heading h3{margin:0;font-size:15px;line-height:1.4}
.ab-summary-heading p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}
.ab-summary-section .ab-stats{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}
.ab-summary-section .ab-stats>div:last-child{grid-column:auto}
.ab-tabs{flex-wrap:wrap;align-items:center;row-gap:0}
.ab-tab{white-space:normal;line-height:1.45!important}
@media(max-width:640px){.ab-summary-section .ab-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.ab-summary-section .ab-stats{grid-template-columns:1fr}}

/* Registros documentais: sem impacto sobre dívidas ou pagamentos. */
.ab-kind-neutral{color:#506981;background:#edf2f7;border-color:#d6e2eb}
.ab-neutral-row td{background:#fbfcfe}
.ab-neutral-row:hover td{background:#f2f7fa}
.ab-neutral-row .ab-direction{color:#607c93}
.ab-import-result{margin-top:12px}
.ab-import-preview{border:1px solid #d5e4eb;background:#f6fafc;
  padding:12px 14px;border-radius:9px;font-size:12px;line-height:1.55}
.ab-import-preview p{margin:7px 0 0}
.ab-import-warnings{padding:9px 11px;margin-top:10px;border-radius:7px;
 background:#fff8e7;border:1px solid #f0dfb4;color:#74561b}
.ab-import-warnings p{margin:4px 0;font-size:11px}
.ab-row-actions{flex-wrap:wrap;justify-content:flex-end}
.ab-neutral-row .ab-note{overflow-wrap:anywhere}

/* Prévia compacta dos lançamentos financeiros de A × B. */
.ab-financial-modal{width:min(100%,650px)}
.ab-financial-modal .modal-body{max-height:min(65vh,620px);overflow-y:auto}
.ab-financial-stats{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 8px}
.ab-financial-stats span{padding:4px 8px;border:1px solid #d8e4e8;
 border-radius:6px;background:#fff;color:#344b5d;font-size:11px}
.ab-financial-warning{padding:8px 10px;border-radius:6px;background:#fff8eb;
 border-left:3px solid #e9b766;color:#665131;line-height:1.5}
.ab-financial-dates{margin-top:13px;padding:12px;border:1px solid #d9e4ea;
 border-radius:8px;background:#fff;display:flex;flex-direction:column;gap:7px}
.ab-financial-dates>strong{font-size:12px}
.ab-financial-dates>p{margin:0 0 3px;font-size:11px;color:var(--muted)}
.ab-financial-dates label{font-size:11px;color:#405568;line-height:1.4}
.ab-financial-dates input[type=date]{min-height:34px}
.ab-financial-consent{display:flex;align-items:flex-start;gap:8px;margin-top:12px;
 font-size:11px;line-height:1.5}
.ab-financial-consent input[type=checkbox]{flex:none;width:16px;height:16px;margin-top:1px}
.ab-financial-hint{color:var(--muted);font-size:11px}
