.debt-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:18px}.debt-summary>div{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;display:grid;gap:8px}.debt-summary span{color:var(--muted);font-size:12px}.debt-summary b{font-size:20px}.debt-summary .attention{background:#fff4f1;border-color:#f1b9ad}.debt-summary .attention b,.debt{color:#c33b2f!important}.paid{color:#07865f!important}.debt-filters{display:grid;grid-template-columns:180px 240px minmax(260px,1fr);gap:12px;margin-bottom:18px}.debt-filters label{display:grid;gap:6px;font-weight:600}.debt-chart-section{margin-bottom:18px}.debt-employee-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:14px}.debt-employee-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:17px;display:grid;grid-template-columns:120px 1fr;align-items:center;gap:16px}.debt-donut{width:110px;height:110px;border-radius:50%;background:conic-gradient(#07865f 0 var(--paid),#ef6a5b var(--paid) 100%);display:grid;place-items:center;position:relative}.debt-donut:after{content:"";position:absolute;inset:16px;border-radius:50%;background:#fff}.debt-donut span{position:relative;z-index:1;text-align:center;display:grid}.debt-donut b{font-size:20px}.debt-donut small{color:var(--muted)}.debt-employee-card h4{margin:0 0 8px}.debt-employee-card p{display:flex;justify-content:space-between;margin:5px 0;font-size:12px}.debt-table{min-width:1250px}.debt-table td{vertical-align:middle}.debt-open{background:#fffaf7}.debt-paid{background:#f5fbf8}.debt-payment-history{margin-top:18px}.debt-payment-history>div:last-child{display:grid}.debt-payment-history article{display:grid;grid-template-columns:minmax(260px,1fr) 140px 120px minmax(180px,1fr);gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}.debt-payment-history article div{display:grid}.debt-payment-history article small{color:var(--muted)}@media(max-width:1100px){.debt-summary{grid-template-columns:repeat(2,1fr)}.debt-filters{grid-template-columns:1fr}.debt-employee-grid{grid-template-columns:1fr}}@media(max-width:600px){.debt-summary{grid-template-columns:1fr}.debt-employee-card{grid-template-columns:1fr}.debt-donut{margin:auto}.debt-payment-history article{grid-template-columns:1fr}}
.debt-table tfoot .debt-detail-total{background:#e8f3fb;border-top:2px solid #0f7dcc}
.debt-table tfoot .debt-detail-total th{font-weight:800;white-space:nowrap}
.debt-table tfoot .debt-detail-total th:first-child{text-align:right;color:#173b52}
@media(min-width:1101px){.debt-filters{grid-template-columns:180px 240px repeat(2,minmax(0,1fr))}.debt-filters label{min-width:0}}
.debt-filters:has([data-debt-unit-filter]){grid-template-columns:repeat(3,minmax(150px,1fr))}
.debt-unit-cell{min-width:150px;max-width:240px;white-space:normal;overflow-wrap:anywhere}
.debt-await-confirm{background:#fff8e7}
.debt-await-confirm td:last-child{min-width:105px}
@media(max-width:1100px){.debt-filters:has([data-debt-unit-filter]){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.debt-filters:has([data-debt-unit-filter]){grid-template-columns:1fr}}
.debt-table{min-width:1580px;table-layout:auto}
.debt-table th,.debt-table td{white-space:nowrap;padding-left:14px;padding-right:14px}
.debt-table thead th:nth-child(2),.debt-table tbody td:nth-child(2){min-width:145px}
.debt-table thead th:nth-child(4),.debt-table tbody td:nth-child(4){min-width:170px}
.debt-table thead th:nth-child(5),.debt-table tbody td:nth-child(5){min-width:190px;white-space:normal;line-height:1.45}
.debt-table thead th:nth-child(9),.debt-table tbody td:nth-child(9){min-width:190px;max-width:260px;white-space:normal;line-height:1.45}
.debt-table thead th:nth-child(10),.debt-table tbody td:nth-child(10){min-width:150px}
.debt-table thead th:nth-child(n+6):nth-child(-n+7),.debt-table tbody td:nth-child(n+6):nth-child(-n+7),.debt-table thead th:nth-child(n+11):nth-child(-n+13),.debt-table tbody td:nth-child(n+11):nth-child(-n+13){min-width:112px;text-align:right}
.debt-table thead th:last-child,.debt-table tbody td:last-child{min-width:210px}
.debt-table td:last-child{display:table-cell!important;white-space:nowrap}
.debt-table td:last-child .table-action{display:inline-flex;margin-right:6px}
.debt-table tfoot th{white-space:nowrap}
.debt-table thead th:nth-child(4),.debt-table tbody td:nth-child(4){position:sticky;left:0;z-index:3;background:#fff;box-shadow:5px 0 8px rgba(19,55,76,.08)}
.debt-table thead th:nth-child(4){z-index:5;background:#f3f7f8}
.debt-table .debt-open td:nth-child(4){background:#fffaf7}
.debt-table .debt-paid td:nth-child(4){background:#f5fbf8}
.debt-table .debt-await-confirm td:nth-child(4){background:#fff8e7}
.debt-table tfoot th{position:static;min-width:0;max-width:none;box-shadow:none}
.debt-table thead th:nth-child(n+6):nth-child(-n+7),.debt-table tbody td:nth-child(n+6):nth-child(-n+7),.debt-table thead th:nth-child(n+11):nth-child(-n+13),.debt-table tbody td:nth-child(n+11):nth-child(-n+13),.debt-table tfoot th:nth-child(2),.debt-table tfoot th:nth-child(3),.debt-table tfoot th:nth-child(7),.debt-table tfoot th:nth-child(8),.debt-table tfoot th:nth-child(9){text-align:right;padding-left:14px;padding-right:14px;font-variant-numeric:tabular-nums}
.debt-table tfoot th:nth-child(2),.debt-table tfoot th:nth-child(3),.debt-table tfoot th:nth-child(7),.debt-table tfoot th:nth-child(8),.debt-table tfoot th:nth-child(9){font-size:inherit;line-height:1.4}
.debt-table tfoot th:first-child{text-align:right;padding-right:18px}
.debt-table tfoot th:last-child{text-align:center;padding-left:14px;padding-right:14px}
.debt-duplicate-dialog{border:0;padding:0;background:transparent;max-width:min(92vw,520px);width:100%;overflow:visible}
.debt-duplicate-dialog::backdrop{background:rgba(8,29,42,.58);backdrop-filter:blur(2px)}
.debt-duplicate-card{background:#fff;border-radius:20px;padding:26px;box-shadow:0 24px 70px rgba(4,29,45,.3);text-align:center;border:2px solid #efb2a8}
.debt-duplicate-icon{width:54px;height:54px;margin:0 auto 12px;border-radius:50%;display:grid;place-items:center;background:#fee8e5;color:#c6382e;font-size:30px;font-weight:900}
.debt-duplicate-card h3{margin:0 0 10px;color:#a92e27;font-size:22px}
.debt-duplicate-card p{margin:0;white-space:pre-line;line-height:1.55;color:#294553}
.debt-duplicate-card>div:last-child{display:flex;justify-content:center;gap:10px;margin-top:22px;flex-wrap:wrap}
.debt-duplicate-card button{min-width:145px}
.table-wrap:has(.debt-table-viewport){overflow:visible}
.debt-table-scroll-top{height:18px;overflow-x:auto;overflow-y:hidden;margin:0 20px 8px;border-radius:8px;background:#eef4f6;scrollbar-color:#7f8f96 #e5ecef;scrollbar-width:auto}
.debt-table-scroll-track{height:1px}
.debt-table-viewport{width:100%;overflow-x:auto;overflow-y:visible;overscroll-behavior-x:contain;scrollbar-color:#7f8f96 #e5ecef}
.debt-table-scroll-top::-webkit-scrollbar,.debt-table-viewport::-webkit-scrollbar{height:12px}
.debt-table-scroll-top::-webkit-scrollbar-track,.debt-table-viewport::-webkit-scrollbar-track{background:#e5ecef;border-radius:10px}
.debt-table-scroll-top::-webkit-scrollbar-thumb,.debt-table-viewport::-webkit-scrollbar-thumb{background:#7f8f96;border-radius:10px;border:2px solid #e5ecef}
.debt-table-scroll-top.hidden{display:none}
@media(max-width:700px){.debt-table-scroll-top{margin-left:10px;margin-right:10px}}
.debt-table tbody td:nth-child(4){font-weight:800;color:#123d57}
.debt-scroll-controls{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:7px;white-space:nowrap}
.debt-scroll-controls span{font-size:12px;color:var(--muted);font-weight:700}
.debt-scroll-controls button{width:38px;min-width:38px;height:34px;padding:0;display:grid;place-items:center;font-size:24px;line-height:1;border-radius:9px}
.debt-scroll-controls.hidden{display:none}
@media(max-width:700px){.debt-scroll-controls span{display:none}.debt-scroll-controls button{width:42px;min-width:42px;height:38px}}
.debt-table-viewport.debt-scroll-enabled{cursor:grab}
.debt-table-viewport.debt-scroll-enabled.is-dragging{cursor:grabbing;user-select:none}
.debt-table-viewport button,.debt-table-viewport input,.debt-table-viewport select,.debt-table-viewport textarea,.debt-table-viewport a{cursor:pointer}
.debt-duplicate-detail-dialog{max-width:min(96vw,1100px)}
.debt-duplicate-dialog::backdrop{background:rgba(8,29,42,.62)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.debt-duplicate-table-wrap{margin-top:18px;max-height:46vh;overflow:auto;border:1px solid #d9e4e8;border-radius:12px;text-align:left}
.debt-duplicate-table-wrap table{width:100%;min-width:900px;border-collapse:collapse;background:#fff}
.debt-duplicate-table-wrap th,.debt-duplicate-table-wrap td{padding:10px 12px;border-bottom:1px solid #e3ebee;vertical-align:top;white-space:normal}
.debt-duplicate-table-wrap th{position:sticky;top:0;z-index:2;background:#edf4f7;color:#365564;font-size:12px;text-transform:uppercase}
.debt-duplicate-table-wrap td:last-child,.debt-duplicate-table-wrap th:last-child{text-align:right;white-space:nowrap}
.debt-duplicate-help{margin-top:14px;padding:12px 14px;background:#fff7e6;border-radius:10px;text-align:left;line-height:1.55;color:#5e4a1e}
.debt-duplicate-actions{display:flex;justify-content:flex-end!important;gap:10px;margin-top:18px!important}
.debt-duplicate-actions .danger{background:#d84a3f;color:#fff;border-color:#d84a3f}
@media(max-width:700px){.debt-duplicate-card{padding:18px}.debt-duplicate-actions{display:grid!important;grid-template-columns:1fr}.debt-duplicate-actions button{width:100%}}
