/* Pembayaran — selected option B: record table and detail panel. */
.pay-page{height:100dvh;min-height:0;padding:0;overflow:hidden;color:#1c2b43}
.pay-workspace{display:grid;grid-template-columns:minmax(0,1fr);height:100%;position:relative;background:var(--canvas)}
.pay-workspace.detail-open{grid-template-columns:minmax(0,1fr) 480px}
.pay-list-pane{display:flex;flex-direction:column;min-width:0;min-height:0;padding:28px 24px}
.pay-list-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:24px;border-bottom:1px solid #e5e9f1}
.pay-heading{display:flex;align-items:center;gap:10px;min-width:0}.pay-heading>span{width:34px;height:34px;display:grid;place-items:center;background:#eef1f9;border-radius:9px;color:#6277a2}.pay-heading .icon{width:20px;height:20px}.pay-heading h1{font-size:24px;letter-spacing:-.7px;margin:0}
.pay-new{min-height:34px;padding:8px 12px;font-size:11px;gap:7px;border-radius:7px;white-space:nowrap;flex:none}
.pay-toolbar{display:flex;align-items:center;gap:20px;padding:20px 0 22px;border-bottom:1px solid #e5e9f1;flex-wrap:wrap}
.pay-toolbar .search-field{width:260px;max-width:100%;min-height:36px;border:1px solid #dce2ec;background:white;border-radius:7px}.pay-toolbar .search-field input{height:34px;font-size:12px;min-width:0;width:100%;background:transparent}.pay-toolbar .search-field .icon{width:16px;height:16px}
.pay-filter-line{display:flex;align-items:center;gap:12px;color:#708099;font-size:11px}.pay-filter-line select{border:1px solid #dce2ec;border-radius:7px;padding:7px 25px 7px 10px;background-color:#fff;color:#253651;font:inherit}
.pay-table-scroll{flex:1;overflow:auto;min-height:0;padding-top:16px}
.pay-table{width:100%;min-width:660px;border-collapse:separate;border-spacing:0 7px;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.pay-table th{padding:0 10px 10px;font-size:10px;font-weight:500;color:#71819a;text-align:left}.pay-table th:nth-child(n+3){text-align:right}
.pay-table td{height:50px;padding:10px;background:#fff;border-top:1px solid #e5e9f1;border-bottom:1px solid #e5e9f1}.pay-table td:first-child{border-left:1px solid #e5e9f1;border-radius:8px 0 0 8px}.pay-table td:last-child{border-right:1px solid #e5e9f1;border-radius:0 8px 8px 0;text-align:right}
.pay-table td:nth-child(n+3):not(:last-child){text-align:right}.pay-table td small{display:block;color:#19805d;font-size:10px;margin-top:3px}.pay-table td button{border:0;background:none;color:inherit;font:inherit;padding:0;text-align:left;cursor:pointer}.pay-table tr[data-action]{cursor:pointer}.pay-table tr:hover td{background:#f3f6fb}.pay-table tr.is-selected td{background:#eef3fc;border-color:#90ade3}.pay-table .badge{font-size:10px;padding:3px 8px}
.pay-pagination{display:flex;align-items:center;justify-content:space-between;padding:8px 0;font-size:12px}
.pay-detail-pane{min-width:0;min-height:0;display:flex;flex-direction:column;background:#fff;border-left:1px solid #e0e5ee;box-shadow:-8px 0 24px #17294308;z-index:2}
.pay-detail-head{display:grid;grid-template-columns:minmax(0,1fr) 30px 30px;gap:12px 6px;align-items:center;padding:28px 24px 24px;flex:none}
.pay-detail-title{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}.pay-detail-title h2{font-size:22px;letter-spacing:-.6px;line-height:1.3;margin:0;overflow-wrap:anywhere}.pay-detail-title .badge{font-size:9px;padding:3px 8px}.pay-detail-head>p{grid-column:1/-1;font-size:11px;color:#75839b;margin:0}.pay-detail-head>.icon-button{width:30px;height:30px;min-height:0}
.pay-actions{position:relative}.pay-actions summary{list-style:none;display:grid;place-items:center;font-size:22px;line-height:1;width:30px;height:30px;cursor:pointer;color:#64758f;border-radius:6px}.pay-actions summary::-webkit-details-marker{display:none}.pay-actions summary:hover{background:#f0f3f8}.pay-actions>div{position:absolute;right:0;top:36px;min-width:155px;padding:6px;border:1px solid #e0e5ee;border-radius:8px;background:#fff;box-shadow:0 8px 24px #1729431a;z-index:3}.pay-actions button{display:block;width:100%;padding:10px;border:0;background:none;font-size:12px;text-align:left;color:#24344f;cursor:pointer;border-radius:5px}.pay-actions button:hover{background:#f5f7fa}.pay-actions .pay-void{color:#b33d43}
.pay-detail-content{padding:0 24px;flex:1;min-height:0;overflow-y:auto}
.pay-balances{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:18px 12px;background:#f3f5fb;border:1px solid #dfe5f1;border-radius:8px;gap:10px;margin-bottom:28px}.pay-balances>div+div{border-left:1px solid #dbe2ef;padding-left:10px}.pay-balances span{display:block;font-size:9px;line-height:1.5;color:#73829b;margin-bottom:6px}.pay-balances strong{font-size:13px;font-weight:650;white-space:nowrap;font-variant-numeric:tabular-nums}
.pay-history h3{font-size:13px;margin:0 0 12px}.pay-ledger-row{display:grid;grid-template-columns:85px minmax(0,1fr) auto;gap:10px;align-items:start;padding:18px 0;border-bottom:1px solid #e7ebf2;font-size:11px;line-height:1.5}.pay-ledger-row:last-child{border-bottom:0}.pay-ledger-row time{color:#74839b;font-size:10px}.pay-ledger-row strong{font-size:11px;font-weight:600;display:block}.pay-ledger-row span{display:block;font-size:10px;color:#73819a;margin-top:3px}.pay-ledger-row b{text-align:right;font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}.pay-ledger-row .is-negative{color:#b45640}
.pay-detail-footer{padding:22px 24px 28px;flex:none}.pay-detail-footer .primary-button{width:100%;justify-content:center;min-height:38px;font-size:12px;border-radius:7px}
.pay-drawer-enter{animation:pay-drawer-arrive 220ms cubic-bezier(.2,.8,.2,1)}@keyframes pay-drawer-arrive{from{transform:translateX(32px);opacity:0}to{transform:translateX(0);opacity:1}}
/* Both popups use the same restrained geometry as the selected image. */
#overlay-payment-create{width:min(480px,calc(100vw - 32px));border-radius:12px}
#overlay-payment-create .modal-head{padding:24px 26px 18px;border-bottom:1px solid #e5e9f1;align-items:flex-start}
#overlay-payment-create .modal-head .eyebrow{display:none}
#overlay-payment-create .modal-head h2{font-size:18px;letter-spacing:-.2px}
#overlay-payment-create .modal-head p:not(.eyebrow){margin:8px 0 0;font-size:13px;color:#526179}
#overlay-payment-create .modal-body{padding:24px 26px 26px}
#overlay-payment-create .modal-footer{padding:8px 26px 24px;display:flex;justify-content:flex-end;gap:14px;border:0;background:#fff}
#overlay-payment-create .modal-footer button{font-size:12px;min-height:38px;padding:9px 20px;border-radius:7px}
.pay-create-form,.pay-entry-form{display:grid;gap:20px}.pay-create-form label,.pay-entry-fields label{display:flex;flex-direction:column;gap:8px;font-size:11px;color:#708099}
.pay-create-form input,.pay-create-form select,.pay-entry-fields input{box-sizing:border-box;width:100%;min-width:0;height:38px;padding:8px 10px;border:1px solid #dce2ec;border-radius:6px;background:#fff;color:#24344f;font:inherit;font-size:12px}
.pay-create-form input[readonly]{background:#f7f8fa}.pay-create-customer{display:grid;gap:7px;font-size:13px}.pay-create-customer span,.pay-create-form>p{font-size:11px;color:#73819a;line-height:1.5;margin:0}.pay-entry-form fieldset{border:0;padding:0;margin:0;min-width:0}.pay-entry-form legend{font-size:11px;color:#708099;margin-bottom:8px;padding:0}
.pay-form-error{color:#b63838!important;font-size:12px;margin:0}
.pay-empty{padding:40px 16px;text-align:center;color:#7c89a0}.pay-empty h2{font-size:16px;color:#34465f}.pay-empty p{font-size:12px}
/* Customer-context option B: compact ledger table and matching creation popup. */
.pay-customer-list{padding:4px;min-width:0;color:var(--navy)}
.pay-customer-list>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}
.pay-customer-list h3{margin:0;font-size:15px}
.pay-customer-list>header button{min-height:36px;font-size:12px;padding:9px 16px;border-radius:7px}
.pay-customer-table-scroll{max-width:100%;overflow-x:auto;background:white;border:1px solid #e1e5ed;border-radius:10px}
.pay-customer-table{width:100%;min-width:570px;border-collapse:collapse;font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
.pay-customer-table .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.pay-customer-table th{padding:15px 12px;text-align:left;color:#68788f;font-size:10px;font-weight:600;border-bottom:1px solid #e5e9f1}
.pay-customer-table td{padding:18px 12px;border-bottom:1px solid #e5e9f1;color:#263650}
.pay-customer-table th:nth-child(n+2):nth-child(-n+4),.pay-customer-table td:nth-child(n+2):nth-child(-n+4){text-align:right}
.pay-customer-table th:first-child,.pay-customer-table td:first-child{padding-left:16px}
.pay-customer-table tr:last-child td{border-bottom:0}
.pay-customer-table tbody tr{cursor:pointer}.pay-customer-table tbody tr:hover{background:#f8f9fb}
.pay-customer-table td button{border:0;padding:0;text-align:left;background:transparent;font:inherit;color:inherit;cursor:pointer;display:grid;gap:7px}
.pay-customer-table td strong{font-size:11px;font-weight:600}.pay-customer-table td time{color:#74829b;font-size:10px}
.pay-customer-table td small{display:block;font-size:10px;color:#19805d;margin-top:4px}
.pay-customer-table .badge{font-size:10px;padding:3px 8px}
.pay-customer-table .pay-customer-chevron{padding-left:0;padding-right:12px;width:22px;color:#73819a}.pay-customer-chevron .icon{width:14px;height:14px}
.pay-create-form label{font-size:12px;gap:10px}
.pay-create-amount{display:flex;align-items:stretch;height:44px;border:1px solid #d6ddeb;border-radius:7px;overflow:hidden;background:white}
.pay-create-amount>span{display:flex;align-items:center;padding:0 13px;border-right:1px solid #dce2ec;background:#f8f9fb;color:#526179;font-size:14px}
.pay-create-amount>input{height:42px;border:0;border-radius:0;padding:10px 13px;font-size:14px;outline:none;appearance:textfield;-moz-appearance:textfield}
.pay-create-amount>input::-webkit-inner-spin-button,.pay-create-amount>input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.pay-create-amount:focus-within{outline:2px solid #82aef1;outline-offset:2px}
.cx-ref-tabs{overflow-x:auto}
@media(min-width:1600px){.pay-workspace.detail-open{grid-template-columns:minmax(0,1fr) 520px}.pay-detail-head{padding:32px 28px 24px}.pay-detail-content{padding:0 28px}.pay-detail-footer{padding:24px 28px 32px}.pay-balances strong{font-size:14px}.pay-ledger-row{font-size:12px;padding:21px 0}}
@media(max-width:1200px){.pay-workspace.detail-open{grid-template-columns:minmax(0,1fr)}.pay-detail-pane{position:absolute;inset:0 0 0 auto;width:min(480px,100%);box-shadow:-12px 0 36px #17294320}.pay-workspace.detail-open .pay-list-pane{padding-right:24px}}
@media(max-width:1024px){.pay-page{height:calc(100dvh - 70px)}}
@media(max-width:600px){.pay-list-pane{padding:20px 16px}.pay-heading h1{font-size:21px}.pay-heading{gap:7px}.pay-heading>span{width:30px;height:30px}.pay-new{padding:8px 10px;font-size:10px}.pay-toolbar{gap:14px}.pay-toolbar .search-field{width:100%}.pay-detail-pane{width:100%;border:0}.pay-detail-head{padding:22px 18px}.pay-detail-title h2{font-size:21px}.pay-detail-content{padding:0 18px}.pay-detail-footer{padding:18px}.pay-balances{grid-template-columns:1fr 1fr;padding:16px;gap:16px}.pay-balances>div:first-child{grid-column:1/-1}.pay-balances>div:first-child strong{font-size:24px}.pay-balances>div:nth-child(2){padding:0;border:0}.pay-balances strong{font-size:14px}.pay-balances span{font-size:10px}.pay-ledger-row{grid-template-columns:70px minmax(0,1fr) auto;gap:8px}.pay-ledger-row time{font-size:9px}.pay-ledger-row b{font-size:10px}.pay-customer-list>header{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.pay-drawer-enter{animation:none}}
@media(min-width:1201px) and (max-width:1599px){.pay-workspace.detail-open .pay-table{min-width:620px;font-size:11px}.pay-workspace.detail-open .pay-table td,.pay-workspace.detail-open .pay-table th{padding-left:8px;padding-right:8px}.pay-workspace.detail-open .pay-table th{font-size:9px}}


/* Entry flow A: separate actions opening matching popups. */
.pay-entry-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pay-entry-actions .primary-button,.pay-entry-actions .secondary-button{width:100%;min-width:0;min-height:40px;padding:9px 10px;justify-content:center;font-size:11px;border-radius:7px;white-space:normal;text-align:center}
#overlay-payment-entry{width:min(480px,calc(100vw - 32px));border-radius:12px}
#overlay-payment-entry .modal-head{padding:26px 28px 20px;border:0;align-items:flex-start}
#overlay-payment-entry .modal-head .eyebrow{display:none}
#overlay-payment-entry .modal-head h2{font-size:20px;letter-spacing:-.3px}
#overlay-payment-entry .modal-head p:not(.eyebrow){margin:8px 0 0;font-size:13px;color:#73819a}
#overlay-payment-entry .modal-body{padding:4px 28px 24px}
#overlay-payment-entry .modal-footer{padding:8px 28px 26px;display:flex;justify-content:space-between;gap:16px;border:0;background:white}
#overlay-payment-entry .modal-footer button{font-size:12px;min-height:42px;padding:10px 22px;border-radius:6px}
.pay-signed-entry{gap:24px}.pay-entry-help{margin:-4px 0 0;font-size:12px;color:#718099;line-height:1.5}
.pay-entry-field{display:flex;flex-direction:column;gap:10px;font-size:13px;font-weight:600;color:#24344f}
.pay-entry-field>input{box-sizing:border-box;width:100%;min-width:0;height:42px;border:1px solid #dce2ec;border-radius:6px;padding:9px 12px;background:white;font:inherit;font-size:14px;font-weight:400;color:#24344f}
.pay-signed-entry legend{font-size:13px;font-weight:600;color:#24344f;margin-bottom:10px}
.pay-direction{display:grid;grid-template-columns:1fr 1fr;border:1px solid #24344f;border-radius:6px;overflow:hidden}
.pay-direction label{position:relative;cursor:pointer}.pay-direction label+label{border-left:1px solid #24344f}.pay-direction input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}
.pay-direction span{display:flex;align-items:center;justify-content:center;height:44px;font-size:14px;font-weight:600;color:#24344f;background:white;pointer-events:none}.pay-direction input:checked+span{background:#192d49;color:white}.pay-direction input:focus-visible+span{outline:2px solid #82aef1;outline-offset:-4px}
.pay-amount-input{display:flex;align-items:center;border:1px solid #dce2ec;border-radius:6px;height:42px;overflow:hidden;background:white}.pay-amount-input>span{padding:0 12px;color:#52657e;font-size:14px;font-weight:400}.pay-amount-input>input{width:100%;min-width:0;height:40px;padding:9px 12px 9px 0;border:0;background:transparent;color:#24344f;font-size:14px;outline:none}.pay-amount-input:focus-within{outline:2px solid #82aef1;outline-offset:2px}
.pay-total-preview{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 12px;background:#edf3fb;border-radius:6px;font-size:11px;font-variant-numeric:tabular-nums;flex-wrap:wrap}.pay-total-preview strong{font-size:12px}.pay-total-preview>span:first-child{color:#4c607c}
@media(max-width:420px){#overlay-payment-entry .modal-head{padding:22px 20px 18px}#overlay-payment-entry .modal-body{padding:4px 20px 20px}#overlay-payment-entry .modal-footer{padding:8px 20px 22px;gap:10px}#overlay-payment-entry .modal-footer button{font-size:11px;padding:9px 12px}.pay-total-preview>span:first-child{flex-basis:100%;margin-bottom:3px}.pay-signed-entry{gap:20px}.pay-entry-actions{gap:8px}.pay-entry-actions button{font-size:10px}}
