/* KSNB V5.4: financial meaning, privacy-aware old debt, stable table sizing.
   Nonzero payables red; exact zero and credit balances green. Unknown != 0. */
.employee-scroll .debt-entity-table{min-width:1190px!important;table-layout:fixed!important}
.employee-scroll .debt-entity-table tbody td:nth-child(2){width:21%!important}
.employee-scroll .debt-entity-table tbody td:nth-child(7){width:9%!important;text-align:right!important;font-size:13.2px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
.employee-scroll .debt-entity-table tbody td:nth-child(8){width:6%!important}
.employee-scroll .debt-entity-table thead th.olddebt-head{font-size:12px!important;white-space:normal!important;line-height:1.18!important;text-align:right!important;padding-inline:5px!important}
.employee-scroll .debt-entity-table tbody td.money-cell{font-size:13.3px!important}
/* V5.2 had red light for 0đ: zero debt must be green. */
.debt-entity-table tbody .money-cell .red-money.zero,
.debt-entity-table tbody .olddebt-cell .red-money.zero,
.detail-grid-scroll .red-money.zero,
.dialog .red-money.zero,
.user-snapshot .debt-amount.zero,
.debt-no-record{color:#08734e!important;font-weight:850}
.debt-entity-table tbody .money-cell .red-money.credit,
.debt-entity-table tbody .olddebt-cell .red-money.credit,
.detail-grid-scroll .red-money.credit,
.dialog .red-money.credit{color:#08734e!important;font-weight:850}
.debt-entity-table tbody .olddebt-cell .red-money.positive,
.dialog .red-money.positive{color:#aa1833!important;font-weight:900}
.olddebt-muted{color:#637e96;font-size:11px;font-weight:720}
.olddebt-review{color:#a16207;font-size:11px;font-weight:820}
.dark .debt-entity-table tbody .money-cell .red-money.zero,
.dark .debt-entity-table tbody .olddebt-cell .red-money.zero,
.dark .detail-grid-scroll .red-money.zero,
.dark .dialog .red-money.zero,
.dark .debt-no-record,
.dark .debt-entity-table tbody .money-cell .red-money.credit,
.dark .debt-entity-table tbody .olddebt-cell .red-money.credit,
.dark .detail-grid-scroll .red-money.credit,
.dark .dialog .red-money.credit{color:#64e5b0!important}
.dark .debt-entity-table tbody .olddebt-cell .red-money.positive,
.dark .dialog .red-money.positive{color:#ff7185!important}
.dark .olddebt-muted{color:#b0c1d2}
.dark .olddebt-review{color:#f9c878}
/* Detail modal: three statuses + document IDs. Scroll if viewport is narrow. */
.dialog .dialogBody .tablewrap{overflow-x:auto}
.dialog .dialogBody .tablewrap table{min-width:950px}
.dialog .dialogBody .tablewrap tbody td:last-child{white-space:nowrap;max-width:190px;overflow:hidden;text-overflow:ellipsis}
.dialog .dialogBody .filters{grid-template-columns:minmax(220px,1fr);max-width:420px}
/* Detail tab no separate type selector; export remains on the right. */
.detailGridTools{justify-content:flex-end!important;min-height:44px}
.detailGridActions{margin-left:auto}
@media(max-width:1250px){.employee-scroll .debt-entity-table{min-width:1190px!important}}

.user-snapshot .debt-amount.positive,.dialog .debt-amount.positive{color:#aa1833!important}
.user-snapshot .debt-amount.credit,.dialog .debt-amount.credit{color:#08734e!important}
.dark .user-snapshot .debt-amount.positive,.dark .dialog .debt-amount.positive{color:#ff7185!important}
.dark .user-snapshot .debt-amount.zero,.dark .dialog .debt-amount.zero,.dark .user-snapshot .debt-amount.credit,.dark .dialog .debt-amount.credit{color:#64e5b0!important}

.dialog .debt-amount.zero{color:#08734e!important}
/* Improve dark-mode control contrast; no change to light theme. */
.dark .topbar .btn:not(.primary),
.dark .panelTitle .btn:not(.primary),
.dark .filters .btn:not(.primary),
.dark .pager .btn:not(.primary),
.dark .dialog .btn:not(.primary){background:#25425f!important;color:#e8f3ff!important;border-color:#486985!important}
.dark .topbar .btn:not(.primary):hover,
.dark .panelTitle .btn:not(.primary):hover,
.dark .filters .btn:not(.primary):hover{background:#315777!important}
.dark .topbar button.btn:not(.primary),
.dark .panelTitle button.btn:not(.primary),
.dark .filters button.btn:not(.primary),
.dark .pager button.btn:not(.primary){appearance:none!important;-webkit-appearance:none!important;background-color:#25425f!important;background-image:none!important;color:#e8f3ff!important}
