#posView .panel{max-width:1200px}#posView .pos-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:22px}#posView input,#posView select{max-width:100%;padding:10px;border:1px solid var(--line);border-radius:9px}#posView label{display:grid;gap:6px;margin-bottom:12px}#posView .pos-hits{display:grid;gap:8px;max-height:310px;overflow:auto;margin:12px 0}#posView .pos-hit{display:flex;align-items:center;gap:12px;text-align:left;background:white;border:1px solid var(--line);border-radius:12px;padding:10px}#posView .pos-hit img{width:46px;height:46px;object-fit:contain}#posView .pos-hit span{min-width:0;overflow-wrap:anywhere}#posView .pos-hit small{display:block;color:var(--muted)}#posView .pos-lines{width:100%;border-collapse:collapse}#posView td,#posView th{padding:8px;text-align:left;border-bottom:1px solid var(--line)}#posView .pos-lines input{width:78px}#posView .pos-side{background:var(--soft);border-radius:14px;padding:18px}#posView .pos-total{font-size:1.8rem;font-weight:bold;padding:16px 0}#posView .pos-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}#posView .pos-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}#posView [hidden]{display:none!important}#posView .pos-history article{border-top:1px solid var(--line);padding:14px 0;overflow-wrap:anywhere}#posView .pos-customer-results{display:grid;gap:6px;margin-bottom:12px}#posView button{min-height:40px}#posView .pos-notice{color:var(--muted);font-size:.9rem;line-height:1.5}@media(max-width:760px){#posView .pos-layout,#posView .pos-filters{grid-template-columns:1fr}#posView .panel{padding:18px}#posView .pos-lines th,#posView .pos-lines td{padding:6px}#posView .table-wrap{max-width:100%}}
#posView .pos-layout{display:flex;flex-direction:column;gap:0}
#posView .panel{max-width:none;padding:24px;border-radius:16px}
body:has(#posView.active,#posHistoryView.active,#cashView.active) .hero,body:has(#posView.active,#posHistoryView.active,#cashView.active) .trust-strip{display:none}
#posView .pos-workspace,#posView .pos-footer,#posView .pos-payment-total{min-width:0}
body:has(#posView.active,#posHistoryView.active,#cashView.active) header{flex-wrap:wrap;gap:8px;padding:12px 24px}
body:has(#posView.active,#posHistoryView.active,#cashView.active) header .tabs{order:3;flex:0 0 100%;min-width:0;overflow-x:auto;justify-content:flex-start}
body:has(#posView.active,#posHistoryView.active,#cashView.active) header .tabs button{flex:0 0 auto;white-space:nowrap}
body:has(#posView.active,#posHistoryView.active,#cashView.active) header .cart-btn{margin-left:auto;flex-shrink:0}
body:has(#posView.active,#posHistoryView.active,#cashView.active) .wrap{max-width:none;padding:24px}
#posView .pos-workspace>label{grid-template-columns:170px minmax(0,1fr);align-items:center;font-weight:bold}
#posView .pos-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
#posView .pos-hits{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));max-height:180px}
#posView .pos-workspace>.table-wrap{border:1px solid var(--line);border-radius:10px;min-height:120px;max-height:320px;background:#fff;overflow:auto}
#posView .pos-lines{min-width:820px}
#posView .pos-lines th{background:var(--brand-tint);white-space:nowrap;font-size:.8rem}
#posView .pos-lines td{font-size:.9rem;vertical-align:middle}
#posView .pos-lines td:nth-child(2){min-width:180px;font-weight:600}
#posView .pos-lines td:nth-child(7){background:var(--brand-tint);font-weight:bold}
#posView .pos-lines td.pos-code{color:var(--muted);font-size:.78rem;max-width:120px;overflow-wrap:anywhere}
#posView .pos-line-photo{width:42px;height:42px;object-fit:contain;vertical-align:middle;margin-right:10px}
#posView .pos-stock{color:var(--brand)}
#posView .pos-empty{padding:18px 12px;text-align:center;color:var(--muted)}
#posView .pos-item-count{font-size:.85rem;color:var(--muted);margin:6px 0 10px}
#posView .pos-footer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 24px;border-top:2px solid var(--line);border-radius:0 0 12px 12px}
#posView .pos-footer>label{margin:0}
#posView #posCustomerForm{grid-column:1/-1;border:1px solid var(--line);padding:16px;border-radius:10px}
#posView .pos-payment-total{grid-column:3;grid-row:1/span 5;padding-left:24px;border-left:1px solid var(--line)}
#posView .pos-payment-total>span{font-size:.85rem;color:var(--muted)}
#posView .pos-total{font-size:clamp(2rem,3.5vw,3.2rem);padding:10px 0 16px;color:var(--brand);line-height:1.1;overflow-wrap:anywhere}
#posView #posConfirm{width:100%;min-height:54px;font-size:1.05rem}
#posView .pos-history-details{margin-top:12px;border-top:1px solid var(--line);padding-top:8px}
#posView .pos-history-details>summary{cursor:pointer;font-weight:bold;padding:10px 0;color:var(--brand)}
#posView #posMessage:empty,#posView #posCheckoutMessage:empty,#posView .pos-customer-results:empty{display:none}
#posView .pos-lines th{position:sticky;top:0;z-index:1}
@media(min-width:761px){
 body:has(#posView.active) .wrap{padding:14px}
 #posView .panel{padding:16px}
 #posView h2{font-size:1.4rem}
 #posView .pos-notice{font-size:.8rem;margin:6px 0;line-height:1.35}
 #posView input,#posView select{padding:7px 9px;min-height:36px;font-size:.9rem}
 #posView button{min-height:36px}
 #posView label{font-size:.88rem;gap:4px;margin-bottom:8px}
 #posView .pos-toolbar{gap:6px;margin-bottom:6px}
 #posView .pos-hits{margin:6px 0 10px;gap:6px;max-height:130px}
 #posView .pos-hit{padding:7px 10px;font-size:.88rem;gap:8px}
 #posView .pos-hit img{width:34px;height:34px}
 #posView .pos-footer{padding:12px;gap:8px 16px;align-items:start}
 #posView .pos-customer-results{margin:0}
 #posView #posCustomerSelected{margin:4px 0;font-size:.85rem}
 #posView #posNewCustomer{padding:7px 10px;justify-self:start}
 #posView .pos-payment-total{padding-left:16px}
 #posView .pos-total{font-size:2.1rem;padding:6px 0 10px}
 #posView #posConfirm{min-height:44px;font-size:.95rem;padding:10px}
 #posView #posCheckoutMessage{font-size:.85rem;margin:6px 0}
}
@media(max-width:760px){
 body:has(#posView.active,#posHistoryView.active,#cashView.active) .wrap{padding:12px}
 #posView .panel{padding:14px}
 #posView .pos-workspace>label{grid-template-columns:1fr}
 #posView .pos-hits{grid-template-columns:1fr;max-height:200px}
 #posView .pos-workspace>.table-wrap{min-height:110px}
 #posView .pos-footer{grid-template-columns:1fr;padding:14px;gap:12px}
 #posView .pos-payment-total{grid-column:auto;grid-row:auto;padding:16px 0 0;border-left:0;border-top:1px solid var(--line)}
 #posView .pos-total{font-size:2.4rem}
}
#posView .pos-footer{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(280px,.9fr);gap:18px;padding:16px;border:1px solid var(--line);border-radius:14px;align-items:start}
#posView .pos-client-panel,#posView .pos-payment-panel{min-width:0;display:grid;gap:8px}
#posView .pos-block-title{font-weight:700;color:var(--brand);font-size:.95rem;margin:0 0 4px}
#posView .pos-footer label{margin:0;gap:5px;font-weight:600}
#posView .pos-footer input:not([type=checkbox]),#posView .pos-footer select{width:100%;min-width:0;background:white}
#posView .pos-payment-total{grid-column:auto;grid-row:auto;border:1px solid var(--line);border-radius:12px;background:white;padding:16px;min-width:0}
#posView .pos-payment-total>label>span{display:flex;align-items:center;gap:9px;font-size:.85rem;font-weight:400;line-height:1.4;margin:8px 0 12px}
#posView #posPaid{width:18px;height:18px;min-height:18px;margin:0;padding:0;flex:0 0 18px;accent-color:var(--brand)}
#posView #posCustomerSelected{margin:0;color:var(--muted);font-size:.85rem}
#posView #posNewCustomer{justify-self:start;margin:0}
#posView #posReceipt:empty{display:none}
#posView .pos-lines th:nth-child(2){width:30%}
.pos-receipt-dialog{width:min(780px,94vw);max-height:92vh;padding:0;border:0;border-radius:14px;color:var(--deep);background:#fff;box-shadow:0 20px 80px #0005}
.pos-receipt-dialog::backdrop{background:#10282099}
.pos-receipt-toolbar{display:flex;flex-wrap:wrap;gap:8px;padding:14px;background:var(--brand-tint);position:sticky;top:0}
.pos-receipt-toolbar button{padding:10px 14px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--brand);cursor:pointer;font-weight:700}
.pos-receipt-toolbar button:disabled{opacity:.5;cursor:not-allowed}
.pos-receipt-hint{padding:0 20px;font-size:12px;color:var(--muted)}
.pos-receipt-paper{padding:0 38px 30px;font:14px/1.5 Arial,sans-serif;overflow-wrap:anywhere}
.pos-invoice-banner{margin:0 -38px 28px;padding:24px 38px;background:var(--deep);color:white}
.pos-invoice-banner h2:before{content:'';display:inline-block;width:18px;height:18px;background:var(--lime);margin-right:10px}
.pos-invoice-meta{display:grid;grid-template-columns:1.3fr 1fr;gap:20px;margin-bottom:32px;color:var(--muted);font-size:12px}.pos-invoice-meta strong{font-size:16px;color:var(--deep)}
.pos-invoice-table{width:100%;border-collapse:collapse;font-size:11px;table-layout:fixed}.pos-invoice-table th{background:var(--brand);color:white;font-size:10px;text-align:right;padding:10px 8px}.pos-invoice-table td{padding:9px 8px;border-bottom:1px solid var(--line);text-align:right;vertical-align:top}.pos-invoice-table th:first-child,.pos-invoice-table td:first-child{text-align:left;width:48%}.pos-invoice-table th:nth-child(2){width:9%}
.pos-invoice-totals{margin:24px 0 24px auto;max-width:275px}.pos-invoice-totals>div{display:flex;justify-content:space-between;gap:20px;padding:6px 8px;font-size:12px}.pos-invoice-grand{background:var(--brand-tint);font-size:17px!important;margin-top:8px}
.pos-receipt-paper h2{font-size:24px;margin:0 0 18px}.pos-receipt-paper p{margin:5px 0}.pos-receipt-heading{display:flex;justify-content:space-between;gap:15px;margin-bottom:22px}
.pos-receipt-items{margin:24px 0}.pos-receipt-items section{margin-bottom:20px}.pos-receipt-items p{font-size:13px}.pos-receipt-paper h3{font-size:23px;margin:24px 0 12px}
@media(max-width:600px){.pos-receipt-paper{padding:0 12px 24px}.pos-invoice-banner{margin:0 -12px 20px;padding:20px 16px}.pos-invoice-meta{grid-template-columns:1fr;gap:10px}.pos-invoice-table td,.pos-invoice-table th{padding:8px 3px;font-size:10px}.pos-receipt-heading{flex-wrap:wrap}.pos-receipt-toolbar button{min-height:44px}}
@media(max-width:1000px){#posView .pos-footer{grid-template-columns:repeat(2,minmax(0,1fr))}#posView .pos-payment-total{grid-column:1/-1}}
@media(max-width:600px){#posView .pos-footer{grid-template-columns:1fr;padding:12px;gap:16px}#posView .pos-payment-total{grid-column:auto}#posView .pos-footer input:not([type=checkbox]),#posView .pos-footer select,#posView .pos-footer button{min-height:44px}}

#posHistoryView .panel{max-width:1200px}#posHistoryView label{display:grid;gap:6px;margin-bottom:12px}#posHistoryView input,#posHistoryView select{width:100%;min-width:0;padding:10px;border:1px solid var(--line);border-radius:9px}#posHistoryView .pos-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}#posHistoryView .pos-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0}#posHistoryView .pos-history article{border-top:1px solid var(--line);padding:14px 0;overflow-wrap:anywhere}#posHistoryView .pos-history button{margin:4px 8px 4px 0;min-height:40px}#posHistoryView .pos-notice{color:var(--muted);font-size:.9rem;line-height:1.5}#posHistoryView [hidden],#posHistoryMessage:empty{display:none!important}@media(max-width:760px){#posHistoryView .pos-filters{grid-template-columns:1fr}#posHistoryView .panel{padding:18px}}
