﻿:root{--navy:#0f2744;--blue:#075985;--blue2:#0e7490;--green:#16a34a;--bg:#f1f5f9;--line:#dbe4ee;--text:#172033;--muted:#64748b;--danger:#dc2626;--white:#fff;--shadow:0 12px 35px rgba(15,39,68,.09)}
.offline-status-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 24px;border-bottom:1px solid #dbe4ee;background:#f8fafc;font-size:12px;color:#475569}
.offline-status-bar>div:first-child{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.offline-status-bar strong{color:#166534}.offline-status-bar.is-offline{background:#fffbeb;border-color:#fde68a}.offline-status-bar.is-offline strong{color:#92400e}.offline-status-actions{display:flex;gap:6px}.offline-status-actions button{min-height:36px;padding:0 10px;font-size:12px;background:#e8eef5;color:#075985;white-space:nowrap}.offline-sale-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid #dbe4ee}.offline-sale-row small{display:block;overflow-wrap:anywhere;color:#64748b;font-size:12px;margin-top:4px}.offline-sale-row p{font-size:13px;overflow-wrap:anywhere}.offline-sale-row>div{min-width:0}.offline-sale-row>button{flex-shrink:0;font-size:12px}#offlineQueueList{max-height:55dvh;overflow:auto}#offlineReceiptPaper table{min-width:0;font-size:12px}#offlineReceiptPaper td,#offlineReceiptPaper th{padding:8px}#offlineReceiptPaper small{display:block;white-space:pre-wrap}#offlineReceiptPaper dl>div{display:flex;justify-content:space-between;gap:12px;padding:5px 0}#offlineReceiptPaper dd{margin:0;font-weight:700}.offline-reference{overflow-wrap:anywhere;font-size:12px}.offline-receipt-warning{padding:10px;background:#fffbeb;border:1px solid #fde68a;color:#92400e;font-weight:750}
@media(max-width:600px){.offline-status-bar{padding:7px 10px;flex-wrap:wrap;gap:5px}.offline-status-bar>div:first-child{gap:8px}.offline-status-actions{width:100%;justify-content:flex-end}.offline-status-actions button{min-height:36px;font-size:11px;padding:0 8px}}
.admin-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 15px;border-radius:10px;background:#e0f2fe;color:#075985;text-decoration:none;font-weight:750;white-space:nowrap}
*{box-sizing:border-box}*[hidden]{display:none!important}body{margin:0;font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--text);background:var(--bg);-webkit-tap-highlight-color:transparent}button,input,select,textarea{font:inherit}button{min-height:44px;border:0;border-radius:10px;padding:0 18px;font-weight:700;cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{width:100%;min-height:44px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:var(--text);padding:10px 12px;outline:none}input:focus,select:focus,textarea:focus{border-color:#0284c7;box-shadow:0 0 0 3px rgba(2,132,199,.14)}label{display:grid;gap:7px;font-weight:650;font-size:.9rem}.primary{background:#0878bf;color:#fff}.secondary{background:#0e7490;color:#fff}.success{background:var(--green);color:#fff}.ghost{background:#e8eef5;color:#24354d}.wide{width:100%}.link-btn{background:transparent;color:#0878bf;padding:0 5px}.eyebrow{margin:0 0 4px;color:#0878bf;font-size:.72rem;font-weight:850;letter-spacing:.13em}.muted{color:var(--muted);margin:.3rem 0}.error{color:#b91c1c;background:#fef2f2;border:1px solid #fecaca;padding:10px;border-radius:8px}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at top left,#dbeafe,transparent 42%),var(--bg)}.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:20px;padding:34px;box-shadow:var(--shadow);display:grid;gap:17px}.login-card h1{font-size:2rem;margin:0}.brand-mark{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#0284c7,#075985);color:#fff;font-size:1.4rem;font-weight:900}
.login-card #toggleLoginPassword{justify-self:start;min-height:28px;margin-top:-12px}
.topbar{min-height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:12px 24px;gap:20px;position:sticky;top:0;z-index:10}.topbar h1{font-size:1.35rem;margin:0;color:var(--navy)}.top-actions{display:flex;align-items:center;gap:12px}.shop-label{display:flex;align-items:center;gap:8px;color:var(--muted)}.shop-label select{min-width:210px}.user-chip{display:flex;align-items:center;gap:9px}.user-chip>span{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#dbeafe;color:#075985;font-weight:900}.user-chip div{display:grid}.user-chip small{color:var(--muted)}.tabs{display:flex;gap:6px;padding:10px 24px;background:#fff;border-bottom:1px solid var(--line);overflow:auto}.tab{background:transparent;color:#52637a;white-space:nowrap}.tab.active{background:#e0f2fe;color:#075985}.badge{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:12px;background:#075985;color:#fff;font-size:.75rem;margin-left:5px}main{padding:18px 22px}.view{display:none}.active-view{display:block}#orderView.active-view{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:18px}.catalog,.cart-panel,#holdsView,#quotesView{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 4px 18px rgba(15,39,68,.04)}.catalog{padding:16px;min-height:calc(100vh - 188px)}.search-row{display:flex;gap:9px}.search-box{position:relative;flex:1}.search-box span{position:absolute;left:13px;top:8px;font-size:1.4rem;color:#64748b}.search-box input{padding-left:41px}.category-list{display:flex;gap:8px;overflow:auto;padding:14px 0 12px}.category{background:#edf2f7;color:#334155;white-space:nowrap}.category.active{background:#075985;color:#fff}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:11px}.product-card{min-height:126px;border:1px solid #dbe4ee;border-radius:13px;padding:14px;background:#fff;display:flex;flex-direction:column;justify-content:space-between;text-align:left;cursor:pointer}.product-card:hover,.product-card:active{border-color:#38bdf8;background:#f0f9ff}.product-card strong{font-size:.98rem}.product-card small{display:block;color:var(--muted);margin-top:4px}.product-card footer{display:flex;justify-content:space-between;align-items:end;margin-top:12px}.product-card .price{color:#075985;font-size:1.1rem;font-weight:850}.stock{font-size:.75rem;color:#64748b}
.cart-panel{position:sticky;top:96px;height:calc(100vh - 190px);min-height:560px;padding:17px;display:flex;flex-direction:column}.cart-title{display:flex;justify-content:space-between;align-items:start;padding-bottom:12px;border-bottom:1px solid var(--line)}.cart-title h2{margin:0;font-size:1.25rem}.cart-items{overflow:auto;flex:1}.cart-line{padding:13px 0;border-bottom:1px solid #e8eef5;display:grid;grid-template-columns:1fr auto;gap:8px}.cart-line h3{margin:0;font-size:.94rem}.cart-line p{margin:3px 0;color:var(--muted);font-size:.8rem}.line-total{text-align:right;font-weight:800}.qty-control{display:flex;gap:7px;align-items:center;margin-top:8px}.qty-control button{min-height:36px;width:38px;padding:0;border-radius:8px;background:#e7eef5;color:#17324d}.qty-control input{min-height:36px;width:72px;text-align:center;padding:4px}.remove{color:#dc2626;background:transparent!important}.cart-summary{display:flex;justify-content:space-between;align-items:center;border-top:2px solid var(--navy);padding:15px 0;font-size:1.05rem}.cart-summary strong{font-size:1.65rem;color:var(--navy)}.cart-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.cart-actions button{min-height:54px}.empty{padding:48px 20px;text-align:center;color:var(--muted)}.empty.compact{margin:auto;display:grid;gap:6px;padding:30px}.section-header{display:flex;justify-content:space-between;align-items:center;padding:18px;border-bottom:1px solid var(--line)}.section-header h2{margin:0}.record-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:13px;padding:16px}.record-card{border:1px solid var(--line);border-radius:13px;padding:15px;background:#fff}.record-card header{display:flex;justify-content:space-between;gap:8px}.record-card h3{margin:0}.record-card dl{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:14px 0}.record-card dt{color:var(--muted);font-size:.75rem}.record-card dd{margin:2px 0 0;font-weight:750}.record-card button{width:100%}.table-wrap{overflow:auto;padding:14px}table{width:100%;border-collapse:collapse;min-width:680px}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line)}th{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:#64748b;background:#f8fafc}.status{display:inline-block;border-radius:999px;padding:5px 9px;font-size:.75rem;font-weight:800;background:#dcfce7;color:#15803d}.status.cancelled{background:#fee2e2;color:#b91c1c}
dialog{border:0;border-radius:18px;padding:0;width:min(620px,calc(100% - 24px));box-shadow:0 24px 80px rgba(15,23,42,.3)}dialog::backdrop{background:rgba(15,23,42,.55)}.dialog-card{padding:22px;display:grid;gap:15px}.dialog-card.large{width:100%}.dialog-head{display:flex;justify-content:space-between;align-items:start}.dialog-head h2{margin:0}.icon-btn{width:44px;padding:0;border-radius:50%;background:#eef2f7;font-size:1.5rem}.dialog-actions{display:flex;justify-content:flex-end;gap:9px}.table-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:9px;max-height:340px;overflow:auto}.table-choice{min-height:74px;background:#edf2f7;color:#17324d;border:2px solid transparent}.table-choice.occupied{background:#fff7ed;color:#9a3412}.table-choice.selected{border-color:#0284c7;background:#e0f2fe;color:#075985}.notice{background:#fff7ed;color:#9a3412;padding:10px;border-radius:9px;margin:0}.customer-results{max-height:240px;overflow:auto;border:1px solid var(--line);border-radius:10px}.customer-row{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:left;background:#fff;border-radius:0;border-bottom:1px solid var(--line);padding:12px}.customer-row:last-child{border:0}.customer-row small{display:block;color:var(--muted)}.selected-customer{padding:13px;border-radius:10px;background:#ecfdf5;color:#166534;font-weight:750}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.toast{position:fixed;right:20px;bottom:20px;z-index:100;background:#0f2744;color:#fff;padding:14px 18px;border-radius:11px;box-shadow:var(--shadow);max-width:min(430px,calc(100% - 40px))}.toast.error-toast{background:#991b1b}.busy{position:fixed;inset:0;background:rgba(255,255,255,.7);z-index:200;display:grid;place-content:center;justify-items:center;gap:10px;font-weight:750}.spinner{width:40px;height:40px;border-radius:50%;border:4px solid #bae6fd;border-top-color:#0284c7;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.busy[hidden]{display:none!important}
@media(max-width:900px){.topbar{position:static;align-items:flex-start}.top-actions{flex-wrap:wrap;justify-content:flex-end}.user-chip{display:none}#orderView.active-view{grid-template-columns:1fr}.cart-panel{position:static;height:auto;min-height:420px}.catalog{min-height:auto}.product-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}.cart-items{max-height:380px}}
@media(max-width:600px){.topbar{padding:12px 14px;display:block}.top-actions{margin-top:10px;display:grid;grid-template-columns:1fr auto}.shop-label{grid-column:1/-1;display:grid;gap:4px}.shop-label select{min-width:0}.tabs{padding:8px 10px}main{padding:10px}.catalog,.cart-panel,#holdsView,#quotesView{border-radius:12px}.search-row{align-items:stretch}.search-row .primary{padding:0 12px}.product-grid{grid-template-columns:1fr 1fr;gap:8px}.product-card{min-height:118px;padding:11px}.cart-actions{grid-template-columns:1fr}.section-header{align-items:flex-start;gap:8px}.record-grid{grid-template-columns:1fr}.dialog-card{padding:16px}.form-grid{grid-template-columns:1fr}.dialog-actions button{flex:1}.login-card{padding:25px}}

#fiscalJournal{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.45;background:#f1f5f9;padding:12px;max-height:55vh;overflow:auto}.dialog-actions{flex-wrap:wrap}#fiscalMessage{overflow-wrap:anywhere}

.login-logo{display:block;width:120px;height:120px;object-fit:contain;border-radius:16px}.header-brand{display:flex;align-items:center;gap:12px;min-width:0}.header-brand>div{min-width:0}.header-brand h1{overflow-wrap:anywhere}.header-logo{width:56px;height:56px;object-fit:contain;border-radius:10px;flex-shrink:0}
.login-logo{justify-self:center}
#fiscalQrBlock{margin:8px 0;text-align:center}#fiscalQr{display:block;width:100%;max-width:388px;height:auto;margin:0 auto;background:white;image-rendering:pixelated}#fiscalQrBlock figcaption{margin-top:8px;font-size:14px;color:#334155}
.payment-methods{margin:0;padding:0;border:0;min-width:0}.payment-methods legend{font-size:.9rem;font-weight:700;margin-bottom:10px}.payment-method-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.payment-choice{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:126px;padding:16px 5px 12px;border:2px solid #cbd5e1;background:#fff;color:#334155;border-radius:14px}.payment-choice svg{width:46px;height:40px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.payment-choice strong{font-size:16px;white-space:nowrap}.payment-choice small{font-size:12px;font-weight:500}.mpaisa-choice svg,.mpaisa-choice strong{color:#c62828}.payment-choice[aria-pressed="true"]{border-color:#0878bf;background:#eaf6ff;color:#075985;box-shadow:0 0 0 1px #0878bf}.payment-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:3px}.payment-tick{display:none;position:absolute;top:5px;right:7px;font-size:14px}.payment-choice[aria-pressed="true"] .payment-tick{display:block}.payment-choice:hover:not(:disabled){background:#f0f9ff}.payment-choice:disabled{cursor:wait}#paymentError:empty{display:none}@media(max-width:420px){.payment-method-grid{gap:6px}.payment-choice{min-height:112px}.payment-choice strong{font-size:14px}.payment-choice small{font-size:10px}}
#fiscalPaper{width:100%;max-width:340px;margin:0 auto;padding:18px 12px;background:#f1f5f9;box-sizing:border-box}#fiscalJournal,#fiscalFooter{font-family:"Courier New",monospace;font-size:12px;line-height:1.35;white-space:pre;overflow:visible;overflow-wrap:normal;width:40ch;max-width:100%;padding:0;margin:0 auto;background:transparent;max-height:none}#fiscalQrBlock{margin:12px auto;width:240px;max-width:100%}#fiscalQr{width:100%;max-width:240px;height:auto}#fiscalFooter{margin-top:8px}#fiscalVerify{text-align:center}@media(max-width:380px){#fiscalPaper{padding:14px 6px}#fiscalJournal,#fiscalFooter{font-size:clamp(9px,2.8vw,12px)}}
#fiscalPaper.non-fiscal{background:#fff;border:1px solid #dbe4ee;border-radius:8px;max-width:370px;padding:16px 10px}#fiscalPaper.non-fiscal #fiscalJournal{font-size:12px;line-height:1.45;color:#172033}
#trainingReceiptHeader{box-sizing:border-box;width:100%;max-width:40ch;margin:0 auto 10px;padding:0;background:transparent;color:#111;font:700 12px/1.45 "Courier New",monospace;white-space:pre;text-align:left}#trainingReceiptHeader[hidden]{display:none}
.price-entry{background:#f0f9ff;border:1px solid #bae6fd;border-radius:12px;padding:12px;margin-bottom:12px}.price-entry-row{display:flex;align-items:end;gap:10px}.price-entry-row label{flex:1}.price-entry p{margin:8px 0;font-size:13px}.price-entry summary{cursor:pointer;font-weight:700;color:#075985}.price-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;max-width:300px;margin-top:10px}.price-keypad button{background:#fff;border:1px solid #cbd5e1;color:#0f2744;font-size:20px;min-height:48px}.product-photo{width:100%;height:110px;object-fit:contain;border-radius:5px;background:#f8fafc}.product-image-preview{width:120px;height:100px;object-fit:contain}.list-mode .product-card:has(.product-photo){grid-template-columns:64px minmax(0,1fr) auto}.list-mode .product-photo{width:60px;height:55px}
@media print{
  @page{margin:2mm}
  body{background:#fff!important;margin:0!important}
  body>*:not(#receiptDialog){display:none!important}
  #receiptDialog[open]{position:static!important;display:block!important;width:100%!important;max-width:none!important;max-height:none!important;height:auto!important;overflow:visible!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:white!important}
  #receiptDialog::backdrop{display:none!important}
  #receiptDialog .dialog-card{display:block;padding:0}
  #receiptDialog .dialog-card>*{display:none!important}
  #receiptDialog .dialog-card>.eyebrow{display:block!important;text-align:center;font-size:10px;color:#000;margin-bottom:10px}
  #receiptDialog #fiscalPaper:not([hidden]){display:block!important;width:54mm;max-width:100%;background:#fff;padding:0}
  #fiscalJournal,#fiscalFooter{width:100%;max-width:100%;font-size:13px;font-weight:700;line-height:1.25;white-space:pre-wrap;overflow-wrap:anywhere;color:#000;background:#fff}
  #receiptDialog #fiscalPaper.non-fiscal{border:0;border-radius:0;width:58mm;max-width:100%;padding:0}#receiptDialog #fiscalPaper.non-fiscal #fiscalJournal{font-size:9px;font-weight:400;line-height:1.3;white-space:pre;color:#000}#receiptDialog #trainingReceiptHeader{display:block!important;max-width:100%;margin:0 0 4px;padding:0;font-size:9px;line-height:1.3;background:#fff!important;color:#000!important}#receiptDialog #trainingReceiptHeader[hidden]{display:none!important}
  #fiscalQrBlock{width:40mm;max-width:100%;break-inside:avoid;page-break-inside:avoid}
  #fiscalFooter{break-before:avoid;page-break-before:avoid}
}
.receipt-reference{font-size:14px;color:#475569;margin:0 0 12px}.receipt-payment-summary{margin:0;padding:4px 16px;border:1px solid #dbe4ee;border-radius:12px;background:#f8fafc}.receipt-payment-summary>div{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:12px 0}.receipt-payment-summary dt{color:#334155}.receipt-payment-summary dd{margin:0;text-align:right;font-weight:700;font-variant-numeric:tabular-nums}.receipt-payment-summary .receipt-total{border-bottom:1px solid #dbe4ee;font-size:20px;font-weight:800;color:#075985}#fiscalMessage:empty{display:none}
.split-payment-row{display:flex;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid #dbe4ee}.split-payment-row span{margin-left:auto}.split-payment-row button{font-size:12px;min-height:36px;padding:0 10px}
.payment-logo{display:block;width:100px;height:100px;object-fit:contain;justify-self:center}
/* Compact receipt with actions always within reach. */
#receiptDialog{max-height:calc(100dvh - 24px);width:min(520px,calc(100% - 20px));overflow:auto}
#receiptDialog .dialog-card{padding:14px 16px 0;gap:8px}
#receiptDialog h2{margin:0;font-size:20px;line-height:1.2}
#receiptDialog .eyebrow{margin:0;font-size:10px;letter-spacing:.05em}
#receiptDialog .receipt-reference{margin:0 0 6px;font-size:12px}
#receiptDialog .receipt-payment-summary{padding:6px 10px;display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
#receiptDialog .receipt-payment-summary>div{padding:5px 0;gap:8px;font-size:13px}
#receiptDialog .receipt-payment-summary .receipt-total{grid-column:1/-1;font-size:18px;padding-bottom:7px;margin-bottom:3px}
#receiptDialog .receipt-payment-summary>div:nth-child(2){grid-column:1/-1}
#receiptDialog #fiscalMessage{margin:0;font-size:13px}
#receiptDialog #fiscalPaper{padding-top:10px;padding-bottom:10px}
#receiptDialog #fiscalVerify{font-size:12px}
#receiptDialog .dialog-actions{position:sticky;bottom:0;background:#fff;padding:10px 0;margin:0;border-top:1px solid #e2e8f0;z-index:1}
#receiptDialog .dialog-actions button{flex:1;min-height:42px}
@media print{#receiptDialog .dialog-card{padding:0}#receiptDialog .dialog-actions{display:none!important}#receiptDialog .eyebrow{margin-bottom:8px}}
#paymentDialog{width:min(480px,calc(100% - 20px));max-height:calc(100dvh - 20px);overflow:auto}#paymentForm{padding:12px 16px;gap:10px}#paymentForm .payment-logo{width:64px;height:64px}#paymentForm h2{margin:0;font-size:21px;line-height:1.25}#paymentForm p{margin:0}#paymentForm label{gap:5px;font-size:13px}#paymentForm .payment-methods legend{margin-bottom:6px;font-size:13px}#paymentForm .payment-method-grid{gap:8px}#paymentForm .payment-choice{min-height:88px;padding:8px 4px;gap:4px;border-radius:10px}#paymentForm .payment-choice svg{width:32px;height:28px}#paymentForm .payment-choice strong{font-size:14px}#paymentForm .payment-choice small{font-size:10px}#paymentParts:empty{display:none}#paymentForm #paymentChange{padding:7px 10px;background:#eef6fb;border-radius:8px;font-weight:700;font-size:14px}#paymentForm .dialog-actions{position:sticky;bottom:-12px;padding:8px 0;background:white;gap:8px}#paymentForm .dialog-actions button{min-height:42px}#paymentForm .error{padding:8px;font-size:13px}
#paymentForm .payment-logo{width:96px;height:96px;justify-self:start}
#receiptDialog .receipt-payment-summary .receipt-payment-types{display:block}#receiptDialog .receipt-payment-types dd{text-align:left;margin-top:5px;display:grid;gap:5px;font-weight:400}#receiptDialog .receipt-payment-types dd span{display:block}#receiptDialog .receipt-payment-types dd strong{margin-left:8px}
#receiptDialog #shareHint{font-size:12px;margin:2px 0}
#receiptDialog .dialog-actions button{flex:1 1 105px;padding:0 9px}
.email-options{padding:10px;border:1px solid #cbd5e1;border-radius:9px;background:#f8fafc}
.email-options strong{display:block;margin-bottom:4px}
.email-options p{font-size:12px;margin:0 0 9px}
.email-options>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.email-options button{min-height:40px;padding:5px 8px;font-size:12px}
@media(max-width:380px){.email-options>div{grid-template-columns:1fr}}
.product-section-title,.product-manage{margin:16px 18px 0}.product-section-title{font-size:18px}.product-manage{padding:18px 0;border-top:1px solid var(--line)}.product-manage h3{margin:0 0 12px}.product-manage>.muted{font-size:12px}.product-manage-list{display:grid;gap:7px;margin-top:12px}.product-manage-row{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:66px;text-align:left;background:#f8fafc;border:1px solid var(--line);color:var(--text)}.product-manage-row span{min-width:0}.product-manage-row small{display:block;color:var(--muted);font-weight:400;overflow-wrap:anywhere}.product-manage-row>span:last-child{white-space:nowrap;color:#075985}#editProductForm{border-top:1px solid var(--line)}#editProductForm h3{margin:0}#editProductForm .dialog-actions{justify-content:flex-start}@media(max-width:600px){.product-manage-row{align-items:flex-start;flex-direction:column}.product-manage-row>span:last-child{white-space:normal}}
.ops-form .product-check{align-self:end;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:9px;background:#f8fafc;cursor:pointer}
.ops-form .product-check input{flex:none;cursor:pointer}
/* Dense catalog: full product names, clear prices, touch-sized targets. */
.catalog{padding:12px}.catalog-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;font-size:12px;color:#475569}.view-switch{display:flex;gap:4px;flex-shrink:0}.view-switch button{min-height:36px;padding:0 10px;background:#edf2f7;font-size:12px}.view-switch button[aria-pressed=true]{background:#075985;color:white}.category-list{padding:8px 0;gap:6px}.category{padding:0 12px;font-size:13px}.product-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:7px;align-items:stretch}.product-card{min-width:0;min-height:102px;padding:10px;border-radius:8px;border-color:#cbd5e1;border-top:3px solid #0e7490;gap:8px}.product-card strong{font-size:14px;line-height:1.3;overflow-wrap:anywhere}.product-card small{font-size:11px;overflow-wrap:anywhere;color:#526176}.product-card footer{margin-top:0;display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center}.product-card .price{font-size:15px}.product-card .stock{font-size:11px}.product-card:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}.product-grid.list-mode{grid-template-columns:1fr;gap:4px}.list-mode .product-card{min-height:64px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border-top:1px solid #cbd5e1;border-left:3px solid #0e7490}.list-mode .product-card footer{flex-direction:column;align-items:flex-end}.topbar{min-height:64px;padding:8px 18px}.tabs{padding:6px 18px}main{padding:12px}#orderView.active-view{gap:12px;grid-template-columns:minmax(0,1fr) 340px}
@media(max-width:900px){#orderView.active-view{grid-template-columns:1fr}.catalog{max-height:65dvh;overflow:auto}.catalog .search-row{position:sticky;top:-12px;z-index:2;background:#fff;padding:8px 0}.cart-panel{min-height:240px}.topbar{position:static}}
@media(max-width:600px){main{padding:6px}.catalog{padding:8px}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-tools{align-items:flex-start;flex-wrap:wrap}.catalog-tools>span{flex:1;min-width:120px}.view-switch button{min-height:44px;padding:0 8px}.topbar{padding:8px 12px}.header-logo{width:40px;height:40px}.topbar h1{font-size:17px}.top-actions{margin-top:6px;display:flex;flex-wrap:nowrap}.shop-label{flex:1;display:flex}.shop-label select{min-width:0}.tabs{padding:4px 8px}.product-card{min-height:100px}.catalog .search-row{top:-8px}.cart-panel{padding:12px}.cart-actions button{min-height:44px}}
.ops-panel{background:#fff;border:1px solid var(--line);border-radius:12px}.ops-form{padding:18px;display:grid;gap:14px;max-width:1000px}.ops-form .form-grid{gap:12px 18px}.ops-form>button{justify-self:start}.check-label{display:flex;align-items:center;gap:8px}.check-label input{width:20px;min-height:20px}.ops-subtabs{display:flex;gap:8px;flex-wrap:wrap;padding:14px 18px}.ops-form .ops-subtabs{padding:0}.ops-line{display:grid;grid-template-columns:minmax(150px,1fr) 130px 130px auto;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}.ops-line small{display:block;color:#64748b;margin-top:4px}.ops-line label{font-size:12px}.ops-search-results{max-height:240px;overflow:auto}.ops-search-results button{display:block;text-align:left;width:100%;border-radius:0;border-bottom:1px solid var(--line);background:#f1f5f9;padding:10px}.ops-search-results small{display:block;font-weight:400}.ops-result:empty{display:none}.ops-result{padding:12px;background:#eff6ff;border-radius:8px;margin:0;overflow-wrap:anywhere}.report-paper{border:1px solid var(--line);padding:20px;max-width:540px}.report-paper dl>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}.report-paper dd{margin:0;font-weight:700}#zHistory{display:grid;gap:8px}#zCloseForm{display:grid;gap:12px;max-width:540px}.cart-actions{grid-template-columns:1fr}.tabs button{white-space:nowrap}
@media(max-width:650px){.ops-form{padding:12px}.ops-form .form-grid{grid-template-columns:1fr 1fr}.ops-line{grid-template-columns:1fr 1fr}.ops-line>strong,.ops-line>div{grid-column:1/-1}.ops-form input,.ops-form select{min-width:0}.ops-form label{min-width:0}.ops-form>button{width:100%}}
@media print{body.printing-ops>#appScreen{display:block!important}body.printing-ops #appScreen>*:not(main),body.printing-ops main>*:not(#reportsView),body.printing-ops #reportsView>*:not(.ops-form),body.printing-ops #reportsView .ops-form>*:not(#opsReport){display:none!important}body.printing-ops #reportsView,body.printing-ops #opsReport{display:block!important}body.printing-ops .ops-panel,body.printing-ops .report-paper{border:0;box-shadow:none}body.printing-ops main,body.printing-ops .ops-form{padding:0}}

/* Give the sale cart enough room for item names and quantity controls. */
@media(min-width:901px){#orderView.active-view{grid-template-columns:minmax(0,1fr) 400px}}
#recentSalesBtn{min-height:44px;padding:0 18px;font:inherit;font-weight:700}
#recentSalesDialog{width:min(680px,calc(100% - 24px))}
.receipt-filter{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}
.receipt-filter-actions{display:flex;gap:6px}
.receipt-filter-actions button,#closeRecentSales{min-height:38px;padding:0 12px;font-size:13px}
.recent-sales-list{display:grid;gap:6px;max-height:50vh;overflow:auto}
.recent-sale-button{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;width:100%;min-height:38px;padding:7px 10px;text-align:left;border:1px solid var(--line);border-radius:8px;background:#f8fafc;color:var(--text);font-size:13px}
.recent-sale-button:hover,.recent-sale-button:focus-visible{border-color:#0284c7;background:#eff6ff}
.recent-sale-button strong{overflow-wrap:anywhere}
.recent-sale-button small{font-size:12px;color:var(--muted);font-weight:400}
#closeRecentSales{justify-self:end}
@media(max-width:640px){.receipt-filter{grid-template-columns:1fr 1fr}.receipt-filter-actions{grid-column:1/-1}.recent-sale-button{grid-template-columns:1fr auto}.recent-sale-button small{grid-column:1/-1}}
.cart-summary{padding-bottom:2px}
.cart-vat{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;width:100%;min-height:30px;column-gap:16px;padding:2px 0 15px;color:var(--muted);font-size:12px;line-height:1.4}
.cart-vat small{justify-self:end;white-space:nowrap;text-align:right;font-size:12px;font-weight:650;font-variant-numeric:tabular-nums}
.checkout-unavailable{margin:0;color:var(--muted);font-size:12px;line-height:1.4;text-align:center}
#receiptDialog .receipt-payment-summary .receipt-amount-paid{justify-content:flex-start}
#receiptDialog .receipt-payment-summary .receipt-amount-paid dd{text-align:left}
/* Keep the signed-in user and account actions compact. */
.top-actions{gap:10px}
.user-chip{gap:8px}
.user-chip>span{width:34px;height:34px}
.user-chip strong{font-size:14px;line-height:1.2}
.user-chip small{font-size:11px;line-height:1.2}
#manageUsersLink,#logoutBtn{min-height:38px;padding:0 13px;font-size:13px}
@media(max-width:600px){.top-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}.shop-label{grid-column:1/-1}#manageUsersLink{justify-self:start}#logoutBtn{justify-self:end}}
/* Compact product tiles with readable images and touch targets. */
.product-grid:not(.list-mode){grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:6px}
.product-grid:not(.list-mode) .product-card{min-height:88px;padding:8px;gap:6px}
.product-grid:not(.list-mode) .product-photo{height:78px}
.product-grid:not(.list-mode) .product-card strong{font-size:13px}
.product-grid:not(.list-mode) .product-card .price{font-size:14px}
@media(max-width:600px){.product-grid:not(.list-mode){grid-template-columns:repeat(2,minmax(0,1fr))}.product-grid:not(.list-mode) .product-photo{height:72px}}
/* Keep every payment and summary amount in the same readable column. */
#receiptDialog .receipt-payment-summary{display:flex;flex-direction:column;gap:0;padding:8px 12px}
#receiptDialog .receipt-payment-summary>div{padding:6px 0;font-size:13px}
#receiptDialog .receipt-payment-summary .receipt-total{display:flex;justify-content:space-between;align-items:baseline;padding:3px 0 9px;margin:0;font-size:18px}
#receiptDialog .receipt-payment-summary .receipt-payment-types{display:block;padding:10px 0 9px}
#receiptDialog .receipt-payment-types dt{font-size:12px;font-weight:650;color:var(--muted);margin-bottom:6px}
#receiptDialog .receipt-payment-types dd{display:grid;gap:5px;margin:0}
#receiptDialog .receipt-payment-types .receipt-payment-line{display:grid;grid-template-columns:112px minmax(0,1fr);gap:8px;align-items:baseline;font-size:13px}
#receiptDialog .receipt-payment-types .receipt-payment-line strong{margin:0;text-align:left;font-weight:700}
#receiptDialog .receipt-payment-summary .receipt-amount-paid,#receiptDialog .receipt-payment-summary .receipt-change{display:grid;grid-template-columns:112px minmax(0,1fr);gap:8px;justify-content:initial;align-items:baseline}
#receiptDialog .receipt-payment-summary .receipt-amount-paid{border-top:1px solid var(--line);padding-top:10px}
#receiptDialog .receipt-payment-summary .receipt-amount-paid dd,#receiptDialog .receipt-payment-summary .receipt-change dd{text-align:left}
@media print{body.printing-refund>*{display:none!important}body.printing-refund #appScreen,body.printing-refund main,body.printing-refund #refundView,body.printing-refund #refundReceipt{display:block!important}body.printing-refund #appScreen>*:not(main),body.printing-refund main>*:not(#refundView),body.printing-refund #refundView>*:not(#refundReceipt),body.printing-refund #printRefund{display:none!important}body.printing-refund #refundReceipt{max-width:80mm;margin:auto}body.printing-refund .report-paper{border:0;box-shadow:none}}
.refund-fiscal-paper{max-width:360px;background:white;padding:12px;border:1px solid #cbd5e1}.refund-fiscal-paper pre{font:12px/1.4 'Courier New',monospace;white-space:pre;margin:0;color:#111}.refund-fiscal-paper img{display:block;width:240px;max-width:100%;margin:12px auto}.refund-fiscal-paper .muted{font-size:11px}#refundHistory{display:grid;gap:6px;margin-top:10px}
@media print{body.printing-refund #refundReceipt button,body.printing-refund #refundFiscalStatus{display:none!important}body.printing-refund .refund-fiscal-paper{border:0;padding:0;max-width:none}body.printing-refund .refund-fiscal-paper pre{font-size:10px}body.printing-refund .refund-fiscal-paper img{width:55mm}}
@media print{body.printing-refund>#receiptDialog{display:none!important}}

.sale-customer {padding:10px 0 12px;border-bottom:1px solid #d8e3ee;display:grid;gap:4px}
.sale-customer small {color:#60748c}
.sale-customer .link-btn {font-size:12px;padding:4px 8px 4px 0}
.service-description {display:grid;gap:4px;margin:8px 0;font-size:12px;color:#60748c}
.service-description input {width:100%;min-width:0;padding:8px;font-size:13px}


#saleCustomerDialog,#createCustomerDialog {width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:20px;overflow:auto}
#saleCustomerDialog .search-row input {min-width:0;flex:1}
#saleCustomerDialog .customer-results {margin:16px 0;max-height:45dvh;overflow:auto}
#saleCustomerDialog .customer-row {width:100%;gap:12px}
#saleCustomerDialog .customer-row small {display:block}
#createCustomerForm {padding:0;margin:0}
.service-description {max-width:100%}
.cart-line>div:first-child {min-width:0}

.refund-panel {max-width:900px;margin:0 auto}
.refund-search {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end}
.refund-search .ops-result {grid-column:1/-1;margin:0}
.refund-items-heading {display:flex;justify-content:space-between;align-items:center;gap:12px}
.refund-items-heading h3 {margin:0}
.refund-item {display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:16px;padding:14px 0;border-bottom:1px solid var(--line);align-items:center}
.refund-item strong,.refund-item small {display:block}
.refund-item small {color:var(--muted);font-size:12px;margin-top:4px}
.refund-item label {font-size:12px}
.refund-item input {text-align:center}
.refund-total-row {display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:#eef6fb;border-radius:10px;color:var(--navy)}
.refund-total-row strong {font-size:24px}
#refundForm>.primary {justify-self:start;min-width:180px}
#refundItemHint,#refundProviderHint {font-size:13px;margin:0}
@media(max-width:600px){.refund-search {grid-template-columns:1fr}.refund-search .primary {width:100%}.refund-items-heading {align-items:flex-start;flex-direction:column}.refund-item {grid-template-columns:minmax(0,1fr) 85px;gap:10px}.refund-panel .section-header {flex-wrap:wrap}#refundForm>.primary {width:100%}}

.recent-sale-row {display:flex;gap:8px;align-items:stretch}
.recent-sale-row .recent-sale-button {flex:1;min-width:0}
.copy-invoice-button {flex:none;min-height:38px;padding:0 12px;font-size:12px}
@media(max-width:600px){.recent-sale-row .recent-sale-button {flex-wrap:wrap}.recent-sale-row .recent-sale-button small {white-space:normal}}

.refund-close-actions {display:flex;justify-content:flex-end;padding:16px 18px;border-top:1px solid var(--line)}

#poPrintDialog {width:min(1000px,calc(100vw - 24px));max-height:95dvh;overflow:auto}
#poPrintList .customer-row {width:100%}
#poPrintList .customer-row small {display:block}
.po-paper {padding:24px;background:#fff;color:#111;border:1px solid #d8e3ee}
.po-paper header {display:flex;align-items:flex-start;gap:18px;border-bottom:2px solid #18344c;padding-bottom:18px}
.po-company-logo {width:110px;height:80px;object-fit:contain}
.po-paper h2 {margin:0 0 6px;font-size:20px}
.po-paper p {margin:4px 0;font-size:12px;overflow-wrap:anywhere}
.po-heading {margin-left:auto;text-align:right}
.po-heading h1 {font-size:20px;margin:0 0 8px}
.po-details {display:flex;justify-content:space-between;gap:20px;padding:20px 0}
.po-details small,.po-details strong {display:block}
.po-details small {margin-bottom:8px;color:#64748b}
.po-paper table {width:100%;border-collapse:collapse}
.po-paper th,.po-paper td {padding:10px 8px;border-bottom:1px solid #d8e3ee;font-size:12px;text-align:left}
.po-paper th {background:#eef3f8}
.po-paper .numeric {text-align:right;white-space:nowrap}
.po-total {display:flex;justify-content:flex-end;gap:36px;padding:18px 8px;font-size:16px}
.po-cancelled {text-decoration:line-through;color:#64748b}
.po-note {white-space:pre-wrap}
.po-paper footer {display:flex;justify-content:space-between;gap:20px;margin-top:40px;font-size:12px}
@media(max-width:600px){.po-paper {padding:12px;overflow:auto}.po-paper header {flex-wrap:wrap}.po-heading {text-align:left;margin:0}.po-paper table {min-width:540px}.po-details,.po-paper footer {flex-wrap:wrap}.po-company-logo {width:85px;height:60px}}
@media print{
  @page poDocument {size:A4;margin:12mm}
  body.printing-po>* {display:none!important}
  body.printing-po>#poPrintDialog {display:block!important;position:static!important;width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;overflow:visible!important}
  body.printing-po>#receiptDialog {display:none!important}
  body.printing-po #poPrintDialog::backdrop {display:none}
  body.printing-po #poPrintDialog>.dialog-card {padding:0}
  body.printing-po #poPrintDialog>.dialog-card>*:not(#poPrintPaper) {display:none!important}
  body.printing-po .po-paper {page:poDocument;padding:0;border:0;overflow:visible}
  body.printing-po .po-paper table {min-width:0}
  body.printing-po .po-paper thead {display:table-header-group}
  body.printing-po .po-paper tr {break-inside:avoid}
  body.printing-po .po-paper header {flex-wrap:nowrap}
  body.printing-po .po-heading {margin-left:auto;text-align:right}
}

.supplier-picker {display:grid;gap:8px}
.supplier-picker>.create-supplier {justify-self:start;min-height:36px}
#receivePoResults {max-height:240px;overflow:auto}
#supplierDialog {width:min(600px,calc(100vw - 24px))}
#createSupplierForm {padding:0}
.ops-product-picker>.ghost {margin:6px 0}

/* Purchase order document */
.po-paper {font-family:"Segoe UI",Arial,sans-serif;line-height:1.5;padding:30px;color:#172033}
.po-paper header {align-items:flex-start;gap:22px;padding-bottom:24px;border-bottom:2px solid #172033}
.po-paper .po-company-logo {width:115px;height:85px;flex:none;object-fit:contain}
.po-paper header>div:first-of-type {flex:1;min-width:0}
.po-paper h2 {font-size:22px;line-height:1.25;margin:0 0 10px}
.po-paper p {font-size:13px;line-height:1.55;margin:3px 0}
.po-paper .po-heading {flex:none;text-align:right}
.po-heading h1 {font-size:22px;letter-spacing:.03em;line-height:1.3;margin:0 0 12px}
.po-heading>strong {display:block;font-size:18px;font-weight:700}
.po-paper .po-details {align-items:flex-start;padding:24px 0;gap:30px}
.po-details>div:first-child {flex:1;min-width:0}
.po-details small {font-size:11px;letter-spacing:.08em;font-weight:700;margin-bottom:8px}
.po-details strong {font-size:17px}
.po-meta {margin:0;min-width:250px;font-size:13px;display:grid;gap:7px}
.po-meta>div {display:grid;grid-template-columns:105px minmax(0,1fr);gap:16px}
.po-meta dt {color:#52637a}
.po-meta dd {margin:0;text-align:right;font-weight:600;overflow-wrap:anywhere}
.po-paper table {table-layout:fixed}
.po-paper th {font-size:12px;font-weight:700;text-transform:none;color:#172033;padding:12px 10px;background:#eef2f6;border-top:1px solid #cbd5e1;border-bottom:1px solid #cbd5e1}
.po-paper td {font-size:13px;padding:14px 10px;vertical-align:top;overflow-wrap:anywhere}
.po-paper th:nth-child(1) {width:12%}
.po-paper th:nth-child(2) {width:32%}
.po-paper th:nth-child(3) {width:10%}
.po-paper th:nth-child(4) {width:10%}
.po-paper th:nth-child(5) {width:18%}
.po-paper th:nth-child(6) {width:18%}
.po-paper .po-total {align-items:center;gap:28px;border-top:2px solid #172033;padding:18px 10px;font-size:14px;white-space:nowrap}
.po-total strong {font-size:20px}
.po-note {margin-top:8px!important;padding:14px 16px;border-left:3px solid #cbd5e1;background:#f8fafc}
.po-paper footer {margin-top:55px;display:grid;grid-template-columns:240px 150px;gap:40px;border:0}
.po-paper footer>div {display:grid;gap:8px;font-size:12px;color:#52637a}
.po-signature-line {display:block;border-bottom:1px solid #52637a;height:20px}
@media(max-width:600px){.po-paper {padding:16px}.po-paper header {flex-wrap:wrap}.po-paper .po-heading {text-align:left}.po-meta {min-width:0;width:100%}.po-paper footer {grid-template-columns:1fr 100px;gap:24px}.po-paper table {min-width:560px}}
@media print{
  body.printing-po>#poPrintDialog {box-shadow:none!important;border-radius:0!important;background:#fff!important;height:auto!important}
  body.printing-po #poPrintDialog>.dialog-card {display:block!important;box-shadow:none!important}
  body.printing-po .po-paper {font-size:11pt;padding:0;box-shadow:none;background:#fff;line-height:1.5}
  body.printing-po .po-paper header {flex-wrap:nowrap;break-inside:avoid}
  body.printing-po .po-paper .po-heading {text-align:right}
  body.printing-po .po-paper h2 {font-size:16pt}
  body.printing-po .po-heading h1 {font-size:16pt}
  body.printing-po .po-paper p,body.printing-po .po-meta {font-size:10pt}
  body.printing-po .po-paper table {width:100%;min-width:0}
  body.printing-po .po-paper td {font-size:10.5pt}
  body.printing-po .po-paper th {font-size:10pt}
  body.printing-po .po-paper footer {grid-template-columns:240px 150px;break-inside:avoid}
  body.printing-po .po-paper * {-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

.po-filter {display:grid;grid-template-columns:1fr 1.3fr 1fr;gap:12px}
.po-filter-actions {grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}
@media(max-width:600px){.po-filter {grid-template-columns:1fr}.po-filter-actions button {flex:1}}

#poCreate>.form-grid {align-items:start}
#poCreate>.form-grid>label {align-content:start;align-self:start}
@media(max-width:600px){#poCreate>.form-grid {grid-template-columns:1fr}}

#directReceive>.form-grid {align-items:start}
#directReceive>.form-grid>label {align-content:start;align-self:start}
@media(max-width:600px){#directReceive>.form-grid {grid-template-columns:1fr}}

.po-paper th,.po-paper td {font-size:12px;padding:10px 8px}
#salesHoldActions {display:grid;grid-template-columns:1fr 1fr;gap:9px}
#salesHoldActions[hidden] {display:none}
#salesResumeList {display:grid;gap:10px;max-height:60vh;overflow:auto}
#salesResumeList button {display:grid;gap:5px;text-align:left;background:#f5f8fc;color:var(--navy);width:100%}
#salesResumeList small {font-weight:400;color:var(--muted)}
@media print{body.printing-po .po-paper th,body.printing-po .po-paper td {font-size:9pt}}

.sale-discount {display:flex;align-items:center;gap:8px;margin-top:8px;font-size:12px}
.sale-discount input {width:85px;min-height:36px;padding:6px}

.service-description-preview {white-space:pre-wrap;overflow-wrap:anywhere;max-height:100px;overflow:auto}
#serviceDescriptionDialog {max-height:calc(100dvh - 24px);overflow:auto}
#serviceDescriptionProduct {margin:0;overflow-wrap:anywhere}
#serviceDescriptionText {width:100%;min-height:220px;max-height:50dvh;resize:vertical;font:inherit;line-height:1.5;padding:12px}

.sale-discount {flex-wrap:wrap}
.sale-discount select {width:125px;min-height:36px;padding:6px;font-size:12px}

.held-sale-row {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
#salesResumeList .held-sale-remove {width:auto;background:#fee2e2;color:#991b1b;min-height:44px}

#directReceive .supplier-picker {grid-column:1/-1;grid-template-columns:minmax(0,1fr) auto;gap:12px}
#directReceive .supplier-picker>label:first-child,#directReceive .supplier-search-results {grid-column:1/-1}
#directReceive .supplier-picker>.create-supplier {align-self:end;min-height:44px}
#directReceive>.form-grid {gap:16px 18px}
@media(max-width:600px){#directReceive .supplier-picker {grid-template-columns:1fr}#directReceive .supplier-picker>.create-supplier {justify-self:start}}
#poReceive>h3 {margin:0}
.receive-po-group {display:grid;gap:14px;padding:18px;border:1px solid var(--line);border-radius:12px;background:#fff;min-width:0}
.receive-po-group h4 {margin:0;color:var(--navy);font-size:14px}
.receive-po-tools {display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.receive-po-tools #refreshPos {margin-left:auto}
#receivePoResults:empty {display:none}
#receiveLines .ops-line {grid-template-columns:minmax(0,1fr) 150px 110px;align-items:end;gap:16px}
#receiveLines .ops-line>.check-label {min-height:44px;align-self:end}
@media(max-width:600px){.receive-po-group {padding:14px}.receive-po-group .form-grid {grid-template-columns:1fr}#receiveLines .ops-line {grid-template-columns:minmax(0,1fr) 110px}#receiveLines .ops-line>div {grid-column:1/-1}.receive-po-tools #refreshPos {margin-left:0}}
/* Sales screen: compact toolbar, consistent product tiles and clear checkout. */
#orderView .catalog {padding:16px}
#orderView .search-row {margin-bottom:12px}
#orderView .price-entry {display:grid;grid-template-columns:minmax(260px,420px) minmax(160px,1fr) auto;align-items:center;gap:14px;background:#f8fafc;border-color:var(--line);padding:12px;margin-bottom:12px}
#orderView .price-entry-row {gap:8px}
#orderView .price-entry-row label {font-size:12px;min-width:0}
#orderView .price-entry-row button {white-space:nowrap;padding:0 12px}
#orderView .price-entry p {font-size:12px;line-height:1.5;margin:0}
#orderView .price-entry details {position:relative;white-space:nowrap;font-size:13px}
#orderView .price-entry details[open] .price-keypad {position:absolute;right:0;top:25px;width:260px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);z-index:5}
#orderView .catalog-tools {margin-top:0;padding-bottom:8px;border-bottom:1px solid #edf2f7}
#orderView .category-list {padding:12px 0;gap:8px}
#orderView .product-grid:not(.list-mode) {grid-template-columns:repeat(auto-fill,minmax(132px,148px));gap:10px}
#orderView .product-grid:not(.list-mode) .product-card {min-height:174px;padding:10px;justify-content:flex-start;gap:9px;border-top-width:1px;border-radius:10px}
#orderView .product-visual {height:74px;display:grid;place-items:center;background:#f8fafc;border-radius:7px;overflow:hidden;flex-shrink:0}
#orderView .product-photo {width:100%;height:74px;object-fit:contain;background:transparent}
#orderView .product-placeholder {display:grid;justify-items:center;gap:3px;color:#8091a5;font-size:10px;font-weight:500}
#orderView .product-placeholder svg {width:32px;height:32px}
#orderView .product-card footer {margin-top:auto;display:grid;gap:3px}
#orderView .product-card .price {font-size:14px}
#orderView .product-grid.list-mode .product-card {grid-template-columns:52px minmax(0,1fr) auto}
#orderView .product-grid.list-mode .product-visual,#orderView .product-grid.list-mode .product-photo {width:48px;height:48px}
#orderView .product-grid.list-mode .product-placeholder span {display:none}
#orderView .product-grid.list-mode .product-card footer {margin:0;text-align:right;justify-items:end}
#orderView .cart-title {align-items:center;padding-bottom:14px}
#orderView .cart-title h2 {font-size:18px}
#orderView #clearCart {font-size:12px;padding:0;min-height:36px}
#orderView .sale-customer {grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:14px 0}
#orderView .sale-customer>small,#orderView .sale-customer>strong {grid-column:1}
#orderView .sale-customer>div {grid-column:2;grid-row:1/3;align-self:center;text-align:right}
#orderView .sale-customer .link-btn {min-height:36px;padding:4px 0}
#orderView .cartEmpty,#orderView #cartEmpty {flex:1;margin:0;place-content:center;font-size:14px}
#orderView .cart-summary {padding:14px 0 8px}
#orderView .cart-summary strong {font-size:25px}
#orderView .cart-actions {gap:10px}
#orderView .cart-actions button {min-height:46px;border-radius:10px}
#orderView #payBtn {min-height:50px}
@media(max-width:1100px){#orderView .price-entry {grid-template-columns:minmax(0,1fr) auto}#orderView .price-entry p {grid-column:1;grid-row:2}#orderView .price-entry details {grid-column:2;grid-row:1/3}}
@media(max-width:900px){#orderView .cart-panel {position:static;height:auto;min-height:340px}#orderView #cartEmpty {min-height:120px}#orderView .catalog {min-height:320px}}
@media(max-width:600px){#orderView .catalog {padding:10px}#orderView .price-entry {grid-template-columns:1fr;gap:8px;padding:10px}#orderView .price-entry p,#orderView .price-entry details {grid-column:auto;grid-row:auto}#orderView .price-entry details[open] .price-keypad {position:static;width:100%;margin-top:10px;box-shadow:none}#orderView .product-grid:not(.list-mode) {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#orderView .product-grid:not(.list-mode) .product-card {min-height:166px}#orderView .catalog .search-row {top:-10px}#orderView .sale-customer {gap:4px 8px}}

#orderView #salesHoldActions {padding:12px 0 0;gap:8px;flex-shrink:0}
#orderView #salesHoldActions button {min-height:38px;font-size:13px;border:1px solid #dbe4ee;border-radius:8px;background:#f1f5f9;color:#075985;padding:0 12px}
#orderView #salesHoldActions button:hover:not(:disabled) {background:#e0f2fe;border-color:#bae6fd}
.operation-form-actions {display:flex;gap:10px;align-items:center;flex-wrap:wrap}
#productsView>.section-header,#stockView>.section-header {gap:16px;align-items:center}
.close-operation-view {flex-shrink:0}

#orderView .cart-unit-price {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#orderView .cart-discount-btn {min-height:28px;padding:0 8px;font-size:11px;background:#edf4fa;color:#075985;border-radius:6px;white-space:nowrap}
#orderView .cart-discount-btn.has-discount {background:#ecfdf5;color:#166534}
#cartDiscountDialog {width:min(460px,calc(100% - 24px))}
#discountEditorProduct {overflow-wrap:anywhere;margin:0}
.mobile-only{display:none}
.cart-line-content{display:contents}
#barcodeScannerVideo{width:100%;height:220px;object-fit:contain;background:#0f172a;border-radius:10px}
#barcodeCameraTools{display:flex;align-items:end;gap:8px}
#barcodeCameraLabel{flex:1;min-width:0;font-size:12px}
#barcodeCameraSelect{font-size:14px}
#barcodeTorchBtn{font-size:13px;flex-shrink:0}
#barcodeScannerStatus{margin:0;overflow-wrap:anywhere;font-size:14px}
#barcodeManualForm{display:flex;align-items:end;gap:8px}
#barcodeManualForm label{flex:1;min-width:0}
#barcodeManualForm button{flex-shrink:0;font-size:12px}
@media(max-width:600px){#orderView .search-row #scanBarcodeBtn{min-height:44px;padding:0 10px;font-size:13px}#barcodeManualInput{font-size:16px}#barcodeScannerVideo{height:190px}}
/* Dashboard and sales reporting. */
.reporting-view{background:#fff;border:1px solid var(--line);border-radius:14px;min-width:0;padding-bottom:18px}
.reporting-view .section-header{padding:18px;gap:12px}
.reporting-view .section-header h2{font-size:22px}
.reporting-view .section-header p{font-size:13px;margin-top:6px}
.report-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:18px;background:#f8fafc;border-bottom:1px solid var(--line)}
.report-filter-actions{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}
.report-status{margin:16px 18px;font-size:13px;color:var(--muted)}
.report-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;padding:0 18px 18px}
.report-kpi{padding:16px;border:1px solid var(--line);border-radius:10px;background:#f8fafc;display:grid;gap:10px;min-width:0}
.report-kpi small{color:var(--muted);font-size:12px}
.report-kpi strong{font-size:20px;color:var(--navy);overflow-wrap:anywhere}
.dashboard-panels{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:0 18px}
.report-panel{border:1px solid var(--line);border-radius:12px;padding:16px;min-width:0}
.report-panel h3{font-size:16px;margin:0 0 16px}
.report-table-wrap{overflow:auto;max-width:100%;padding:0 18px}
.report-panel .report-table-wrap{padding:0}
.report-table-wrap table{font-size:12px;min-width:650px}
.report-panel table{min-width:320px}
.report-table-wrap th{white-space:nowrap}
.report-table-wrap td{vertical-align:top;padding:12px 10px;font-variant-numeric:tabular-nums}
.report-table-wrap td:last-child{font-weight:700;white-space:nowrap}
.report-description{display:block;min-width:180px;max-width:300px;white-space:pre-wrap;overflow-wrap:anywhere}
.report-refund{color:#b91c1c;font-weight:700}
.report-empty{text-align:center;color:var(--muted);padding:30px!important}
.report-pager{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;padding:16px;font-size:13px}
.report-footnote{padding:0 18px;font-size:12px;color:var(--muted)}
.sales-day{display:grid;grid-template-columns:80px minmax(0,1fr) auto;gap:10px;align-items:center;margin:12px 0;font-size:12px}
.sales-day-track{height:12px;background:#eef2f7;border-radius:8px;overflow:hidden}
.sales-day-track i{display:block;background:#0878bf;height:100%;border-radius:8px}
.sales-day-track i.negative{background:#dc2626}
.sales-day strong{font-variant-numeric:tabular-nums}
@media(max-width:1100px){.report-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:750px){.dashboard-panels{grid-template-columns:1fr}.report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.reporting-view .section-header{padding:14px}.report-filters{padding:12px;gap:10px}.report-filters input,.report-filters select{font-size:16px;min-width:0}.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:0 12px 12px;gap:8px}.report-kpi{padding:12px}.report-kpi strong{font-size:18px}.dashboard-panels{padding:0 12px;gap:12px}.report-panel{padding:12px}.report-table-wrap{padding:0 12px}.report-status{margin:12px}.report-filter-actions button{font-size:12px;padding:0 12px}.reporting-view .section-header h2{font-size:18px}.report-product-search{grid-column:1/-1}.report-filters label{min-width:0;font-size:12px}.sales-day{grid-template-columns:75px minmax(0,1fr) auto;gap:6px;font-size:11px}}
.report-export-actions{display:flex;flex-wrap:wrap;gap:8px;padding:10px 18px}.report-export-actions button{min-height:44px;font-size:13px}#reportExportControls{padding:0}#reportExportStatus{white-space:pre-wrap;overflow-wrap:anywhere}
.barcode-photo-button{position:relative;display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 12px;border-radius:9px;background:#edf2f7;color:#17324d;font-size:13px;font-weight:700;cursor:pointer;flex-shrink:0}.barcode-photo-button input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.barcode-photo-button:focus-within{outline:2px solid #0878bf;outline-offset:2px}#barcodeCameraTools{flex-wrap:wrap}
.product-code-entry{display:flex;align-items:center;gap:8px}.product-code-entry input{flex:1;min-width:0}.product-code-entry button{flex-shrink:0;min-height:44px;font-size:13px}
/* Consistent desktop and tablet application chrome. */
.account-menu{position:relative}
.account-menu summary{cursor:pointer;list-style:none}
.account-menu summary::-webkit-details-marker{display:none}
.account-menu-items{position:absolute;right:0;top:calc(100% + 10px);width:230px;padding:6px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 12px 30px rgba(15,39,68,.14);z-index:25;display:grid;gap:2px}
.top-actions .account-menu-items>.ghost,.top-actions .account-menu-items>.admin-link{justify-content:flex-start;text-align:left;width:100%;min-height:44px;padding:0 12px;border-radius:7px;background:transparent;color:#334155;font-size:13px;font-weight:600;border:0}
.account-menu-items>.ghost:hover,.account-menu-items>.admin-link:hover{background:#f0f9ff;color:#075985}
.account-menu-items>#logoutBtn{border-top:1px solid #e2e8f0;margin-top:4px;border-radius:0 0 7px 7px;color:#b91c1c}
.account-chevron{margin-left:8px;color:#64748b}
@media(min-width:601px){
  #appScreen>.topbar{padding:14px 24px;min-height:88px;gap:20px;border-top:3px solid #0e7490;box-shadow:none;flex-wrap:wrap}
  .header-brand{gap:14px;flex:1 1 300px}
  .header-logo{width:48px;height:48px;border-radius:0}
  .header-brand .eyebrow{font-size:10px;letter-spacing:.16em;margin-bottom:5px;color:#0e7490}
  .header-brand h1{font-size:20px;font-weight:750;line-height:1.3;letter-spacing:-.4px}
  .top-actions{gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:0;margin:0}
  .shop-label{display:flex;gap:10px;margin-right:12px;font-size:12px;font-weight:600;letter-spacing:0}
  .shop-label select{min-width:170px;max-width:240px;min-height:40px;padding:8px 32px 8px 12px;font-size:13px;letter-spacing:0;background:#f8fafc;border-color:#dbe4ee;border-radius:9px}
  .user-chip{display:flex;padding:5px 10px;border:1px solid transparent;border-radius:10px;margin:0;gap:10px;min-height:48px}
  .user-chip:hover,.account-menu[open]>.user-chip{background:#f8fafc;border-color:#e2e8f0}
  .user-chip>span{width:36px;height:36px;background:#e6f3f7;color:#075985;font-size:14px}
  .user-chip strong{font-size:13px;font-weight:700;line-height:1.4}
  .user-chip small{font-size:11px;line-height:1.4}
  .top-actions .admin-link,.top-actions>.ghost{min-height:40px;padding:0 12px;border:1px solid #dbe4ee;border-radius:9px;background:#fff;color:#334155;font-size:12px;font-weight:650;white-space:nowrap;text-decoration:none;transition:background .15s,border-color .15s}
  .top-actions .admin-link:hover,.top-actions>.ghost:hover{background:#f0f9ff;border-color:#9ecbd9;color:#075985}
  #logoutBtn{color:#64748b}
  #appScreen>.tabs{padding:7px 24px;gap:5px;min-height:58px;align-items:stretch;background:#075985;border-bottom:0;box-shadow:0 3px 10px rgba(7,89,133,.12)}
  #appScreen>.tabs>button{position:relative;min-height:44px;padding:0 18px;border-radius:8px;background:transparent;color:#e0f2fe;font-size:13px;font-weight:650;border:0;flex-shrink:0}
  #appScreen>.tabs>button:hover{background:rgba(255,255,255,.1);color:#fff}
  #appScreen>.tabs>button.active{background:#fff;color:#075985;font-weight:750;box-shadow:0 2px 6px rgba(0,0,0,.08)}
  #appScreen>.tabs>button.active:after{display:none}
  .top-actions :focus-visible,#appScreen>.tabs>button:focus-visible{outline:2px solid #0284c7;outline-offset:-3px}
  #appScreen>.tabs>button:focus-visible{outline-color:#7dd3fc}
  .reporting-view>.section-header{padding:22px 24px;gap:16px}
  .reporting-view>.section-header h2{font-size:22px;letter-spacing:-.4px;line-height:1.3}
  .reporting-view>.section-header .muted{font-size:13px;margin:6px 0 0}
  .reporting-view>.section-header>.ghost{min-height:40px;font-size:12px;background:#fff;border:1px solid #dbe4ee;padding:0 16px}
}
@media(min-width:601px) and (max-width:1200px){
  #appScreen>.topbar{position:static;padding:12px 18px;gap:12px}
  .header-brand{flex-basis:100%}
  .top-actions{width:100%;justify-content:flex-start}
  #appScreen>.tabs{padding:7px 18px}
}
 .component-assignment{display:grid;grid-template-columns:minmax(120px,1fr) 100px auto auto;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #d5e2ed}.component-assignment small{display:block;color:#64748b}.component-assignment label{margin:0}.component-assignment input[type=number]{width:100%}@media(max-width:600px){.component-assignment{grid-template-columns:1fr 85px}.component-assignment .check-label,.component-assignment button{justify-self:start}}

.group-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.group-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}.group-workspace>div,.group-editor{min-width:0}.group-list{max-height:370px;overflow-y:auto;display:grid;gap:6px;margin-top:12px;align-content:start}.group-entry{width:100%;text-align:left;background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:10px 12px;white-space:normal;overflow-wrap:anywhere}.group-entry strong,.group-entry small{display:block}.group-entry small{font-weight:400;color:var(--muted);margin-top:4px}.group-entry.selected{border-color:#087ea4;background:#eaf7fc}.group-editor{display:grid;gap:12px;align-content:start;padding:18px;border:1px solid var(--line);border-radius:12px}.group-editor h3{margin:0}.group-editor .vms-confirm{display:flex;align-items:center;gap:8px}.group-editor input[type=checkbox]{width:18px;min-height:18px}.group-editor textarea{width:100%;resize:vertical}.group-editor [hidden]{display:none!important}
@media(max-width:650px){.group-workspace{grid-template-columns:1fr;gap:16px}.group-list{max-height:210px}.group-editor{padding:14px}.group-tabs button{flex:1;white-space:normal}}

#productGroupsDialog{width:min(880px,calc(100vw - 24px));max-width:880px}#productGroupsDialog .admin-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.group-field-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.group-field-heading .link-btn{min-height:32px;padding:4px 8px;font-size:12px}.group-close-actions{padding:0 24px 20px}#productGroupsDialog .group-editor label{display:grid;gap:6px}#productGroupsDialog .group-editor .vms-confirm{display:flex}#productGroupsDialog .group-editor input[type=checkbox]{width:18px;height:18px;margin:0}#productGroupsDialog .group-tabs [aria-pressed=false]{background:#f1f5f9;color:#334155}

.license-notice{margin:10px 12px;padding:12px 16px;border:1px solid #f2ce79;border-radius:10px;background:#fff8e7;color:#79520b;font-size:14px;line-height:1.5;}
.license-notice[hidden]{display:none;}
