:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#17342d;background:#f3f6f5;--green:#176b52;--green2:#248765;--line:#dbe5e1;--muted:#6d7f78;--red:#b42318;--amber:#9a6700}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}textarea{min-height:88px;resize:vertical}.login{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#eaf5f0,#f8faf9)}.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:30px;box-shadow:0 22px 60px #174f3d1f}.brand{display:flex;gap:12px;align-items:center}.logo{width:48px;height:48px;border-radius:16px;background:var(--green);color:white;display:grid;place-items:center;font-weight:800}.brand h1{font-size:22px;margin:0}.brand p{margin:4px 0;color:var(--muted)}.brand-sub{font-size:12px;color:#abd3c5}.field{margin-top:14px}.field label{display:block;font-size:13px;font-weight:700;margin-bottom:7px}.field input,.field select,.field textarea,.toolbar input,.pos-top input,.pos-top select,.line-add input,.line-add select{width:100%;padding:12px 13px;border:1px solid var(--line);border-radius:12px;outline:none;background:white}.field input:focus,.field select:focus,.field textarea:focus,.toolbar input:focus{border-color:var(--green2);box-shadow:0 0 0 3px #2487651a}.primary,.secondary,.logout,.tiny{border-radius:11px;padding:11px 14px;font-weight:700}.primary{width:100%;border:0;background:var(--green);color:white;margin-top:18px}.primary:hover{background:#115740}.primary.auto{width:auto;margin-top:0}.primary:disabled{opacity:.55;cursor:not-allowed}.secondary{border:1px solid var(--line);background:white;color:#17342d}.secondary:hover{border-color:#a9c2b8}.secondary.full{width:100%;margin-top:10px}.hint{margin-top:16px;background:#f2f8f5;border-radius:12px;padding:12px;font-size:13px}.error{color:var(--red);margin-top:12px}.shell{min-height:100vh;display:grid;grid-template-columns:260px 1fr}.sidebar{background:#113f34;color:white;padding:20px 14px;position:sticky;top:0;height:100vh;overflow:auto}.sidebar .brand{padding:4px 8px 20px}.nav button{display:flex;width:100%;border:0;background:transparent;color:#d8ece5;padding:11px 13px;border-radius:11px;text-align:left;margin:2px 0}.nav button.active,.nav button:hover{background:#ffffff18;color:#fff}.main{min-width:0}.topbar{height:70px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px;position:sticky;top:0;z-index:6}.topbar-left,.topbar-user{display:flex;gap:10px;align-items:center}.content{padding:24px;max-width:1550px;margin:auto}.page-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.page-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.title h2{margin:0}.title p{margin:5px 0;color:var(--muted)}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:20px}.card{background:white;border:1px solid var(--line);border-radius:18px;padding:19px}.metric{font-size:28px;font-weight:800;margin-top:10px}.metric small{font-size:13px;color:var(--muted)}.muted{color:var(--muted)}.small{font-size:12px}.compact-cards{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}.report-cards{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.dashboard-cards{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}.table-wrap{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:auto;margin-top:16px}.rows{width:100%;border-collapse:collapse;min-width:720px}.rows th,.rows td{padding:13px 15px;text-align:left;border-bottom:1px solid #edf1ef;vertical-align:top}.rows th{font-size:12px;color:var(--muted);text-transform:uppercase;white-space:nowrap}.rows tbody tr:hover{background:#fafcfb}.toolbar{display:flex;gap:14px;align-items:center;margin-top:18px}.toolbar input{max-width:520px}.loader,.empty,.error-card{background:white;border:1px solid var(--line);border-radius:18px;padding:28px;text-align:center;color:var(--muted);margin-top:20px}.error-card{color:var(--red)}.quick,.note-card,.ai-card,.doc-builder{background:white;border:1px solid var(--line);border-radius:18px;padding:20px;margin-top:22px}.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.quick-grid button{border:1px solid var(--line);background:#f8fbfa;border-radius:14px;padding:18px;font-weight:750}.quick-grid button:hover{border-color:var(--green);color:var(--green)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.span-2{grid-column:span 2}.checks,.check{display:flex;gap:18px;align-items:center;margin-top:14px}.checks label,.check{font-weight:650}.modal-backdrop{position:fixed;inset:0;background:#0e2922a8;display:grid;place-items:center;padding:20px;z-index:50}.modal{width:min(560px,100%);max-height:92vh;overflow:auto;background:white;border-radius:20px;box-shadow:0 30px 80px #0004}.modal.wide{width:min(840px,100%)}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:1}.modal-head h3{margin:0}.modal-body{padding:6px 20px 20px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:16px 20px;border-top:1px solid var(--line);position:sticky;bottom:0;background:white}.icon-btn{border:0;background:#edf4f1;border-radius:10px;min-width:34px;height:34px;font-size:20px}.icon-btn.danger{color:var(--red)}#toasts{position:fixed;right:20px;top:86px;z-index:100;display:grid;gap:10px}.toast{background:#17342d;color:white;padding:13px 16px;border-radius:12px;box-shadow:0 14px 40px #0003;max-width:420px}.toast.error{background:var(--red)}.danger-text{color:var(--red);font-weight:750}.success-text{color:var(--green);font-weight:750}.line-add{display:grid;grid-template-columns:2fr .7fr .8fr auto;gap:10px;margin-top:18px}.doc-footer{display:flex;justify-content:space-between;align-items:center;margin-top:16px;padding-top:16px;border-top:1px solid var(--line);font-size:18px}.section-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:18px;margin-top:18px}.subhead{display:flex;justify-content:space-between;align-items:center}.tiny{border:1px solid var(--line);background:#fff;padding:7px 10px}.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:18px;margin-top:18px}.pos-products,.receipt{background:white;border:1px solid var(--line);border-radius:18px;padding:18px}.receipt{position:sticky;top:88px;height:fit-content;max-height:calc(100vh - 105px);overflow:auto}.pos-top{display:grid;grid-template-columns:1fr 240px;gap:12px}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-top:16px}.product-card{border:1px solid var(--line);background:white;border-radius:16px;padding:14px;text-align:left;display:flex;flex-direction:column;gap:5px;min-height:160px}.product-card:hover{border-color:var(--green2);box-shadow:0 8px 24px #174f3d12}.product-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#e6f3ee;color:var(--green);font-size:22px}.product-card span,.product-card small{color:var(--muted)}.product-card strong{font-size:17px;margin-top:auto}.cart-line{display:grid;grid-template-columns:1fr auto;gap:8px;padding:13px 0;border-bottom:1px solid var(--line)}.cart-line>b{grid-column:2}.cart-controls{display:flex;align-items:center;gap:6px}.cart-controls button{width:30px;height:30px;border:1px solid var(--line);background:white;border-radius:8px}.cart-controls button.danger{color:var(--red)}.receipt-totals{margin-top:12px}.receipt-totals>div:not(.field){display:flex;justify-content:space-between;gap:10px;padding:9px 0}.ai-card{max-width:900px}.ai-card #ai-messages{height:420px;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:8px}.ai-msg{max-width:80%;padding:13px 15px;border-radius:16px;line-height:1.45}.ai-msg.bot{background:#edf5f2;align-self:flex-start}.ai-msg.user{background:var(--green);color:white;align-self:flex-end}.ai-card form{display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:14px}.ai-card form input{border:1px solid var(--line);border-radius:12px;padding:13px}.mobile-menu{display:none;border:0;background:transparent;font-size:24px}.logout{border:1px solid var(--line);background:white;padding:9px 12px}.status{font-size:13px;color:var(--green);font-weight:700}
@media(max-width:1100px){.cards{grid-template-columns:repeat(2,1fr)}.pos-layout{grid-template-columns:1fr}.receipt{position:static;max-height:none}.section-grid{grid-template-columns:1fr}}
@media(max-width:760px){.shell{grid-template-columns:1fr}.sidebar{position:fixed;z-index:20;left:-280px;width:260px;transition:.2s}.sidebar.open{left:0}.mobile-menu{display:block}.topbar{padding:0 14px}.topbar-user .muted{display:none}.content{padding:14px}.page-head{flex-direction:column}.page-actions{width:100%;justify-content:stretch}.page-actions button{flex:1}.cards,.quick-grid,.form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.toolbar{flex-direction:column;align-items:stretch}.toolbar input{max-width:none}.rows{min-width:0}.rows thead{display:none}.rows,.rows tbody,.rows tr,.rows td{display:block;width:100%}.rows tr{padding:10px 14px;border-bottom:1px solid var(--line)}.rows td{border:0;padding:5px 0}.rows td:before{content:attr(data-label);display:block;font-size:11px;color:var(--muted);text-transform:uppercase}.table-wrap{overflow:visible}.line-add{grid-template-columns:1fr}.doc-footer{align-items:flex-end;gap:12px}.pos-top{grid-template-columns:1fr}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-card{min-height:150px}.receipt{padding:14px}.ai-card form{grid-template-columns:1fr}.modal-backdrop{padding:8px}.modal{max-height:96vh;border-radius:16px}.toast{max-width:calc(100vw - 28px)}#toasts{right:14px;top:78px}}
@media(max-width:430px){.product-grid{grid-template-columns:1fr 1fr}.product-card{padding:11px}.metric{font-size:24px}}
.inline-field{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.compact{padding:8px 10px!important;min-height:38px}.ghost{border:1px dashed var(--green);background:#f5fbf8;color:var(--green);padding:10px 12px;border-radius:10px;font-weight:700}.report-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.report-tabs button{border:1px solid var(--line);background:white;padding:10px 14px;border-radius:10px;font-weight:700}.report-tabs button.active{background:var(--green);color:white;border-color:var(--green)}.report-filter{display:flex;gap:12px;align-items:end;flex-wrap:wrap;background:white;border:1px solid var(--line);padding:14px;border-radius:14px;margin-bottom:16px}.report-filter label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}.report-filter input{border:1px solid var(--line);border-radius:9px;padding:9px 10px}.metric-banner{background:#edf7f3;border:1px solid #cfe7de;border-radius:12px;padding:14px 16px;margin-bottom:16px;font-size:18px}.receipt input[inputmode="decimal"],.field input[inputmode="decimal"]{font-variant-numeric:tabular-nums}
@media(max-width:760px){.inline-field{grid-template-columns:1fr}.report-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.report-filter{display:grid;grid-template-columns:1fr}.report-filter .primary{width:100%}}
.inline-field{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.field-help{margin-top:7px;font-size:12px;line-height:1.35;color:var(--muted)}.catalog-check{width:20px;height:20px;accent-color:var(--green)}.row-actions{display:flex;gap:7px;flex-wrap:wrap}.label-options{display:flex;flex-wrap:wrap;gap:10px 14px}.label-options label{font-size:13px;font-weight:600}.label-list{margin-top:16px;border:1px solid var(--line);border-radius:14px;overflow:hidden}.label-row{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line)}.label-row:last-child{border-bottom:0}.label-row label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700}.label-row input{width:90px;padding:9px;border:1px solid var(--line);border-radius:9px}.barcode-svg{display:block;width:100%;height:100%}
@media(max-width:760px){.inline-field{grid-template-columns:1fr}.label-row{grid-template-columns:1fr}.label-row label{justify-content:space-between}.row-actions{margin-top:4px}}
.danger-outline{border-color:#efb6b2!important;color:var(--red)!important}.extra-wide{width:min(1180px,98vw)!important}.doc-total{margin-top:16px;margin-left:auto;max-width:360px}.doc-total>div{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid var(--line)}.doc-total .grand{font-size:18px}.inventory-actual,.inventory-reason{width:100%;min-width:120px;padding:9px;border:1px solid var(--line);border-radius:9px}.receipt-print h3{margin-top:0}@media(max-width:760px){.extra-wide{width:100%!important}.inventory-actual,.inventory-reason{min-width:0}}


/* v6: поиск-подсказки, вкладки склада и цены */
.lookup{position:relative}.lookup-results{position:absolute;z-index:60;left:0;right:0;top:calc(100% + 4px);background:#fff;border:1px solid #ccd9d4;border-radius:12px;box-shadow:0 14px 34px rgba(17,54,44,.18);max-height:280px;overflow:auto}.lookup-results:empty{display:none}.lookup-option{display:block;width:100%;padding:10px 12px;text-align:left;border:0;border-bottom:1px solid #edf2f0;background:#fff;cursor:pointer}.lookup-option:hover{background:#edf7f3}.lookup-option:last-child{border-bottom:0}.lookup-locked{background:#eef8f4!important;border-color:#1f8a68!important}.stock-tabs,.price-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.stock-tabs button,.price-tabs button{border:1px solid #cfdbd7;background:#fff;border-radius:10px;padding:9px 13px;font-weight:700}.stock-tabs button.active,.price-tabs button.active{background:#176b52;color:#fff;border-color:#176b52}.inline-summary{display:flex;gap:18px;flex-wrap:wrap;padding:12px 16px;background:#f5f9f7;border:1px solid #dce6e2;border-radius:12px;margin:12px 0}.doc-items{margin-top:8px;padding:8px 10px;background:#f7faf9;border-radius:8px}.help-box{background:#f4f8f6;border-left:4px solid #176b52;padding:10px 12px;border-radius:8px;color:#4f665e}.price-input{min-width:105px}.lookup-line{display:grid;grid-template-columns:minmax(240px,1fr) 130px 140px auto;gap:10px;align-items:end}@media(max-width:800px){.lookup-line{grid-template-columns:1fr 1fr}.lookup-line .lookup{grid-column:1/-1}}

/* v7: общий поиск, надёжные подсказки и адаптивные карточки */
.lookup-clear{margin-top:7px;border:0;background:transparent;color:var(--green);font-weight:750;padding:4px 0}.lookup-clear[hidden]{display:none}.lookup input[readonly]{cursor:default}.v7-searchbar{display:grid;grid-template-columns:minmax(260px,1fr) 190px auto auto;gap:10px;align-items:end;margin:16px 0;padding:13px;background:#fff;border:1px solid var(--line);border-radius:14px}.v7-searchbar .field{margin:0}.v7-search-count{align-self:center;white-space:nowrap}.price-order-toolbar,.v7-modal-search{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:9px;align-items:center;margin:14px 0}.price-order-toolbar input,.v7-modal-search input{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px}.price-editor-list,.history-card-list{display:grid;gap:12px}.price-editor-card,.history-doc{border:1px solid var(--line);border-radius:14px;padding:14px;background:#fff}.price-editor-title{display:flex;gap:10px;align-items:flex-start}.price-editor-title>input{width:20px;height:20px;accent-color:var(--green);margin-top:2px}.price-editor-title span{display:grid;gap:3px}.price-editor-title small,.history-doc small{display:block;color:var(--muted)}.price-editor-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.price-editor-grid .field{margin-top:12px}.history-doc-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:10px}.history-items{display:grid;gap:7px;padding:10px 0}.history-items>div{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:start}.history-items small{margin-top:2px}.history-summary-grid,.document-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.history-summary-grid>div,.document-summary>div{background:#f5f9f7;border-radius:9px;padding:9px;display:grid;gap:3px}.history-summary-grid span,.document-summary span{font-size:11px;text-transform:uppercase;color:var(--muted)}.document-summary{margin-bottom:12px;grid-template-columns:1fr 2fr}
@media(max-width:900px){.price-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.history-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v7-searchbar{grid-template-columns:1fr 170px auto}.v7-search-count{grid-column:1/-1}}
@media(max-width:760px){.v7-searchbar{grid-template-columns:1fr}.v7-date-field,.v7-searchbar .secondary{width:100%}.price-order-toolbar,.v7-modal-search{grid-template-columns:1fr}.price-order-toolbar button,.v7-modal-search button{width:100%}.price-editor-grid{grid-template-columns:1fr 1fr}.history-doc-head{display:grid}.history-items>div{grid-template-columns:1fr auto}.history-items>div>b{grid-column:2}.document-summary{grid-template-columns:1fr}.modal.wide{width:100%}}
@media(max-width:480px){.price-editor-grid,.history-summary-grid{grid-template-columns:1fr}.history-items>div{grid-template-columns:1fr}.history-items>div>b{grid-column:auto}.price-editor-card,.history-doc{padding:12px}}

/* v8: точечный выбор товара, голосовой ИИ */
.v8-product-picker{position:relative;margin:14px 0;padding:14px;border:1px solid var(--line,#d8e2de);border-radius:14px;background:#f7faf9}
.v8-product-picker .lookup-results{position:absolute;left:14px;right:14px;top:78px;z-index:30;max-height:280px;overflow:auto;background:#fff;border-radius:12px;box-shadow:0 12px 30px rgba(16,52,43,.18)}
.v8-selected-head{display:flex;justify-content:space-between;align-items:center;margin:16px 0 8px}
.v8-selected-price-list{display:grid;gap:12px;max-height:48vh;overflow:auto;padding-right:4px}
.v8-price-card{border:1px solid var(--line,#d8e2de);border-radius:14px;padding:14px;background:#fff}
.v8-price-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.v8-price-card-head small{display:block;color:#667c73;margin-top:3px}
.v8-ai-compose{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
.v8-ai-options{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:8px}
.v8-ai-options select{width:auto;min-width:120px}
.v8-mic-button.listening{background:#8c2d2d;color:#fff;border-color:#8c2d2d}
@media(max-width:700px){
  .v8-ai-compose{grid-template-columns:1fr 1fr}.v8-ai-compose input{grid-column:1/-1}.v8-ai-compose button{width:100%}
  .v8-price-card-head{flex-direction:column}.v8-price-card-head button{width:100%}
  .v8-selected-price-list{max-height:none;overflow:visible}
  .v8-product-picker .lookup-results{max-height:45vh}
}
/* Server Edition: пользователи и права */
.server-admin-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:18px;align-items:start}.permission-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.perm-group{border:1px solid var(--border,#d7e3df);border-radius:12px;padding:10px;background:#fbfdfc}.perm-group summary{font-weight:800;cursor:pointer}.perm-list{display:grid;gap:7px;margin-top:10px}.perm-override{display:grid;grid-template-columns:minmax(0,1fr) 140px;gap:8px;align-items:center}.advanced-rights{margin-top:16px;border:1px solid var(--border,#d7e3df);border-radius:12px;padding:12px}.advanced-rights>summary{font-weight:800;cursor:pointer}.topbar-user>div{text-align:right}@media(max-width:900px){.server-admin-grid,.permission-editor{grid-template-columns:1fr}.perm-override{grid-template-columns:1fr}.topbar-user .muted{display:none}}

/* Mobile Stage 1: phone navigation, customer autocomplete and mobile POS */
.mobile-sidebar-head{display:flex;align-items:center;justify-content:space-between}.mobile-sidebar-close{display:none}.sidebar-overlay{display:none}.mobile-bottom-nav{display:none}.pwa-install-button{display:none}.pwa-install-available .pwa-install-button{display:inline-flex}.pos-search-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.pos-scan-button{white-space:nowrap}.customer-picker-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start}.customer-lookup-option{display:grid;width:100%;gap:3px;text-align:left;border:0;border-bottom:1px solid #edf2f0;background:#fff;padding:11px 12px}.customer-lookup-option:hover{background:#edf7f3}.customer-lookup-option span,.customer-lookup-option small{color:var(--muted);font-size:12px}.lookup-empty{padding:13px;color:var(--muted);font-size:13px}.customer-anonymous{border:0;background:transparent;color:var(--green);font-weight:750;padding:8px 0}.mobile-receipt-close,.mobile-cart-bar,.receipt-mobile-overlay{display:none}.barcode-scanner-modal{width:min(520px,100%);background:#fff;border-radius:18px;overflow:hidden;padding-bottom:16px}.scanner-video-wrap{position:relative;background:#07110e;aspect-ratio:3/4;max-height:68vh}.scanner-video-wrap video{width:100%;height:100%;object-fit:cover}.scanner-frame{position:absolute;left:10%;right:10%;top:38%;height:24%;border:3px solid #6ef2bd;border-radius:14px;box-shadow:0 0 0 9999px #0005}.scanner-help{text-align:center;padding:0 16px}.barcode-scanner-modal>.secondary{width:calc(100% - 32px);margin:0 16px}.mobile-sidebar-head>.brand{flex:1}
@media(max-width:760px){
  body{padding-bottom:70px}.content{padding-bottom:92px}.sidebar{width:min(86vw,320px);left:-340px;box-shadow:18px 0 44px #0004}.sidebar.open{left:0}.sidebar-overlay{display:block;position:fixed;inset:0;background:#0d2c24a8;z-index:19;opacity:0;pointer-events:none;transition:.2s}.sidebar-overlay.show{opacity:1;pointer-events:auto}.mobile-sidebar-head{position:sticky;top:0;background:#113f34;z-index:2;padding-bottom:10px}.mobile-sidebar-close{display:grid;color:#fff;background:#ffffff18}.topbar{height:62px}.topbar-left>div{max-width:52vw}.topbar-left b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar-user>div{display:none}.topbar-user .logout{padding:8px 10px}.pwa-install-button{padding:8px 10px}.mobile-bottom-nav{position:fixed;display:grid;grid-template-columns:repeat(5,1fr);left:0;right:0;bottom:0;height:68px;background:#fff;border-top:1px solid var(--line);z-index:18;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -8px 24px #17342d12}.mobile-bottom-nav button{border:0;background:#fff;color:#657a72;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px 2px}.mobile-bottom-nav button span{font-size:20px;line-height:1}.mobile-bottom-nav button small{font-size:10px}.mobile-bottom-nav button.active{color:var(--green);font-weight:800}.page-head{gap:8px}.title h2{font-size:23px}.title p{font-size:13px}.mobile-pos-layout{display:block;margin-top:12px}.pos-products{padding:12px;border-radius:14px}.mobile-pos-top{display:grid;gap:8px;position:sticky;top:62px;z-index:5;background:#fff;padding-bottom:10px}.pos-search-wrap{grid-template-columns:minmax(0,1fr) 48px}.pos-scan-button{font-size:0;padding:10px}.pos-scan-button::before{content:'▣';font-size:22px}.product-grid{gap:8px;margin-top:8px}.product-card{min-height:132px;padding:10px;border-radius:13px}.product-card .product-icon{width:34px;height:34px}.product-card b{font-size:14px}.product-card strong{font-size:15px}.product-card span,.product-card small{font-size:11px}.mobile-receipt{display:block;position:fixed;z-index:42;left:0;right:0;bottom:-105%;top:auto;max-height:92vh;border-radius:22px 22px 0 0;padding:16px 14px calc(18px + env(safe-area-inset-bottom));transition:bottom .22s ease;overflow:auto}.mobile-receipt.mobile-open{bottom:0}.mobile-receipt-head{display:flex;align-items:center;justify-content:space-between;position:sticky;top:-16px;background:#fff;z-index:3;padding:10px 0}.mobile-receipt-head h3{margin:0}.mobile-receipt-close{display:grid}.receipt-mobile-overlay{display:block;position:fixed;inset:0;background:#0b251e99;z-index:41;opacity:0;pointer-events:none;transition:.2s}.receipt-mobile-overlay.show{opacity:1;pointer-events:auto}.receipt-open{overflow:hidden}.mobile-cart-bar{display:flex;position:fixed;z-index:17;left:10px;right:10px;bottom:76px;border:0;background:var(--green);color:#fff;border-radius:15px;padding:12px 14px;align-items:center;justify-content:space-between;gap:10px;box-shadow:0 12px 30px #0e4d3a55}.mobile-cart-bar>span:first-child{display:grid;text-align:left}.mobile-cart-bar small{font-weight:400;opacity:.85}.customer-picker-row{grid-template-columns:1fr}.customer-picker-row>.secondary{width:100%}.customer-lookup-results{max-height:38vh}.cart-line{grid-template-columns:1fr auto}.cart-controls button{width:36px;height:36px}.receipt-totals .field input,.receipt-totals .field select{min-height:48px}.receipt .primary{min-height:52px;font-size:17px}.barcode-scanner-modal{height:100%;border-radius:0}.modal-backdrop:has(.barcode-scanner-modal){padding:0}.scanner-video-wrap{max-height:none;height:72vh;aspect-ratio:auto}
}
@media(max-width:430px){.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-card{min-width:0}.status{font-size:11px}.topbar-left>div{max-width:48vw}}


/* Mobile Stage 1.1.1: keep the normal desktop layout on mouse/desktop devices,
   even when browser zoom or Windows scaling makes the CSS viewport narrow. */
html.bmn-desktop body{padding-bottom:0!important}
html.bmn-desktop .shell{display:grid!important;grid-template-columns:260px minmax(0,1fr)!important}
html.bmn-desktop .sidebar{position:sticky!important;top:0!important;left:auto!important;width:auto!important;height:100vh!important;transition:none!important;box-shadow:none!important;z-index:auto!important}
html.bmn-desktop .mobile-sidebar-head{display:block!important;position:static!important;padding:0!important;background:transparent!important}
html.bmn-desktop .mobile-sidebar-head>.brand{padding:4px 8px 20px!important}
html.bmn-desktop .mobile-menu,
html.bmn-desktop .mobile-sidebar-close,
html.bmn-desktop .sidebar-overlay,
html.bmn-desktop .mobile-bottom-nav,
html.bmn-desktop .mobile-cart-bar,
html.bmn-desktop .receipt-mobile-overlay{display:none!important}
html.bmn-desktop .topbar{height:70px!important;padding:0 26px!important}
html.bmn-desktop .topbar-left>div{max-width:none!important}
html.bmn-desktop .topbar-user>div{display:block!important}
html.bmn-desktop .content{padding:24px!important;padding-bottom:24px!important}
html.bmn-desktop .page-head{display:flex!important;flex-direction:row!important;justify-content:space-between!important}
html.bmn-desktop .page-actions{width:auto!important;justify-content:flex-end!important}
html.bmn-desktop .page-actions button{flex:0 0 auto!important}
html.bmn-desktop .toolbar{flex-direction:row!important;align-items:center!important}
html.bmn-desktop .toolbar input{max-width:520px!important}
html.bmn-desktop .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html.bmn-desktop .span-2{grid-column:span 2!important}
html.bmn-desktop .line-add{grid-template-columns:2fr .7fr .8fr auto!important}
html.bmn-desktop .pos-top{grid-template-columns:1fr 240px!important;position:static!important}
html.bmn-desktop .mobile-pos-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 390px!important;gap:18px!important;align-items:start!important}
html.bmn-desktop .mobile-receipt{display:block!important;position:sticky!important;top:88px!important;left:auto!important;right:auto!important;bottom:auto!important;inset:auto!important;height:fit-content!important;max-height:calc(100vh - 105px)!important;border-radius:18px!important;padding:18px!important;overflow:auto!important;transition:none!important}
html.bmn-desktop .mobile-receipt-head{position:static!important;padding:0!important}
html.bmn-desktop .product-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))!important}
html.bmn-desktop .product-card{min-height:160px!important;padding:14px!important}
html.bmn-desktop .customer-picker-row{grid-template-columns:minmax(0,1fr) auto!important}
html.bmn-desktop .customer-picker-row>.secondary{width:auto!important}
html.bmn-desktop .rows{display:table!important;width:100%!important;min-width:720px!important}
html.bmn-desktop .rows thead{display:table-header-group!important}
html.bmn-desktop .rows tbody{display:table-row-group!important}
html.bmn-desktop .rows tr{display:table-row!important;padding:0!important}
html.bmn-desktop .rows th,
html.bmn-desktop .rows td{display:table-cell!important;width:auto!important;padding:13px 15px!important;border-bottom:1px solid #edf1ef!important}
html.bmn-desktop .rows td:before{display:none!important;content:none!important}
html.bmn-desktop .table-wrap{overflow:auto!important}
html.bmn-desktop .modal-backdrop{padding:20px!important}
html.bmn-desktop .modal{max-height:92vh!important;border-radius:20px!important}

/* Mobile Stage 1.1.2: restore desktop POS split layout */
html.bmn-desktop .pos-products{min-width:0!important}
html.bmn-desktop .mobile-receipt-close{display:none!important}
@media(min-width:901px){html.bmn-desktop .mobile-pos-layout{grid-template-columns:minmax(0,1fr) 390px!important}}

/* Mobile Stage 2: purchases, stock, returns, inventory, debts, expenses and reports */
html.bmn-phone .mobile-stage2-page{padding-left:10px;padding-right:10px}
html.bmn-phone .mobile-stage2-page .page-head{margin-bottom:12px}
html.bmn-phone .mobile-stage2-page .page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html.bmn-phone .mobile-stage2-page .page-actions>*{width:100%!important;min-height:44px;margin:0!important}
html.bmn-phone .mobile-stage2-page .page-actions.mobile-many-actions>*:last-child:nth-child(odd){grid-column:1/-1}
html.bmn-phone .v7-searchbar{position:sticky;top:62px;z-index:8;padding:10px;margin:10px 0 12px;border-radius:13px;box-shadow:0 7px 22px #17342d14}
html.bmn-phone .v7-searchbar .field{margin:0}
html.bmn-phone .v7-searchbar input{min-height:44px}
html.bmn-phone .mobile-card-table{border:0;background:transparent;border-radius:0;overflow:visible;margin-top:10px}
html.bmn-phone .mobile-card-table .rows{display:block;min-width:0;background:transparent}
html.bmn-phone .mobile-card-table .rows thead{display:none}
html.bmn-phone .mobile-card-table .rows tbody{display:grid;gap:10px}
html.bmn-phone .mobile-card-table .rows tr.mobile-data-card{display:block;background:#fff;border:1px solid var(--line);border-radius:15px;padding:10px 12px;box-shadow:0 5px 18px #17342d0b}
html.bmn-phone .mobile-card-table .rows tr.mobile-data-card[hidden]{display:none}
html.bmn-phone .mobile-card-table .rows td{display:grid!important;grid-template-columns:minmax(92px,34%) minmax(0,1fr);gap:9px;align-items:start;width:100%!important;padding:6px 0!important;border:0!important;overflow-wrap:anywhere}
html.bmn-phone .mobile-card-table .rows td::before{content:attr(data-label);display:block;font-size:10px;line-height:1.25;color:var(--muted);text-transform:uppercase;font-weight:750}
html.bmn-phone .mobile-card-table .rows td.mobile-empty-cell{display:none!important}
html.bmn-phone .mobile-card-table .rows td.mobile-input-cell{grid-template-columns:1fr}
html.bmn-phone .mobile-card-table .rows td.mobile-input-cell::before{margin-bottom:3px}
html.bmn-phone .mobile-card-table .rows td.mobile-actions-cell{display:block!important;padding-top:10px!important;border-top:1px solid #edf2ef!important;margin-top:5px}
html.bmn-phone .mobile-card-table .row-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
html.bmn-phone .mobile-card-table .row-actions>*{width:100%;min-height:40px}
html.bmn-phone .mobile-card-table td.mobile-actions-cell>button,
html.bmn-phone .mobile-card-table td.mobile-actions-cell>a{width:100%;min-height:42px}
html.bmn-phone .stock-tabs,html.bmn-phone .report-tabs,html.bmn-phone .price-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:7px;margin:10px -10px 12px;padding:0 10px 6px;scrollbar-width:none}
html.bmn-phone .stock-tabs::-webkit-scrollbar,html.bmn-phone .report-tabs::-webkit-scrollbar,html.bmn-phone .price-tabs::-webkit-scrollbar{display:none}
html.bmn-phone .stock-tabs button,html.bmn-phone .report-tabs button,html.bmn-phone .price-tabs button{flex:0 0 auto;white-space:nowrap;min-height:42px}
html.bmn-phone .mobile-document-builder{padding:12px;border-radius:15px;margin-top:10px}
html.bmn-phone .mobile-document-builder .form-grid{display:grid;grid-template-columns:1fr}
html.bmn-phone .mobile-document-builder .field{margin-top:10px}
html.bmn-phone .mobile-lookup-line{display:grid!important;grid-template-columns:1fr!important;gap:4px}
html.bmn-phone .mobile-lookup-line .field{grid-column:auto!important}
html.bmn-phone .mobile-lookup-line>button{width:100%;min-height:48px;margin-top:8px}
html.bmn-phone .mobile-document-builder .link-button{width:100%;min-height:44px;margin-top:8px}
html.bmn-phone .mobile-document-footer{position:sticky;bottom:68px;z-index:9;display:grid;grid-template-columns:1fr;gap:8px;background:#fff;border-top:1px solid var(--line);margin:14px -12px -12px;padding:12px;box-shadow:0 -10px 26px #17342d12}
html.bmn-phone .mobile-document-footer .primary{width:100%;min-height:50px}
html.bmn-phone .mobile-native-select-hidden{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
html.bmn-phone .mobile-supplier-lookup{margin-top:6px}
html.bmn-phone .mobile-supplier-lookup>input{width:100%;min-height:46px;padding:12px 13px;border:1px solid var(--line);border-radius:12px;background:#fff}
html.bmn-phone .lookup-results{max-height:44vh}
html.bmn-phone .mobile-fullscreen-modal{width:100%!important;height:100%!important;max-height:100%!important;border-radius:0!important;display:flex;flex-direction:column}
html.bmn-phone .mobile-fullscreen-modal .modal-head{flex:0 0 auto;padding:14px 15px}
html.bmn-phone .mobile-fullscreen-modal .modal-head h3{font-size:19px;line-height:1.25}
html.bmn-phone .mobile-fullscreen-modal form{display:flex;flex-direction:column;min-height:0;flex:1}
html.bmn-phone .mobile-fullscreen-modal .modal-body{flex:1;overflow:auto;padding:5px 13px 18px}
html.bmn-phone .mobile-fullscreen-modal .modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
html.bmn-phone .mobile-fullscreen-modal .modal-actions>*{width:100%!important;min-height:48px;margin:0!important}
html.bmn-phone .mobile-inventory-modal .inventory-actual,html.bmn-phone .mobile-inventory-modal .inventory-reason{min-height:44px;font-size:16px}
html.bmn-phone .history-card-list{gap:10px}
html.bmn-phone .history-doc{padding:12px;border-radius:13px}
html.bmn-phone .history-summary-grid{grid-template-columns:1fr 1fr}
html.bmn-phone .history-items>div{grid-template-columns:1fr;gap:4px;padding:6px 0;border-bottom:1px solid #edf2ef}
html.bmn-phone .history-items>div>b{grid-column:auto}
html.bmn-phone .report-filter{display:grid;grid-template-columns:1fr;padding:11px;margin-bottom:12px}
html.bmn-phone .report-filter label{width:100%}
html.bmn-phone .report-filter input{width:100%;min-height:44px}
html.bmn-phone .report-filter .primary{width:100%;min-height:48px}
html.bmn-phone .mobile-report-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin:10px 0;padding:10px;background:#fff;border:1px solid var(--line);border-radius:13px}
html.bmn-phone .mobile-report-search input{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
html.bmn-phone .mobile-report-search span{grid-column:1/-1}
html.bmn-phone .metric-banner{font-size:16px}
html.bmn-phone .report-cards{grid-template-columns:1fr 1fr;gap:9px}
html.bmn-phone .report-cards .card{padding:13px}
html.bmn-phone .report-cards .metric{font-size:21px}
html.bmn-phone .doc-items{font-size:13px;line-height:1.5}
html.bmn-phone .inventory-actual,html.bmn-phone .inventory-reason{width:100%;min-width:0}
@media(max-width:390px){html.bmn-phone .report-cards{grid-template-columns:1fr}html.bmn-phone .mobile-fullscreen-modal .modal-actions{grid-template-columns:1fr}}

/* Keep Stage 2 strictly mobile. */
html.bmn-desktop .mobile-native-select-hidden{position:static!important;width:auto!important;height:auto!important;opacity:1!important;pointer-events:auto!important}

/* v1.3.0 — current FX, native prices and multiple POS checks */
.native-price-ref{display:block;color:var(--muted);font-size:11px;line-height:1.25;opacity:.72;font-weight:600;margin-top:2px}
.native-price-ref.table-ref{font-size:12px;opacity:.78}
.readonly-rate{min-height:46px;display:flex;align-items:center;padding:11px 13px;border:1px solid var(--line);border-radius:12px;background:#f5f8f7;color:#284c42}
.rate-equation{display:flex;align-items:center;justify-content:center;gap:9px;font-size:20px;font-weight:800;padding:18px;background:#f3f8f6;border:1px solid var(--line);border-radius:14px}
.rate-equation input{width:150px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;text-align:center;font-weight:800}
.help-box{background:#f4f8f6;border:1px solid var(--line);border-radius:12px;padding:12px;color:#49645c;font-size:13px;line-height:1.45;margin-top:12px}
.currency-rate-banner{display:grid;grid-template-columns:minmax(220px,.7fr) 1.3fr;gap:16px;align-items:center;background:linear-gradient(135deg,#eaf5f0,#f8fbfa);border:1px solid #cfe2da;border-radius:17px;padding:16px 18px;margin:18px 0}
.currency-rate-banner.compact{margin:14px 0 20px}
.currency-rate-banner span{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;font-weight:800;letter-spacing:.04em}
.currency-rate-banner b{display:block;margin-top:4px;font-size:17px}.currency-rate-banner p{margin:0;color:#526d65;line-height:1.45}
.currency-rate-strip{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 4px}.currency-rate-strip span{background:#edf5f2;border:1px solid var(--line);border-radius:999px;padding:7px 11px;font-size:12px}.currency-rate-strip b{margin-right:5px}
.native-calc{color:var(--muted);font-size:12px;line-height:1.35;margin-top:6px;min-height:16px}
.v9-native-price-card .price-editor-grid label{display:flex;align-items:center;gap:5px}
.current-rate-note{background:#f4f8f6;border:1px solid var(--line);border-radius:10px;padding:10px 11px;color:#60756e;font-size:12px;line-height:1.4;margin:10px 0}
.pos-check-tabs{display:flex;gap:7px;overflow-x:auto;padding:3px 0 10px;margin-bottom:4px;scrollbar-width:thin}
.pos-check-tab{display:flex;align-items:stretch;border:1px solid var(--line);border-radius:12px;background:#fff;flex:0 0 auto;overflow:hidden;max-width:235px}
.pos-check-tab.active{border-color:var(--green);box-shadow:0 0 0 2px #176b5214;background:#f1f8f5}
.pos-check-tab>button:first-child{border:0;background:transparent;padding:8px 8px 8px 11px;text-align:left;min-width:92px;max-width:190px;font-weight:750;color:#17342d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pos-check-tab small{display:block;font-size:10px;color:var(--muted);font-weight:500;margin-top:2px}
.pos-check-close{border:0;border-left:1px solid var(--line);background:transparent;width:32px;color:var(--muted);font-size:17px}.pos-check-close:hover{background:#fff1f0;color:var(--red)}
.pos-check-add{flex:0 0 auto;border:1px dashed #98b9ae;background:#f7fbf9;color:var(--green);border-radius:12px;padding:8px 12px;font-weight:800;white-space:nowrap}
.active-check-title{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 0 4px;border-top:1px solid #edf1ef}.active-check-title span{color:var(--muted);font-size:10px;text-align:right}
.product-card .native-price-ref{margin-top:0;min-height:14px}
.v9-cart-line .native-price-ref{font-size:10px}

@media(max-width:760px){
  html.bmn-phone .currency-rate-banner{grid-template-columns:1fr;padding:13px;gap:7px}
  html.bmn-phone .currency-rate-banner b{font-size:15px}
  html.bmn-phone .rate-equation{font-size:16px;flex-wrap:wrap;padding:13px}
  html.bmn-phone .rate-equation input{width:120px}
  html.bmn-phone .pos-check-tabs{margin:0 -2px 5px;padding:2px 2px 9px;scrollbar-width:none}
  html.bmn-phone .pos-check-tabs::-webkit-scrollbar{display:none}
  html.bmn-phone .pos-check-tab{max-width:205px}
  html.bmn-phone .active-check-title{align-items:flex-start;flex-direction:column}
  html.bmn-phone .active-check-title span{text-align:left}
  html.bmn-phone .product-card strong{font-size:18px}
  html.bmn-phone .native-price-ref{font-size:10px}
  html.bmn-phone .currency-rate-strip{flex-wrap:nowrap;overflow-x:auto;margin-left:-10px;margin-right:-10px;padding:0 10px 5px;scrollbar-width:none}
  html.bmn-phone .currency-rate-strip::-webkit-scrollbar{display:none}
}

/* === BMN Smart Keeper v1.3.1 === */
.v10-price-order-modal{max-width:1180px}
.v10-cost-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 16px;padding:12px;border:1px solid var(--line,#d9e4df);border-radius:14px;background:#f7faf8}
.v10-cost-strip>div{display:flex;flex-direction:column;gap:4px}
.v10-cost-strip span{font-size:12px;color:var(--muted,#708078)}
.v10-cost-strip b{font-size:16px}
.v10-price-grid{grid-template-columns:repeat(5,minmax(150px,1fr))}
.v10-add-product-row{display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:default}
.v10-add-product-row>div{min-width:0}
.v10-add-product-row button{flex:0 0 auto}
.v10-product-picker .lookup-results{max-height:280px;overflow:auto}

.reconciliation-modal{width:min(96vw,1500px)!important;max-width:1500px!important;height:min(92vh,920px);display:flex;flex-direction:column}
.reconciliation-modal form{display:flex;flex-direction:column;min-height:0;flex:1}
.reconciliation-modal .modal-body{overflow:auto;min-height:0;flex:1;padding-bottom:20px}
.reconciliation-modal .modal-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line,#d9e4df);z-index:3}
.v10-recon-toolbar{position:sticky;top:-1px;z-index:4;display:flex;align-items:end;justify-content:space-between;gap:16px;padding:8px 0 14px;background:#fff}
.v10-recon-toolbar .field{flex:1;margin:0}
.v10-recon-actions{display:flex;gap:8px;flex-wrap:wrap}
.v10-recon-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:4px 0 18px}
.v10-recon-summary>div{display:flex;flex-direction:column;gap:5px;padding:14px;border:1px solid var(--line,#d9e4df);border-radius:14px;background:#f7faf8}
.v10-recon-summary span{font-size:12px;color:var(--muted,#708078)}
.v10-recon-summary b{font-size:18px}
.v10-recon-balance{background:#eef8f3!important;border-color:#b9d9ca!important}
.v10-recon-items{margin-top:8px;padding:8px 10px;border-radius:10px;background:#f7faf8}
.v10-recon-items>div{display:grid;grid-template-columns:minmax(160px,1fr) auto auto;gap:12px;align-items:start;padding:4px 0;border-bottom:1px dashed #d9e4df}
.v10-recon-items>div:last-child{border-bottom:0}
.v10-recon-items span:first-child{display:flex;flex-direction:column}
.v10-recon-items small{font-size:11px;color:var(--muted,#708078)}
.v10-recon-print-head{margin-bottom:16px}
.v10-recon-print-head h2{margin:0 0 8px}
.v10-recon-signatures{display:flex;justify-content:space-between;gap:30px;margin-top:46px;padding-top:20px}

@media (max-width:760px){
  .v10-cost-strip{grid-template-columns:1fr}
  .v10-price-grid{grid-template-columns:1fr}
  .v10-add-product-row{align-items:flex-start}
  .v10-add-product-row button{min-height:44px}
  .reconciliation-modal{width:100%!important;max-width:none!important;height:100%!important}
  .v10-recon-toolbar{display:block}
  .v10-recon-actions{display:grid;grid-template-columns:repeat(3,1fr);margin-top:10px}
  .v10-recon-actions button{width:100%}
  .v10-recon-summary{grid-template-columns:1fr 1fr}
  .v10-recon-items>div{grid-template-columns:1fr}
  .v10-recon-signatures{display:block}
  .v10-recon-signatures>div+div{margin-top:30px}
}

/* v1.3.2 — markup-first price editor */
.v11-price-order-modal{max-width:1180px}
.v11-bulk-markup{margin:14px 0 16px;padding:14px;border:1px solid #cfe0d9;border-radius:16px;background:#f4faf7;display:grid;grid-template-columns:minmax(260px,1fr) auto minmax(250px,auto);gap:14px;align-items:center}
.v11-bulk-markup>div:first-child{display:grid;gap:3px}.v11-bulk-markup>div:first-child span{font-size:12px;color:var(--muted)}
.v11-bulk-buttons,.v11-markup-presets{display:flex;gap:7px;flex-wrap:wrap}
.v11-bulk-buttons button,.v11-markup-presets button,.v11-markup-control>button{border:1px solid #b8d0c7;background:#fff;color:#145a46;border-radius:10px;padding:8px 10px;font-weight:800}
.v11-bulk-buttons button:hover,.v11-markup-presets button:hover,.v11-markup-control>button:hover{background:#e8f5ef;border-color:var(--green)}
.v11-bulk-buttons button:disabled,.v11-markup-presets button:disabled,.v11-markup-control>button:disabled{opacity:.45;cursor:not-allowed}
.v11-bulk-custom{display:grid;grid-template-columns:90px auto;gap:8px}.v11-bulk-custom input{min-width:0;padding:10px 11px;border:1px solid var(--line);border-radius:11px}
.v11-price-card{padding:16px}
.v11-price-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:8px 0 14px}
.v11-price-summary>div{border:1px solid var(--line);border-radius:13px;padding:11px 12px;background:#f8fbfa;display:grid;gap:3px}
.v11-price-summary span{font-size:11px;color:var(--muted);text-transform:uppercase}.v11-price-summary b{font-size:17px}.v11-price-summary small{font-size:11px;color:var(--muted)}
.v11-sale-summary{background:#eef8f3!important;border-color:#bddccb!important}
.v11-markup-panel{border:1px solid #bcd8cc;border-radius:15px;padding:14px;background:#f5fbf8;display:grid;grid-template-columns:minmax(160px,.8fr) minmax(240px,1.2fr);gap:12px 16px;align-items:end}
.v11-markup-panel.disabled{background:#fafbfa;border-color:var(--line)}
.v11-markup-title{grid-column:1/-1}.v11-markup-title>div{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.v11-markup-title b{font-size:18px}.v11-markup-title span{font-size:12px;color:var(--muted)}
.v11-markup-control{display:grid;grid-template-columns:auto minmax(95px,1fr) auto;gap:8px;align-items:center}
.v11-markup-control label{display:flex;align-items:center;border:2px solid #85b9a5;background:#fff;border-radius:12px;overflow:hidden;height:46px}.v11-markup-control label:focus-within{border-color:var(--green);box-shadow:0 0 0 3px #176b5218}.v11-markup-control input{width:100%;border:0;outline:0;padding:10px 4px 10px 12px;font-size:20px;font-weight:850;text-align:right;background:transparent}.v11-markup-control label span{padding:0 12px 0 3px;font-weight:850;color:var(--green)}
.v11-markup-presets{grid-column:1/-1}
.v11-retail-edit{display:grid;gap:6px}.v11-retail-edit label{font-size:13px;font-weight:800}.v11-retail-edit input{width:100%;border:2px solid #85b9a5;border-radius:12px;padding:10px 12px;font-size:20px;font-weight:850;outline:0}.v11-retail-edit input:focus{border-color:var(--green);box-shadow:0 0 0 3px #176b5218}.v11-retail-edit small{color:var(--muted)}
.v11-price-extra{margin-top:12px;border-top:1px dashed #cfdcd7;padding-top:10px}.v11-price-extra summary{cursor:pointer;color:#315f50;font-weight:800;user-select:none}.v11-extra-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px}.v11-price-floor{margin-top:10px;padding:10px 12px;border-radius:11px;background:#fff6e8;color:#684800}.v11-price-floor b{color:#493200}
@media(max-width:900px){.v11-bulk-markup{grid-template-columns:1fr}.v11-price-summary{grid-template-columns:1fr 1fr}.v11-markup-panel{grid-template-columns:1fr}.v11-markup-presets{grid-column:auto}.v11-extra-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.v11-price-summary,.v11-extra-grid{grid-template-columns:1fr}.v11-bulk-custom{grid-template-columns:1fr}.v11-bulk-custom .secondary{width:100%}.v11-markup-presets{display:grid;grid-template-columns:repeat(4,1fr)}.v11-markup-presets button{padding:10px 4px}.v11-markup-control{grid-template-columns:70px 1fr 70px}.v11-price-card{padding:12px}}

/* v1.3.3 compact pricing UX */
.v12-price-order-modal{max-width:1040px}
.v12-order-meta textarea{min-height:64px}
.v12-picker{position:relative;margin:10px 0 12px;padding:12px 14px;border:1px solid var(--line);border-radius:13px;background:#f8fbfa}
.v12-picker>label{display:block;font-size:13px;font-weight:800;margin-bottom:6px}
.v12-picker-input input{width:100%;height:42px;padding:0 12px;border:1px solid #aaccc0;border-radius:10px;font-size:14px;outline:none;background:#fff}
.v12-picker-input input:focus{border-color:var(--green);box-shadow:0 0 0 2px #176b5215}
.v12-picker-hint{font-size:11px;color:var(--muted);margin-top:5px}
.v12-product-results{display:none;position:absolute;z-index:30;left:14px;right:14px;top:82px;max-height:310px;overflow:auto;border:1px solid #bdd2ca;border-radius:12px;background:#fff;box-shadow:0 12px 28px #173d3026}
.v12-product-results.open{display:block}
.v12-product-result{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border-bottom:1px solid #edf1ef;background:#fff}
.v12-product-result:last-child{border-bottom:0}.v12-product-result:hover{background:#f4faf7}
.v12-result-info{min-width:0;display:grid;gap:2px}.v12-result-info>b{font-size:14px}.v12-result-info>span{font-size:12px}.v12-result-info>small{font-size:11px;color:var(--muted);white-space:normal}
.v12-add-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:96px;height:34px;padding:0 11px;border:0;border-radius:9px;background:var(--green);color:#fff;font-size:12px;font-weight:850;cursor:pointer;box-shadow:0 1px 2px #00000014}
.v12-add-btn:hover{filter:brightness(.96)}.v12-add-btn span{font-size:15px;line-height:1}
.v12-added-badge{flex:0 0 auto;padding:6px 9px;border-radius:999px;background:#eaf4ef;color:#2e6c58;font-size:11px;font-weight:800}
.v12-no-results{padding:13px;color:var(--muted);font-size:12px}
.v12-bulk{margin:10px 0 14px;padding:10px 12px;border:1px solid #d0e0da;border-radius:13px;background:#f5faf7;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.v12-bulk-title{display:grid;gap:2px}.v12-bulk-title b{font-size:13px}.v12-bulk-title span{font-size:11px;color:var(--muted)}
.v12-bulk-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.v12-bulk-actions>button,.v12-quick-markup button{height:30px;min-width:45px;padding:0 9px;border:1px solid #b8d0c7;border-radius:8px;background:#fff;color:#185a47;font-size:12px;font-weight:800;cursor:pointer}
.v12-bulk-actions>button:hover,.v12-quick-markup button:hover{background:#e9f5ef;border-color:var(--green)}
.v12-bulk-custom{display:flex;gap:5px;margin-left:3px}.v12-bulk-custom input{width:74px;height:30px;padding:0 8px;border:1px solid #c4d6cf;border-radius:8px;font-size:12px}.v12-bulk-custom button{height:30px;padding:0 10px;border:0;border-radius:8px;background:var(--green);color:#fff;font-size:12px;font-weight:800}
.v12-selected-head{display:flex;align-items:center;justify-content:space-between;margin:10px 0 7px;font-size:14px}.v12-selected-head span{min-width:26px;text-align:center;padding:3px 7px;border-radius:999px;background:#eef5f2;color:#45675c;font-size:11px;font-weight:800}
.v12-price-card{margin-bottom:9px;padding:12px;border:1px solid #d6e1dd;border-radius:13px;background:#fff}
.v12-price-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:9px}.v12-price-name{display:grid;gap:1px;min-width:0}.v12-price-name>b{font-size:15px}.v12-price-name>span{font-size:12px}.v12-price-name>small{font-size:11px;color:var(--muted)}
.v12-remove-btn{height:29px;padding:0 9px;border:1px solid #efb7b2;border-radius:8px;background:#fff;color:#b43831;font-size:11px;font-weight:800;cursor:pointer}
.v12-price-main{display:grid;grid-template-columns:1fr .8fr 1fr 1fr;gap:8px;align-items:end}
.v12-stat,.v12-edit-block{min-width:0}.v12-stat{height:64px;padding:8px 9px;border:1px solid #e0e8e5;border-radius:10px;background:#f8fbfa;display:grid;align-content:center;gap:1px}.v12-stat>span,.v12-edit-block>span{font-size:10px;color:var(--muted);text-transform:uppercase;font-weight:700}.v12-stat>b{font-size:14px}.v12-stat>small{font-size:10px;color:var(--muted)}
.v12-sale-tjs{background:#eef8f3;border-color:#c5ddd3}
.v12-edit-block{display:grid;gap:4px}.v12-unit-input{height:39px;display:flex;align-items:center;border:1px solid #9fc7b7;border-radius:9px;background:#fff;overflow:hidden}.v12-unit-input:focus-within{border-color:var(--green);box-shadow:0 0 0 2px #176b5215}.v12-unit-input input{width:100%;min-width:0;border:0;outline:0;padding:0 8px;font-size:15px;font-weight:800;background:transparent}.v12-unit-input i{font-style:normal;padding:0 8px 0 2px;color:#2d6150;font-size:11px;font-weight:800}.v12-edit-block.is-disabled{opacity:.6}
.v12-quick-markup{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:8px}.v12-quick-markup>span{font-size:11px;color:var(--muted);margin-right:2px}.v12-quick-markup.is-disabled{opacity:.5}
.v12-extra{margin-top:9px;padding-top:8px;border-top:1px dashed #d7e0dd}.v12-extra summary{cursor:pointer;font-size:12px;font-weight:800;color:#315f50}.v12-extra-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}.v12-extra-grid .field label{font-size:11px}.v12-extra-grid input{height:36px;padding:0 9px;font-size:13px}.v12-floor{margin-top:7px;padding:7px 9px;border-radius:8px;background:#fff7e9;color:#674a08;font-size:11px}
@media(max-width:900px){.v12-price-main{grid-template-columns:1fr 1fr}.v12-bulk{align-items:flex-start}.v12-bulk-actions{width:100%}}
@media(max-width:600px){.v12-picker{padding:10px}.v12-product-results{left:10px;right:10px;top:78px}.v12-product-result{align-items:flex-start}.v12-add-btn{min-width:84px;height:32px;padding:0 8px}.v12-price-main{grid-template-columns:1fr 1fr}.v12-extra-grid{grid-template-columns:1fr}.v12-bulk-custom{width:100%;margin-left:0}.v12-bulk-custom input{flex:1}.v12-bulk-custom button{flex:0 0 auto}.v12-price-card{padding:10px}.v12-quick-markup button{min-width:40px;padding:0 6px}}

/* v1.3.4 — per-item receipt corrections */
.v134-cart-line{grid-template-columns:minmax(0,1fr) auto;align-items:start}
.v134-cart-product{min-width:0}
.v134-line-price-row{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:6px;font-size:12px}
.v134-line-price-row>small{color:var(--muted)}
.v134-edit-line{border:1px solid #b8cdc5;background:#f4faf7;color:var(--green);border-radius:8px;padding:5px 8px;font-size:11px;font-weight:750}
.v134-line-total{grid-column:2;align-self:center}
.v134-line-editor{grid-column:1/-1;background:#f7faf9;border:1px solid var(--line);border-radius:12px;padding:10px;margin-top:3px;display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}
.v134-line-editor .field{margin:0}
.v134-line-editor .field label{font-size:11px;margin-bottom:4px}
.v134-line-editor .field input{padding:8px 9px;border-radius:9px}
.v134-line-editor-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}
.v134-line-editor-actions .primary,.v134-line-editor-actions .secondary{margin:0;width:auto;padding:7px 11px;font-size:12px}
.v134-line-editor>small{grid-column:1/-1;color:var(--muted);line-height:1.35}
@media (max-width:760px){
  .v134-cart-line{grid-template-columns:minmax(0,1fr) auto}
  .v134-line-editor{grid-template-columns:1fr}
  .v134-line-editor .field,.v134-line-editor-actions,.v134-line-editor>small{grid-column:1}
  .v134-line-editor-actions{justify-content:stretch}
  .v134-line-editor-actions button{flex:1}
}

/* v1.3.5 — line total correction: unit price stays unchanged */
.v135-line-math{display:flex;flex-direction:column;gap:2px;margin-top:5px;font-size:12px;color:var(--text)}
.v135-line-math small{color:var(--green);font-weight:650}
.v135-adjusted-total{color:var(--green)}
.v135-line-editor{grid-template-columns:auto minmax(180px,1fr);align-items:end}
.v135-editor-summary{display:flex;flex-direction:column;gap:3px;padding:7px 9px;border-radius:9px;background:#edf5f1;border:1px solid var(--line)}
.v135-editor-summary span,.v135-quick-total>span{font-size:11px;color:var(--muted)}
.v135-editor-summary b{font-size:14px}
.v135-quick-total{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.v135-quick-total button{border:1px solid #b8cdc5;background:#fff;color:var(--green);border-radius:8px;padding:5px 8px;font-size:11px;font-weight:750}
@media(max-width:760px){.v135-line-editor{grid-template-columns:1fr}.v135-editor-summary,.v135-quick-total{grid-column:1}}

/* v1.3.6 — mixed payments and cash account management */
.v136-payments{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:12px 0;display:flex;flex-direction:column;gap:10px}
.v136-payments-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.v136-payments-head>div{display:flex;flex-direction:column;gap:2px}
.v136-payments-head small{color:var(--muted);font-size:11px}
#pos-payment-rows{display:flex;flex-direction:column;gap:8px}
.v136-payment-row{display:grid;grid-template-columns:minmax(150px,1.4fr) minmax(95px,.8fr) auto auto;gap:7px;align-items:end;padding:9px;border:1px solid var(--line);border-radius:12px;background:#f8fbfa}
.v136-payment-row .field{margin:0}
.v136-payment-row label{font-size:11px}
.v136-payment-row select,.v136-payment-row input{min-height:40px;padding:8px 10px;font-size:13px}
.v136-fill-payment{min-height:40px;padding:8px 10px;font-size:12px;white-space:nowrap}
.v136-remove-payment{width:40px;height:40px;align-self:end}
.v136-paid-total{display:flex;justify-content:space-between;align-items:center;font-size:14px}
.v136-paid-total b{font-size:17px;color:var(--green)}
.v136-account-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 12px}
.v136-account-summary span{color:var(--muted);font-size:13px}
.v136-account-grid{align-items:stretch}
.v136-account-card{display:flex;flex-direction:column;gap:8px}
.v136-account-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.v136-account-top h3{margin:2px 0 0;font-size:17px}
.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:700}
.status-pill.active{background:#e5f4ee;color:var(--green)}
.status-pill.archived{background:#f0f1f1;color:var(--muted)}
.v136-account-actions{margin-top:auto;padding-top:4px}
.v136-account-archived{opacity:.72;background:#f7f7f7}
.danger-box{border-color:#edc7c7;background:#fff6f6;color:#8b2424}
@media(max-width:760px){
  .v136-payment-row{grid-template-columns:1fr 100px;gap:6px}
  .v136-fill-payment{grid-column:1}
  .v136-remove-payment{grid-column:2;grid-row:2}
  .v136-payments-head{align-items:flex-start;flex-direction:column}
  .v136-account-summary{align-items:flex-start;flex-direction:column;gap:3px}
}


/* v1.4.0 — opening balances, daily views, category folders and AI */
.v140-date-control{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:700;color:var(--muted)}
.v140-date-control input{min-height:38px;padding:7px 9px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--text);font:inherit}
.v140-daily-strip{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.v140-daily-strip span{padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:#f7faf9;color:var(--muted);font-size:12px}
.v140-daily-strip b{color:var(--text);font-size:13px}
.v140-overall{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.v140-overall>div{display:grid;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:13px;background:#fff}
.v140-overall span{font-size:11px;color:var(--muted)}
.v140-overall b{font-size:19px;color:var(--green)}
.v140-folder-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.v140-folder-toolbar>input{flex:1 1 280px}
.v140-folder-tools,.v140-pos-folder-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.v140-folder-tools .compact,.v140-pos-folder-tools .compact{min-height:34px;padding:6px 9px;font-size:11px}
.v140-folder{margin:0 0 7px;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.v140-folder>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;cursor:pointer;background:#f8fbfa;font-weight:750}
.v140-folder>summary::-webkit-details-marker{display:none}
.v140-folder>summary:before{content:'›';width:18px;flex:0 0 18px;font-size:20px;line-height:1;color:var(--green);transition:transform .15s ease}
.v140-folder[open]>summary:before{transform:rotate(90deg)}
.v140-folder-name{min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v140-folder-summary{flex:0 0 auto;color:var(--muted);font-size:11px;font-weight:650;text-align:right}
.v140-folder-body{padding:8px;background:#fff}
.v140-folder-body>.v140-folder{margin-left:10px}
.v140-folder-body .table-wrap{margin:0}
.v140-search-result{border:1px solid var(--line);border-radius:12px;background:#fff;padding:8px}
.v140-pos-folder-tools{margin:0 0 8px}
.v140-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:9px}
.v140-feature-note{margin:0 0 12px;padding:9px 11px;border:1px solid #cbe0d7;border-radius:10px;background:#f0f8f4;color:#315f50;font-size:12px;line-height:1.4}
.v140-opening-cash-list{display:grid;gap:8px;margin:8px 0 12px}
.v140-opening-cash-list label{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,180px);align-items:center;gap:10px;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#f8fbfa}
.v140-opening-cash-list label>span{font-weight:750}
.v140-opening-cash-list small{color:var(--muted);font-weight:600}
.v140-opening-cash-list input{min-height:38px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:#fff}
.v140-ai-status{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:800}
.v140-ai-status.ok{background:#e5f4ee;color:var(--green)}
.v140-ai-status.warn{background:#fff6df;color:#795600}
.v140-ai-card{max-width:900px}
.v140-ai-card #ai-messages{max-height:52vh;overflow:auto}
.v140-ai-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.v140-ai-compose input{min-height:44px}
@media(max-width:900px){.v140-overall{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
  .v140-date-control{width:100%;justify-content:space-between}.v140-date-control input{flex:1;max-width:190px}
  .v140-daily-strip{display:grid;grid-template-columns:1fr 1fr}
  .v140-daily-strip span{padding:7px 8px}
  .v140-overall{grid-template-columns:1fr 1fr;gap:7px}.v140-overall>div{padding:10px}.v140-overall b{font-size:17px}
  .v140-folder-toolbar{align-items:stretch}.v140-folder-toolbar>input{flex-basis:100%;width:100%}.v140-folder-tools{width:100%}.v140-folder-tools button{flex:1}
  .v140-folder>summary{padding:9px 10px;align-items:flex-start}.v140-folder-summary{max-width:45%;white-space:normal}.v140-folder-body{padding:6px}.v140-folder-body>.v140-folder{margin-left:5px}
  .v140-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .v140-opening-cash-list label{grid-template-columns:1fr}.v140-opening-cash-list input{width:100%}
  .v140-ai-compose{grid-template-columns:1fr}.v140-ai-compose button{width:100%}
}
@media(max-width:430px){.v140-daily-strip{grid-template-columns:1fr}.v140-overall{grid-template-columns:1fr 1fr}.v140-product-grid{grid-template-columns:1fr 1fr}.v140-folder-name{white-space:normal}}
