.pos-workspace{max-width:980px;margin:auto;padding-bottom:90px}.pos-heading{display:flex;gap:8px;align-items:center;margin-bottom:16px}.pos-heading>div{flex:1}.pos-heading small{color:var(--muted);font-size:10px;letter-spacing:1.5px}.pos-heading h1{margin:3px 0;font-size:26px}.pos-heading .btn{font-size:12px;padding:9px 12px}.pos-steps{display:flex;gap:6px;margin:12px 0}.pos-steps button{flex:1;border:0;background:var(--surface,#fff);font-size:12px;min-height:42px}.pos-steps .active,.pos-categories .active,.pos-pay-methods .active{background:#fff0e6!important;color:#b74419!important;box-shadow:inset 0 0 0 1px #f2a77f}.pos-search{display:flex;gap:8px;margin-bottom:14px}.pos-search input{min-width:0;flex:1}.pos-search button{display:flex;align-items:center;gap:5px}.pos-search svg{width:20px}.pos-catalog{display:grid;grid-template-columns:115px 1fr;gap:12px}.pos-categories{display:flex;flex-direction:column;gap:7px;align-self:start;position:sticky;top:65px}.pos-categories button{white-space:normal;overflow-wrap:anywhere;font-size:12px;padding:12px 7px;border:0;text-align:left}.pos-products{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.pos-product{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);background:var(--surface,#fff);border-radius:12px;padding:12px;gap:7px}.pos-product-photo{width:100%;height:116px;display:grid;place-items:center;background:#f5f6f7;border:0;border-radius:8px;padding:0}.pos-product-photo img{width:100%;height:100%;object-fit:contain;border-radius:8px}.pos-product-photo svg{width:46px;height:46px;color:#82909a}.pos-item-name{padding:0;background:none;border:0;text-align:left;font-weight:650;font-size:13px;line-height:1.35;overflow-wrap:anywhere}.pos-product>strong{color:#15835c;font-size:14px}.pos-product small{font-size:10px;color:var(--muted)}.pos-add,.pos-stepper{margin-top:auto;min-height:35px}.pos-add{background:#fff4ed;color:#b74419;border:1px solid #edc2a9;font-size:12px}.pos-stepper{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--line);border-radius:7px}.pos-stepper button{border:0;background:none;padding:4px 10px;font-size:18px}.pos-stepper span{font-size:13px}.pos-bottom{position:fixed;bottom:24px;left:calc(218px + (100vw - 218px)/2);transform:translateX(-50%);width:calc(100vw - 290px);max-width:980px;display:flex;align-items:center;gap:8px;padding:16px 18px;z-index:22;box-shadow:0 5px 20px #17253322;font-size:14px}.pos-bottom strong{margin-left:auto}.pos-bottom svg{width:21px}.pos-cart-line{display:flex;gap:10px;align-items:center;background:var(--surface,#fff);border-bottom:1px solid var(--line);padding:16px 12px}.pos-cart-line>div{flex:1;min-width:0;overflow-wrap:anywhere}.pos-cart-line strong{font-size:14px}.pos-cart-line small{display:block;color:var(--muted);margin-top:5px}.pos-cart-line label{font-size:10px;width:78px}.pos-cart-line input{width:100%;padding:9px 6px;margin-top:5px}.pos-cart-line>button{padding:6px;border:0;background:none;color:#b33}.pos-cart-line svg{width:18px}.pos-adjustments, .pos-workspace form>details{padding:16px 0}.pos-workspace summary{cursor:pointer;font-size:13px;margin-bottom:12px}.pos-totals{padding:18px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:10px;margin:15px 0}.pos-totals>div,.pos-payment-summary{display:flex;justify-content:space-between;gap:10px;padding:6px 0;font-size:13px}.pos-totals .pos-grand{border-top:1px solid var(--line);margin-top:8px;padding-top:14px;font-size:20px}.pos-clear{display:block;margin:22px auto;border:1px solid var(--line);background:transparent;font-size:12px}.pos-pay-methods{display:flex;gap:8px;margin:18px 0}.pos-pay-methods button{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;min-height:55px}.pos-pay-methods svg{width:23px}.pos-tender input{font-size:26px!important;min-height:60px}.pos-quick-cash{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.pos-quick-cash button{font-size:12px}.pos-payment-summary{padding:18px;background:#eaf6ef;border-radius:8px;color:#17663e;font-size:16px;margin:15px 0}.pos-home-shortcut{display:flex;align-items:center;gap:14px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:12px;padding:16px;margin-bottom:16px;color:var(--ink);text-decoration:none}.pos-home-shortcut>svg{width:32px;color:#e75b2d}.pos-home-shortcut span{flex:1}.pos-home-shortcut small{display:block;color:var(--muted);font-size:11px;margin-top:5px}#posError:empty{display:none}#posError{color:#b42318;background:#fff0ed;padding:12px;border-radius:7px}body:has(.pos-workspace) #pageAddDock{display:none}body:has(.pos-workspace) #calcShortcut{bottom:148px}
@media(max-width:650px){.pos-catalog{grid-template-columns:75px 1fr;gap:8px}.pos-categories button{font-size:10px;padding:12px 6px}.pos-products{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pos-product{padding:8px;border-radius:9px;gap:5px}.pos-product-photo{height:86px}.pos-item-name{font-size:12px}.pos-product>strong{font-size:12px}.pos-add{font-size:10px;padding:6px}.pos-bottom{left:12px;right:12px;width:auto;transform:none;bottom:calc(72px + env(safe-area-inset-bottom));padding:13px 12px;font-size:12px}.pos-workspace{padding-bottom:110px}.pos-cart-line{gap:6px;padding:12px 6px}.pos-cart-line label{width:64px}.pos-cart-line strong{font-size:12px}.pos-cart-line>button{padding:2px}.pos-pay-methods button{font-size:12px;gap:5px}.pos-heading .btn{font-size:10px}.pos-heading h1{font-size:23px}.pos-search button{font-size:12px;padding:8px}.pos-search input{width:100px}.pos-payment-summary{font-size:14px}}
body[data-theme=dark] .pos-product-photo{background:#27313b}body[data-theme=dark] .pos-add{background:#483125;color:#ffd0b2;border-color:#795039}body[data-theme=dark] .pos-item-name{color:#eaf0f6}body[data-theme=dark] .pos-payment-summary{background:#203d31;color:#b5ecd0}body[data-theme=dark] #posError{background:#472723;color:#ffd1ca}body[data-theme=dark] .pos-steps .active,body[data-theme=dark] .pos-categories .active,body[data-theme=dark] .pos-pay-methods .active{background:#503728!important;color:#ffd1b0!important}

.pos-barcode-modes{display:flex;gap:10px;margin:12px 0 18px}.pos-barcode-modes button{flex:1;display:flex;gap:6px;align-items:center;justify-content:center;min-height:44px}.pos-barcode-modes svg{width:20px}.pos-barcode-modes [aria-pressed=true]{background:#fff0e6;color:#b74419;border-color:#eeaa88}body[data-theme=dark] .pos-barcode-modes [aria-pressed=true]{background:#503728;color:#ffd1b0;border-color:#b1754d}
@media(max-width:650px){.pos-search{flex-wrap:wrap}.pos-search input{flex-basis:100%}.pos-search button{flex:1;justify-content:center;min-height:42px}}
.thermal-sheet{max-width:520px;margin:auto}.thermal-preview{background:#e7e7e7;padding:18px;overflow:auto;border-radius:10px}.thermal-preview canvas{display:block;width:100%;max-width:320px;height:auto;margin:auto;box-shadow:0 3px 14px #0002}.thermal-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:15px 0}.thermal-actions button{min-height:44px;white-space:normal;display:flex;justify-content:center;align-items:center;gap:6px}.thermal-actions svg{width:18px;height:18px}.payment-confirmation{text-align:center;padding:20px 10px;background:#e8f5ed;color:#145335;border-radius:12px;margin-bottom:16px}.payment-confirmation h2{font-size:17px}.payment-confirmation>strong{font-size:40px}.plan-options{display:grid;gap:12px}.plan-options article{border:1px solid var(--line);padding:14px;border-radius:10px}.ledger-actions{display:flex!important;gap:10px!important;align-items:stretch!important}.ledger-actions>button{flex:1!important;min-width:0!important;min-height:46px!important}.ledger-actions .green{background:#147d4a!important;color:#fff!important}.ledger-actions .red{background:#bf3434!important;color:#fff!important}body[data-theme=dark] .thermal-preview{background:#30343a}body[data-theme=dark] .payment-confirmation{background:#203d31;color:#c0f0d6}

.pos-payment-summary{display:block}.pos-payment-summary>div{display:flex;justify-content:space-between;gap:12px;padding:4px 0}
/* Override the legacy full-page entry shell only for scanner and receipts. */
dialog#modal[open]:has(#posScanVideo),dialog#modal[open]:has(.thermal-sheet){inset:0;margin:auto;width:min(560px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;height:auto!important;max-height:90dvh!important;min-height:0;border-radius:16px;box-shadow:0 16px 60px #0005}dialog#modal[open]:has(#posScanVideo){width:min(440px,calc(100vw - 24px))!important}#modal:has(#posScanVideo)>#modalbody,#modal:has(.thermal-sheet)>#modalbody{padding:14px;overflow:auto;max-height:72dvh}#modal:has(#posScanVideo) .modal-close-bar,#modal:has(.thermal-sheet) .modal-close-bar{flex-shrink:0}#modal:has(#posScanVideo) .modal-cancel-bar,#modal:has(.thermal-sheet) .modal-cancel-bar{flex-shrink:0;padding:8px 12px}#posScanVideo{border-radius:9px;background:#101719}#modal:has(#posScanVideo) h2{font-size:19px;margin:4px 0}

/* Supplier columns and dock share Purchase / Payment order on every screen. */
#bankActionDock.supplier-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}#bankActionDock.supplier-actions button{min-width:0;white-space:nowrap}#bankActionDock.supplier-actions .green{background:#147d4a;color:#fff;border-color:#147d4a}#bankActionDock.supplier-actions .red{background:#bf3434;color:#fff;border-color:#bf3434}.supplier-ledger th:nth-child(2){color:#15803d}.supplier-ledger th:nth-child(3){color:#c62828}body[data-theme=dark] .supplier-ledger th:nth-child(2){color:#80dbb2}body[data-theme=dark] .supplier-ledger th:nth-child(3){color:#ff9990}

.pos-barcode-modes{display:flex;gap:6px;flex-wrap:wrap}.pos-barcode-modes button{flex:1;min-width:85px;padding:10px 6px}.pos-barcode-modes button[aria-pressed=true]{background:#ea580c;color:white}.pos-scan-actions,#posScanReview{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}#posScanReview strong,#posScanReview p{width:100%;margin:4px 0}#posScanStatus{padding:10px;border-radius:8px;background:#fff7ed;color:#9a3412}#posScanStatus[data-tone=success]{background:#dcfce7;color:#166534}#posScanStatus[data-tone=error]{background:#fee2e2;color:#991b1b}#posScanCart{font-size:13px;overflow-wrap:anywhere}body[data-theme=dark] #posScanStatus{background:#44301e;color:#ffdbb5}body[data-theme=dark] #posScanStatus[data-tone=success]{background:#203d31;color:#bbf7d0}body[data-theme=dark] #posScanStatus[data-tone=error]{background:#452526;color:#fecaca}
