.other-payables-section{margin:24px 0 38px;color:#14223e}
.other-payables-section>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.other-payables-section h2{margin:0;font-size:21px;font-weight:700}
.other-payables-section h2 svg{width:20px;height:20px;vertical-align:-3px;color:#3d69ed}
.other-payables-section header p{margin:5px 0 0;color:#7183a4;font-size:13px}
.other-payables-table-wrap{overflow:auto;border:1px solid #dce5f3;border-radius:14px;background:#fff;box-shadow:0 2px 5px #152b4a0d}
.other-payables-table-wrap table,.other-payable-payments table{width:100%;border-collapse:collapse;text-align:left}
.other-payables-table-wrap th,.other-payables-table-wrap td{padding:13px 12px;border-bottom:1px solid #edf1f7;white-space:nowrap;font-size:13px}
.other-payables-table-wrap thead th{background:#f7f9fc;color:#687d9e;font-weight:500;font-size:12px}
.other-payables-table-wrap tbody tr[data-other-payable]{cursor:pointer}
.other-payables-table-wrap tbody tr[data-other-payable]:hover{background:#f5f8ff}
.other-payables-table-wrap tbody tr[data-other-payable]:focus-visible{outline:2px solid #3d69ed;outline-offset:-2px}
.other-payables-table-wrap tfoot th{background:#f7f9fc;font-weight:700}
.other-payable-status{display:inline-block;border-radius:99px;padding:4px 9px;background:#e0f8eb;color:#12834b}
.other-payable-status.inactive{background:#edf0f5;color:#718096}
.other-payable-delete{display:inline-grid;width:28px;height:28px;place-items:center;border:0;border-radius:6px;background:transparent;color:#f04452;cursor:pointer}
.other-payable-delete:hover{background:#fff0f1;color:#d93642}
.other-payable-delete svg{width:15px;height:15px}
.other-payables-empty{text-align:center;color:#7183a4;padding:24px!important;font-size:12px}

.other-payable-modal{display:flex;flex-direction:column;overflow:hidden;background:#f8fafc;color:#243047}
.other-payable-modal svg,.other-payables-section svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.other-payable-modal.other-payable-main{width:min(1100px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.other-payable-modal.other-payable-main:has(.other-payable-standalone-form){width:min(512px,calc(100vw - 24px));background:#f8fafc}
.other-payable-main:has(.other-payable-standalone-form) .other-payable-title-icon{display:none}
.other-payable-main:has(.other-payable-standalone-form)>header{border:0;padding-bottom:0}
.other-payable-main:has(.other-payable-detail){height:min(560px,calc(100dvh - 24px))}
.other-payable-modal.other-payable-child{width:min(448px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.other-payable-modal>header{display:flex;flex:none;min-height:54px;align-items:center;gap:9px;border-bottom:1px solid #e1e8f2;padding:12px 24px}
.other-payable-modal>header h2{margin:0;color:#1c2b46;font-size:17px;font-weight:700}
.other-payable-modal>header small{margin-left:auto;color:#73849f;font-size:12px}
.other-payable-modal>header .icon{flex:none;margin-left:8px}
.other-payable-title-icon{display:grid;width:20px;height:20px;place-items:center;color:#3867ed}
.other-payable-title-icon svg{width:18px;height:18px}
.other-payable-child .other-payable-title-icon{display:none}
.other-payable-modal>footer{display:flex;flex:none;justify-content:flex-end;gap:8px;border-top:1px solid #e1e8f2;padding:12px 20px}
.other-payable-modal button svg{width:14px;height:14px;vertical-align:-2px;margin-right:5px}
.other-payable-modal button.icon svg{margin:0}
.other-payable-standalone-form,.other-payable-child>form{overflow:auto;padding:18px 24px}
.other-payable-standalone-form{padding-top:14px}
.other-payable-main:has(.other-payable-standalone-form)>footer{border:0;padding-top:0;padding-bottom:24px}

.other-payable-detail{display:grid;min-height:0;flex:1;grid-template-columns:1fr 1fr;gap:16px;overflow:auto;padding:16px 24px}
.other-payable-detail>article{min-width:0;min-height:0;overflow:auto;border:1px solid #e0e8f3;border-radius:13px;background:#f8fafc;padding:16px}
.other-payable-detail>article{scrollbar-width:none}
.other-payable-detail>article::-webkit-scrollbar{display:none}
.other-payable-panel-heading,.other-payable-inline-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.other-payable-panel-heading h3,.other-payable-inline-heading h3{margin:0;font-size:14px;font-weight:650}
.other-payable-panel-heading small{display:block;margin-top:3px;color:#7083a2;font-size:11px}
.other-payable-panel-heading button{white-space:nowrap}
.other-payable-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px 11px;border:1px solid #e1e8f2;border-radius:12px;background:#f3f6fa;padding:13px}
.other-payable-facts span{display:grid;min-width:0;align-content:start;gap:5px;color:#7183a4;font-size:11px}
.other-payable-facts strong{color:#172541;font-size:13px;line-height:1.25;overflow-wrap:anywhere}
.other-payable-facts .other-payable-fact-notes{grid-column:span 3}
.other-payable-summary-rows{margin:12px 0;border:1px solid #e1e8f2;border-radius:12px;overflow:hidden}
.other-payable-summary-rows div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #e1e8f2;padding:9px 12px;font-size:12px}
.other-payable-summary-rows div:last-child{border-bottom:0}
.other-payable-wide{display:flex;width:100%;min-height:36px;align-items:center;justify-content:center;gap:7px;margin-top:8px;padding:8px;font-size:12px;font-weight:650}
.other-payable-wide.primary{border-radius:8px;background:#3d69ed;box-shadow:0 3px 7px #335de32b}
.other-payable-wide.secondary{border-color:#dfe6f0;background:#f8fafc;color:#243047;box-shadow:0 1px 3px #152b4a0a}
.other-payable-wide svg{width:16px!important;height:16px!important;margin:0!important}
.other-payable-payments{overflow:auto;border:1px solid #e1e8f2;border-radius:12px;background:#f6f8fb}
.other-payable-payments th,.other-payable-payments td{border-bottom:1px solid #e9edf5;padding:10px;font-size:11px;white-space:nowrap}
.other-payable-payments thead{background:#f7f9fc;color:#7083a2}
.other-payable-advance-actions{text-align:right;min-width:72px}
.other-payable-advance-actions button{border:0;background:transparent;color:#273854;padding:5px;cursor:pointer}
.other-payable-advance-actions button:hover{color:#3765ed}
.other-payable-advance-actions button[data-delete-other-advance]{color:#e5484d}
.other-payable-advance-actions button[data-delete-other-advance]:hover{color:#ba2631}
.other-payable-advance-actions button svg{width:15px;height:15px;margin:0;vertical-align:middle}
.other-payable-advance-actions button span{display:none}
.other-payable-settlements{margin-top:18px}.other-payable-settlements h3{font-size:13px}

.other-payables-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}
.other-payables-form-grid label{display:grid;min-width:0;gap:6px;color:#35435b;font-size:12px;font-weight:600}
.other-payables-form-grid .wide{grid-column:1/-1}
.other-payables-form-grid input,.other-payables-form-grid select,.other-payables-form-grid textarea{width:100%;min-width:0;min-height:38px;border:1px solid #d7e1ef;border-radius:9px;background:#f6f9fc;padding:8px 10px;color:#14223e;font:inherit}
.other-payables-form-grid textarea{resize:vertical}
.other-payable-inline-heading{border:1px solid #e1e8f2;border-bottom:0;border-radius:12px 12px 0 0;background:#f5f7fa;margin:0;padding:12px}
.other-payable-inline-editor{border:1px solid #e1e8f2;border-radius:12px;background:#f5f7fa}
.other-payable-inline-heading{border:0;background:transparent}
#other-payable-edit-form{padding:0 12px 12px}
#other-payable-edit-form .other-payables-form-grid{row-gap:10px}
#other-payable-edit-form textarea{height:60px}
.other-payable-inline-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.other-payable-inline-actions button{min-width:55px}

.other-payable-child>header{padding:16px 24px 10px;border-bottom:0}
.other-payable-child>form{padding-top:0;padding-bottom:4px}
.other-payable-payment-context{display:grid;gap:5px;border:1px solid #dbe4f1;border-radius:12px;background:#f3f6fa;padding:13px;margin-bottom:18px;color:#677b9a;font-size:13px}
.other-payable-payment-context strong{color:#1c2b46}
.other-payable-payment-note{margin:13px 0 0;color:#7083a2;font-size:11px}
.other-payable-payment-note:empty{display:none}
.other-payable-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:16px 0 20px}
.other-payable-choice-grid label{position:relative;min-width:0;cursor:pointer}
.other-payable-choice-grid input,.other-payable-loans input{position:absolute;width:1px;height:1px;opacity:0}
.other-payable-choice-grid label>span{display:grid;min-height:88px;align-content:start;gap:5px;border:1px solid #dbe4f1;border-radius:11px;padding:11px 13px;color:#293950}
.other-payable-choice-grid svg{width:18px;height:18px;color:#61738e}
.other-payable-choice-grid b{font-size:13px;font-weight:600}
.other-payable-choice-grid small{color:#7485a0;font-size:11px}
.other-payable-choice-grid input:checked+span,.other-payable-loans input:checked+span{border-color:#3d6aff;background:#eef3ff;box-shadow:0 0 0 1px #3d6aff}
.other-payable-choice-grid input:checked+span svg{color:#3867ed}
.other-payable-choice-grid input:focus-visible+span,.other-payable-loans input:focus-visible+span{outline:2px solid #3d6aff;outline-offset:2px}
.other-payable-methods>p,.other-payable-loans>p{margin:17px 0 0;font-size:13px;font-weight:600}
.other-payable-methods .other-payable-choice-grid{margin:8px 0 0}
.other-payable-methods .other-payable-choice-grid label>span{min-height:58px;grid-template-columns:19px 1fr;column-gap:8px}
.other-payable-methods .other-payable-choice-grid svg{grid-row:span 2;align-self:center}
.other-payable-methods .other-payable-choice-grid small{grid-column:2}
.other-payable-loans{display:grid;gap:8px}
.other-payable-loans>p{margin-bottom:0}
.other-payable-loans label{position:relative;cursor:pointer}
.other-payable-loans label>span{display:grid;grid-template-columns:1fr auto;gap:4px;border:1px solid #dbe4f1;border-radius:11px;padding:12px}
.other-payable-loans b,.other-payable-loans strong{font-size:12px}
.other-payable-loans small{grid-column:1;color:#7485a0;font-size:11px}
.other-payable-loans em{grid-column:2;justify-self:end;border:1px solid #bcd3ff;border-radius:3px;background:#ebf2ff;padding:2px 4px;color:#406eee;font-size:10px;font-style:normal}
.other-payable-child:has(.other-payable-methods){max-height:min(95dvh,700px)}
.other-payable-payment-source{margin:13px 0 0;border-top:1px solid #e1e8f2;padding-top:10px;color:#6b7e99;font-size:11px}
.other-payable-payment-source summary{cursor:pointer;list-style:none}
.other-payable-payment-source summary::after{content:'⌄';float:right}
.other-payable-payment-source[open] .other-payables-form-grid{margin-top:12px}
.other-payable-child>footer{border-top:0;padding-top:10px}

@media(max-width:750px){.other-payable-detail{grid-template-columns:1fr}.other-payable-main:has(.other-payable-detail){height:min(90dvh,850px)}.other-payable-detail>article{overflow:visible}.other-payable-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.other-payable-facts .other-payable-fact-notes{grid-column:1/-1}}
@media(max-width:480px){.other-payable-modal>header{padding:12px 16px}.other-payable-detail{padding:12px}.other-payable-detail>article{padding:12px}.other-payable-modal>header small{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.other-payables-section>header{align-items:flex-start}.other-payables-section>header button{white-space:nowrap}}

@media(max-width:750px){
  .other-payable-modal.other-payable-main:has(.other-payable-detail){height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)}
  .other-payable-detail{display:flex;min-height:0;flex:1;flex-direction:column;gap:12px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:max(24px,env(safe-area-inset-bottom))}
  .other-payable-detail>article{min-width:0;flex:none;overflow:visible}
  .other-payable-payments{overflow:visible;border:0;background:transparent}
  .other-payable-payments table,.other-payable-payments tbody{display:block;width:100%}
  .other-payable-payments thead{display:none}
  .other-payable-payments tbody{display:grid;gap:9px}
  .other-payable-payments tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border:1px solid #dfe7f3;border-radius:11px;background:#fff;padding:12px}
  .other-payable-payments tbody td{display:grid;min-width:0;gap:4px;border:0;padding:0;white-space:normal;overflow-wrap:anywhere;color:#243047;font-size:12px}
  .other-payable-payments tbody td::before{content:attr(data-label);color:#7183a4;font-size:10px;font-weight:500}
  .other-payable-payments tbody td strong{font-size:14px}
  .other-payable-payments tbody .other-payable-advance-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #e9edf5;padding-top:10px}
  .other-payable-payments tbody .other-payable-advance-actions:empty{display:none}
  .other-payable-payments tbody .other-payable-advance-actions::before{display:none}
  .other-payable-advance-actions button{display:inline-flex;min-height:36px;align-items:center;gap:6px;border:1px solid #dce5f1;border-radius:8px;background:#fff;padding:7px 10px}
  .other-payable-advance-actions button span{display:inline}
}
@media screen and (max-width:750px){
  .other-payable-payments,.other-payable-payments table{border:0!important;box-shadow:none!important}
  .other-payable-payments tbody{gap:8px;padding:3px 2px 8px}
  .other-payable-payments tbody tr{gap:7px 10px;border:0;border-radius:9px;padding:9px 10px;box-shadow:0 2px 7px rgba(15,23,42,.10)}
  .other-payable-payments tbody td{gap:2px;font-size:11px;line-height:1.4}
  .other-payable-payments tbody td:first-child{grid-column:1;grid-row:1;font-weight:600;align-self:center}
  .other-payable-payments tbody td:nth-child(4){grid-column:2;grid-row:1;text-align:right;align-self:center}
  .other-payable-payments tbody td:first-child::before,.other-payable-payments tbody td:nth-child(4)::before{display:none}
  .other-payable-payments tbody td strong{font-size:13px}
  .other-payable-payments tbody td:nth-child(2){grid-column:1;grid-row:2}
  .other-payable-payments tbody td:nth-child(3){grid-column:2;grid-row:2}
  .other-payable-payments tbody .other-payable-advance-actions{gap:6px;border:0;padding-top:0}
  .other-payable-payments .other-payable-advance-actions button{min-height:32px;padding:5px 8px;font-size:11px}
  html[data-theme=dark] .other-payable-payments tbody tr{box-shadow:0 2px 8px rgba(0,0,0,.35)}
}
@media screen and (max-width:750px){
  .other-payables-section{min-width:0}
  .other-payables-section>header{gap:8px}
  .other-payables-section h2{font-size:18px}
  .other-payables-table-wrap{overflow:visible;border:0!important;box-shadow:none!important}
  .other-payables-table-wrap table{display:block;width:100%;min-width:0;background:transparent}
  .other-payables-table-wrap thead{display:none}
  .other-payables-table-wrap tbody{display:grid;gap:8px;padding:3px}
  .other-payables-table-wrap tbody tr[data-other-payable]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px 8px;border:0;border-radius:10px;background:var(--fc-surface,#fff);padding:10px 11px;box-shadow:0 2px 7px rgba(15,23,42,.10)}
  .other-payables-table-wrap tbody td{min-width:0;border:0;padding:0;font-size:12px;white-space:normal;overflow-wrap:anywhere}
  .other-payables-table-wrap tbody td:first-child{grid-column:1/3;grid-row:1;align-self:center}
  .other-payables-table-wrap tbody td:nth-child(4){grid-column:3/5;grid-row:1;padding-right:30px;text-align:right;align-self:center}
  .other-payables-table-wrap tbody td:nth-child(8){grid-column:4;grid-row:1;justify-self:end;align-self:center}
  .other-payables-table-wrap tbody td:nth-child(2){grid-column:1/-1;grid-row:2;font-size:11px;color:var(--fc-muted,#64748b)}
  .other-payables-table-wrap tbody td:nth-child(3){grid-column:1/3;grid-row:3}
  .other-payables-table-wrap tbody td:nth-child(5){grid-column:3/5;grid-row:3;text-align:right}
  .other-payables-table-wrap tbody td:nth-child(6){grid-column:1/3;grid-row:4}
  .other-payables-table-wrap tbody td:nth-child(7){grid-column:3/5;grid-row:4;text-align:right}
  .other-payables-table-wrap tbody td:is(:nth-child(3),:nth-child(5),:nth-child(6),:nth-child(7)):before{display:block;margin-bottom:2px;font-size:10px;color:var(--fc-muted,#64748b)}
  .other-payables-table-wrap tbody td:nth-child(3):before{content:'Monthly amount'}
  .other-payables-table-wrap tbody td:nth-child(5):before{content:'Paid this month'}
  .other-payables-table-wrap tbody td:nth-child(6):before{content:'Cash advance'}
  .other-payables-table-wrap tbody td:nth-child(7):before{content:'Remaining'}
  .other-payables-table-wrap tfoot{display:block;margin-top:8px}
  .other-payables-table-wrap tfoot tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border-radius:10px;padding:10px}
  .other-payables-table-wrap tfoot th{min-width:0;border:0;padding:0;white-space:normal;font-size:12px}
  .other-payables-table-wrap tfoot th:first-child,.other-payables-table-wrap tfoot th:nth-child(6){grid-column:1/-1}
  .other-payables-table-wrap tfoot th:is(:nth-child(3),:nth-child(4),:nth-child(7)){display:none}
  .other-payables-table-wrap tfoot th:is(:nth-child(2),:nth-child(5),:nth-child(6)):before{display:block;font-size:10px;font-weight:400;color:var(--fc-muted,#64748b)}
  .other-payables-table-wrap tfoot th:nth-child(2):before{content:'Monthly amount'}
  .other-payables-table-wrap tfoot th:nth-child(5):before{content:'Cash advance'}
  .other-payables-table-wrap tfoot th:nth-child(6):before{content:'Remaining'}
  .other-payable-payments tbody tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:4px 7px;align-items:center}
  .other-payable-payments tbody td:nth-child(4){grid-column:1/3;grid-row:1;text-align:left}
  .other-payable-payments tbody td:first-child{grid-column:1;grid-row:2;font-size:10px;font-weight:400}
  .other-payable-payments tbody td:nth-child(2){grid-column:2;grid-row:2;font-size:10px}
  .other-payable-payments tbody td:nth-child(2):before{display:none}
  .other-payable-payments tbody td:nth-child(3){display:block;grid-column:1/-1;grid-row:3;font-size:10px}
  .other-payable-payments tbody td:nth-child(3):before{content:'Note: ';display:inline}
  .other-payable-payments tbody .other-payable-advance-actions{grid-column:3;grid-row:1/3;gap:3px;align-self:center}
  .other-payable-payments .other-payable-advance-actions button{width:32px;height:32px;min-height:32px;justify-content:center;padding:5px;border:0;background:transparent}
  .other-payable-payments .other-payable-advance-actions button span{display:none}
  html[data-theme=dark] .other-payables-table-wrap tbody tr[data-other-payable]{box-shadow:0 2px 8px rgba(0,0,0,.35)}
}
@media screen and (max-width:750px){
  .other-payables-table-wrap .other-payable-delete{width:32px;height:32px}
  .other-payables-table-wrap tbody td:nth-child(4){padding-right:34px}
}
.other-payment-mobile-info{display:none}
@media screen and (max-width:750px){
  /* Use the payroll register's name/status and amount/balance hierarchy. */
  .other-payables-table-wrap tbody tr[data-other-payable]{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:10px 11px}
  .other-payables-table-wrap tbody td:first-child{grid-column:1;grid-row:1}
  .other-payables-table-wrap tbody td:nth-child(4){grid-column:2;grid-row:1;padding-right:0}
  .other-payables-table-wrap tbody td:nth-child(2){grid-column:1;grid-row:2;align-self:center}
  .other-payables-table-wrap tbody td:nth-child(8){grid-column:2;grid-row:2}
  .other-payables-table-wrap tbody td:nth-child(3){grid-column:1;grid-row:3;color:#3865ef;font-weight:700}
  .other-payables-table-wrap tbody td:nth-child(7){grid-column:2;grid-row:3}
  .other-payables-table-wrap tbody td:nth-child(7) strong{font-size:18px}
  .other-payables-table-wrap tbody td:nth-child(7):before{content:'Net payment'}
  .other-payables-table-wrap tbody td:is(:nth-child(5),:nth-child(6)){display:none}
  /* Match payroll's amount, date/creator and small action icons. */
  .other-payable-payments tbody tr{grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:9px 10px}
  .other-payable-payments tbody td:nth-child(4){grid-column:1;grid-row:1}
  .other-payable-payments tbody td:first-child{grid-column:1;grid-row:2}
  .other-payable-payments tbody td:is(:nth-child(2),:nth-child(3)){display:none}
  .other-payable-payments tbody .other-payable-advance-actions{grid-column:2;grid-row:1/3;gap:3px}
  .other-payable-payments .other-payable-advance-actions button{border:0;background:transparent;box-shadow:none}
  .other-payment-desktop-date{display:none}
  .other-payment-mobile-info{display:block;font-size:10px;font-weight:400;color:var(--fc-muted,#64748b)}
  .other-payment-mobile-info summary{list-style:none;cursor:pointer;overflow-wrap:anywhere}
  .other-payment-mobile-info summary::-webkit-details-marker{display:none}
  .other-payment-mobile-info summary:focus-visible{outline:2px solid var(--fc-blue,#2563eb);outline-offset:2px}
  .other-payment-mobile-info>span{display:block;margin-top:3px;overflow-wrap:anywhere}
}
@media screen and (max-width:750px){
  .other-payables-table-wrap tfoot{margin:0;border-top:1px solid var(--fc-line,#e0e7f2);padding:10px}
  .other-payables-table-wrap tfoot tr{gap:8px 12px;border:0;border-radius:0;background:transparent;padding:0;box-shadow:none}
  .other-payables-table-wrap tfoot th{height:auto;min-height:0;border:0;background:transparent;padding:0;font-size:13px;text-align:left;overflow-wrap:anywhere}
  .other-payables-table-wrap tfoot th:first-child{padding:0 0 5px;font-size:12px;font-weight:500}
  .other-payables-table-wrap tfoot th:is(:nth-child(2),:nth-child(5),:nth-child(6)):before{margin-bottom:3px;color:var(--fc-muted,#71839e);font-size:10px;font-weight:600;letter-spacing:.04em}
  .other-payables-table-wrap tfoot th:nth-child(6){border-top:1px solid var(--fc-line,#e0e7f2);padding-top:8px;font-size:14px;text-align:right}
  .other-payables-table-wrap tfoot th:nth-child(6):before{text-align:left;content:'Net payment'}
}
