#customerWalletModal { z-index: 250; }
#manage-customers .customer-wallet-columns { grid-template-columns: minmax(0,1.4fr) minmax(0,.7fr) minmax(0,1.2fr) minmax(0,.6fr) minmax(0,1fr) auto; }
#manage-customers .customer-wallet-value { display: flex; align-items: center; gap: 8px; }
#manage-customers .customer-wallet-open { margin-left: auto; flex: 0 0 auto; min-width: 44px; height: 28px; padding: 0 8px; border: 1px solid #222; border-radius: 7px; background: #fff; color: #222; font-size: 12px; cursor: pointer; }
#manage-customers [data-wallet-customer-id] { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media(max-width:620px) { #manage-customers .customer-wallet-columns { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } #manage-customers .customer-wallet-columns > .customer-cell:first-child { grid-column: span 2; } }
#customerWalletModal .wallet-box { width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 36px); overflow: auto; padding: 24px; background: #fff; border: 1px solid #d4d7da; border-radius: 16px; }
.wallet-balance { padding: 16px 0; font-size: 15px; }
.wallet-balance strong { font-size: 28px; margin: 0 8px; }
.wallet-note { font-size: 12px; color: #68737d; line-height: 1.65; margin: 8px 0; }
.wallet-fields { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin: 12px 0; }
.wallet-fields label, .wallet-settle-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.wallet-fields input, .wallet-settle-fields input { padding: 10px; border: 1px solid #d4d7da; border-radius: 7px; width: 100%; min-width: 0; box-sizing: border-box; font-size: 14px; color: #222; background: #fff; }
#customerWalletModal .wallet-reason-control { display: flex; align-items: center; gap: 5px; padding-right: 6px; border: 1px solid #d4d7da; border-radius: 7px; background: #fff; min-width: 0; }
#customerWalletModal .wallet-reason-control:focus-within { border-color: #222; }
#customerWalletModal .wallet-reason-control input { flex: 1 1 0; width: 0; border: 0; outline: 0; background: transparent; }
#customerWalletModal .wallet-reason-shortcuts { display: flex; flex: 0 0 auto; gap: 4px; }
#customerWalletModal .wallet-reason-shortcuts button { padding: 4px 6px; border: 1px solid #d4d7da; border-radius: 5px; background: #f6f7f8; color: #222; font-family: inherit; font-size: 11px; line-height: 18px; white-space: nowrap; cursor: pointer; }
#customerWalletModal .wallet-reason-shortcuts button:hover { border-color: #222; background: #eee; }
@media(max-width:420px) { #customerWalletModal .wallet-reason-control { flex-wrap: wrap; padding: 0 6px 6px; } #customerWalletModal .wallet-reason-control input { flex-basis: 100%; } #customerWalletModal .wallet-reason-shortcuts { margin-left: auto; } }
#walletSave { margin: 10px 0 16px; padding: 10px 22px; border: 1px solid #222; border-radius: 8px; background: #222; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
#walletSave:disabled, #settleWalletUse:disabled { opacity: .5; cursor: default; }
#walletVerifyLabel { display: block; }
#walletVerifyLabel[hidden] { display: none; }
.wallet-ledger-scroll { overflow-x: auto; }
.wallet-ledger { width: 100%; border-collapse: collapse; font-size: 12px; }
.wallet-ledger th, .wallet-ledger td { text-align: left; padding: 10px 6px; border-bottom: 1px solid #e1e5e8; vertical-align: top; }
.wallet-ledger td:nth-child(2), .wallet-ledger td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.wallet-ledger button, #walletMore, #settleWalletUse { background: #fff; color: #222; border: 1px solid #bbc3ca; border-radius: 6px; padding: 7px; cursor: pointer; }
.wallet-ledger-order-link { display:inline-block; padding:7px; color:#222; background:#fff; border:1px solid #bbc3ca; border-radius:6px; text-decoration:none; white-space:nowrap; }
.wallet-ledger-order-link:hover { border-color:#222; }
#walletMore { margin-top: 12px; }
#settleWalletBox { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid #222; background: #fff; font-size: 13px; color: #222; }
#settleWalletBox small { margin-left: 8px; font-size: 13px; color: #1d4ed8; font-weight: 700; }
#settleWalletBox .settle-wallet-heading { display: inline-flex; align-items: center; }
#settleModal #settleWalletBox .settle-wallet-balance,
#settleModal #settleWalletBox .settle-wallet-balance .settle-currency { color: #222; font-weight: 700; }
#settleWalletBox .settle-wallet-remainder { display: inline-flex; align-items: baseline; gap: 4px; margin: 0; white-space: nowrap; font-size: 13px; font-weight: 700; }
#settleWalletRemainder { color: #222; font-variant-numeric: tabular-nums; }
#settleModal #settleWalletFinal .settle-wallet-explanation { font-family: inherit; font-size: 12px; font-weight: 400; color: #555; }
@media(max-width:420px) { #settleWalletBox .settle-wallet-remainder .settle-currency { display: none; } #settleWalletBox .settle-wallet-remainder { font-size: 12px; gap: 2px; } #settleWalletBox .settle-wallet-heading small { margin-left: 4px; font-size: 12px; } }
#settleWalletBox .settle-category-label { font-weight: 700; }
#settleModal .settle-checkout-box .settle-total-box,
#settleModal #settleWalletBox { font-family: "Inter Tight", "Noto Sans SC", sans-serif; }
#settleModal .settle-checkout-box .settle-category-label { font-size: 13px; font-weight: 700; line-height: 1.25; letter-spacing: normal; }
#settleModal #settleWalletFinal strong b { font: inherit; }
#settleModal #settleWalletAmount { font-family: inherit; font-variant-numeric: tabular-nums; }
#settleModal .settle-checkout-box .settle-total-box,
#settleModal #settleWalletBox { height: 38px; min-height: 38px; box-sizing: border-box; padding: 0 10px; }
#settleModal #settleWalletAmount { height: 28px; box-sizing: border-box; padding: 0 8px; }
#settleModal .settle-checkout-box .settle-currency { font-family: inherit; font-size: 11px; font-weight: 700; line-height: 1.25; color: #222; }
#settleModal .settle-shipping-note { font-family: inherit; font-size: 13px; font-weight: 700; color: #222; }
#settleWalletBox .settle-wallet-entry { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; font-weight: 700; }
#settleWalletUseAll { border:0; padding:0; background:transparent; color:#222; font:inherit; font-weight:700; cursor:pointer; white-space:nowrap; }
#settleWalletUseAll:hover { text-decoration:underline; }
#settleWalletUseAll:disabled { opacity:.45; cursor:default; text-decoration:none; }
.wallet-order-sale { position:relative; display:inline-block; }
.wallet-order-mark { position:absolute; right:-5px; top:-12px; z-index:1; padding:1px 4px; border:1px solid #222; border-radius:5px; background:#222; color:#fff; font:700 9px/1.3 "Inter Tight","Noto Sans SC",sans-serif; white-space:nowrap; cursor:pointer; }
.wallet-order-mark[hidden] { display:none; }
.wallet-order-mark.wallet-order-returned { background:#eee; color:#777; border-color:#aaa; }
.wallet-order-mark.wallet-order-partial { background:#fff2d4; color:#684900; border-color:#d3b778; }
#walletOrderPaymentModal, #walletOrderReceiptModal { z-index:250; }
#walletOrderPaymentModal .wallet-payment-box, #walletOrderReceiptModal .wallet-payment-box { width:min(460px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); box-sizing:border-box; overflow:auto; padding:24px; font:13px/1.7 "Inter Tight","Noto Sans SC",sans-serif; }
.wallet-receipt-form { display:grid; gap:8px; }
.wallet-receipt-form label { display:grid; gap:4px; }
.wallet-receipt-form input { min-width:0; width:100%; box-sizing:border-box; padding:8px 10px; border:1px solid #ccc; border-radius:7px; font:inherit; }
.wallet-receipt-form button { justify-self:end; }
.wallet-payment-cycle { border:1px solid #ddd; border-radius:8px; padding:12px; margin:12px 0; }
.wallet-payment-cycle p { margin:6px 0; }
#walletOrderPaymentFunds { border:1px solid #222; border-radius:6px; background:#fff; color:#222; padding:7px 12px; cursor:pointer; }
#settleWalletAmount { width: 68px; min-width: 0; padding: 5px 8px; border: 1px solid #cdd3d9; border-radius: 5px; text-align: right; font-size: 13px; font-weight: 700; color: #222; background: #fff; }
#settleWalletBox[hidden], #settleWalletFinal[hidden] { display: none; }
@media(max-width:420px) { #settleWalletBox { flex-wrap: nowrap; } #settleWalletBox .settle-wallet-entry { margin-left: auto; } #settleModal #settleWalletAmount { width: 64px; } #settleWalletBox small { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.wallet-settle-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; font-size: 12px; }
.wallet-settle-fields input { max-width: 130px; padding: 7px; }
.wallet-settle-fields > span { margin: auto 0 auto auto; }
@media(max-width:600px) { .wallet-fields { grid-template-columns: 1fr; } #customerWalletModal .wallet-box { padding: 18px 12px; } .wallet-settle-fields > span { width: 100%; margin-top: 3px; } }
#walletShortcut { position:fixed; z-index:95; width:54px; height:54px; padding:0; border:1.5px solid #222; border-radius:50%; background:#222; color:#fff; box-shadow:0 10px 22px rgba(0,0,0,.18); font:800 13px "Inter Tight","Noto Sans SC",sans-serif; cursor:pointer; }
#walletShortcut[hidden] { display:none; }
#walletHolderModal { z-index:249; }
#walletHolderModal .wallet-holder-box { width:min(800px,calc(100vw - 24px)); max-height:calc(100dvh - 36px); overflow:auto; padding:24px; box-sizing:border-box; font-family:"Inter Tight","Noto Sans SC",sans-serif; }
.wallet-holder-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0 0 10px; }
.wallet-holder-summary > div { min-width:0; padding:7px 8px; border:1px solid #ddd; border-radius:8px; background:#f8f8f8; }
.wallet-holder-summary span { display:block; color:#555; font-size:12px; }
.wallet-holder-summary strong { display:block; margin-top:2px; font-size:14px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.wallet-holder-tools { display:flex; align-items:center; gap:8px; }
.wallet-holder-tools input { flex:1; min-width:0; height:36px; padding:0 10px; border:1px solid #222; border-radius:7px; font:inherit; }
.wallet-holder-box button:not(.modal-close-x) { padding:6px 10px; border:1px solid #222; border-radius:7px; background:#fff; color:#222; font:600 12px "Inter Tight","Noto Sans SC",sans-serif; cursor:pointer; }
.wallet-holder-box button:disabled { opacity:.4; cursor:default; }
.wallet-holder-table th:first-child { width:45%; }
.wallet-holder-table td:first-child > small { display:block; margin-top:4px; color:#777; }
.wallet-holder-table td:nth-child(2) { white-space:nowrap; }
.wallet-holder-table td:nth-child(2) small { font-size:10px; }
.wallet-holder-pages { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.wallet-holder-actions { display:flex; justify-content:flex-end; gap:6px; margin:0; flex:0 0 auto; }
#walletOtherCustomers { padding:10px 12px; margin-top:10px; border:1px solid #ddd; border-radius:8px; }
.wallet-other-results { max-height:190px; overflow:auto; }
.wallet-other-results > div { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0; }
.wallet-other-results > div + div { border-top:1px solid #eee; }
.wallet-other-results span { min-width:0; overflow-wrap:anywhere; }
.wallet-other-results small { display:block; color:#777; }
.wallet-other-results button { flex-shrink:0; }
body.wallet-reminder-pair #voiceProductModal .reminder-toolbar,
body.wallet-reminder-pair #voiceProductModal .reminder-toolbar-right { flex-wrap:wrap; }
body.wallet-reminder-pair #voiceProductModal .reminder-toolbar-right { margin-left:0; }
body.wallet-reminder-pair #voiceProductModal .message-reminder-table { overflow-x:auto; }
body.wallet-reminder-pair #walletHolderModal,
body.wallet-reminder-pair #voiceProductModal { z-index:249; left:0; right:0; width:100%; height:50dvh; padding:8px; box-sizing:border-box; align-items:flex-start; }
body.wallet-reminder-pair #walletHolderModal { top:0; bottom:auto; }
body.wallet-reminder-pair #voiceProductModal { top:50dvh; bottom:0; }
body.wallet-reminder-pair #walletHolderModal .wallet-holder-box,
body.wallet-reminder-pair #voiceProductModal .modal-box { width:min(800px,100%); max-width:100%; max-height:calc(50dvh - 16px); box-sizing:border-box; overflow:auto; }
#walletHolderModal .wallet-ledger-scroll { border:1px solid #222; border-radius:9px; overflow:hidden; }
.wallet-holder-table { table-layout:fixed; border:0; border-collapse:separate; border-spacing:0; }
.wallet-holder-table th, .wallet-holder-table td { border:0; border-right:1px solid #222; border-bottom:1px solid #222; padding:7px 6px; vertical-align:middle; }
.wallet-holder-table th, .wallet-holder-table td { text-align:center; }
.wallet-holder-table th:last-child, .wallet-holder-table td:last-child { border-right:0; }
.wallet-holder-table tbody tr:last-child td { border-bottom:0; }
.wallet-holder-table th { background:#fafafa; font-weight:700; }
.wallet-holder-table th:first-child { width:30%; }
.wallet-holder-table th:nth-child(2), .wallet-holder-table th:nth-child(3) { width:21%; }
.wallet-holder-row-actions { display:flex; flex-wrap:nowrap; align-items:center; justify-content:center; gap:5px; }
.wallet-holder-row-actions button { white-space:nowrap; }
#walletHolderModal .wallet-holder-row-actions button { padding:6px; font-size:11px; }
.wallet-holder-table th:first-child { width:23%; }
.wallet-holder-table th:nth-child(2), .wallet-holder-table th:nth-child(4) { width:14%; }
.wallet-holder-table th:nth-child(3) { width:16%; }
#walletFundsModal { z-index:251; }
#walletOrderReceiptModal { z-index:252; }
#walletFundsModal .wallet-funds-box { width:min(960px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); overflow:auto; box-sizing:border-box; padding:24px; font-family:"Inter Tight","Noto Sans SC",sans-serif; }
#walletFundsCheck { margin:12px 0; padding:10px; border:1px solid #bbb; border-radius:7px; font-size:13px; line-height:1.5; }
#walletFundsCheck.wallet-audit-ok { color:#17643b; border-color:#b3d8c1; background:#f2faf5; }
#walletFundsCheck.wallet-audit-error { color:#a52720; border-color:#e5a7a1; background:#fff4f3; font-weight:700; }
.wallet-funds-scroll { overflow-x:auto; margin-top:12px; border:1px solid #ccc; border-radius:8px; }
.wallet-funds-table { min-width:730px; }
.wallet-funds-table th { background:#f7f7f7; }
.wallet-funds-table td:nth-child(4) { font-weight:700; white-space:nowrap; }
.wallet-funds-table td:first-child { max-width:260px; overflow-wrap:anywhere; }
.wallet-funds-payment { display:grid; justify-items:start; gap:3px; margin-top:6px; color:#444; }
.wallet-funds-payment small { display:block; color:#666; }
.wallet-funds-due { color:#8c4d20; }
.wallet-funds-payment summary, .wallet-funds-restore summary { cursor:pointer; }
.wallet-funds-table .wallet-funds-restore td { padding:5px 6px; background:#fafafa; color:#666; font-size:11px; }
.wallet-funds-restore small { display:block; margin-top:4px; }
#walletFundsRefresh, #walletFundsMore { border:1px solid #222; border-radius:6px; background:#fff; padding:6px 10px; cursor:pointer; font:inherit; font-size:12px; }
#walletFundsRefresh:disabled { opacity:.5; }
#walletFundsMore { margin-top:12px; }
@media(max-width:480px) { #walletFundsModal .wallet-funds-box { padding:18px 12px; } }
.wallet-holder-table td:first-child { overflow-wrap:anywhere; }
.wallet-holder-table td:nth-child(n+2):nth-child(-n+4) { white-space:normal; overflow-wrap:anywhere; }
.wallet-holder-table td:nth-child(n+2):nth-child(-n+4) small { font-size:10px; }
.wallet-holder-table .wallet-holder-entry-meta { display:block; margin-top:3px; color:#666; line-height:1.3; }
.wallet-holder-entry-meta time { white-space:nowrap; }
.wallet-holder-tools input { width:100%; box-sizing:border-box; }
.wallet-holder-actions { flex-wrap:nowrap; }
@media(max-width:480px) {
  .wallet-holder-row-actions { flex-wrap:wrap; gap:3px; }
  #walletHolderModal .wallet-holder-box { padding:16px 10px; }
  .wallet-holder-table th, .wallet-holder-table td { font-size:11px; padding:8px 4px; }
  .wallet-holder-table td:first-child > small { font-size:10px; }
  .wallet-holder-table td:last-child button { padding:5px 3px; font-size:11px; }
  .wallet-holder-tools { gap:4px; }
  .wallet-holder-tools input { padding:0 5px; font-size:12px; }
  .wallet-holder-tools .wallet-holder-actions { gap:3px; }
  .wallet-holder-tools .wallet-holder-actions button { padding:6px 4px; font-size:11px; white-space:nowrap; }
}
