/* =========================================================
   Batch 10.4 - Riwayat Cicilan Employee Row Modal
   ========================================================= */
body.payment-modal-lock{
  overflow:hidden;
  touch-action:none;
}
.payment-employee-section .section-note{
  max-width:620px;
}
.payment-employee-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
.payment-employee-card{
  width:100%;
  text-align:left;
  border:1px solid rgba(203,213,225,.9);
  border-radius:24px;
  background:linear-gradient(145deg,#ffffff,#f7fbff);
  padding:14px;
  box-shadow:0 16px 34px rgba(15,23,42,.08);
  color:#07182f;
  position:relative;
  overflow:hidden;
}
.payment-employee-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:#0ea76f;
}
.payment-employee-card.pending::before{background:#d6a23a;}
.payment-employee-card.overpaid::before{background:#0b5c8f;}
.payment-employee-card:active{transform:scale(.99);}
.payment-employee-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.payment-employee-name{
  font-weight:950;
  font-size:15px;
  line-height:1.08;
  color:#07182f;
}
.payment-employee-sub{
  margin-top:5px;
  font-size:11px;
  font-weight:800;
  color:#60728a;
}
.payment-employee-top span{
  flex:0 0 auto;
  border-radius:999px;
  background:#e8fff5;
  color:#06734d;
  border:1px solid #a8ebcf;
  padding:5px 8px;
  font-size:9px;
  font-weight:950;
  letter-spacing:.03em;
}
.payment-employee-card.pending .payment-employee-top span{
  background:#fff4d9;
  color:#805406;
  border-color:#efd08f;
}
.payment-employee-card.overpaid .payment-employee-top span{
  background:#e8f5ff;
  color:#0b4c7b;
  border-color:#a9d8f7;
}
.payment-employee-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.payment-employee-stats div{
  border:1px solid rgba(226,232,240,.9);
  border-radius:16px;
  background:rgba(255,255,255,.74);
  padding:9px;
}
.payment-employee-stats small{
  display:block;
  color:#63748b;
  font-size:9px;
  line-height:1.1;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:950;
  margin-bottom:5px;
}
.payment-employee-stats b{
  display:block;
  font-size:13px;
  line-height:1.12;
  font-weight:950;
  color:#07182f;
  overflow-wrap:anywhere;
}
.payment-list-modal{
  position:fixed;
  inset:0;
  z-index:135;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:14px 10px calc(14px + env(safe-area-inset-bottom));
  background:rgba(8,22,41,.58);
  backdrop-filter:blur(12px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.payment-list-backdrop{
  position:fixed;
  inset:0;
}
.payment-list-dialog{
  position:relative;
  z-index:1;
  width:min(100%,820px);
  max-height:calc(100vh - 28px - env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column;
  border-radius:28px;
  background:linear-gradient(180deg,#ffffff,#f7fbff);
  border:1px solid rgba(255,255,255,.76);
  box-shadow:0 30px 90px rgba(5,18,34,.33);
  overflow:hidden;
  animation:adminModalIn .18s ease-out;
}
.payment-list-head{
  flex:0 0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:17px 18px 12px;
  background:linear-gradient(135deg,#09203d,#123f6d);
  color:#fff;
}
.payment-list-head h3{
  margin:0;
  font-size:19px;
  line-height:1.1;
  font-weight:950;
  letter-spacing:-.02em;
}
.payment-list-head p{
  margin:6px 0 0;
  color:rgba(255,255,255,.76);
  font-size:12px;
  font-weight:800;
}
.payment-list-close{
  width:38px;
  height:38px;
  border:1px solid rgba(255,255,255,.32);
  border-radius:14px;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:24px;
  line-height:1;
  font-weight:950;
}
.payment-list-summary{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  padding:11px;
  border-bottom:1px solid rgba(203,213,225,.8);
  background:#f8fafc;
}
.payment-list-summary div{
  background:#fff;
  border:1px solid rgba(226,232,240,.95);
  border-radius:16px;
  padding:10px;
}
.payment-list-summary span{
  display:block;
  margin-bottom:5px;
  font-size:9px;
  font-weight:950;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#63748b;
}
.payment-list-summary b{
  display:block;
  color:#07182f;
  font-weight:950;
  font-size:13px;
  line-height:1.12;
  overflow-wrap:anywhere;
}
.payment-row-table-wrap{
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  background:#eef4fb;
}
.payment-row-table-head{
  position:sticky;
  top:0;
  z-index:2;
  display:grid;
  grid-template-columns:82px 1fr 116px;
  gap:8px;
  align-items:center;
  padding:10px 12px;
  background:linear-gradient(135deg,#061b35,#0d355f);
  color:#fff;
  border-bottom:3px solid #d4a449;
  box-shadow:0 8px 18px rgba(7,24,47,.2);
}
.payment-row-table-head span{
  font-size:11px;
  line-height:1;
  font-weight:950;
  letter-spacing:.07em;
}
.payment-row-table-body{
  padding:0 8px 10px;
}
.payment-line-row{
  display:grid;
  grid-template-columns:82px 1fr 116px;
  gap:8px;
  align-items:center;
  min-height:48px;
  padding:8px 8px;
  border-left:5px solid #0ea76f;
  border-bottom:1px solid rgba(203,213,225,.74);
  background:#ffffff;
}
.payment-line-row.alt{background:#f8fbff;}
.payment-line-row.debt-add{
  border-left-color:#d64242;
  background:#fff5f5;
}
.payment-line-row.debt-add.alt{background:#fffafa;}
.payment-line-date{
  font-weight:950;
  font-size:12px;
  color:#0b2747;
  white-space:nowrap;
}
.payment-line-type b{
  display:block;
  color:#07182f;
  font-size:12px;
  line-height:1.1;
  font-weight:950;
}
.payment-line-type em{
  display:block;
  margin-top:3px;
  color:#65758b;
  font-size:10px;
  line-height:1;
  font-style:normal;
  font-weight:900;
}
.payment-line-amount{
  text-align:right;
  font-weight:950;
  font-size:13px;
  color:#075f44;
  overflow-wrap:anywhere;
}
@media(max-width:560px){
  .payment-employee-grid{grid-template-columns:1fr;gap:10px;}
  .payment-list-modal{padding:8px 6px calc(8px + env(safe-area-inset-bottom));}
  .payment-list-dialog{border-radius:22px;max-height:calc(100vh - 16px - env(safe-area-inset-bottom));}
  .payment-list-head{padding:15px 14px 10px;}
  .payment-list-summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px;gap:7px;}
  .payment-row-table-head,
  .payment-line-row{grid-template-columns:70px 1fr 106px;gap:6px;}
  .payment-row-table-head{padding:9px 9px;}
  .payment-row-table-body{padding:0 5px 8px;}
  .payment-line-row{padding:8px 6px;min-height:46px;}
  .payment-line-date{font-size:11px;}
  .payment-line-type b{font-size:11px;}
  .payment-line-amount{font-size:12px;}
}

/* =========================================================
   Batch 10.5 - Rekap Hutang Karyawan & Quick Actions
   ========================================================= */
.payment-employee-card .rekap-stats .stat-debt b,
.payment-list-summary .stat-debt b{
  color:#a21f1f;
}
.payment-employee-card .rekap-stats .stat-pay b,
.payment-list-summary .stat-pay b{
  color:#06734d;
}
.payment-employee-card .stat-status.pending b,
.payment-list-summary .stat-status.pending b{
  color:#b42318;
}
.payment-employee-card .stat-status.safe b,
.payment-list-summary .stat-status.safe b,
.payment-employee-card .stat-status.overpaid b,
.payment-list-summary .stat-status.overpaid b{
  color:#047857;
}
.payment-list-head.rekap-head{
  align-items:center;
}
.payment-head-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
.payment-list-actions{
  display:flex;
  align-items:center;
  gap:7px;
}
.quick-pay-btn,
.quick-debt-btn{
  border:1px solid rgba(255,255,255,.35);
  border-radius:999px;
  padding:9px 11px;
  color:#fff;
  font-size:11px;
  font-weight:950;
  letter-spacing:.01em;
  box-shadow:0 12px 24px rgba(0,0,0,.18);
}
.quick-pay-btn{
  background:linear-gradient(135deg,#0e9f6e,#047857);
}
.quick-debt-btn{
  background:linear-gradient(135deg,#dc2626,#991b1b);
}
.payment-row-table-head.rekap-table-head,
.payment-line-row{
  grid-template-columns:72px 92px 112px minmax(120px,1fr) 48px;
}
.payment-row-table-head.rekap-table-head{
  padding:10px 10px;
}
.payment-line-note{
  font-size:11px;
  line-height:1.22;
  color:#43546b;
  font-weight:800;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.payment-line-proof{
  display:flex;
  justify-content:center;
  align-items:center;
}
.row-proof-btn{
  border:1px solid rgba(14,116,144,.25);
  border-radius:999px;
  background:#ecfeff;
  color:#0e7490;
  padding:5px 7px;
  font-size:9px;
  line-height:1;
  font-weight:950;
}
.row-proof-empty{
  color:#94a3b8;
  font-weight:950;
  font-size:11px;
}
.payment-line-amount{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
}
.row-edit-btn{
  width:20px;
  height:20px;
  border:1px solid rgba(153,27,27,.22);
  border-radius:8px;
  background:#fff7ed;
  color:#991b1b;
  font-size:11px;
  font-weight:950;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.quick-debt-theme{
  border-color:rgba(220,38,38,.28);
  background:linear-gradient(180deg,#fff7f7,#ffffff 52%);
}
.quick-debt-theme .form-head{
  border-bottom-color:rgba(220,38,38,.18);
}
.quick-debt-theme .section-title{
  color:#7f1d1d;
}
.quick-debt-theme .input:focus{
  border-color:#dc2626;
  box-shadow:0 0 0 4px rgba(220,38,38,.10);
}
.danger-note{
  background:#fff1f2;
  border-color:#fecdd3;
  color:#7f1d1d;
}
.danger-save{
  background:linear-gradient(135deg,#dc2626,#991b1b) !important;
  box-shadow:0 16px 30px rgba(153,27,27,.22) !important;
}
.quick-payment-theme{
  border-color:rgba(16,185,129,.28);
  background:linear-gradient(180deg,#f0fdf4,#ffffff 52%);
}
.quick-payment-theme .form-head{
  border-bottom-color:rgba(16,185,129,.18);
}
.quick-payment-theme .section-title{
  color:#065f46;
}
.quick-payment-theme .input:focus{
  border-color:#10b981;
  box-shadow:0 0 0 4px rgba(16,185,129,.10);
}
.success-save{
  background:linear-gradient(135deg,#10b981,#047857) !important;
  box-shadow:0 16px 30px rgba(4,120,87,.22) !important;
}
.rekap-empty{
  margin:12px;
}
@media(max-width:560px){
  .payment-head-right{
    gap:6px;
  }
  .payment-list-actions{
    flex-direction:column;
    align-items:stretch;
    gap:5px;
  }
  .quick-pay-btn,
  .quick-debt-btn{
    padding:7px 9px;
    font-size:10px;
  }
  .payment-row-table-head.rekap-table-head,
  .payment-line-row{
    grid-template-columns:58px 68px 91px minmax(66px,1fr) 36px;
    gap:5px;
  }
  .payment-row-table-head.rekap-table-head span{
    font-size:9px;
    letter-spacing:.03em;
  }
  .payment-line-note{
    font-size:9px;
    line-height:1.15;
    -webkit-line-clamp:2;
  }
  .payment-line-amount{
    font-size:10px;
    gap:3px;
  }
  .row-proof-btn{
    padding:4px 5px;
    font-size:8px;
  }
  .row-edit-btn{
    width:17px;
    height:17px;
    border-radius:7px;
    font-size:10px;
  }
}

/* =========================================================
   Batch 10.6 - Row Click Edit Rekap Hutang Karyawan
   ========================================================= */
.payment-line-row.editable{
  cursor:pointer;
  transition:background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.payment-line-row.editable:hover{
  background:#eef6ff;
  box-shadow:inset 0 0 0 1px rgba(14,116,144,.14);
}
.payment-line-row.editable:active{
  transform:scale(.998);
}
.payment-line-row.editable.debt-add:hover{
  background:#fff1f2;
  box-shadow:inset 0 0 0 1px rgba(220,38,38,.16);
}
.payment-line-amount span{
  white-space:nowrap;
}
.row-edit-btn{display:none!important;}
.general-transaction-edit-modal{
  z-index:170;
}
.transaction-edit-card .textarea{
  min-height:105px;
}
.transaction-edit-card .upload-help{
  margin-top:7px;
}
.transaction-edit-card .form-summary-note{
  margin-top:14px;
}
@media(max-width:560px){
  .payment-row-table-head.rekap-table-head,
  .payment-line-row{
    grid-template-columns:56px 66px 96px minmax(70px,1fr) 34px;
  }
  .payment-line-amount{
    font-size:9.5px;
  }
}

/* =========================================================
   Batch 10.9 - Tambah Hutang sebagai transaksi tambahan
   ========================================================= */
.general-debt-addition-modal{
  z-index:172;
}
.general-addition-form .textarea{
  min-height:110px;
}
.general-addition-form .form-summary-note{
  margin-top:12px;
}
.payment-line-amount,
.payment-line-amount span{
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
}
@media(max-width:560px){
  .payment-row-table-head.rekap-table-head,
  .payment-line-row{
    grid-template-columns:54px 64px 104px minmax(54px,1fr) 30px;
  }
  .payment-line-amount{
    font-size:9px;
  }
  .payment-line-note{
    font-size:8.5px;
  }
}

/* Batch 10.10 - proof upload for tambah hutang */
.general-addition-form .addition-proof-input,
.transaction-edit-card .file-input {
  background: #fff;
}
.danger-upload-help {
  color: #8a2f2f;
}


/* =========================================================
   Batch 11.1 - Detail Per Karyawan Hutang Umum
   ========================================================= */
.detail-summary-grid{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.detail-summary-grid .total-obligation b{
  color:#7f1d1d;
}
.employee-debt-detail-section{
  flex:0 0 auto;
  padding:11px;
  border-bottom:1px solid rgba(203,213,225,.82);
  background:linear-gradient(180deg,#f8fafc,#eef4fb);
}
.detail-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
}
.detail-section-head b{
  display:block;
  color:#07182f;
  font-size:14px;
  line-height:1.1;
  font-weight:950;
}
.detail-section-head span{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:11px;
  font-weight:850;
}
.employee-debt-detail-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.employee-debt-detail-card{
  border:1px solid rgba(203,213,225,.92);
  border-left:5px solid #d6a23a;
  border-radius:18px;
  background:rgba(255,255,255,.88);
  padding:11px;
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}
.employee-debt-detail-card.safe{border-left-color:#0ea76f;}
.employee-debt-detail-card.overpaid{border-left-color:#0b5c8f;}
.employee-debt-detail-card.pending{border-left-color:#d6a23a;}
.debt-detail-title-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:9px;
}
.debt-detail-title-row strong{
  display:block;
  color:#07182f;
  font-size:13px;
  line-height:1.1;
  font-weight:950;
}
.debt-detail-title-row span{
  display:block;
  margin-top:4px;
  color:#475569;
  font-size:11px;
  line-height:1.2;
  font-weight:850;
}
.debt-detail-title-row em{
  flex:0 0 auto;
  border-radius:999px;
  padding:5px 8px;
  background:#fff4d9;
  border:1px solid #efd08f;
  color:#805406;
  font-size:9px;
  line-height:1;
  font-style:normal;
  font-weight:950;
  letter-spacing:.04em;
}
.employee-debt-detail-card.safe .debt-detail-title-row em{
  background:#e8fff5;
  border-color:#a8ebcf;
  color:#06734d;
}
.employee-debt-detail-card.overpaid .debt-detail-title-row em{
  background:#e8f5ff;
  border-color:#a9d8f7;
  color:#0b4c7b;
}
.debt-detail-meta{
  margin-top:8px;
  color:#64748b;
  font-size:10px;
  font-weight:850;
}
.debt-detail-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-top:10px;
}
.debt-detail-grid div{
  border:1px solid rgba(226,232,240,.95);
  border-radius:13px;
  background:#fff;
  padding:7px;
}
.debt-detail-grid small{
  display:block;
  margin-bottom:4px;
  color:#64748b;
  font-size:8px;
  line-height:1;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.debt-detail-grid b{
  display:block;
  color:#07182f;
  font-size:11px;
  line-height:1.1;
  font-weight:950;
  overflow-wrap:anywhere;
}
.debt-note-detail{
  margin-top:9px;
  border-radius:13px;
  background:#f8fafc;
  border:1px solid rgba(226,232,240,.95);
  overflow:hidden;
}
.debt-note-detail summary{
  padding:8px 9px;
  color:#0b2747;
  font-size:11px;
  font-weight:950;
  cursor:pointer;
}
.debt-note-detail p{
  margin:0;
  padding:0 9px 9px;
  color:#475569;
  font-size:11px;
  line-height:1.45;
  font-weight:750;
}
@media(max-width:720px){
  .detail-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .employee-debt-detail-list{grid-template-columns:1fr;}
  .debt-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* Hotfix 13.1 - Void / Batalkan Hutang dan Transaksi */
.void-debt-section{
  margin:10px 8px 12px;
}
.void-debt-action{
  margin-top:9px;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding-top:8px;
  border-top:1px dashed rgba(239,68,68,.22);
}
.void-debt-action small{
  color:#7f1d1d;
  font-size:10px;
  line-height:1.25;
  font-weight:800;
}
.void-mini-btn,
.void-action-btn{
  appearance:none;
  border:1px solid rgba(239,68,68,.35);
  background:linear-gradient(135deg,#fee2e2,#fff7ed);
  color:#991b1b;
  border-radius:999px;
  padding:8px 11px;
  font-size:11px;
  font-weight:950;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(127,29,29,.08);
}
.void-mini-btn:active,
.void-action-btn:active{
  transform:translateY(1px);
}
.transaction-edit-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:9px;
  margin-top:12px;
}
.transaction-edit-actions .form-save-btn{
  margin-top:0;
}
.transaction-edit-actions .void-action-btn{
  width:100%;
  border-radius:15px;
  padding:13px 14px;
  background:linear-gradient(135deg,#fff1f2,#fee2e2);
}
.payment-line-row.editable{
  cursor:pointer;
}
.payment-line-row.editable:hover{
  filter:brightness(.985);
}
@media(min-width:720px){
  .transaction-edit-actions{
    grid-template-columns:1fr auto;
    align-items:center;
  }
  .transaction-edit-actions .void-action-btn{
    width:auto;
    min-width:170px;
  }
}
