.master-screen,.settings-screen{height:100%;min-height:0;display:flex;flex-direction:column;gap:7px;font-size:12px}.master-toolbar{display:flex;flex-wrap:wrap;gap:5px}.master-toolbar button,.master-footer button,.settings-tabs button{padding:7px 10px;font-size:11px;white-space:nowrap}.master-search{display:flex;gap:10px;align-items:end}.master-search label{display:flex;align-items:center;gap:6px;margin:0}.master-search label:first-child{flex:1}.master-search input{width:100%;min-width:80px}.master-search select{max-width:180px}.master-screen input,.master-screen select,.master-form input,.master-form select,.settings-screen input,.settings-screen select{font-size:12px;padding:6px 8px;min-height:30px}.master-screen>.ledger-table{flex:1;min-height:100px;overflow:auto}.master-screen .ledger-table td,.master-screen .ledger-table th{padding:7px 8px;white-space:nowrap}.master-screen .ledger-table input,.master-screen .ledger-table select{min-width:90px;max-width:210px}.master-footer{display:flex;gap:8px;align-items:center;font-size:11px}.master-footer span:first-child{margin-right:auto}.master-help{font-size:11px;line-height:1.45;margin:3px 0 6px;color:#000}.master-dialog{max-width:min(1050px,94vw);width:900px;max-height:90vh;padding:16px}.master-dialog h2{font-size:18px;margin:0 0 10px}.master-form{display:flex;flex-direction:column;gap:7px}.master-form label,.settings-card label,.settings-access label{display:flex;flex-direction:column;gap:3px;margin:0;font-size:12px}.master-product-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px;overflow:auto}.master-product-columns fieldset{display:flex;flex-direction:column;gap:6px;border:1px solid #d7e3dc;border-radius:5px;min-width:0;padding:12px}.master-product-columns legend{font-size:12px;font-weight:600}.master-flags{background:#f3f7f4;padding:8px;display:flex;flex-direction:column;gap:6px}.master-form label.master-check{display:flex;flex-direction:row;align-items:center;gap:8px}.master-check input[type=checkbox]{width:15px;min-height:15px;height:15px;margin:0}.master-vat{display:flex;gap:12px;align-items:center;background:#f3f7f4;padding:6px}.master-vat input[type=number]{width:80px}.master-two{display:grid;grid-template-columns:1fr 1fr;gap:8px}.master-account-form{max-width:580px;margin:auto}.master-account-form small{font-size:10px;color:#000;margin-top:-4px}.master-form .dialog-actions{position:sticky;bottom:-16px;background:white;padding:10px 0 0;border-top:1px solid #d7e3dc;z-index:2}.master-dialog .ledger-table{max-height:55vh;overflow:auto}.settings-tabs{display:flex;flex-wrap:wrap;gap:3px;flex-shrink:0;border-bottom:1px solid #d7e3dc;padding-bottom:5px}.settings-tabs [aria-selected=true]{background:var(--zen-accent,#13795b);color:white}.settings-content{min-height:0;flex:1;overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start}.settings-card{padding:12px;display:flex;flex-direction:column;gap:8px;min-width:0}.settings-card h2{font-size:13px;margin:0}.settings-card p{font-size:11px;line-height:1.5;margin:3px 0}.settings-card-wide{grid-column:1/-1}.settings-card form{display:flex;flex-direction:column;gap:8px}.settings-card button{padding:7px 10px;font-size:11px}.settings-swatches{display:flex;gap:4px}.settings-swatches span{width:35px;height:20px;border-radius:3px}.settings-power{display:grid;grid-template-columns:1fr auto;gap:7px;font-size:11px}.settings-style{display:flex;gap:12px;align-items:end}.settings-style label{flex:1}.settings-style input{width:100%;max-width:150px}.settings-threshold,.settings-footer{display:flex;align-items:end;gap:10px}.settings-threshold label{max-width:200px}.settings-footer span{font-size:10px;color:#000}.settings-warning-form>.ledger-table{height:clamp(160px,34vh,400px);overflow:auto}.settings-negative{height:clamp(150px,30vh,350px);overflow:auto;margin:0;line-height:1.8}.settings-maintenance{display:flex;flex-direction:column;gap:7px}.settings-access{padding:20px;max-width:550px}.settings-access button{width:fit-content}.settings-card pre{white-space:pre-wrap;font-size:11px}#owner-password-field[hidden]{display:none}.master-screen button:disabled,.settings-screen button:disabled{cursor:not-allowed;opacity:1}
.workspace{background:var(--zen-bg,#f4f7f6);color:#000}.topbar{background:var(--zen-top,#122d25)}.sidebar{background:var(--zen-sidebar,#122d25)}.sidebar nav :is(button,a[data-module]).active,.primary{background:var(--zen-accent,#13795b)}.sidebar nav :is(button,a[data-module]).active:hover,.primary:hover{background:var(--zen-accent-dark,#0d5943)}
@media(max-width:900px){.master-product-columns,.settings-content{grid-template-columns:1fr}.master-search{flex-wrap:wrap}.settings-card-wide{grid-column:auto}.settings-power{grid-template-columns:1fr}.settings-threshold{flex-wrap:wrap}.master-dialog{width:90vw}.settings-style{flex-wrap:wrap}}
.pos-stock-warnings{padding:5px 10px;flex-shrink:0;max-height:180px;overflow:auto;background:#fff4dc;border:1px solid #efdba8;border-radius:6px;margin-bottom:6px}.pos-stock-warnings:empty{display:none}.pos-stock-warnings>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 7px;font-size:12px;line-height:1.4;padding:2px 0}.pos-stock-warnings strong{white-space:nowrap;animation:zen-warning-blink 650ms steps(2,start) infinite}.pos-stock-warnings span{white-space:normal;overflow-wrap:anywhere}@keyframes zen-warning-blink{to{opacity:.3}}@media(prefers-reduced-motion:reduce){.pos-stock-warnings strong{animation:none}}
@media(min-width:1000px){.workspace:is([data-screen=products],[data-screen=customers],[data-screen=employees],[data-screen=settings]) main{display:flex;flex-direction:column;overflow:hidden;padding:10px 14px}.workspace:is([data-screen=products],[data-screen=customers],[data-screen=employees],[data-screen=settings]) #screen{flex:1;display:flex;flex-direction:column;min-height:0;margin:0}.master-screen,.settings-screen{flex:1}}
.master-history-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;background:#f3f7f4;padding:10px}.master-history-summary>div{display:flex;flex-direction:column;gap:4px}.master-history-summary small{font-size:10px}.master-history-summary strong{font-size:18px}#master-stock-detail{white-space:pre-wrap;font-size:11px;max-height:90px;overflow:auto}
/* Employee editor: retain every field but group them to fit the desktop. */
.master-dialog:has(.employee-form){max-width:860px;padding:15px 18px}
.master-form.employee-form{max-width:none;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px}
.employee-form>label:first-child,.employee-form>.master-two,.employee-form>.employee-financial,.employee-form>#owner-password-field,.employee-form>.error,.employee-form>.dialog-actions{grid-column:1/-1}
.employee-form .employee-financial{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.employee-form label{margin:0;font-size:11px}
.employee-form input,.employee-form select{min-height:28px;height:28px;padding:4px 7px;margin-top:3px;font-size:12px}
.employee-form input[type=checkbox]{width:14px;height:14px;min-height:14px;margin:0}
.employee-form small,.employee-form .master-help{font-size:10px;line-height:1.3;margin-top:3px}
.employee-form .master-two{gap:6px 12px}
.employee-form .dialog-actions{margin-top:5px;padding-top:7px}
.employee-form .dialog-actions button{min-height:30px;padding:5px 9px}
@media(max-width:640px){.employee-form .employee-financial{grid-template-columns:1fr}.master-form.employee-form{grid-template-columns:1fr}}
/* Compact Products grid; the two identifying columns stay visible while scrolling. */
.master-screen #master-table .product-master-table{table-layout:fixed;width:1656px;min-width:1656px;border-collapse:separate;border-spacing:0}
.product-master-table .product-column-140{width:140px}.product-master-table .product-column-260{width:260px}.product-master-table .product-column-100{width:100px}.product-master-table .product-column-84{width:84px}.product-master-table .product-column-64{width:64px}
.master-screen .product-master-table th,.master-screen .product-master-table td{white-space:normal;overflow-wrap:anywhere;vertical-align:middle;padding:6px}
.master-screen .product-master-table :is(th,td):first-child{position:sticky;left:0;z-index:2;width:140px;background:var(--zen-bg,#f4f7f6)}
.master-screen .product-master-table :is(th,td):nth-child(2){position:sticky;left:140px;z-index:2;width:260px;background:var(--zen-bg,#f4f7f6);box-shadow:2px 0 0 #d7e3dc}
.master-screen .product-master-table th:nth-child(-n+2){z-index:4;background:#e6eee9}
.master-screen .product-master-table tr[aria-selected=true] td:nth-child(-n+2){background:#dcefe4}
.master-screen .product-master-table td input,.master-screen .product-master-table td select{min-width:0;max-width:100%;width:100%}
.cloud-storage-status{border:1px solid #cbded5;border-radius:6px;padding:14px;background:#f3f8f5;margin-bottom:8px}
.cloud-storage-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.cloud-storage-heading h3{font-size:13px;margin:0}
.cloud-storage-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:10px 0}.cloud-storage-metrics>div{display:flex;flex-direction:column;gap:5px;padding:12px;background:white;border:1px solid #d7e3dc;border-radius:5px}.cloud-storage-metrics span{font-size:12px}.cloud-storage-metrics strong{font-size:22px}
.cloud-storage-status small{display:block;font-size:11px;line-height:1.5}.cloud-backup-details{display:grid;grid-template-columns:minmax(140px,180px) minmax(0,1fr);gap:7px 12px;font-size:12px}.cloud-backup-details dt{font-weight:600}.cloud-backup-details dd{margin:0;overflow-wrap:anywhere}
@media(max-width:650px){.cloud-storage-metrics{grid-template-columns:1fr}.cloud-storage-heading{flex-wrap:wrap}.cloud-backup-details{grid-template-columns:1fr}.cloud-backup-details dd{margin-bottom:7px}}

/* SariCloud barcode labels */
dialog.bc-wide{width:min(1180px,calc(100vw - 24px));max-width:none}
.bc-dialog h2{margin:0 0 10px}
.bc-columns{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px}
.bc-field{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;margin-bottom:8px}
.bc-small{max-width:150px}
.bc-row{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}
.bc-row[hidden]{display:none}
.bc-results{display:flex;flex-direction:column;border:1px solid #D3E5D7;border-radius:6px;max-height:220px;overflow:auto;background:#fff;margin-bottom:8px}
.bc-results[hidden]{display:none}
.bc-results button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;border:0;border-bottom:1px solid #E4E1D8;border-radius:0;background:#fff;padding:7px 10px}
.bc-results button:hover{background:#F3F8F3}
.bc-results small{opacity:.75}
.bc-picked{max-height:300px;overflow:auto;margin-bottom:8px}
.bc-picked input{width:80px}
.bc-empty{padding:12px;text-align:center;color:#5D7A6B;font-size:12px}
.bc-checks{display:flex;gap:14px;flex-wrap:wrap;font-size:13px;margin:4px 0 8px}
.bc-summary{font-weight:700;margin:4px 0 8px}
.bc-preview-box{border:1px solid #D3E5D7;border-radius:6px;background:#EEF2EF;padding:10px;height:340px;overflow:hidden;display:flex;justify-content:center}
.bc-preview .bc-sheet{background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.18);transform:scale(.42);transform-origin:top center}
.bc-preview.paper-folio .bc-sheet{transform:scale(.34)}
dialog.bc-wide{max-height:calc(100vh - 24px);overflow:auto}
.bc-dialog .dialog-actions{position:sticky;bottom:-1px;background:#fff;padding-top:10px}
@media(max-width:820px){.bc-columns{grid-template-columns:1fr}.bc-preview-box{height:300px}.bc-preview .bc-sheet{transform:scale(.36)}}
/* the label sheet (screen preview and print use the same layout) */
.bc-print .bc-sheet{display:grid;grid-template-columns:repeat(var(--bc-cols,3),minmax(0,1fr));grid-template-rows:repeat(var(--bc-rows,7),minmax(0,1fr));box-sizing:border-box;overflow:hidden;color:#000}
.bc-print.paper-a4 .bc-sheet{width:198mm;height:284mm}
.bc-print.paper-letter .bc-sheet{width:203.9mm;height:266.4mm}
.bc-print.paper-folio .bc-sheet{width:203.9mm;height:317.2mm}
.bc-label{container-type:size;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.6mm;padding:1.2mm 1.6mm;box-sizing:border-box;overflow:hidden;text-align:center;min-width:0;min-height:0}
.bc-print.guides .bc-label{outline:.2mm dashed #B8B8B8;outline-offset:-.1mm}
.bc-name{flex:0 0 auto;font:600 clamp(5pt,10cqh,14pt)/1.15 Arial,Helvetica,sans-serif;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%}
.bc-bars{display:block;width:100cqw;height:clamp(5mm,40cqh,45mm);fill:#000;flex:0 0 auto}
.bc-digits{flex:0 0 auto;font:clamp(5pt,8cqh,12pt)/1 'Courier New',monospace;letter-spacing:.06em}
.bc-price{flex:0 0 auto;font:800 clamp(6pt,13cqh,26pt)/1 Arial,Helvetica,sans-serif}
@page bc-a4{size:A4 portrait;margin:6mm}
@page bc-letter{size:letter portrait;margin:6mm}
@page bc-folio{size:8.5in 13in;margin:6mm}
@media print{
  body.barcode-printing #print-area .paper-a4{page:bc-a4}
  body.barcode-printing #print-area .paper-letter{page:bc-letter}
  body.barcode-printing #print-area .paper-folio{page:bc-folio}
  body.barcode-printing #print-area .bc-sheet{break-after:page}
  body.barcode-printing #print-area .bc-sheet:last-child{break-after:auto}
  body.barcode-printing .bc-print.guides .bc-label{outline-color:#C8C8C8}
}

/* SariCloud Settings: Store Info and Printer */
.settings-store{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:start}
.settings-store-fields{display:flex;flex-direction:column;gap:9px;max-width:620px}
.settings-store-fields label{display:flex;flex-direction:column;gap:4px;font-weight:700}
.settings-store-fields textarea{font:inherit;padding:8px;border:1px solid #CFCBC0;border-radius:6px;resize:vertical}
.settings-store-fields h3,.settings-receipt-preview h3,.settings-printer-help h3{margin:6px 0 2px;font-size:13px}
.settings-store-fields .settings-check{flex-direction:row;align-items:center;gap:8px;font-weight:600}
.settings-note{color:#5D7A6B;margin:0}
.settings-receipt-preview{position:sticky;top:0}
.settings-receipt-preview pre{margin:0;padding:14px 12px;background:#fff;border:1px solid #D3E5D7;border-radius:4px;box-shadow:0 2px 10px rgba(0,0,0,.08);font:12px/1.35 'Courier New',monospace;white-space:pre;width:max-content;max-width:100%;overflow:auto}
.settings-printer-help{margin-top:8px;padding:10px 12px;background:#F3F8F3;border:1px solid #D3E5D7;border-radius:6px}
.settings-printer-help ol{margin:4px 0 6px;padding-left:18px;display:flex;flex-direction:column;gap:5px}
.settings-printer-help code{background:#fff;border:1px solid #D3E5D7;border-radius:4px;padding:0 4px}
@media(max-width:900px){.settings-store{grid-template-columns:1fr}.settings-receipt-preview{position:static}}
.settings-card form.settings-store{display:grid;grid-template-columns:minmax(0,620px) minmax(0,1fr);gap:24px;align-items:start}
.settings-card .settings-store-fields label.settings-check{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px;font-weight:600}
.settings-card .settings-store-fields label.settings-check input{width:18px;height:18px;min-height:0;margin:0;flex:0 0 auto}
.settings-card .settings-store-fields button.primary{align-self:flex-start;padding:9px 18px}
@media(max-width:900px){.settings-card form.settings-store{grid-template-columns:1fr}}
