/* V12.326 integration R2: scoped to in-store POS only. */
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp {font-size:16px!important;line-height:1.35!important;min-width:0!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp * {box-sizing:border-box}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp button {touch-action:manipulation}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp button:focus-visible {outline:3px solid #70baff!important;outline-offset:2px!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v317-category-grid {display:grid!important;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))!important;gap:12px!important;align-content:start!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v317-category-tile {min-height:88px!important;height:auto!important;padding:16px!important;background:#14212a!important;color:#fff!important;border:1px solid #526573!important;border-radius:12px!important;white-space:normal!important;text-align:left!important;overflow-wrap:anywhere!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v317-category-tile span {font-size:17px!important;line-height:1.3!important;color:#fff!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v317-category-tile small {font-size:12px!important;color:#bac9d3!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pin-login {width:min(440px,100%)!important;max-width:440px!important;padding:24px!important;margin:16px auto!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pin-pad {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pin-pad button {height:64px!important;min-height:64px!important;font-size:24px!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pin-login h3 {font-size:16px!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pin-msg {font-size:13px!important;line-height:1.5!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-manager-session {min-height:48px!important;font-size:13px!important;white-space:normal!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-menu-main {min-width:0!important;overflow-x:hidden!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-checkbar .back,
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v317-check-more {background:#17252f!important;color:#fff!important;border:1px solid #526573!important}
@media(min-width:960px){
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-order-workspace {display:grid!important;grid-template-columns:clamp(300px,27vw,430px) minmax(0,1fr)!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-menu-top {grid-template-columns:minmax(100px,1fr) auto minmax(180px,320px)!important;gap:10px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pos-top {min-height:64px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pos-top-actions button {min-height:48px!important;font-size:14px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-checkbar {min-height:72px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-checkbar button {min-height:52px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-checkbar .meta b {font-size:20px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-checkbar .pay b {font-size:18px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v272-section-tabs button,
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v272-category-strip button {min-height:48px!important;font-size:15px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-line b,
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-line strong {font-size:16px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-menu-main .v272-item-copy b {font-size:16px!important;line-height:1.3!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pos-stage {overflow-y:auto!important}
}
/* Direct POS routing and utility controls. */
body:is(.pos-terminal-active,.v223-pos-active).pos-direct-route #merchant{position:fixed!important;inset:0!important;z-index:1000!important;width:100vw!important;max-width:none!important;height:100dvh!important;padding:0!important;margin:0!important;overflow:auto!important}
body:is(.pos-terminal-active,.v223-pos-active).pos-direct-route #merchant :is(.merchant-final-shell,.merchant-final-content,#m-pos,#v223PosApp,.v223-pos-shell){width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp :is(.v310-checkbar .back,.v310-checkbar .print,.v317-check-more,.v223-pos-back){background:#17252f!important;color:#fff!important;border:1px solid #526573!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp :is(.v310-checkbar .back,.v310-checkbar .print,.v317-check-more,.v223-pos-back):disabled{opacity:.5!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v321-method-grid>button{min-height:88px!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-action-btn{min-height:60px!important;white-space:normal!important}
.rdr-pos-history{position:fixed;inset:0;z-index:24000;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.8);font-family:Inter,system-ui,sans-serif;color:#f2f6f8}
.rdr-pos-history.show{display:flex}.rdr-history-dialog{width:min(820px,100%);max-height:94dvh;overflow:auto;background:#101a21;border:1px solid #465967;border-radius:18px;box-shadow:0 20px 90px #0008}
.rdr-history-dialog header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:18px 20px;background:#101a21;border-bottom:1px solid #344551}.rdr-history-dialog h2{margin:0;font-size:24px}.rdr-history-dialog small{color:#b2c4d0}.rdr-history-dialog button{background:#20323f;color:#fff;border:1px solid #556d7e;border-radius:10px;min-height:46px;padding:10px 14px;cursor:pointer}.rdr-history-dialog button:disabled{opacity:.5;cursor:wait}.rdr-history-dialog button:focus-visible{outline:3px solid #70baff;outline-offset:2px}.rdr-history-dialog header button{font-size:24px;width:46px;padding:0}
.rdr-history-toolbar{display:flex;gap:8px;flex-wrap:wrap;padding:14px 20px;border-bottom:1px solid #344551}.rdr-history-toolbar .active{background:#d9141e;border-color:#f23a44}.rdr-history-content{padding:20px}.rdr-history-row{display:flex;justify-content:space-between;gap:16px;align-items:center;width:100%;text-align:left;margin-bottom:10px!important}.rdr-history-row span{min-width:0}.rdr-history-row b,.rdr-history-row small{display:block;overflow-wrap:anywhere}.rdr-history-row small{margin-top:5px;font-size:12px;line-height:1.5}.rdr-history-summary{display:flex;justify-content:space-between;gap:20px;margin:18px 0;padding:20px;background:#0b1217;border-radius:12px}.rdr-history-summary h3{font-size:32px;margin:8px 0}.rdr-history-summary b,.rdr-history-summary small{display:block;margin-bottom:5px}.rdr-history-payment,.rdr-history-items>div{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #344551}.rdr-history-tools{margin:20px 0}.rdr-history-error{color:#ffb9bd}.rdr-history-notice{padding:15px;border:1px solid #b78d36;border-radius:10px;background:#302512;color:#ffe2a3}
#rdrRefundForm{padding:20px;background:#0b1217;border-radius:12px}#rdrRefundForm p{color:#bfced8;font-size:14px;line-height:1.5}#rdrRefundForm label{display:block;margin:14px 0 6px}#rdrRefundForm input,#rdrRefundForm textarea{width:100%;background:#1a2a35;color:#fff;border:1px solid #587084;border-radius:10px;padding:12px;font:inherit;min-height:48px}#rdrRefundForm textarea{min-height:80px}#rdrRefundForm .rdr-refund-submit{margin-top:14px;background:#c71924;border-color:#ef4450}
@media(max-width:760px){.rdr-pos-history{padding:8px}.rdr-history-dialog{max-height:98dvh}.rdr-history-dialog header,.rdr-history-toolbar,.rdr-history-content{padding:14px}.rdr-history-summary{padding:14px;gap:12px}.rdr-history-summary h3{font-size:26px}.rdr-history-row{flex-direction:column;align-items:flex-start}.rdr-history-payment button{width:100%}.rdr-history-toolbar button{flex:1;min-width:100px}#rdrRefundForm{padding:14px}}
@media(max-width:959px){
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v317-category-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v317-category-tile {min-height:76px!important;padding:12px!important;align-items:flex-start!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v317-category-tile span {font-size:15px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pin-login {padding:16px!important;margin:8px auto!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v223-pin-pad button {height:56px!important;min-height:56px!important;font-size:22px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-live-check {max-height:160px!important;overflow-y:auto!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-menu-top h2 {font-size:20px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v272-section-tabs button,
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v272-category-strip button {min-height:48px!important;height:auto!important;font-size:14px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-menu-main .v272-item-copy b {font-size:14px!important;line-height:1.3!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-menu-main .v272-item-card {min-height:154px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-menu-main .v272-item-copy {min-height:72px!important;padding-right:48px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-menu-main .v272-item-card .add {width:44px!important;height:44px!important;min-height:44px!important;min-width:44px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-line b,
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v310-line strong {font-size:14px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v321-mode-primary strong,
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v321-method-grid>button span strong {font-size:16px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v321-method-grid>button span small {font-size:12px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v321-pay-now {font-size:16px!important}
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v321-mode-secondary button,
 body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .v321-secondary-pay>button {min-height:48px!important;font-size:13px!important}
}

body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp :is(.v317-print,.v310-live-head>button,.v317-details){background:#17252f!important;color:#fff!important;border:1px solid #526573!important}
body:is(.pos-terminal-active,.v223-pos-active) #merchant #m-pos #v223PosApp .rdr-modifier-screen{max-width:700px!important;padding:22px!important;min-height:0!important}
.rdr-modifier-screen .thumb{display:none}.rdr-modifier-screen fieldset{border:1px solid #455763;border-radius:12px;padding:16px;margin:20px 0}.rdr-modifier-screen legend{color:#fff;padding:0 8px}.rdr-modifier-screen legend small{color:#bfced8;display:block}.rdr-modifier-screen .v223-mod-option{min-height:48px;gap:14px}.rdr-modifier-screen .v223-mod-option span{flex:1}.rdr-modifier-screen .v223-counter{margin:18px 0}
