/* KhoViet POS 1.7.3: streamlined checkout and keyboard-friendly search */
.pos-v173{min-height:calc(100vh - 190px);overflow:visible;border:0;border-radius:8px;background:#edeff2}
.pos-v173 .pos-toolbar{position:relative;z-index:12;min-height:58px;padding:5px 10px;gap:7px;background:#0877ed;border-radius:8px 8px 0 0}
.pos-v173 .pos-search-wrap{width:min(35%,490px);min-width:170px;flex-shrink:0}
.pos-v173 .pos-search-wrap input{height:41px}
.pos-search-popover{position:absolute;top:calc(100% + 4px);left:0;width:min(500px,80vw);max-height:67vh;overflow:auto;background:#fff;border:1px solid #dde4ee;border-radius:8px;box-shadow:0 12px 30px #17294442;color:#334155;z-index:50}
.pos-search-popover[hidden]{display:none}
.pos-v173-result{width:100%;border:0;border-bottom:1px solid #edf1f6;background:#fff;padding:12px;display:grid;grid-template-columns:1fr auto;gap:3px 10px;text-align:left;cursor:pointer}
.pos-v173-result strong{font-size:13px}.pos-v173-result small{font-size:11px;color:#7e8b9b;grid-row:2}.pos-v173-result>b{font-size:13px;color:#0775ea;grid-column:2;grid-row:1/3;align-self:center}.pos-v173-result:hover{background:#ecf5ff}
.pos-invoice-tabs{display:flex;gap:2px;align-items:end;max-width:40%;overflow:auto;scrollbar-width:thin;align-self:stretch}
.pos-v173-tab{display:flex;align-items:center;gap:0;border-radius:6px 6px 0 0;white-space:nowrap;color:#fff;align-self:flex-end}.pos-v173-tab.selected{background:#edeff2;color:#26374c}.pos-v173-tab button{background:transparent;border:0;color:inherit;cursor:pointer;padding:9px 8px;font-weight:650}.pos-v173-tab button:last-child{font-size:18px;font-weight:400;padding:4px 7px}.pos-add-invoice,.pos-top-icon{border:0;background:transparent;color:#fff;font-size:24px;cursor:pointer;padding:6px}.pos-add-invoice:hover,.pos-top-icon:hover{background:#1f8bf2;border-radius:6px}.pos-toolbar-space{flex:1}
.pos-sales-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(335px,31%);gap:12px;min-height:690px;padding:12px;background:#edf0f3}
.pos-sales-center{display:flex;flex-direction:column;min-width:0;min-height:660px;position:relative}
.pos-v173-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;color:#718094;text-align:center;gap:10px;padding:30px}.pos-v173-empty[hidden]{display:none}.pos-v173-empty small{color:#8796a8}
.pos-v173-lines{display:flex;flex-direction:column;gap:7px}.pos-v173-line{display:grid;grid-template-columns:23px 29px minmax(170px,1fr) 79px 108px 110px 34px 85px;align-items:center;gap:8px;padding:12px;background:#fff;border:1px solid #e0e6ed;border-radius:10px;box-shadow:0 2px 5px #23394c0b}
.pos-v173-line .pos-remove{font-size:19px;color:#798899}.pos-v173-line-name{display:flex;flex-direction:column;gap:5px;min-width:0}.pos-v173-line-name strong{font-size:13px;white-space:normal;line-height:1.35}.pos-v173-line-name small{font-size:11px;color:#8995a5}.pos-v173-line input{width:100%;text-align:right;min-width:0;padding:8px 4px;border:0;border-bottom:1px solid #d7e0ec;border-radius:0}.pos-v173-line .pos-line-total{text-align:right;font-size:14px}.pos-v173-add-row{font-size:22px;border:0;background:transparent;cursor:pointer;color:#526579}.pos-v173-add-row:hover{color:#0779ee}.pos-v173-history{border:1px solid #d7e8fc;border-radius:5px;padding:7px 3px;color:#086ed6;background:#f6faff;font-size:11px;cursor:pointer}
.pos-v173-note{display:flex;align-items:center;gap:10px;margin-top:auto;background:#fff;padding:17px 18px;border-radius:10px;box-shadow:0 2px 5px #2233440a}.pos-v173-note input{flex:1;border:0;background:none;outline:none}
.pos-v173-checkout{border-radius:12px;min-width:0;gap:15px;box-shadow:0 2px 8px #162d4210}.pos-v173-checkout .pos-operator{padding:2px 0}.pos-v173-list{text-align:right}.pos-v173-list select{max-width:100%;padding:8px;background:#f5f8fc;border:0;border-radius:6px;font-size:13px}.pos-v173-checkout .pos-customer-line{margin-top:1px}.pos-v173-checkout .pos-customer-line input{background:#f1f4f7}.pos-v173-checkout .pos-customer-caption{padding:4px 2px}.pos-v173-checkout .pos-money-row{padding:2px 0}.pos-v173-checkout .pos-money-row small{color:#7d8b9b;font-size:11px;margin-left:5px}.pos-v173-checkout .pos-money-row.grand{font-size:16px;padding:10px 0}.pos-v173-methods{display:flex;flex-wrap:wrap;gap:10px 13px;font-size:12px}.pos-v173-methods label{display:flex;align-items:center;gap:5px;white-space:nowrap}.pos-v173-methods input{accent-color:#0876ea}.pos-v173-cash{display:flex;gap:7px;flex-wrap:wrap;background:#f2f4f7;border-radius:7px;padding:10px;min-height:38px;align-items:center}.pos-v173-cash button{background:#fff;border:1px solid #d9dfe8;border-radius:20px;padding:6px 10px;cursor:pointer;font-size:12px}.pos-v173-cash button:hover{background:#e5f1ff;border-color:#0877e9}.pos-v173-checkout .pos-checkout-actions{padding-top:25px}.pos-v173-checkout .pos-print-btn{background:#677789}.pos-v173-checkout .pos-checkout-btn{background:#0674e8}
.pos-v173-modal{position:fixed;inset:0;background:#0006;z-index:900;display:flex;justify-content:center;align-items:center;padding:20px}.pos-v173-modal[hidden]{display:none}.pos-v173-modal>section{background:#fff;border-radius:15px;max-width:760px;width:100%;box-shadow:0 20px 70px #0004;max-height:82vh;display:flex;flex-direction:column;padding:22px;overflow:auto}.pos-v173-modal header,.pos-v173-modal footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.pos-v173-modal h2{margin:0;font-size:18px}.pos-v173-modal header button{font-size:23px;background:transparent;border:0;cursor:pointer}.pos-v173-modal p{font-size:13px;color:#68788b}.pos-v173-modal footer{justify-content:flex-end;margin-top:16px}.pos-history-table{overflow:auto}.pos-history-table table{width:100%;font-size:13px}.pos-history-table th{background:#1682ee;color:#fff}.pos-history-table td{padding:11px;border-bottom:1px solid #e3e7ef}
@media(max-width:1100px){.pos-sales-grid{grid-template-columns:minmax(0,1fr) 355px}.pos-v173-line{grid-template-columns:20px 23px minmax(100px,1fr) 57px 75px 80px 25px;gap:4px}.pos-v173-history{grid-column:3/8;justify-self:start}.pos-v173-line input{padding:6px 2px}.pos-invoice-tabs{max-width:30%}}
@media(max-width:790px){.pos-sales-grid{grid-template-columns:1fr}.pos-sales-center{min-height:300px}.pos-v173-checkout{min-height:520px}.pos-v173 .pos-search-wrap{width:45%}.pos-invoice-tabs{max-width:40%}.pos-v173-line{grid-template-columns:20px 20px minmax(100px,1fr) 55px 74px 65px 25px}}
/* Purchase entry suggestions: matches must be clicked, never auto-select first substring */
.purchase-product-search,.supplier-grid .span-2{position:relative}.purchase-hints{position:absolute;z-index:80;top:calc(100% + 2px);left:0;right:0;background:#fff;border:1px solid #dbe2eb;border-radius:8px;box-shadow:0 12px 25px #1b35592b;max-height:260px;overflow:auto}.purchase-hints[hidden]{display:none}.purchase-hints button{display:block;width:100%;padding:10px 12px;text-align:left;border:0;background:#fff;font-size:13px;color:#384a5e;cursor:pointer;border-bottom:1px solid #f0f3f7}.purchase-hints button:hover{background:#eaf4ff;color:#0874e8}.purchase-no-match{padding:12px;color:#6e8091;font-size:12px}.purchase-product-search .line-product{display:none!important}
/* Expand product details by clicking product name, without noisy always-visible price links */
.product-detail-trigger{background:none;border:0;padding:0;text-align:left;cursor:pointer;font-family:inherit}.product-detail-trigger:hover,.product-detail-trigger[aria-expanded="true"]{color:#0877ee;text-decoration:underline}.master-table .master-actions-cell{font-size:12px}.master-table .master-actions-cell:empty::before{content:'↗';color:#9aa7b6}.master-product-extra>td{padding:0!important;background:#f5f9ff!important}.product-expanded-panel{display:flex;flex-direction:column;gap:11px;padding:15px 20px;border-left:3px solid #0877ee}.product-expanded-intro{display:flex;flex-direction:column;gap:3px}.product-expanded-intro small{font-size:12px;color:#758497}.product-expanded-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:14px}.product-expanded-actions>a,.product-expanded-actions .action-form button{border:1px solid #d5e6f7;border-radius:6px;padding:9px 11px;background:#fff!important;color:#0877ee;font-size:13px;cursor:pointer}.product-expanded-actions .inline-price-edit{margin-right:5px}.product-expanded-actions .inline-price-edit summary{border:1px solid #d3e4f5;border-radius:6px;background:#fff;padding:9px 11px;cursor:pointer;color:#0877ee}.product-expanded-actions .inline-price-edit[open]{flex-basis:100%;max-width:600px}.product-expanded-actions .inline-price-edit form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));box-shadow:0 5px 17px #17447714}.product-expanded-actions .inline-price-edit button{grid-column:1/-1}
/* Full-screen POS: the shopping toolbar replaces the administrative navigation. */
body.pos-fullscreen .app-header,body.pos-fullscreen .main-nav,body.pos-fullscreen .app-main footer{display:none!important}
body.pos-fullscreen .app-main{min-height:100vh!important}
body.pos-fullscreen .app-main .page{padding:0!important}
body.pos-fullscreen .pos-workspace{border-radius:0;min-height:100vh}
body.pos-fullscreen .pos-sales-grid{min-height:calc(100vh - 58px)}
body.pos-fullscreen .pos-sales-center{min-height:calc(100vh - 90px)}
.master-table .master-actions-cell>*{display:none!important}
.master-table .master-actions-cell::after{content:'Bấm tên hàng ↗';color:#8291a4;font-size:12px;white-space:nowrap}

.pos-v173-checkout .pos-customer-caption-action{display:block;width:100%;border:0;background:transparent;text-align:left;cursor:pointer;color:#64748b;padding:4px 2px}.pos-v173-checkout .pos-customer-caption-action:hover{color:#0877e9}.pos-v173-checkout .pos-customer-caption-action[hidden]{display:none}.pos-v173-modal>section.pos-customer-profile-section{max-width:1180px;width:min(1180px,100%)}
