/* Current debt vs monthly sales goals. Scoped to the collection report. */
#dynamicCreditDetails .credit-view-tabs{display:flex;gap:8px;padding:18px 24px;border-bottom:1px solid #355754;background:#0c2424;flex-wrap:wrap}
.credit-view-tabs button{border:1px solid #4c7670;border-radius:8px;background:#173b36;color:#daf9ef;padding:10px 16px;cursor:pointer;font:inherit;font-weight:750}
.credit-view-tabs button.is-selected{background:#f5cf58;border-color:#f5cf58;color:#102622}
.cc-active>.collections-report-header>.refresh-actions{display:none!important}
#cappedClientsRoot[hidden],#dynamicCreditBody[hidden]{display:none!important}
#cappedClientsRoot{padding:24px;background:#f2f6f8;color:#172b35;min-width:0}
#cappedClientsRoot *{box-sizing:border-box}
.cc-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:22px}
.cc-heading p{margin:0 0 6px;font-size:11px;letter-spacing:.1em;color:#137c74;font-weight:800}
.cc-heading h4{font-size:24px;margin:0 0 7px!important;color:#163642!important}
.cc-heading span{font-size:12px;color:#526873}
.cc-update{display:flex;flex-direction:column;gap:8px;align-items:flex-end;flex-shrink:0}
#cappedClientsRoot .cc-refresh{border:0;border-radius:8px;padding:12px 17px;background:#087eae;color:#fff;font:inherit;font-size:13px;font-weight:750;cursor:pointer}
#cappedClientsRoot .cc-refresh:disabled{opacity:.6;cursor:wait}
.cc-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}
.cc-stats>div{background:#fff;border:1px solid #d1dee5;border-radius:10px;padding:15px;border-top:3px solid #148b86;display:flex;flex-direction:column;gap:7px}
.cc-stats span{font-size:12px;color:#526873}
.cc-stats strong{font-size:22px;color:#173f48;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.cc-stats small{font-size:10px;color:#697c87}
.cc-stats .cc-stat-needed{background:#fff7d7;border-top-color:#e7ad08}
.cc-filters{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:14px}
.cc-filters label{display:flex;flex-direction:column;gap:6px;color:#34525f;font-size:12px;font-weight:750}
#cappedClientsRoot .cc-filters input,#cappedClientsRoot .cc-filters select{width:100%;min-width:0;border:1px solid #bccfd9;border-radius:7px;background:#fff;color:#182e39;padding:11px 12px;font:inherit;font-weight:500}
.cc-basis{font-size:11px;color:#576f7b;line-height:1.5;margin:14px 0}
.cc-table-wrap{width:100%;max-height:660px;overflow:auto;border:1px solid #cbd9e3;border-radius:9px;background:#fff}
#cappedClientsRoot .cc-table{border-collapse:separate;border-spacing:0;width:100%;min-width:1190px;font-size:12px;table-layout:fixed}
.cc-table th{background:#17374e;color:#fff;padding:0;text-align:left;position:sticky;top:0;z-index:2;border-right:1px solid #355466}
.cc-table th:first-child{width:19%}.cc-table th:nth-child(2){width:13%}.cc-table th:last-child{width:14%}
.cc-table th button{background:transparent;border:0;color:inherit;padding:14px 10px;width:100%;text-align:left;cursor:pointer;font:inherit;font-weight:800;position:relative;min-height:70px;line-height:1.35}
.cc-table th button small{display:block;color:#b4d2e3;font-size:10px;font-weight:500;margin-top:4px}
.cc-sort-arrow{display:inline-block;font-size:11px;margin-left:6px;opacity:.7}
.cc-table th.cc-needed-heading{background:#826012}
.cc-table td{padding:13px 10px;border-bottom:1px solid #dce5ea;border-right:1px solid #e4ebef;background:#fff;vertical-align:top;overflow-wrap:anywhere;line-height:1.4}
.cc-table tr:nth-child(even) td{background:#f3f8fa}
.cc-table td small{display:block;font-size:10px;color:#667a84;margin-top:5px;font-weight:400}
.cc-table td.cc-num{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.cc-table td.cc-current{background:#eef7fd}.cc-table td.cc-objective{background:#e4f1fb;font-weight:700}
.cc-table td.cc-debt{background:#fff0ed;color:#a12f23;font-weight:750}
.cc-table td.cc-debt small{color:#9b4b41}
.cc-table td.cc-needed{background:#fff5d1}
.cc-table tr:hover td{box-shadow:inset 0 1px #9fc9cd,inset 0 -1px #9fc9cd}
.cc-no-goal{display:inline-block;font-size:11px;color:#936017;font-weight:650;white-space:normal}
.cc-calculation summary{display:block!important;cursor:pointer;color:#6b4c00;list-style:none;outline-offset:4px}
.cc-calculation summary::-webkit-details-marker{display:none}
#cappedClientsRoot .cc-calculation summary::before{display:none;content:none}
.cc-calculation>div{white-space:normal;text-align:left;font-size:11px;margin-top:10px;padding-top:10px;border-top:1px solid #dfcf8d;color:#514727;line-height:1.5}
.cc-calculation p{margin:6px 0}
.cc-foot{display:flex;justify-content:space-between;gap:25px;font-size:11px;color:#5d7680;margin-top:14px;line-height:1.5}
.cc-foot span:last-child{max-width:600px;text-align:right}
.cc-empty{padding:35px!important;text-align:center!important;color:#61747d}
.cc-message,.cc-error{padding:20px;background:#fff;border:1px solid #cadbe3;border-radius:8px;margin-bottom:12px;font-size:14px;line-height:1.5}
.cc-error{background:#fff0e9;color:#8f342a;border-color:#edb9a0}
@media(max-width:1000px){.cc-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cc-filters{grid-template-columns:1fr 1fr}.cc-filters label:first-child{grid-column:1/-1}}
@media(max-width:600px){#cappedClientsRoot{padding:15px}.cc-heading{flex-direction:column}.cc-update{align-items:flex-start;width:100%}.cc-update .cc-refresh{width:100%}.cc-stats{gap:8px}.cc-stats>div{padding:12px}.cc-stats strong{font-size:18px}.cc-filters{grid-template-columns:1fr}.cc-foot{flex-direction:column;gap:8px}.cc-foot span:last-child{text-align:left}.credit-view-tabs button{flex:1}.cc-table-wrap{max-height:65vh}}

/* Keep the matrix readable inside the dashboard's dark collection theme. */
#cappedClientsRoot .cc-table td{color:#1b3544}
#cappedClientsRoot .cc-table td>strong{color:inherit}
#cappedClientsRoot .cc-table td.cc-debt{color:#a12f23}
.cc-info{display:inline-grid;place-items:center;width:15px;height:15px;font-size:10px;border:1px solid currentColor;border-radius:50%;margin-left:3px;vertical-align:middle;font-family:Arial,sans-serif}
@media(max-width:600px){
 .cc-stats>div:nth-child(1){grid-column:1;grid-row:1}
 .cc-stats>div:nth-child(4){grid-column:2;grid-row:1}
 .cc-stats>div:nth-child(2),.cc-stats>div:nth-child(3){grid-column:1/-1}
 .cc-stats strong{white-space:nowrap}
}

.collections-report-panel.cc-active{min-width:0;width:100%;max-width:100%;box-sizing:border-box}
.collections-report-panel.cc-active #dynamicCreditDetails{min-width:0;width:100%;max-width:100%}
