/* Keep a visible focus indicator inside controls even in scrolling modal bodies. */
input:not([type=checkbox]):not([type=radio]),select,textarea{box-sizing:border-box;max-width:100%}
.modal input:not([type=checkbox]):not([type=radio]),.modal select,.modal textarea{width:100%;min-width:0;border-radius:12px}
.modal input:focus-visible,.modal select:focus-visible,.modal textarea:focus-visible{border-color:var(--primary);outline:2px solid var(--primary);outline-offset:-3px;box-shadow:inset 0 0 0 1px var(--primary)}
.modal-body{padding:3px}
.pos-payment-modal{width:480px;padding:24px!important;max-width:calc(100vw - 24px)}
.pos-payment .payment-total{margin:4px 0 18px;padding:16px}.pos-payment .payment-total strong{font-size:30px;margin:6px 0}
.pos-payment label{margin-bottom:12px;gap:6px}.pos-payment label small{font-weight:400;color:var(--secondary);display:inline}.pos-helper{font-size:11px;margin:8px 0 12px}.pos-payment [hidden]{display:none!important}.pos-payment input{min-height:44px}
.pos-selected{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px;background:var(--accent-bg);border-radius:12px;margin-bottom:16px}.pos-selected small{display:block;font-size:11px;margin-top:4px}.pos-match{font-size:12px;border:1px solid var(--border);border-radius:12px;padding:12px;margin-bottom:12px}.pos-match .btn{display:block;margin-top:8px}.pos-payment .quick-cash{margin-bottom:12px}.pos-payment .quick-cash button{min-height:40px;cursor:pointer}.pos-payment-error{font-size:12px;color:var(--danger);line-height:1.6}.pos-payment-error:empty{display:none}
.pos-payment-footer{position:sticky;bottom:-3px;background:var(--surface);padding:12px 0 2px;border-top:1px solid var(--border);z-index:2}.pos-payment-footer .btn{min-height:48px;width:100%}
.pos-customer-options{position:fixed;z-index:1200;box-sizing:border-box;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 40px #002e2830;overflow-y:auto;overscroll-behavior:contain;padding:5px}.pos-customer-options[hidden]{display:none}.pos-customer-options [role=option]{padding:12px;border-radius:8px;font-size:12px;cursor:pointer;min-height:42px}.pos-customer-options [role=option] small{display:block;margin-top:4px;color:var(--secondary)}.pos-customer-options [aria-selected=true],.pos-customer-options [role=option]:hover{background:var(--accent-bg);color:var(--primary-dark)}
@media(max-width:600px){.modal-backdrop:has(.pos-payment-modal){padding:0;align-items:flex-end}.pos-payment-modal{width:100%;max-width:100%;max-height:100dvh!important;border-radius:18px 18px 0 0;padding:24px!important}.pos-payment-footer{padding-bottom:max(4px,env(safe-area-inset-bottom))}.pos-payment .quick-cash{flex-wrap:wrap}}
/* Compact payment workspace; customer details live in a separate viewport-bound card. */
.pos-payment-modal{width:560px!important;padding:18px 22px!important;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
.pos-payment-modal .modal-heading{margin-bottom:10px}.pos-payment-modal .modal-heading h2{font-size:20px}
.pos-payment .payment-total{margin:0 0 10px;padding:10px 16px}.pos-payment .payment-total strong{font-size:32px;margin:3px 0}.pos-payment .payment-total small{font-size:12px}
.payment-method-row{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px;font-size:14px}.payment-method-row strong{padding:5px 12px;border-radius:8px;background:var(--surface-muted)}
.pos-payment-modal .payment-customer-toggle{display:block;width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere;margin:0 0 10px;padding:8px 12px;min-height:40px;font-size:14px}
.pos-payment-modal .pos-payment label{font-size:14px;gap:5px;margin-bottom:8px}.pos-payment-modal .pos-payment label:has(input[name=paid]){font-size:17px;font-weight:600}.pos-payment-modal #dialog-form .pos-payment input[name=paid]{font-size:32px;font-weight:700;line-height:1.2;min-height:58px;padding:8px 12px;font-variant-numeric:tabular-nums}
.pos-payment .quick-cash{margin:0 0 8px;gap:8px}.pos-payment .quick-cash button{font-size:14px;padding:7px 10px}
.pos-payment .change-line{margin:8px 0;font-size:18px;gap:12px;flex-wrap:wrap}.pos-payment .change-line strong{font-size:30px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.pos-payment-modal .form-error:empty{display:none}
.pos-payment-modal .pos-payment-footer{display:flex;gap:10px;padding:10px 0 0;margin-top:8px}.pos-payment-modal .pos-payment-footer .btn{width:auto;min-height:44px;font-size:14px;flex:1}.pos-payment-modal .pos-payment-footer .primary{flex:2}
.payment-customer-card{position:fixed;z-index:1100;box-sizing:border-box;padding:16px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:14px;box-shadow:0 12px 40px #002e2830;overflow:auto;overscroll-behavior:contain;font-size:14px}
.payment-customer-card[hidden],.payment-customer-card [hidden]{display:none!important}.payment-customer-card label{display:flex;flex-direction:column;gap:5px;margin-bottom:10px;font-size:14px}.payment-customer-card input{width:100%;min-height:44px;font-size:16px}.payment-customer-card .pos-helper{font-size:13px;line-height:1.5;margin:8px 0}.payment-customer-card .pos-selected{overflow-wrap:anywhere}.customer-card-actions{position:sticky;bottom:-16px;background:var(--surface);display:flex;gap:8px;padding:10px 0}.customer-card-actions .btn{flex:1;min-height:44px}.customer-card-error{color:var(--danger);font-size:13px}.customer-card-error:empty{display:none}
@media(max-width:600px){.pos-payment-modal{padding:14px 16px!important;max-height:100dvh!important}.pos-payment .payment-total strong{font-size:28px}.pos-payment .quick-cash{flex-wrap:wrap}.pos-payment-modal .pos-payment-footer{padding-bottom:env(safe-area-inset-bottom)}}

.pos-payment [hidden]{display:none!important}.pos-payment [data-noncash-details]{font-size:12px;line-height:1.35}.pos-payment [data-noncash-details] p{margin:4px 0}.pos-payment .qris-thumbnail{display:block;margin:0 auto;padding:3px;border:1px solid var(--border);background:white;border-radius:6px}.qris-thumbnail img{width:140px;height:140px;object-fit:contain}.qris-zoom{max-width:calc(100vw - 24px);width:420px;border:1px solid var(--border);border-radius:12px;padding:16px;text-align:center}.qris-zoom::backdrop{background:#0008}.qris-zoom img{display:block;width:100%;max-height:60dvh;object-fit:contain}.qris-zoom p{font-size:12px}.pos-payment [data-noncash-reference]{font-size:12px}.pos-payment [data-manual-notice]{font-size:11px;line-height:1.35;margin:4px 0}
.pos-payment-modal .pos-payment-footer .btn{min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.25;padding:9px 12px}
.manual-sale-note{padding:12px 14px;border-radius:10px;background:var(--accent-bg);color:var(--text);line-height:1.6}
.manual-sale-form{display:grid;gap:16px}.manual-sale-line{min-width:0;margin:0 0 14px;padding:14px;border:1px solid var(--border);border-radius:12px}.manual-sale-line legend{padding:0 6px;font-weight:600}.manual-sale-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.manual-sale-fields>label:first-child{grid-column:1/-1}.manual-sale-form label{display:grid;gap:6px;min-width:0}.manual-sale-form input,.manual-sale-form select{width:100%;min-width:0}.manual-sale-line .text-btn{margin-top:12px;min-height:40px}.manual-sale-help{font-size:12px;line-height:1.6}.manual-sale-total{display:grid;grid-template-columns:1fr auto;gap:10px;padding-top:12px;border-top:1px solid var(--border)}.manual-sale-total strong{text-align:right}.manual-sale-modal .modal-save-footer{position:sticky;bottom:0;background:var(--surface);padding-bottom:12px}.pos-manual-tools{display:flex;justify-content:flex-end;margin:6px 0}.pos-manual-tools .btn{min-height:40px;font-size:12px}
@media(max-width:480px){.manual-sale-fields{grid-template-columns:minmax(0,1fr)}.manual-sale-modal .modal-save-footer .btn{flex:1 1 100%}.pos-manual-tools .btn{min-height:44px}}
.manual-sale-form [hidden]{display:none!important}
/* Manual entry shares the existing search row in both POS layouts. */
.pos-workspace .pos-search{display:flex;flex-wrap:nowrap;gap:6px}
.pos-workspace .pos-search>.search-input{min-width:0!important;width:auto!important;flex:1 1 auto!important}
.pos-workspace .pos-search>.btn{flex:0 0 auto}
.pos-workspace .pos-search>.pos-manual-button,.pos-workspace.pos-bulk .pos-search>.pos-manual-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:auto;min-width:84px;padding:8px;font-size:12px;white-space:nowrap}
.pos-workspace .pos-search>.pos-manual-button:after{content:none}
.pos-workspace .pos-manual-button .icon{width:18px;height:18px}
.manual-cart-tag{color:var(--primary);font-size:11px;white-space:nowrap}
.modal.manual-sale-modal{width:min(540px,calc(100vw - 24px))}
.manual-sale-modal .manual-sale-form{gap:12px}.manual-sale-modal .manual-sale-line{border:0;padding:0;margin:0 0 12px}.manual-sale-modal .manual-sale-line+fieldset{border-top:1px solid var(--border);padding-top:12px}
.manual-sale-modal .manual-sale-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.manual-sale-modal .manual-sale-fields>label:last-child{grid-column:1/-1}
.manual-sale-modal label{margin:0;gap:5px;font-size:13px}.manual-sale-modal input,.manual-sale-modal select{min-height:44px}.manual-sale-modal .manual-sale-note{font-size:12px;padding:10px 12px}.manual-sale-modal .manual-sale-total{font-size:14px}
@media(max-width:800px){.pos-workspace .pos-search>.btn:not(.pos-manual-button){width:40px;min-width:40px;font-size:0;padding:8px}.pos-workspace .pos-search>.btn:after{content:none}}
@media(pointer:coarse){.pos-workspace .pos-search>.btn{min-height:44px;height:44px}}
.manual-cost-warning{padding:12px 14px;border:1px solid var(--warning-border,var(--border));border-radius:10px;background:var(--warning-bg);color:var(--warning-text);font-size:13px;line-height:1.5}
