@import url('/fonts.css');
:root{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Tahoma,Arial,sans-serif;color:#202638;background:#f1f3f9;font-size:16px;font-synthesis:none;--muted:#737b8c;--line:#e6e9ef;--accent:#a81939;--blue:#3277cf;--green:#297f68;--sidebar:238px}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:var(--accent);text-decoration:none}input,select,textarea{border:1px solid #dce0e8;border-radius:11px;padding:11px 12px;background:white;color:inherit;min-width:0;width:100%;outline:none;font-size:.9375rem}input:focus,select:focus,textarea:focus{border-color:#ac5970;box-shadow:0 0 0 3px #ad193811}input[type=checkbox]{width:auto;accent-color:var(--accent)}textarea{resize:vertical;min-height:90px}label{display:grid;gap:7px;font-size:.875rem;font-weight:550}button:focus-visible,a:focus-visible{outline:3px solid #3578ce;outline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:1.8rem;font-weight:650;letter-spacing:-.8px}h2{font-size:1.15rem;font-weight:650}h3{font-size:1rem;font-weight:600}p{line-height:1.6}.muted{color:var(--muted)}.small{font-size:.875rem}.arabic{font-family:Tahoma,Arial,sans-serif;direction:rtl;text-align:right;line-height:1.8}.mono{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}.icon{width:20px;height:20px;flex-shrink:0;stroke:currentColor;stroke-width:1.65;fill:none;stroke-linecap:round;stroke-linejoin:round}.loading{display:grid;place-items:center;min-height:70vh;color:var(--muted)}
.shell{min-height:100vh;display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);background:radial-gradient(ellipse at 100% 0,#e6ecfa80,transparent 65%),#f4f5f9}.sidebar{background:#ffffff9c;backdrop-filter:blur(25px);border-inline-end:1px solid #dfe3ed;position:fixed;inset-block:0;inset-inline-start:0;width:var(--sidebar);padding:28px 18px;display:flex;flex-direction:column;z-index:10}.brand{display:flex;align-items:center;gap:11px;padding:0 10px 28px;font-size:1.22rem;font-weight:730;letter-spacing:-.7px}.brand-mark{width:33px;height:33px;background:var(--accent);border-radius:10px;display:grid;place-items:center;color:white;font-weight:750;font-size:1.1rem;letter-spacing:-1px}.brand span span{color:var(--accent)}.nav{display:flex;flex-direction:column;gap:4px}.nav a{display:flex;align-items:center;gap:11px;color:#626c7e;font-size:.9rem;padding:11px 13px;border-radius:12px;font-weight:500}.nav a:hover{background:#ffffff}.nav a.active{background:#ffffff;color:#242c3e;box-shadow:0 3px 12px #27314b09;font-weight:650}.nav a.active .icon{color:var(--accent)}.nav-count{margin-inline-start:auto;background:#a8193910;color:var(--accent);border-radius:7px;padding:1px 6px;font-size:.875rem}.sidebar-bottom{margin-top:auto;padding-top:24px}.account{display:flex;align-items:center;gap:10px;padding:12px 8px}.avatar{width:34px;height:34px;border-radius:50%;background:#e9dbe5;color:#803857;font-size:.875rem;font-weight:650;display:grid;place-items:center}.account-info{font-size:.875rem;font-weight:600}.main{grid-column:2;padding:0 36px 36px;min-width:0}.topbar{min-height:83px;display:flex;align-items:center;gap:16px;border-bottom:1px solid var(--line);margin-bottom:28px}.topbar select{max-width:200px;background:#ffffff87;font-size:.875rem;border-color:transparent}.lang-button{border:1px solid #dce0e8;background:#ffffffa0;padding:8px 12px;border-radius:10px;font-size:.875rem;white-space:nowrap}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:23px}.page-heading p{font-size:.875rem;margin-top:5px}.button{border:1px solid #dce0e8;border-radius:11px;background:#fff;color:#3a4456;padding:10px 14px;font-size:.875rem;font-weight:550;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}.button.primary{background:var(--accent);border-color:var(--accent);color:white;box-shadow:0 3px 8px #a8193917}.button.soft{background:#f2f4f8;border-color:transparent}.button.danger{color:#ad2541}.button.small{font-size:.875rem;padding:7px 10px}.button.icon-only{padding:8px}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.demo-banner{display:flex;align-items:center;gap:10px;background:#fdf5e7;border:1px solid #efe3c7;border-radius:12px;padding:11px 14px;font-size:.875rem;color:#8a6526;margin-bottom:22px}.demo-banner .icon{width:17px;height:17px}.demo-banner span{flex:1}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:25px}.stat{background:#ffffffb8;border:1px solid #fff;border-radius:17px;padding:20px;box-shadow:0 4px 15px #27314b03}.stat-top{display:flex;align-items:center;justify-content:space-between;color:#7b8494;font-size:.875rem}.stat-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#edf2f9;color:#52728d}.stat-icon.rose{background:#f9edf0;color:#ac5069}.stat-icon.green{background:#edf6f1;color:#529179}.stat-number{font-size:2rem;letter-spacing:-1px;font-weight:650;margin-top:10px;line-height:1.2}.stat-caption{font-size:.875rem;color:var(--muted);margin-top:8px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,1fr);gap:23px;align-items:start}.card{background:#ffffffdc;border:1px solid #fff;border-radius:17px;box-shadow:0 5px 20px #27314b04;overflow:hidden}.card-head{padding:20px 22px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #eef0f5}.card-body{padding:20px 22px}.section-stack{display:grid;gap:23px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:start;white-space:nowrap;font-size:.875rem}th{padding:13px 20px;font-weight:500;color:#7b8494;background:#fbfcfe;font-size:.875rem;text-align:start;border-bottom:1px solid var(--line)}td{padding:16px 20px;border-bottom:1px solid #eef0f5}tr:last-child td{border-bottom:0}tr.clickable{cursor:pointer}tr.clickable:hover{background:#fafbfe}.product-name{font-weight:550;white-space:normal;max-width:330px;min-width:170px;line-height:1.65}.subline{font-size:.875rem;color:#8a91a0;font-weight:400;margin-top:2px;direction:ltr;text-align:start}.badge{display:inline-flex;align-items:center;gap:5px;border-radius:7px;padding:4px 8px;font-size:.875rem;font-weight:550;line-height:1.4;background:#f1f3f7;color:#737c8f;white-space:nowrap}.badge.green{background:#eaf5ef;color:#287659}.badge.blue{background:#edf3fd;color:#356da8}.badge.amber{background:#fff5e4;color:#a87620}.badge.rose{background:#fbedf1;color:#ad4161}.badge.purple{background:#f1ecfb;color:#795db0}.pill{border:1px solid #dfe4ed;background:white;border-radius:20px;padding:8px 13px;font-size:.875rem;color:#657086;cursor:pointer}.pill.active{background:#263044;color:#fff;border-color:#263044}.toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:18px;flex-wrap:wrap}.filters{display:flex;gap:7px;flex-wrap:wrap}.search{max-width:270px;font-size:.875rem;background:#ffffffc0}.empty{text-align:center;padding:40px 24px;color:var(--muted);font-size:.9375rem}.empty .icon{width:33px;height:33px;margin-bottom:10px;color:#aeb8c8}.list-item{padding:16px 22px;border-bottom:1px solid #eef0f5;display:flex;align-items:center;gap:12px}.list-item:last-child{border:0}.list-item .info{min-width:0;flex:1}.list-item p{font-size:.875rem;line-height:1.5}.list-item .detail{font-size:.875rem;color:var(--muted);margin-top:4px}.notice-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#edf6f0;color:#478a64}.activity-icon{width:30px;height:30px;background:#f2f4f8;border-radius:50%;display:grid;place-items:center;color:#7e8ca3}.activity-icon .icon{width:15px}.location-bars{display:grid;gap:18px}.location-bar-top{display:flex;justify-content:space-between;font-size:.875rem;margin-bottom:7px}.bar{height:7px;border-radius:20px;background:#edf0f6;overflow:hidden}.bar span{display:block;height:100%;background:#738ba9;border-radius:20px}.bar .dubai{background:#a99cc5}.progress{width:85px;height:5px;background:#ecf0f6;border-radius:10px;overflow:hidden;margin-top:7px}.progress span{height:100%;display:block;background:#7da993}.meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.meta-grid p{font-size:.875rem}.meta-grid .muted{font-size:.875rem}.order-detail-top{padding:20px;background:#f8f9fc;border-radius:12px;display:grid;gap:17px;margin-bottom:18px}.order-detail-lines td{padding:13px 12px}.scan-panel{background:#edf3fb;border:1px solid #dbe7f8;border-radius:13px;padding:17px;margin:18px 0}.scan-label{display:flex;gap:8px;align-items:center;font-size:.875rem;font-weight:600;color:#496682;margin-bottom:12px}.scan-row{display:flex;gap:8px}.scan-row input{flex:1}.serial-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}.serial-tags span{font-family:monospace;background:#f0f5fa;padding:2px 5px;border-radius:4px;font-size:.875rem}.approval-note{font-size:.875rem;color:#398463;margin-top:4px}.notice{padding:13px 15px;background:#edf3fb;color:#456890;border:1px solid #dce7f5;border-radius:10px;font-size:.875rem;line-height:1.6}.notice.warning{background:#fff6e8;border-color:#efdfc3;color:#976c24}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.form-grid .full{grid-column:1/-1}.form-section{padding:18px 0;border-bottom:1px solid #eef0f5}.form-section h3{margin-bottom:14px}.form-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.inline-fields{display:flex;gap:10px;align-items:end;margin-bottom:12px}.inline-fields>*{flex:1}.line-list{display:grid;gap:9px}.line-entry{display:grid;grid-template-columns:minmax(0,1fr) 70px 100px 35px;gap:8px;align-items:center;background:#f8f9fc;padding:11px;border-radius:10px}.line-entry p{font-size:.875rem}.serial-input{direction:ltr}.settings-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:23px;align-items:start}.preview-wrap{background:#e8ebf2;border-radius:13px;padding:22px;overflow:auto}.print-document{background:#fff;padding:35px;min-height:600px;color:#202020;font-family:Tahoma,Arial,sans-serif;direction:rtl;font-size:14px;line-height:1.75}.print-header{display:flex;justify-content:space-between;gap:20px;border-bottom:2px solid #a81939;padding-bottom:18px;margin-bottom:24px}.print-brand{font-family:Arial,sans-serif;color:#a81939;font-size:27px;font-weight:bold;direction:ltr}.print-title{font-size:24px;font-weight:500}.print-boxes{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:25px}.print-box{border:1px solid #ccc;border-radius:3px;padding:12px}.print-document table{font-size:13px;white-space:normal;direction:rtl}.print-document th{background:#eee;color:#222;font-size:12px;border-bottom:1px solid #bbb;padding:8px}.print-document td{padding:9px 8px;border-bottom:1px solid #ccc;vertical-align:top}.print-total{margin-top:20px;display:grid;gap:4px;text-align:end}.print-total strong{font-size:18px}.print-footer{border-top:1px solid #ccc;margin-top:35px;padding-top:15px;white-space:pre-wrap;font-size:12px;line-height:1.8}.print-status{padding:8px;border:1px solid #ddd;margin-top:16px}.print-meta{font-size:12px}.print-page{max-width:850px;margin:30px auto;background:#fff}.print-controls{display:flex;justify-content:center;gap:10px;padding:20px}.print-serial{font-size:11px;direction:ltr;text-align:right}.split-payment{display:flex;gap:10px;align-items:center;margin-bottom:9px}.credit-balance{font-size:1.5rem;font-weight:600;color:var(--green)}
dialog{border:1px solid #ffffff9c;border-radius:21px;box-shadow:0 30px 100px #1d29453a;padding:0;width:min(760px,calc(100% - 30px));max-height:90vh;color:inherit;background:#fff}dialog::backdrop{background:#25314d38;backdrop-filter:blur(7px)}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:21px 25px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:2}.modal-head h2{font-size:1.2rem}.modal-body{padding:23px 25px}.modal-close{border:0;background:#f2f4f8;width:30px;height:30px;border-radius:50%;font-size:20px;color:#718096}.modal-description{font-size:.875rem;color:var(--muted);margin-bottom:19px}.error-box{background:#fff0f2;border:1px solid #f3c6ce;color:#a02540;font-size:.875rem;border-radius:10px;padding:12px;display:none;margin-bottom:15px}.error-box.visible{display:block}#toast{position:fixed;bottom:26px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#243249;color:#fff;padding:13px 20px;border-radius:13px;box-shadow:0 8px 30px #24324930;font-size:.875rem;z-index:100;transition:.2s;max-width:90%;text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}
.auth-screen{min-height:100vh;display:grid;place-items:center;padding:30px;background:radial-gradient(ellipse at 0 0,#e1e8f7,transparent 60%),radial-gradient(ellipse at 100% 100%,#f2e4eb,transparent 60%),#f4f5f9}.auth-card{width:min(430px,100%);background:#ffffffce;border:1px solid white;border-radius:24px;padding:35px;box-shadow:0 20px 70px #2632490b;backdrop-filter:blur(20px)}.auth-card .brand{padding:0 0 25px}.auth-card h1{font-size:1.55rem}.auth-card form{display:grid;gap:17px;margin-top:24px}.auth-card .button{width:100%;padding:12px}.auth-divider{display:flex;align-items:center;gap:10px;color:#959baa;font-size:.875rem;margin:22px 0}.auth-divider:before,.auth-divider:after{content:'';height:1px;background:var(--line);flex:1}.auth-note{font-size:.875rem;color:var(--muted);margin-top:12px;text-align:center}.receipt-summary{background:#f7f9fc;padding:15px;border-radius:10px;margin:15px 0}.role-select{font-size:.875rem;margin-top:6px}.detail-separator{height:1px;background:var(--line);margin:20px 0}.click-label{display:flex;gap:8px;align-items:center}.cards-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.link-button{border:0;background:none;color:var(--accent);padding:0;font-size:.875rem;cursor:pointer}.money{font-variant-numeric:tabular-nums}.issue{color:#a87620}.settings-tabs{margin-bottom:23px}.nowrap{white-space:nowrap}
@media(min-width:1600px){.main{padding-inline:50px}.dashboard-grid{grid-template-columns:minmax(0,1.9fr) minmax(330px,1fr)}}
@media(max-width:1200px){:root{--sidebar:210px}.main{padding-inline:24px}.stats{gap:12px}.stat{padding:16px}.dashboard-grid{grid-template-columns:minmax(0,1.4fr) minmax(270px,1fr)}.settings-grid{grid-template-columns:1fr}.cards-grid{grid-template-columns:1fr 1fr}}
@media(max-width:950px){.dashboard-grid{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr}.topbar select{max-width:150px}.cards-grid{grid-template-columns:1fr}}
@media(max-width:700px){:root{--sidebar:0px}.shell{display:block}.sidebar{position:sticky;top:0;width:100%;height:auto;padding:12px 15px 9px;inset:auto;background:#f5f6fbed;border-inline-end:0;border-bottom:1px solid #dde3ed}.sidebar .brand{padding:0 0 9px;font-size:1.1rem}.brand-mark{width:28px;height:28px;border-radius:8px}.sidebar-bottom,.nav{flex-direction:row;overflow-x:auto;gap:4px;padding-bottom:3px}.nav a{padding:8px 11px;white-space:nowrap;font-size:.875rem;gap:6px}.nav .icon{width:16px;height:16px}.main{padding:0 16px 25px}.topbar{min-height:60px;margin-bottom:20px;gap:8px}.topbar select{max-width:200px;background:#fff}.lang-button{margin-inline-start:auto}.page-heading{align-items:start;gap:10px}h1{font-size:1.5rem}.page-heading p{font-size:.875rem}.page-heading .button{font-size:.875rem;padding:9px 11px}.stats{gap:10px;margin-bottom:18px}.stat{padding:14px;border-radius:13px}.stat-number{font-size:1.7rem}.stat-top{font-size:.875rem}.stat-icon{width:27px;height:27px;border-radius:8px}.stat-icon .icon{width:17px;height:17px}.stat-caption{font-size:.875rem}.card-head{padding:17px}.card-body{padding:17px}.list-item{padding:14px 17px}.demo-banner{font-size:.875rem;align-items:start;padding:10px;margin-bottom:18px}.demo-banner button{display:none}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:1}.modal-head{padding:18px}.modal-body{padding:18px}.meta-grid{grid-template-columns:1fr 1fr}.scan-row{flex-wrap:wrap}.scan-row input{flex-basis:100%}.scan-row .button{flex:1}.inline-fields{flex-wrap:wrap}.inline-fields>*{flex-basis:40%}.inline-fields .button{flex:0}.line-entry{grid-template-columns:minmax(0,1fr) 60px 80px 44px;padding:9px;gap:5px}.print-document{padding:20px}.print-header{gap:12px}.print-brand{font-size:22px}.print-title{font-size:20px}.print-boxes{grid-template-columns:1fr}.search{max-width:none;width:100%}.toolbar{gap:10px}.role-select{display:none}.topbar .button.small{padding:8px}.auth-card{padding:27px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media print{@page{size:A4;margin:14mm}body{background:#fff}.print-page{max-width:none;margin:0}.print-document{padding:0;min-height:0;font-size:12px}.print-controls,dialog,#toast{display:none!important}.print-boxes{grid-template-columns:1fr 1fr}.print-document table{font-size:11px}thead{display:table-header-group}tr,.print-box,.print-total{break-inside:avoid}.print-footer{font-size:10px}.print-header{border-bottom-color:#555}.print-brand{color:#a81939!important}*{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

[hidden]{display:none!important}.mobile-account{display:none}.account-popover{position:absolute;inset-inline-end:0;top:calc(100% + 8px);z-index:40;width:210px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;box-shadow:0 10px 30px #26324920;display:grid;gap:12px;font-size:14px}.mobile-account summary{display:grid;place-items:center;list-style:none;border:1px solid #dce0e8;background:white;border-radius:10px;width:38px;height:38px;cursor:pointer}.mobile-account summary::-webkit-details-marker{display:none}@media(max-width:700px){.mobile-account{display:block;position:relative}.topbar>select{flex:1;width:auto}.topbar>.button{font-size:0;width:38px;height:38px;padding:8px}.topbar>.button .icon{display:block}.nav a,.button.small{min-height:38px}}

.permission-grid{display:grid;gap:14px;margin-top:18px;grid-template-columns:1fr 1fr}@media(max-width:700px){.permission-grid{grid-template-columns:1fr}}

.demo-banner .badge{flex:0}.account-popover strong{overflow-wrap:anywhere}
/* Wide file previews scroll inside the dialog on smaller screens. */
.file-review-table{max-height:360px;overflow:auto;margin-top:12px}
.file-review-table table{min-width:640px}
.file-review-table td{vertical-align:top}
.file-review-table .issue{max-width:240px;white-space:normal}

dialog.file-import-modal{width:min(1100px,calc(100vw - 32px))}

.customer-search-panel{margin-bottom:22px;padding:16px;background:#f6f7fa;border:1px solid var(--line);border-radius:14px}.customer-search-panel .inline-fields{align-items:flex-end}.customer-search-panel>p{margin-top:10px}.customer-results .list-item{gap:10px}.customer-results .info{min-width:0}.customer-contacts{overflow-wrap:anywhere}.customer-results>p{margin:12px 0}.customer-results{max-height:260px;overflow-y:auto}.customer-results .button{flex-shrink:0}
@media(max-width:600px){.customer-search-panel{padding:12px}.customer-results .list-item{align-items:flex-start;flex-wrap:wrap}.customer-results .info{flex:1 1 160px}}

.serial-sale{margin-top:20px;padding:20px;border:1px solid var(--line);border-radius:14px}.serial-sale .product-name{margin:14px 0 6px}.serial-sale .meta-grid{margin:18px 0}.readonly-fields{border:0;padding:0;margin:0;min-width:0}.readonly-fields input,.readonly-fields textarea,.readonly-fields select{opacity:.8}.permission-grid label{min-width:0}#workspace-permissions{gap:15px}#serial-history-results{overflow-wrap:anywhere}

@media(min-width:701px){.sidebar .nav{flex:1;min-height:0;overflow-y:auto}.sidebar .nav a{flex-shrink:0}.sidebar-bottom{padding-top:16px}}
@media(max-width:700px){.page-heading>.actions{flex-wrap:wrap;justify-content:flex-end}.page-heading>.actions>.button{white-space:normal;text-align:center}.serial-sale{padding:14px}}

.stock-help{border:1px solid #e5dfcb;border-radius:14px;background:#fffaf0;padding:18px;margin:18px 0}.stock-help table{background:#fff}.stock-help .product-name{min-width:160px}.stock-help td{white-space:normal;min-width:70px}.stock-help th{white-space:nowrap}

.template-logo-field{min-width:0}.template-logo-field input[type=file]{max-width:100%}.template-logo-field [role=status]{overflow-wrap:anywhere}.print-brand{flex:0 1 45%;display:flex;justify-content:flex-end;align-items:flex-start}.print-logo{display:block;max-width:100%;width:auto;height:auto;max-height:90px;object-fit:contain}.print-header{break-inside:avoid}

.item-picker{margin-bottom:14px;min-width:0}
.item-picker .inline-fields{margin-bottom:8px}
.item-picker .item-query{flex:1 1 0;min-width:0}
.item-picker .item-quantity{flex:0 0 85px}
.item-picker .inline-fields>.button{flex:0 0 auto}
.item-lookup-results{max-height:260px;overflow-y:auto;border:1px solid var(--line);border-radius:11px;margin-bottom:8px}
.item-match{display:grid;gap:4px;width:100%;padding:12px 14px;text-align:start;background:#fff;border:0;border-bottom:1px solid #eef0f5;color:inherit;font:inherit;cursor:pointer}
.item-match:last-child{border-bottom:0}
.item-match strong{font-size:.875rem;overflow-wrap:anywhere}
.item-match:hover,.item-match[aria-selected=true],.item-match:focus-visible{background:#edf3fb}
.item-match:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
@media(max-width:600px){.item-picker .item-query{flex:1 1 100%}.item-picker .item-quantity{flex:0 0 85px}.item-picker .inline-fields>.button{flex:1 1 auto}}

.receiving-entry{display:flex;gap:10px;align-items:flex-end}
.receiving-entry .receiving-code{flex:1;min-width:0}
.receiving-entry .receiving-quantity{flex:0 0 85px}
.receiving-entry>.button{flex:0 0 auto}
@media(max-width:600px){.receiving-entry{flex-wrap:wrap}.receiving-entry .receiving-code{flex:1 1 100%}.receiving-entry>.button{flex:1}}

.report-tabs{margin-bottom:18px}.report-periods{margin-bottom:16px;flex-wrap:wrap}.report-controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;padding:20px;background:#ffffffa6;border:1px solid var(--line);border-radius:16px;margin-bottom:20px}.report-controls label{flex:1 1 150px;min-width:0}.report-controls select,.report-controls input{width:100%;min-height:42px}.report-controls .button{min-height:42px}.report-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:20px;margin-bottom:20px}.report-grid .card{min-width:0;margin-bottom:0}.report-number{font-size:1.5rem;overflow-wrap:anywhere}.report-range{margin-bottom:16px}.report-note{margin-bottom:20px}.report-notes{font-size:.875rem;color:var(--muted);line-height:1.65;margin-top:20px;display:grid;gap:8px}.report-product-name{display:block;min-width:170px;max-width:250px;white-space:normal}.report-table td{vertical-align:top}.report-table th{white-space:nowrap}.report-table .small{margin-top:5px}.report-hot{color:#ad2141;font-weight:600}.report-transfer{color:#246f56;font-size:1.15rem}.report-check{display:flex;align-items:center;gap:9px;flex-direction:row}.report-check input{width:18px;height:18px}.report-list-controls{justify-content:space-between}.report-loading{margin:12px 0}.report-stats{margin-top:16px}.report-page>.card{margin-bottom:20px}
@media(max-width:1100px){.report-grid{grid-template-columns:1fr}.report-number{font-size:1.35rem}}@media(max-width:700px){.report-controls{padding:15px;gap:12px}.report-controls label{flex-basis:calc(50% - 12px)}.report-controls .button{width:100%}.report-stats .stat-caption{overflow-wrap:anywhere}.report-periods{gap:6px}.report-list-controls{flex-wrap:wrap}.report-page .page-heading .actions{max-width:170px}.report-number{font-size:1.15rem}.report-table{max-width:100%}.report-grid{gap:16px}}

#planning-table .report-table th,#planning-table .report-table td{padding:14px 12px}#planning-table .report-table th{white-space:normal;min-width:65px}#planning-table .report-table td{white-space:normal}#planning-table .small{font-size:.8rem}#planning-table .report-product-name{min-width:170px;max-width:210px}

.unknown-stock-row{flex-wrap:wrap;gap:14px}.unknown-stock-row .info{min-width:180px;flex:1}.unknown-stock-row .actions{flex-wrap:wrap;justify-content:flex-end}.serial-entry-progress{margin-top:7px}.serial-entry-progress:empty{display:none}#serial-conversion-fields .form-grid>div{min-width:0}#serial-conversion-fields textarea{width:100%}@media(max-width:700px){.unknown-stock-row .actions{justify-content:flex-start}.unknown-stock-row .info{min-width:0;width:100%}}

.transfer-comparison{margin-top:20px;border:1px solid var(--line);border-radius:16px}.transfer-comparison table{min-width:560px}.transfer-discrepancy p{margin-top:8px}.transfer-attribution{margin-top:14px}.transfer-comparison .product-name{white-space:normal;min-width:170px;max-width:300px}.transfer-comparison .subline{white-space:normal;overflow-wrap:anywhere}
.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:16px 20px;border-top:1px solid var(--line)}
.history-retention{margin:0 0 16px}
.customer-history-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.customer-history-heading h3{flex:1;min-width:150px;overflow-wrap:anywhere}.customer-history-heading .button{flex-shrink:0}

.seller-display{display:block;min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:#f6f7fa;font-size:.9375rem;overflow-wrap:anywhere}

.team-member .actions{justify-content:flex-end}.team-access-comparison{table-layout:fixed;white-space:normal}.team-access-comparison td,.team-access-comparison th{overflow-wrap:anywhere;padding:12px}.team-access-comparison th:first-child{width:30%}@media(max-width:700px){.team-member{flex-wrap:wrap;align-items:flex-start}.team-member .info{flex:1 1 200px}.team-member .actions{width:100%;justify-content:flex-end}.team-access-comparison td,.team-access-comparison th{padding:10px 7px}}
.expense-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:22px}
.driver-delivery-panel{margin:18px 0}.expense-notes{white-space:pre-wrap;margin-top:18px}
@media(max-width:650px){.expense-totals{grid-template-columns:1fr;gap:10px}.expense-totals .card-body{padding:16px}.driver-delivery-panel .actions{align-items:flex-start}}
/* Keep customer-import confirmation reachable while reviewing large exports. */
.customer-import-preview{max-height:300px;overflow:auto;border:1px solid var(--line);border-radius:12px}.customer-import-preview thead{position:sticky;top:0;z-index:1;background:#fafbfe}
@media(max-width:700px){.customer-import-preview{max-height:220px}}

.finance-panel{margin:22px 0;padding:20px;border:1px solid var(--border,#e1e5ee);border-radius:18px;background:#f8f9fc}.finance-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0}.finance-summary strong{display:block;margin-top:5px;overflow-wrap:anywhere}.transaction-row{display:flex;gap:14px;justify-content:space-between;align-items:center;padding:12px 0;border-top:1px solid var(--border,#e1e5ee)}.branch-cash-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:22px}.payment-entry{padding:12px 0;border-bottom:1px solid var(--border,#e1e5ee);margin-bottom:12px}.payment-entry label{margin-top:10px}@media(max-width:600px){.finance-panel{padding:14px}.finance-summary{grid-template-columns:1fr;gap:12px}.transaction-row{flex-wrap:wrap}.branch-cash-cards{grid-template-columns:1fr}.finance-panel>.actions>.button{width:100%;white-space:normal}}

.customer-card-notice{display:block;margin-top:12px}.customer-history-heading .actions{flex-wrap:wrap}.customer-search-panel .button.small{margin-inline-start:10px}

.stock-count-options { margin: 20px 0; padding: 18px; border: 1px solid var(--line, #e3e7ee); border-radius: 16px; background: #f7f9fc; }
.stock-count-options .checkbox { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.stock-count-options .checkbox input { flex: 0 0 auto; margin-top: 4px; }
.stock-count-options p { margin: 8px 0 18px; }
.stock-count-options p:last-child { margin-bottom: 0; }
.stock-count-tabs .filters { flex-wrap: wrap; }
.stock-count-paging { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:16px; }
@media(max-width:600px){ .stock-count-options { padding:14px; } .stock-count-paging { flex-wrap:wrap; } }

.serial-origin{margin-top:20px;padding:20px;border:1px solid var(--line);border-radius:14px;background:#f8f9fc}.serial-origin .product-name{margin:14px 0 6px}.serial-origin .meta-grid{margin:16px 0}.serial-origin .meta-grid>div{min-width:0}.serial-origin p{overflow-wrap:anywhere}@media(max-width:700px){.serial-origin{padding:14px}.serial-origin .meta-grid{grid-template-columns:1fr}}

.serial-search-form label{min-width:0}@media(max-width:700px){.serial-search-form label{flex-basis:100%!important}.serial-search-form input{width:100%}.serial-search-form .button{width:100%}}

.workspace-tab-heading{margin-bottom:20px}.workspace-tab-heading h2{font-size:1.125rem;margin-bottom:5px}.workspace-tab-heading p{font-size:.875rem}

/* v1.1: progress, scan feedback, touch targets, phone print preview */
body.is-busy::before{content:'';position:fixed;inset-block-start:0;inset-inline:0;height:3px;z-index:300;background:linear-gradient(90deg,#a81939 0 40%,#f0b6c3 40% 100%);background-size:200% 100%;animation:erp-progress 1s linear infinite}
@keyframes erp-progress{from{background-position:100% 0}to{background-position:-100% 0}}
body.is-busy .button,body.is-busy button[type=submit]{pointer-events:none;opacity:.6}
body.flash-ok::after,body.flash-error::after{content:'';position:fixed;inset:0;z-index:290;pointer-events:none;animation:erp-flash .65s ease-out forwards}
body.flash-ok::after{box-shadow:inset 0 0 0 10px #1f9d63}
body.flash-error::after{box-shadow:inset 0 0 0 14px #c62945;background:#c6294514}
@keyframes erp-flash{from{opacity:1}to{opacity:0}}
.scan-panel input,.receiving-entry input{font-size:1.15rem;min-height:52px;font-variant-numeric:tabular-nums}
.scan-panel input:focus,.receiving-entry input:focus{outline:3px solid #a8193955;border-color:#a81939}
@media(max-width:700px){.button,button,select,textarea,input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]){min-height:46px}.scan-panel .button,.form-footer .button{width:100%;justify-content:center;font-size:1rem}.modal-head{position:sticky;top:0;background:inherit;z-index:2}}
@media screen and (max-width:700px){.print-page{overflow-x:auto;-webkit-overflow-scrolling:touch}.print-document{min-width:640px}}
@media(prefers-reduced-motion:reduce){body.is-busy::before{animation:none}}
@media print{body.is-busy::before,body.flash-ok::after,body.flash-error::after{display:none!important}}

/* Wider record windows on desktop; phones keep the existing size. */
@media(min-width:900px){dialog:not(.file-import-modal){width:min(1080px,calc(100% - 48px))}}
.line-upc{font-variant-numeric:tabular-nums;letter-spacing:.02em;color:#3d4a66;font-weight:600}
.link-button{all:unset;cursor:pointer;color:#2f5fb3;font-weight:600;text-decoration:underline;text-underline-offset:3px;min-height:0!important}.link-button:hover{color:#1d3f7d}.link-button:focus-visible{outline:2px solid #2f5fb3;outline-offset:2px;border-radius:4px}

/* v1.6: sortable inventory headings, customer selection */
.sort-head{all:unset;cursor:pointer;font:inherit;color:inherit;white-space:nowrap}.sort-head:hover,.sort-head.active{color:#2f5fb3}.sort-head:focus-visible{outline:2px solid #2f5fb3;outline-offset:2px;border-radius:4px}
.select-cell{width:36px;text-align:center}.select-cell input{width:18px;height:18px;cursor:pointer}
.selection-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.badge.orange{background:#ffe8cc;color:#9a4b00}.badge.red{background:#fde2e4;color:#a52b48}
tr.row-attention>td{background:#fff4e5}

/* v1.6.2: Voiso agent panel, call pop-up and message history */
#voiso-dock{position:fixed;inset:24px;z-index:900;background:#fff;border-radius:14px;box-shadow:0 20px 60px rgba(20,30,50,.35);display:none;flex-direction:column;overflow:hidden}
#voiso-dock.open{display:flex}#voiso-dock iframe{flex:1;width:100%;min-height:600px;border:0}
.voiso-dock-head{display:flex;align-items:center;gap:12px;padding:10px 14px;border-bottom:1px solid #e6e9f0}.voiso-dock-head .small{flex:1}
#voiso-pop{position:fixed;right:20px;bottom:20px;z-index:950;width:320px;background:#fff;border:1px solid #d9dfeb;border-left:4px solid #2f5fb3;border-radius:12px;box-shadow:0 12px 40px rgba(20,30,50,.25);padding:14px;display:none;gap:6px;flex-direction:column}
#voiso-pop.open{display:flex}.voiso-pop-head{display:flex;justify-content:space-between;align-items:center}
[dir=rtl] #voiso-pop{right:auto;left:20px;border-left:1px solid #d9dfeb;border-right:4px solid #2f5fb3}
.comm-list{list-style:none;padding:0;margin:8px 0;display:flex;flex-direction:column;gap:8px;max-height:320px;overflow:auto}.comm-list .comm{padding:8px 10px;border-radius:10px;background:#f4f6fa}.comm-list .comm.outbound{background:#eaf1ff}
tr.row-approved>td{background:#effaf3}

/* ===================== v1.7 theme: ERP + CRM redesign ===================== */
:root{font-family:"IBM Plex Sans","IBM Plex Sans Arabic",-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,sans-serif;color:#1A2030;background:#F4F5F8;--muted:#5F6878;--line:#E3E6EC;--accent:#A81939;--accent-soft:#FBEAEE;--ink:#1A2030;--warn:#A35A00;--warn-soft:#FFF1DE;--ok:#1F7A5C;--ok-soft:#E6F4EE;--info:#2456A6;--info-soft:#E8F0FC}
[lang=ar] :root,html[lang=ar]{font-family:"IBM Plex Sans Arabic","IBM Plex Sans",Tahoma,sans-serif}
body{background:#F4F5F8}
.mono,.stat-number,.report-number{font-family:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-variant-numeric:tabular-nums}
.shell{background:#F4F5F8}
.sidebar{background:#FFFFFF;backdrop-filter:none;border-inline-end:1px solid var(--line);padding:20px 14px}
.brand-mark{background:var(--accent)!important}
.nav{gap:2px}
.nav-group{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:16px 12px 6px}
.nav a{color:#3A4254;font-size:14px;font-weight:500;padding:9px 12px;border-radius:10px;min-height:40px}
.nav a:hover{background:#EEF0F4;color:var(--ink)}
.nav a.active{background:var(--accent-soft);color:var(--accent);box-shadow:none;font-weight:600}
.nav a>span:first-of-type{flex:1}
.nav-count{background:var(--accent);color:#fff;border-radius:999px;padding:1px 8px;font-size:12px;font-weight:600}
.nav-count.warn{background:var(--warn)}
.topbar{background:#FFFFFF;margin:0 -36px 24px;padding:12px 36px;min-height:66px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.global-search{position:relative;flex:1 1 320px;display:flex;align-items:center;gap:10px;height:42px;padding:0 14px;border:1px solid #D9DDE5;border-radius:12px;background:#F8F9FB;color:var(--muted)}
.global-search:focus-within{border-color:#ac5970;box-shadow:0 0 0 3px #ad193811;background:#fff}
.global-search input{border:0;background:transparent;padding:0;height:40px;box-shadow:none!important;font-size:14px}
.global-results{position:absolute;inset-inline:0;top:46px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 50px #1d294530;z-index:40;max-height:70vh;overflow:auto;padding:6px}
.gs-head{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:10px 10px 4px}
.gs-row{all:unset;box-sizing:border-box;display:flex;justify-content:space-between;gap:12px;width:100%;padding:10px;border-radius:10px;cursor:pointer;font-size:14px;color:var(--ink)}
.gs-row:hover,.gs-row:focus-visible{background:#F1F3F7}
.card,.stat{background:#FFFFFF;border:1px solid var(--line);border-radius:16px;box-shadow:none}
.button{border-radius:10px;font-weight:600;min-height:40px}
.button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.button.danger{color:#A81939;border-color:#F3B8C4}
h1{font-weight:700;letter-spacing:-.02em}
dialog::backdrop{background:#1A203066;backdrop-filter:none}
dialog.drawer{margin:0 0 0 auto;height:100vh;max-height:100vh;width:min(760px,100vw);border-radius:0;border:0;border-inline-start:1px solid var(--line)}
[dir=rtl] dialog.drawer{margin:0 auto 0 0}
/* Overview */

.attention{display:flex;flex-direction:column;gap:4px;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:16px;color:var(--ink)}
.attention:hover{border-color:#cfd4de}
.attention span{font-size:12px;color:var(--muted)}.attention strong{font-size:22px}.attention small{font-size:12px;color:var(--muted)}
.attention.accent strong,.attention.accent small{color:var(--accent)}.attention.warn strong{color:var(--warn)}.attention.ok small{color:var(--ok)}
.kpi-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin-bottom:16px}
.kpi-strip>div{padding:16px 22px;border-inline-end:1px solid #EEF0F4;display:flex;flex-direction:column;gap:4px}
.kpi-strip span{font-size:13px;color:var(--muted)}.kpi-strip strong{font-size:24px}.kpi-strip small{font-size:12px;color:var(--muted)}
.share-bars,.seller-bars{display:flex;flex-direction:column;gap:10px;padding:16px 20px}
.share-row{display:grid;grid-template-columns:minmax(120px,1.2fr) minmax(80px,2fr) auto auto;gap:10px;align-items:center;font-size:13px}
.share-track{height:10px;border-radius:6px;background:#EEF0F4;overflow:hidden}.share-track>span{display:block;height:10px;border-radius:6px;background:var(--accent)}
.share-track>span.muted-bar{background:#5F6878}.share-value{text-align:end}.share-sub{color:var(--muted);text-align:end;font-size:12px}
.team-card{display:flex;gap:18px;align-items:center;flex-wrap:wrap}.lb-mini{flex:1;min-width:200px}
/* Ranking */
.ranking-grid{display:grid;grid-template-columns:minmax(260px,1fr) minmax(0,1.6fr);gap:16px;margin-bottom:16px}
.score-card{display:flex;align-items:center;gap:22px;flex-wrap:wrap}.score-rank{font-size:18px;font-weight:600;margin-bottom:8px}
.score-ring{width:var(--size);height:var(--size);border-radius:50%;background:conic-gradient(var(--accent) 0 var(--pct),#EEF0F4 var(--pct) 100%);display:grid;place-items:center;flex-shrink:0}
.score-ring>div{width:80%;height:80%;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}
.score-ring span{font-size:calc(var(--size)/3.6);font-weight:700;line-height:1}.score-ring small{font-size:11px;color:var(--muted)}
.day-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.day{height:34px;border-radius:8px;display:grid;place-items:center;font-size:12px;font-weight:600;background:#EEF0F4;color:var(--muted)}
.day.s1{background:#F6D3DA;color:var(--ink)}.day.s2{background:#E9A3B1;color:var(--ink)}.day.s3{background:#C9485F;color:#fff}.day.s4{background:var(--accent);color:#fff}.day.sw{background:#fff;border:1px dashed #D9DDE5}
.mini-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-top:14px}
.mini-stat{padding:12px;border-radius:12px;background:#F8F9FB;display:flex;flex-direction:column;gap:4px}.mini-stat span{font-size:12px;color:var(--muted)}.mini-stat strong{font-size:20px}
.lb-row{display:grid;grid-template-columns:36px minmax(0,1fr) minmax(80px,1.4fr) 44px;gap:12px;align-items:center;padding:10px 6px;border-top:1px solid #EEF0F4;font-size:14px}
.lb-row:first-child{border-top:0}.lb-row.me{background:var(--accent-soft);border-radius:10px}
.lb-bar{height:8px;border-radius:6px;background:#EEF0F4;overflow:hidden}.lb-bar>span{display:block;height:8px;background:var(--accent)}
/* Order drawer: Dubai tracking and delivery */
.track-box,.delivery-box{display:flex;flex-direction:column;gap:12px}
.track-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.track-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.track-step{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:10px;align-items:center;font-size:14px;color:var(--muted)}
.track-step .dot{width:12px;height:12px;border-radius:50%;border:2px solid #C9CED8;background:#fff}
.track-step.done{color:var(--ink)}.track-step.done .dot{background:var(--ok);border-color:var(--ok)}
.track-step.current{color:var(--ink);font-weight:600}.track-step.current .dot{border-color:var(--ok);box-shadow:0 0 0 4px #DDF1E8}
.track-step.late{color:var(--warn);font-weight:600}.track-step.late .dot{border-color:var(--warn);box-shadow:0 0 0 4px var(--warn-soft)}
/* Inventory bulk actions */
.bulk-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 16px;margin-bottom:14px;background:var(--ink);color:#fff;border-radius:14px}
.bulk-bar .spacer{flex:1}.bulk-bar .button{min-height:34px}
.check{display:flex!important;align-items:center;gap:10px;font-weight:500}
@media (max-width:860px){.topbar{margin:0 -16px 18px;padding:10px 16px}.ranking-grid{grid-template-columns:1fr}.share-row{grid-template-columns:1fr auto}.share-track,.share-sub{display:none}dialog.drawer{width:100vw}}

/* v1.7.2: Overview tiles that open a filtered list are buttons. */
button.attention{font:inherit;text-align:start;cursor:pointer;width:100%}
.dubai-filters{margin:-4px 0 14px}
.ai-transfer-table th,.ai-transfer-table td{padding-inline:10px;white-space:normal}
.ai-transfer-table td:last-child{text-align:end}

/* v2: customer inbox */

.box-line{color:var(--ink,#1b2733)}
.box-line strong{background:#fff4d6;border-radius:4px;padding:0 5px}
.line-with-thumb{display:flex;gap:14px;align-items:flex-start}
.line-thumb{flex:0 0 96px;width:96px;height:96px;border-radius:10px;overflow:hidden;background:#f3f4f7;border:1px solid #e3e6ec;display:block}
.line-thumb img{width:100%;height:100%;object-fit:contain;background:#fff}
.line-thumb.empty{background:#f3f4f7}
@media (max-width:640px){.line-thumb{flex-basis:56px;width:56px;height:56px}.product-name{min-width:0;max-width:none}}/* 3.3.1: − n + and the stock column stay on a phone screen */
.awb-preview{max-width:900px;margin:24px auto;padding:0 16px}
.awb-preview h2{font-size:1rem;margin:0 0 10px}
.awb-preview object{width:100%;height:1100px;border:1px solid #e3e6ec;border-radius:10px;background:#fff}
@media print{.awb-preview{display:none!important}}
/* 2.1.2: English documents (Settings → Template → Document language) read left to right. */
.print-document[dir="ltr"]{direction:ltr}.print-document[dir="ltr"] table{direction:ltr}.print-document[dir="ltr"] th,.print-document[dir="ltr"] td{text-align:left}.print-document[dir="ltr"] .print-serial{text-align:left}
/* 2.3: Live Stock Count */
.live-scan .card-body{display:grid;gap:14px}
.lc-title{display:grid;gap:6px;padding:22px 18px;border-radius:14px;background:#f3f4f7;border:2px solid #e3e6ec;min-height:118px;align-content:center;text-align:center}
.lc-title .lc-name{font-size:clamp(22px,4.2vw,40px);font-weight:700;line-height:1.15;overflow-wrap:anywhere}
.lc-title .lc-sub{font-size:15px;color:#5b6475}
.lc-title.ok{background:#ecf8f0;border-color:#34a46a}.lc-title.serial{background:#fff7e6;border-color:#e0a21a}
.lc-title.unknown,.lc-title.error{background:#fdeeee;border-color:#c43b3b}.lc-title.undo{background:#eef2fb;border-color:#5b7bd5}.lc-title.busy{opacity:.75}
.lc-input{font-size:22px;padding:14px 16px;width:100%;border-radius:12px;border:2px solid #c9ced8}
.lc-input:focus{border-color:#a81939;outline:none}
.lc-actions{align-items:center;gap:16px;flex-wrap:wrap}.lc-undo{font-size:17px;padding:10px 18px}
.sp-task{width:100%;background:none;border:0;border-bottom:1px solid #eef0f4;text-align:start;cursor:pointer;font:inherit;color:inherit}.sp-task.active{background:#fff7e6;border-radius:8px}.sp-task.done{opacity:.6}
.lc-feed-undone td{opacity:.5;text-decoration:line-through}
.lc-title.box{background:#f1effb;border-color:#6b5bd5}
.lc-boxbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.lc-boxnow{font-size:16px}.lc-newbox{font-size:16px;padding:10px 16px}
.lc-boxform{display:grid;gap:10px;margin-top:12px}.lc-boxform label{display:grid;gap:6px;font-weight:600}
.lc-recent{display:grid;gap:4px}.lc-row{display:flex;justify-content:space-between;gap:10px;padding:6px 10px;border-bottom:1px solid #eef0f4;font-size:14px}.lc-row.undone{opacity:.45;text-decoration:line-through}

/* 2.3.10: new version available */
.update-bar{position:fixed;left:50%;bottom:72px;transform:translateX(-50%);z-index:1000;display:flex;gap:12px;align-items:center;background:#1f2430;color:#fff;padding:10px 14px;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.2);max-width:calc(100vw - 32px);font-size:14px}
/* 2.7: phone / iPad camera scanner */
.camera-button{white-space:nowrap}
#lc-camera{margin-top:10px;width:100%;justify-content:center;font-size:1.05rem;padding:12px}
dialog.camera-scan{width:min(560px,100vw);max-width:100vw;max-height:100dvh;padding:0;border:0;border-radius:16px;background:#0d1017;color:#fff;overflow:auto}
dialog.camera-scan::backdrop{background:#000c}
@media(max-width:600px){dialog.camera-scan{width:100vw;height:100dvh;border-radius:0}}
.camera-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px}
.camera-close{background:none;border:0;color:#fff;font-size:2rem;line-height:1;padding:0 6px}
.camera-view{position:relative;background:#000;aspect-ratio:3/4;max-height:62dvh;overflow:hidden;margin:0 auto}
.camera-view video{width:100%;height:100%;object-fit:cover;display:block}
.camera-guide{position:absolute;left:5%;right:5%;top:32%;height:36%;border:3px solid #ffffffcc;border-radius:12px;box-shadow:0 0 0 999px #0006;transition:border-color .15s}
.camera-guide.hit{border-color:#3ddc84}
.camera-result{margin:12px 16px 4px;padding:12px 14px;border-radius:10px;background:#1c2230;font-size:1.05rem;min-height:1.5em;word-break:break-word}
.camera-result.ok{background:#14532d}.camera-result.error{background:#7f1d1d}.camera-result.busy{background:#1e3a5f}
.camera-actions{display:flex;gap:10px;flex-wrap:wrap;padding:6px 16px}
.camera-actions .button{flex:1;justify-content:center}
.camera-hint{margin:6px 16px 16px;color:#ffffffa8;font-size:.9rem}
/* 2.8: packing photos */
.photo-ok{color:#15803d}.photo-bad{color:#b91c1c}.photo-wait{color:#b45309}
dialog.photo-check{width:min(560px,100vw);max-width:100vw;max-height:100dvh;border:0;border-radius:16px;padding:18px;overflow:auto}
dialog.photo-check::backdrop{background:#000a}
@media(max-width:600px){dialog.photo-check{width:100vw;height:100dvh;border-radius:0}}
.photo-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}
.photo-check .camera-close{color:inherit}
.photo-slots{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.photo-slot{display:flex;flex-direction:column;gap:6px;border:1px dashed var(--line);border-radius:12px;padding:12px;cursor:pointer;text-align:center}
.photo-slot input{display:none}.photo-slot img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}
.photo-slot-title{font-weight:600}.photo-pick{justify-content:center}
.photo-result{margin:6px 0 12px;padding:10px 12px;border-radius:10px;min-height:1.4em}
.photo-result:empty{display:none}.photo-result.ok{background:#dcfce7}.photo-result.error{background:#fee2e2}.photo-result.busy{background:#e0e7ff}
.packing-photos .photo-line{margin:12px 0}.photo-round{display:flex;gap:12px;align-items:flex-start;margin:8px 0}
.photo-thumbs{display:flex;gap:6px}.photo-thumbs img{width:84px;height:84px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
.photo-tips{margin:8px 0 0;padding-inline-start:18px;color:var(--muted)}
.lc-paste{margin:12px 0}.lc-paste textarea{width:100%;font-family:ui-monospace,monospace}

/* ===== 3.0 theme layer: tokens, dark mode, command palette, Today, order steps, Ask incrediERP ===== */
:root{--bg:#f1f3f9;--bg-shell:#f4f5f9;--surface:#ffffffdc;--surface-solid:#fff;--surface-2:#f8f9fb;--surface-3:#fbfcfe;--ink:#202638;--ink-2:#3a4456;--muted:#737b8c;--line:#e6e9ef;--line-2:#eef0f5;--sidebar-bg:#ffffff9c;--nav-active:#fff;--input-bg:#fff;--shadow:#27314b0a;--toast:#243249;--tile:#fff}
:root[data-theme="dark"]{--bg:#12151c;--bg-shell:#12151c;--surface:#1b2028;--surface-solid:#1b2028;--surface-2:#20262f;--surface-3:#1f242d;--ink:#e6e9f0;--ink-2:#c9cfdb;--muted:#8d95a6;--line:#2b323d;--line-2:#262c36;--sidebar-bg:#161a21;--nav-active:#252b35;--input-bg:#161a21;--shadow:#0000004d;--toast:#e6e9f0;--tile:#1b2028;color-scheme:dark}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--bg:#12151c;--bg-shell:#12151c;--surface:#1b2028;--surface-solid:#1b2028;--surface-2:#20262f;--surface-3:#1f242d;--ink:#e6e9f0;--ink-2:#c9cfdb;--muted:#8d95a6;--line:#2b323d;--line-2:#262c36;--sidebar-bg:#161a21;--nav-active:#252b35;--input-bg:#161a21;--shadow:#0000004d;--toast:#e6e9f0;--tile:#1b2028;color-scheme:dark}}
:root{color:var(--ink);background:var(--bg)}
.shell{background:var(--bg-shell)}.sidebar{background:var(--sidebar-bg);border-inline-end-color:var(--line)}.nav a{color:var(--ink-2)}.nav a.active{background:var(--nav-active);color:var(--ink)}
.topbar{border-bottom-color:var(--line)}.topbar select{background:var(--surface);color:var(--ink);border-color:var(--line)}.lang-button{background:var(--surface);color:var(--ink);border-color:var(--line)}
.card,.stat,.attention,.kpi-strip{background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:0 4px 15px var(--shadow)}.card-head,.list-item,td{border-bottom-color:var(--line-2)}th{background:var(--surface-3);color:var(--muted);border-bottom-color:var(--line)}
.button{background:var(--surface-solid);color:var(--ink-2);border-color:var(--line)}.button.soft{background:var(--surface-2)}.pill{background:var(--surface-solid);color:var(--ink-2);border-color:var(--line)}
input,select,textarea{background:var(--input-bg);color:var(--ink);border-color:var(--line)}.global-search{background:var(--surface-2);border-color:var(--line)}.global-search input{color:var(--ink)}.global-results{background:var(--surface-solid);border-color:var(--line)}.gs-row{color:var(--ink)}.gs-row:hover,.gs-row[aria-selected="true"]{background:var(--surface-2)}
dialog{background:var(--surface-solid);color:var(--ink);border-color:var(--line)}.modal-head{background:var(--surface-solid);border-bottom-color:var(--line)}.modal-close{color:var(--muted)}.empty{color:var(--muted)}#toast{background:var(--toast);color:var(--bg)}
:root[data-theme="dark"] .notice,:root:not([data-theme="light"]) .notice{background:#1f2a3a;color:#b9cce8;border-color:#2c3d55}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]) .notice{background:#edf3fb;color:#456890;border-color:#dce7f5}}
:root[data-theme="light"] .notice{background:#edf3fb;color:#456890;border-color:#dce7f5}
:root[data-theme="dark"] .badge{background:#2a303b;color:#c9cfdb}:root[data-theme="dark"] .notice.warning{background:#3a2a1a;color:#f0c38e;border-color:#5a4020}:root[data-theme="dark"] .error-box{background:#3a1d24;border-color:#6a2a3a;color:#f3b3c0}
:root[data-theme="dark"] .account-popover,:root[data-theme="dark"] .customer-search-panel,:root[data-theme="dark"] .item-match,:root[data-theme="dark"] .report-controls,:root[data-theme="dark"] .stock-help{background:var(--surface-2);color:var(--ink);border-color:var(--line)}
:root[data-theme="dark"] img.thumb,:root[data-theme="dark"] .product-thumb{filter:brightness(.92)}
.icon-button{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink-2);font-size:.875rem;white-space:nowrap}.icon-button .icon{width:18px;height:18px}
.kbd{font:600 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:4px 6px;background:var(--surface-solid)}
@media(max-width:950px){.kbd{display:none}}
.net-bar{position:fixed;top:0;left:0;right:0;z-index:1200;text-align:center;padding:6px 10px;background:#b45309;color:#fff;font-size:13px}
/* Today */
.today-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);gap:18px;margin-bottom:22px}@media(max-width:950px){.today-grid{grid-template-columns:1fr}}
.today-list{display:flex;flex-direction:column}.today-row{display:flex;align-items:center;gap:14px;padding:13px 18px;border-bottom:1px solid var(--line-2);color:var(--ink);text-decoration:none}.today-row:last-child{border-bottom:0}.today-row:hover{background:var(--surface-2)}
.today-row>strong{min-width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:var(--surface-2);font-size:1.15rem}.today-row.accent>strong{background:#a8193918;color:var(--accent)}.today-row.warn>strong{background:#b4530920;color:#b45309}
.today-row>span{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.today-row small{color:var(--muted)}.today-row .icon{opacity:.35}
.all-clear{display:flex;align-items:center;gap:10px;padding:22px;color:var(--green)}.brief-body{line-height:1.7;font-size:.95rem;white-space:normal}
/* Order steps */
.steps{display:flex;gap:4px;margin:0 0 10px;overflow-x:auto;padding-bottom:4px}.step{flex:1 1 0;min-width:72px;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;border-radius:12px;background:var(--surface-2);color:var(--muted);font-size:.78rem;text-align:center;position:relative}
.step .step-dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--line);display:grid;place-items:center;font-size:12px;background:var(--surface-solid)}.step .step-label{font-weight:600}.step small{font-size:.72rem;line-height:1.2}
.step.done{color:var(--green)}.step.done .step-dot{background:var(--green);border-color:var(--green);color:#fff}.step.current{color:var(--ink);background:#a8193912}.step.current .step-dot{border-color:var(--accent);box-shadow:0 0 0 3px #a8193922}.step.blocked{opacity:.55}.step.skipped{opacity:.4;text-decoration:line-through}
.next-action{display:flex;flex-wrap:wrap;gap:6px;align-items:baseline;padding:10px 14px;margin-bottom:16px;border-radius:12px;background:#a8193910;color:var(--ink);font-size:.9rem}
@media(max-width:700px){.steps{gap:2px}.step{min-width:62px}}
.topbar{flex-wrap:wrap;row-gap:8px}.sidebar-bottom .link-button{display:inline-block;margin:8px 10px 0 0}[dir="rtl"] .sidebar-bottom .link-button{margin:8px 0 0 10px}
/* 3.0.1: previous / next order arrows in the order window header; the Shopify note above Activity. */
.modal-head .order-nav{display:flex;align-items:center;gap:4px;margin-inline-start:auto}.modal-head .order-nav-btn{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--ink-2);cursor:pointer}.modal-head .order-nav-btn .icon{width:18px;height:18px}.modal-head .order-nav-btn:hover:not([disabled]){background:var(--surface-solid);color:var(--ink)}.modal-head .order-nav-btn[disabled]{opacity:.35;cursor:default}
.shopify-note-text{white-space:pre-wrap;background:var(--surface-2);border:1px solid var(--line);border-inline-start:3px solid #d97706;border-radius:10px;padding:12px 14px;margin-top:8px;font-size:.9rem;color:var(--ink)}
.shopify-attributes{display:grid;gap:6px;margin-top:10px;font-size:.875rem}.shopify-attributes div{display:flex;gap:8px}.shopify-attributes dt{color:var(--muted);min-width:120px}.shopify-attributes dd{margin:0;color:var(--ink)}
/* 3.0.1: dark mode for the order window and the 3.0 dark rules also when dark comes from the system (no toggle set):
   the order card, transactions, scan panel, badges and warnings kept light backgrounds under light text. */
:root[data-theme="dark"] .order-detail-top,:root[data-theme="dark"] .finance-panel,:root[data-theme="dark"] .line-entry,:root[data-theme="dark"] .seller-display,:root[data-theme="dark"] .customer-search-panel,:root[data-theme="dark"] .stock-help,:root[data-theme="dark"] .account-popover,:root[data-theme="dark"] .item-match,:root[data-theme="dark"] .report-controls{background:var(--surface-2);color:var(--ink);border-color:var(--line)}:root[data-theme="dark"] .stock-help table,:root[data-theme="dark"] .line-thumb img{background:var(--surface-solid)}:root[data-theme="dark"] .line-thumb,:root[data-theme="dark"] .line-thumb.empty,:root[data-theme="dark"] .modal-close,:root[data-theme="dark"] tr.clickable:hover{background:var(--surface-2)}:root[data-theme="dark"] .scan-panel{background:#1c2636;border-color:#2c3d55}:root[data-theme="dark"] .scan-label{color:#9fb8d6}:root[data-theme="dark"] .box-line strong{background:#3a3220;color:#f0d58e}:root[data-theme="dark"] .badge{background:#2a303b;color:#c9cfdb}:root[data-theme="dark"] .notice.warning{background:#3a2a1a;color:#f0c38e;border-color:#5a4020}:root[data-theme="dark"] .error-box{background:#3a1d24;border-color:#6a2a3a;color:#f3b3c0}:root[data-theme="dark"] img.thumb,:root[data-theme="dark"] .product-thumb{filter:brightness(.92)}:root[data-theme="dark"] .serial-tags span{background:var(--surface-2);color:var(--ink-2)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .order-detail-top,:root:not([data-theme="light"]) .finance-panel,:root:not([data-theme="light"]) .line-entry,:root:not([data-theme="light"]) .seller-display,:root:not([data-theme="light"]) .customer-search-panel,:root:not([data-theme="light"]) .stock-help,:root:not([data-theme="light"]) .account-popover,:root:not([data-theme="light"]) .item-match,:root:not([data-theme="light"]) .report-controls{background:var(--surface-2);color:var(--ink);border-color:var(--line)}:root:not([data-theme="light"]) .stock-help table,:root:not([data-theme="light"]) .line-thumb img{background:var(--surface-solid)}:root:not([data-theme="light"]) .line-thumb,:root:not([data-theme="light"]) .line-thumb.empty,:root:not([data-theme="light"]) .modal-close,:root:not([data-theme="light"]) tr.clickable:hover{background:var(--surface-2)}:root:not([data-theme="light"]) .scan-panel{background:#1c2636;border-color:#2c3d55}:root:not([data-theme="light"]) .scan-label{color:#9fb8d6}:root:not([data-theme="light"]) .box-line strong{background:#3a3220;color:#f0d58e}:root:not([data-theme="light"]) .badge{background:#2a303b;color:#c9cfdb}:root:not([data-theme="light"]) .notice.warning{background:#3a2a1a;color:#f0c38e;border-color:#5a4020}:root:not([data-theme="light"]) .error-box{background:#3a1d24;border-color:#6a2a3a;color:#f3b3c0}:root:not([data-theme="light"]) img.thumb,:root:not([data-theme="light"]) .product-thumb{filter:brightness(.92)}:root:not([data-theme="light"]) .serial-tags span{background:var(--surface-2);color:var(--ink-2)}}
/* 3.0.2: Settings → Display (light / dark / automatic). */
.display-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.display-option{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:var(--ink);text-align:start;cursor:pointer}.display-option.selected{border-color:var(--accent);box-shadow:0 0 0 2px #a8193926}
/* 3.0.7: recount checklist in Live Stock Count (red until scanned). */
.lc-focus-head{margin:14px 0 6px}.lc-focus{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.lc-focus-row{display:grid;grid-template-columns:70px minmax(0,1fr) auto;gap:10px;align-items:center;padding:9px 12px;border-radius:10px;border:1px solid var(--line)}.lc-focus-row.todo{background:#fde2e4;border-color:#f3b3bd;color:#7a1528}.lc-focus-row.done{background:#e3f5ea;border-color:#b8e2c6;color:#155c33}.lc-focus-box{font-weight:700}.lc-focus-count{font-weight:700}
:root[data-theme="dark"] .lc-focus-row.todo{background:#3a1d24;border-color:#6a2a3a;color:#f3b3c0}:root[data-theme="dark"] .lc-focus-row.done{background:#163024;border-color:#2b5a40;color:#a8e2bf}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .lc-focus-row.todo{background:#3a1d24;border-color:#6a2a3a;color:#f3b3c0}:root:not([data-theme="light"]) .lc-focus-row.done{background:#163024;border-color:#2b5a40;color:#a8e2bf}}
.recount-row td{background:#fff4f5}:root[data-theme="dark"] .recount-row td{background:#2a1a1e}
.lc-focus-name .subline{display:block}
/* 3.0.9: the incrediDeals sticker shown in the packing photo tips. */
.photo-tips .photo-sticker-tip{display:flex;gap:10px;align-items:center;list-style:none;margin-inline-start:-18px}.photo-sticker-tip img{border:1px solid var(--line);border-radius:8px;background:#fff;flex:none}
/* 3.0.9: financing (down payment + admin fees) on orders and invoices. */
.financing-box{margin:12px 0 4px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}.financing-box .finance-summary{margin-top:8px}
.print-financing{margin-top:16px}.print-financing table{margin-top:6px}

/* 3.1.4: change items in the order window */
.qty-stepper{display:inline-flex;align-items:center;gap:8px}
.qty-stepper .button{min-width:32px;padding:4px 8px;justify-content:center}
.line-edit-links{margin-top:6px}
.line-edit-links .danger-text{color:var(--accent)}
.line-edit-form{margin:16px 0;padding:14px;border:1px dashed var(--line,#d8dce3);border-radius:12px}
.line-edit-form h3{margin:0 0 10px;font-size:15px}
/* 3.1.5: the product column wraps so Quantity / Price / Packing stay inside the order window */
.order-detail-lines td:first-child{white-space:normal}
.order-detail-lines .line-upc{overflow-wrap:anywhere}

/* 3.1.8: product window variant */
.variant-block{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:2px 0 6px}
.variant-label{font-weight:600}
.variant-chips{display:flex;flex-wrap:wrap;gap:8px}
.variant-chip{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface-2,#eef1f6);color:var(--ink,#1A2030);font-weight:600;font-size:15px}
.variant-dot{width:14px;height:14px;border-radius:50%;border:1px solid var(--muted);display:inline-block}

/* 3.2.0: Capture payment */
.capture-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin-top:14px}
.capture-card{border:1px solid var(--line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px}
.capture-card h3{margin:0;font-size:16px}

/* 3.3.0: the counter invoice's one action sits in the Next bar */
.next-action{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.next-action-button{margin-inline-start:auto}

/* 4.0 check prices / costs */
.pc-count{margin-inline-start:6px}
.pc-rules-line{margin:-4px 0 10px}
.pc-filters{margin-bottom:12px}
.pc-table .pc-variant .variant-block{margin:4px 0}
.pc-table .pc-variant .variant-label{display:none}
.pc-table .pc-variant .variant-chip{font-size:13px;padding:3px 9px}
.cost-stats{margin-bottom:12px}
.cost-actions{margin-bottom:12px;flex-wrap:wrap}
.cost-filters{margin-bottom:12px}
.cost-walk-product{margin:8px 0 12px}
.cost-walk-facts{margin-bottom:14px}
.cost-import-preview{margin-top:16px}
.cost-line{margin:-6px 0 8px}

/* 4.1 serial counts */
.sc-serials{margin-top:14px;padding-top:10px;border-top:1px solid var(--line)}.sc-pick{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin:6px 0}.sc-pick select{min-width:160px}.sc-pick select[name=countGoneOrder]{grid-column:1 / -1}.sc-ok{color:var(--ok)}.sc-hint{margin:4px 0}

/* ===== 4.0 layout layer: one dialog system, phone sheets, touch targets, bottom tab bar, card lists, theme fixes ===== */
dialog.erp-modal{max-width:none;max-height:min(90vh,100dvh);width:min(var(--dlg-w,720px),calc(100vw - 32px));display:none;flex-direction:column;padding:0;overflow:hidden;border-radius:18px}
dialog.erp-modal[open]{display:flex}
dialog.erp-modal.size-s{--dlg-w:480px}dialog.erp-modal.size-m{--dlg-w:720px}dialog.erp-modal.size-l{--dlg-w:960px}dialog.erp-modal.size-xl{--dlg-w:1200px}dialog.erp-modal.file-import-modal{--dlg-w:1100px}
@media(min-width:900px){dialog.erp-modal:not(.file-import-modal){width:min(var(--dlg-w,720px),calc(100vw - 48px))}}
dialog.erp-modal>.modal-head{position:static;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px}
dialog.erp-modal>.modal-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
dialog.erp-modal>.modal-body>form:last-child>.form-footer:last-child,dialog.erp-modal>.modal-body>.form-footer:last-child{position:sticky;bottom:-1px;background:var(--surface-solid,#fff);padding:12px 0;margin-top:14px;border-top:1px solid var(--line);z-index:2}
dialog.erp-modal.drawer{width:min(760px,100vw);height:100dvh;max-height:100dvh;border-radius:0;margin:0 0 0 auto;border:0;border-inline-start:1px solid var(--line)}
[dir=rtl] dialog.erp-modal.drawer{margin:0 auto 0 0}
#modal2::backdrop{background:#25314d2e}
.more-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}.more-row{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:12px;color:inherit;text-decoration:none;min-height:48px}.more-row .icon{width:20px;height:20px}
.tabbar{display:none;position:fixed;left:0;right:0;bottom:0;z-index:25;background:var(--surface-solid,#fff);border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom,0px));justify-content:space-around}
.tabbar a,.tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:inherit;font-size:11px;color:var(--muted);background:none;border:0;min-height:48px;text-decoration:none;padding:0}
.tabbar .icon{width:22px;height:22px}.tabbar .active{color:var(--accent);font-weight:600}
@media(max-width:700px){
  dialog.erp-modal,dialog.erp-modal.drawer,dialog.erp-modal.file-import-modal{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;border:0;inset:0}
  dialog.erp-modal>.modal-head{padding:calc(12px + env(safe-area-inset-top,0px)) 16px 10px}
  dialog.erp-modal>.modal-body{padding:14px 16px calc(16px + env(safe-area-inset-bottom,0px))}
  dialog.erp-modal>.modal-body>form:last-child>.form-footer:last-child,dialog.erp-modal>.modal-body>.form-footer:last-child{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
  .button,.button.small,button,.pill,.nav a,.icon-button,.lang-button{min-height:44px}
  .modal-close,.order-nav-btn{width:44px;height:44px;min-height:44px;border-radius:50%}
  input,select,textarea,.search,#global-search,.topbar select{font-size:16px!important;min-height:44px}
  .qty-stepper .button,.qty-stepper button{min-width:44px}
  .sidebar{display:none}
  .main{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
  .topbar{flex-wrap:nowrap;gap:8px;position:sticky;top:0;z-index:20}
  .topbar .global-search{flex:1 1 auto;min-width:0}
  #location-filter{max-width:120px}
  .workspace-tabs,.filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:4px}.workspace-tabs::-webkit-scrollbar,.filters::-webkit-scrollbar{display:none}
  .tabbar{display:flex}
  .table-wrap[data-cards]{overflow:visible}
  .table-wrap[data-cards] table,.table-wrap[data-cards] tbody,.table-wrap[data-cards] tr,.table-wrap[data-cards] td{display:block;white-space:normal;width:auto;min-width:0}
  .table-wrap[data-cards] thead{display:none}
  .table-wrap[data-cards] tr{border:1px solid var(--line);border-radius:14px;margin:8px 0;padding:6px 12px;background:var(--surface)}
  .table-wrap[data-cards] td{padding:6px 0;border:0;display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:start}
  .table-wrap[data-cards] td[data-label]::before{content:attr(data-label);color:var(--muted);font-size:12px;flex:0 0 auto}
  .table-wrap[data-cards] td:empty{display:none}
  .order-detail-top .meta-grid{grid-template-columns:1fr 1fr}
  .steps{gap:4px}.step{min-width:0;flex:1}
  .next-action{flex-wrap:wrap;gap:8px}.next-action .next-action-button{margin-inline-start:0;width:100%}.next-action .next-action-button .button{width:100%}
  .line-thumb{flex-basis:48px;width:48px;height:48px}
}
/* theme fixes found in the 4.0 review */
.topbar{background:var(--surface-solid,#fff)}
#toast{color:#fff;background:var(--toast,#243249);inset:auto auto 26px 50%;margin:0;border:0;padding:13px 20px}#toast.error{background:var(--accent)}#toast:popover-open{display:block}
:root[data-theme="dark"] .badge.green,:root:not([data-theme="light"]) .badge.green{background:#1e3a2c;color:#8fe0b3}
:root[data-theme="dark"] .badge.blue,:root:not([data-theme="light"]) .badge.blue{background:#1f2f45;color:#9cc4f0}
:root[data-theme="dark"] .badge.amber,:root:not([data-theme="light"]) .badge.amber{background:#3a2d16;color:#f0c38e}
:root[data-theme="dark"] .badge.red,:root:not([data-theme="light"]) .badge.red{background:#3f1f27;color:#f3a5b3}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]) .badge.green{background:#eaf5ef;color:#287659}:root:not([data-theme="dark"]) .badge.blue{background:#edf3fd;color:#356da8}:root:not([data-theme="dark"]) .badge.amber{background:#fff5e4;color:#a87620}:root:not([data-theme="dark"]) .badge.red{background:#fde2e4;color:#a52b48}}
:root[data-theme="light"] .badge.green{background:#eaf5ef;color:#287659}:root[data-theme="light"] .badge.blue{background:#edf3fd;color:#356da8}:root[data-theme="light"] .badge.amber{background:#fff5e4;color:#a87620}:root[data-theme="light"] .badge.red{background:#fde2e4;color:#a52b48}
:root .notice.warning{background:var(--warn-soft,#fff5e4);color:#8a5a12;border-color:#f0d9a8}
:root[data-theme="dark"] .notice.warning{background:#3a2a1a;color:#f0c38e;border-color:#5a4020}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .notice.warning{background:#3a2a1a;color:#f0c38e;border-color:#5a4020}}
:root[data-theme="light"]{color-scheme:light}
:root[data-theme="dark"] .lc-title,:root:not([data-theme="light"]) .lc-title{background:var(--surface-2);border-color:var(--line);color:var(--ink)}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]) .lc-title{background:#f3f4f7;border-color:#e3e6ec;color:#202638}}
:root[data-theme="light"] .lc-title{background:#f3f4f7;border-color:#e3e6ec;color:#202638}
:root[data-theme="dark"] .lc-title .lc-sub,:root:not([data-theme="light"]) .lc-title .lc-sub{color:var(--muted)}
:root[data-theme="dark"] .global-search:focus-within,:root:not([data-theme="light"]) .global-search:focus-within{background:var(--input-bg)}
/* 4.0 payment method */
.pm-notice-banner{position:fixed;left:16px;right:16px;bottom:16px;z-index:90;display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:14px;background:#a52b48;color:#fff;box-shadow:0 10px 30px #a52b4840;font-size:.9rem}
.pm-notice-text{flex:1;min-width:0}.pm-notice-text p{margin:0}.pm-notice-text p+p{margin-top:6px}
.pm-notice-banner .pm-notice-close{background:#fff;color:#a52b48;border-color:#fff;flex:0 0 auto}
.pm-notice-banner.good{background:#1f7a4d}.pm-notice-banner.good .pm-notice-close{color:#1f7a4d}/* 5.2.9: points given by Admin */
.pm-admin{margin-top:10px}
.pm-badge{margin-top:4px}.pm-badge .muted{margin-inline-start:6px}
.pm-lost{margin-top:10px;padding-top:8px;border-top:1px solid var(--line)}.pm-lost strong{color:#a52b48}
.pm-review-meta{margin-top:12px}.pm-review-meta p{margin:6px 0}
@media (min-width:768px){.pm-notice-banner{inset-inline:auto 24px;max-width:520px}}
/* 4.1.2: the serial list on an order line takes the full width (phones show order lines as cards). */
.serial-pick-label{display:block;margin-top:6px;flex:1 0 100%}.serial-pick-label select{display:block;width:100%;margin-top:4px}
.serial-none{flex:1 0 100%}
@media (max-width:700px){.table-wrap[data-cards] td.line-product{flex-wrap:wrap}}

/* 4.1.4: branch cash statement */
.cash-card{cursor:pointer}.cash-card:hover{border-color:var(--accent,#a81939)}
.cash-card-more{float:inline-end;font-weight:600;color:var(--accent,#a81939)}
.cash-statement td.money.positive{color:var(--ok,#1f7a5c)}.cash-statement td.money.negative{color:var(--accent,#a81939)}
.cash-statement th,.cash-statement td{padding:8px 10px;font-size:14px}.cash-statement td:nth-child(2){white-space:normal;min-width:140px}.cash-statement td:nth-child(3){white-space:normal}

/* 4.1.5: Receive Stock session (Live Stock Count look) */
.receive-session .receive-details summary{cursor:pointer;font-weight:600;color:var(--muted)}
.receive-session .live-scan{display:grid;gap:12px;margin-top:12px}
.receive-scanrow{display:flex;gap:10px;align-items:center}.receive-scanrow .lc-input{flex:1}
.receive-serial-setup{display:grid;gap:10px}.receive-serial-setup label{display:grid;gap:6px;font-weight:600}
.receive-serial-count{display:flex;justify-content:space-between;align-items:center;gap:10px}
.receive-lines{display:grid;gap:8px;margin-top:14px}
.receive-line{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px}
.receive-line-name{min-width:0;display:grid;gap:4px}.receive-line-name .subline{overflow-wrap:anywhere}

/* 4.1.6: stock count Fix / Keep */
.sc-search{display:flex;gap:8px;align-items:center;margin:12px 0}.sc-search input{flex:1;max-width:420px}
.sc-fix{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:8px}.sc-fix form{display:flex;gap:6px;align-items:center}.sc-fix input{width:86px}
.sc-kept{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:12px;display:grid;gap:6px}
.sc-kept-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;font-size:14px}

/* 4.2.2: Box / Shelf on an approved receipt */
.receipt-box-edit{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin-top:6px}.receipt-box-edit input{max-width:160px}
/* 4.2.2: receipt / summary cards follow the theme (were light in dark mode) */
.receipt-summary{background:var(--surface-2,#f7f9fc);color:var(--ink,#202638);border:1px solid var(--line,#e6e9ef)}

/* 4.2.3: receipt line codes */
.receipt-codes{margin:4px 0}.receipt-codes .scanned-upc{text-decoration:underline;text-underline-offset:3px}

/* 4.3.1: live Receive Stock (sync state on the scanner; Admin's Receiving now card and watch window) */
.receive-live{font-size:13px;font-weight:600;color:var(--muted,#5b6475)}.receive-live.ok{color:var(--ok,#1f8a53)}.receive-live.off{color:var(--warn,#b7791f)}
.rl-sessions{display:grid;gap:12px}
.rl-session{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px;border:1px solid var(--line,#e6e9ef);border-radius:14px}
.rl-meta{display:grid;gap:4px;min-width:0}.rl-meta .badge{margin-inline-start:6px}
.lc-title.rl-mini{min-height:0;padding:10px 12px;gap:2px}.lc-title.rl-mini .lc-name{font-size:18px}.lc-title.rl-mini .lc-sub{font-size:13px}
.rl-h{margin:16px 0 8px;font-size:15px}
.rl-summary{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:12px 0}
.rl-summary>div{display:grid;gap:2px;padding:8px 10px;border:1px solid var(--line,#e6e9ef);border-radius:10px;background:var(--surface-2,#f7f9fc);min-width:0}
.rl-summary span{font-size:12px;color:var(--muted,#5b6475)}.rl-summary strong{overflow-wrap:anywhere}
.rl-ev-issue td{color:var(--accent,#c43b3b)}.rl-ev-undo td{opacity:.65}.rl-ev-done td{font-weight:600}
.rl-live{animation:rl-pulse 1.6s ease-in-out infinite}@keyframes rl-pulse{50%{opacity:.55}}
.rl-recent{margin-top:14px}.rl-recent summary{cursor:pointer;font-weight:600}
@media (max-width:700px){.rl-session{grid-template-columns:1fr}.rl-session .button{justify-self:start}}
@media (prefers-reduced-motion:reduce){.rl-live{animation:none}}
/* 4.3.1: the scan banner's state colours (ok / serial / error / undo / box) were lost to the 4.0 theme rules for .lc-title
   (both light and dark): Live Stock Count, Receive Stock and Admin's live view show them again, tinted from the tokens. */
:root:root .lc-title.ok{background:#ecf8f0;background:color-mix(in srgb,var(--ok,#1F7A5C) 16%,var(--surface-2,#f3f4f7));border-color:var(--ok,#1F7A5C)}
:root:root .lc-title.serial{background:#fff7e6;background:color-mix(in srgb,var(--warn,#A35A00) 16%,var(--surface-2,#f3f4f7));border-color:#e0a21a}
:root:root .lc-title.unknown,:root:root .lc-title.error{background:#fdeeee;background:color-mix(in srgb,var(--accent,#A81939) 14%,var(--surface-2,#f3f4f7));border-color:#c43b3b}
:root:root .lc-title.undo{background:#eef2fb;background:color-mix(in srgb,var(--info,#2456A6) 14%,var(--surface-2,#f3f4f7));border-color:#5b7bd5}
:root:root .lc-title.box{background:#f1effb;background:color-mix(in srgb,#6b5bd5 14%,var(--surface-2,#f3f4f7));border-color:#6b5bd5}

/* ===== 5.0 glass layer (owner: iOS 27 / macOS 27 look on the app chrome only) =====
   Sidebar, top bar, tab bar, dialogs, popovers and toasts are translucent "Liquid Glass" over a soft ambient backdrop;
   cards, tables and forms stay solid for reading. Reduce Transparency (or a browser without backdrop-filter) gets solid
   chrome; Reduce Motion gets no spring animations. Colours come from the tokens (light / dark / automatic). */
:root{--glass:rgba(255,255,255,.64);--glass-strong:rgba(255,255,255,.86);--glass-edge:rgba(255,255,255,.75);--glass-line:rgba(22,30,48,.09);
  --glass-shadow:0 12px 40px rgba(25,32,56,.10),0 1px 2px rgba(25,32,56,.06);--glass-blur:saturate(180%) blur(28px);--chrome-radius:22px;
  --spring:cubic-bezier(.2,.9,.25,1.12);--card-shadow:0 1px 2px rgba(25,32,56,.04),0 6px 22px rgba(25,32,56,.05);--ambient-a:rgba(168,25,57,.09);--ambient-b:rgba(36,86,166,.09)}
:root[data-theme="dark"]{--glass:rgba(28,33,42,.58);--glass-strong:rgba(30,35,45,.86);--glass-edge:rgba(255,255,255,.09);--glass-line:rgba(255,255,255,.08);--glass-shadow:0 14px 44px rgba(0,0,0,.45),0 1px 2px rgba(0,0,0,.3);--card-shadow:0 1px 2px rgba(0,0,0,.3);--ambient-a:rgba(168,25,57,.16);--ambient-b:rgba(60,110,200,.14)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--glass:rgba(28,33,42,.58);--glass-strong:rgba(30,35,45,.86);--glass-edge:rgba(255,255,255,.09);--glass-line:rgba(255,255,255,.08);--glass-shadow:0 14px 44px rgba(0,0,0,.45),0 1px 2px rgba(0,0,0,.3);--card-shadow:0 1px 2px rgba(0,0,0,.3);--ambient-a:rgba(168,25,57,.16);--ambient-b:rgba(60,110,200,.14)}}
/* the ambient backdrop the glass refracts */
.shell{background:radial-gradient(70vw 55vh at 105% -15%,var(--ambient-a),transparent 70%),radial-gradient(60vw 55vh at -10% 115%,var(--ambient-b),transparent 70%),var(--bg-shell);background-attachment:fixed}
.sidebar,.topbar,.tabbar,dialog.erp-modal,#modal2,.account-popover,.global-results,#toast,.net-bar{-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur)}
/* floating glass sidebar on desktop */
@media(min-width:701px){
  .sidebar{inset-block:12px;inset-inline-start:12px;width:calc(var(--sidebar) - 18px);border-radius:var(--chrome-radius);border:1px solid var(--glass-line);background:var(--glass);box-shadow:var(--glass-shadow),inset 0 1px 0 var(--glass-edge);overflow:auto;scrollbar-width:none}
  .sidebar::-webkit-scrollbar{display:none}
  [dir=rtl] .sidebar{inset-inline-start:12px}
}
.nav a{border-radius:14px;transition:background .18s ease,color .18s ease,transform .18s var(--spring)}
.nav a:hover{background:color-mix(in srgb,var(--surface-solid) 60%,transparent)}
.nav a.active{background:var(--glass-strong);color:var(--accent);box-shadow:inset 0 1px 0 var(--glass-edge),0 2px 10px rgba(25,32,56,.08);font-weight:650}
.nav a:active{transform:scale(.98)}
/* glass top bar that stays in reach while scrolling */
.topbar{position:sticky;top:0;z-index:20;background:var(--glass);border-bottom:1px solid var(--glass-line);box-shadow:0 1px 0 var(--glass-edge) inset}
.global-search{border-radius:999px;background:color-mix(in srgb,var(--surface-solid) 70%,transparent);border-color:var(--glass-line)}
.global-search:focus-within{background:var(--surface-solid);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 14%,transparent)}
.global-results,.account-popover{background:var(--glass-strong);border:1px solid var(--glass-line);border-radius:18px;box-shadow:var(--glass-shadow),inset 0 1px 0 var(--glass-edge)}
.icon-button,.lang-button,.topbar select{border-radius:999px;background:color-mix(in srgb,var(--surface-solid) 72%,transparent);border-color:var(--glass-line)}
/* capsule controls (iOS 27) */
.button{border-radius:999px;transition:transform .16s var(--spring),box-shadow .16s ease,background .16s ease}
.button:active:not(:disabled){transform:scale(.97)}
.button.primary{box-shadow:0 4px 14px color-mix(in srgb,var(--accent) 28%,transparent),inset 0 1px 0 rgba(255,255,255,.22)}
.button.primary:hover:not(:disabled){box-shadow:0 6px 18px color-mix(in srgb,var(--accent) 34%,transparent),inset 0 1px 0 rgba(255,255,255,.22)}
.pill{border-radius:999px;transition:background .18s ease,color .18s ease}
.workspace-tabs{gap:6px;padding:4px;border-radius:999px;background:var(--glass);border:1px solid var(--glass-line);box-shadow:inset 0 1px 0 var(--glass-edge);width:fit-content;max-width:100%}
.workspace-tabs .pill{border-color:transparent;background:transparent}
.workspace-tabs .pill.active,.workspace-tabs .pill[aria-selected="true"]{background:var(--surface-solid);color:var(--ink);border-color:var(--glass-line);box-shadow:0 2px 8px rgba(25,32,56,.10)}
input,select,textarea{border-radius:12px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none;box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 14%,transparent);border-color:color-mix(in srgb,var(--accent) 55%,var(--line))}
/* solid content, softer depth */
.card,.stat{border-radius:20px;box-shadow:var(--card-shadow);border-color:var(--line)}
.page-heading h1{font-size:clamp(24px,2.4vw,30px);letter-spacing:-.025em}
/* glass dialogs and sheets */
dialog.erp-modal,#modal2{background:var(--glass-strong);border:1px solid var(--glass-line);box-shadow:var(--glass-shadow),inset 0 1px 0 var(--glass-edge);border-radius:26px}
dialog.erp-modal>.modal-head{background:transparent;border-bottom-color:var(--glass-line)}
dialog.erp-modal>.modal-body>form:last-child>.form-footer:last-child,dialog.erp-modal>.modal-body>.form-footer:last-child{background:var(--glass-strong);-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);border-top-color:var(--glass-line)}
dialog::backdrop{background:rgba(15,20,35,.26);-webkit-backdrop-filter:blur(8px) saturate(120%);backdrop-filter:blur(8px) saturate(120%)}
.modal-close{border-radius:50%;background:color-mix(in srgb,var(--ink) 6%,transparent)}
dialog.erp-modal[open]{animation:glass-in .34s var(--spring)}
dialog.erp-modal.drawer[open]{animation:glass-drawer .36s var(--spring)}
@keyframes glass-in{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@keyframes glass-drawer{from{opacity:.4;transform:translateX(28px)}to{opacity:1;transform:none}}
[dir=rtl] dialog.erp-modal.drawer[open]{animation-name:glass-drawer-rtl}
@keyframes glass-drawer-rtl{from{opacity:.4;transform:translateX(-28px)}to{opacity:1;transform:none}}
dialog.erp-modal.drawer{border-radius:26px 0 0 26px;border-inline-start:1px solid var(--glass-line)}
[dir=rtl] dialog.erp-modal.drawer{border-radius:0 26px 26px 0}
/* glass toast capsule */
#toast{background:var(--glass-strong);color:var(--ink);border:1px solid var(--glass-line);border-radius:999px;box-shadow:var(--glass-shadow),inset 0 1px 0 var(--glass-edge);padding:12px 20px}
/* phones: floating glass tab bar */
@media(max-width:700px){
  .tabbar{left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom,0px));padding:6px;border-radius:28px;background:var(--glass);border:1px solid var(--glass-line);box-shadow:var(--glass-shadow),inset 0 1px 0 var(--glass-edge)}
  .tabbar .active{background:var(--glass-strong);border-radius:22px;box-shadow:inset 0 1px 0 var(--glass-edge)}
  .main{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
  dialog.erp-modal,dialog.erp-modal.drawer,#modal2{border-radius:0}
  .workspace-tabs{width:auto;border-radius:20px}
  .page-heading{flex-wrap:wrap;row-gap:10px}.page-heading>:last-child{display:flex;flex-wrap:wrap;gap:8px;max-width:100%}
}
.workspace-tabs .pill,.filters .pill{white-space:nowrap}
/* accessibility: no glass for Reduce Transparency (or no backdrop-filter support), no springs for Reduce Motion */
@media (prefers-reduced-transparency: reduce){:root,:root[data-theme]{--glass:var(--surface-solid);--glass-strong:var(--surface-solid)}.sidebar,.topbar,.tabbar,dialog.erp-modal,#modal2,.account-popover,.global-results,#toast,dialog::backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){:root,:root[data-theme]{--glass:var(--surface-solid);--glass-strong:var(--surface-solid)}}
@media (prefers-reduced-motion: reduce){dialog.erp-modal[open],dialog.erp-modal.drawer[open]{animation:none}.button,.nav a{transition:none}}
/* 5.0: two-step sign-in setup */
.tf-steps{padding-inline-start:20px;display:grid;gap:8px;margin:0 0 12px}.tf-key{letter-spacing:.08em;word-break:break-all}.tf-codes{columns:2;padding-inline-start:22px;margin:10px 0}

/* 5.1: same-day / next-day "Deliver to" card, list address line, proof of delivery (ID photo or signature) */
.deliver-to{margin:0 0 16px;padding:14px 16px;border-radius:14px;background:var(--info-bg,#eef3ff);border:1px solid var(--info-border,#c9d6f5)}
.deliver-to-label{margin:0 0 6px;font-size:.85rem;font-weight:700;color:var(--info-ink,#2b4a8b)}
.deliver-to-address{margin:0 0 8px;font-size:1.2rem;font-weight:700;line-height:1.45;overflow-wrap:anywhere}
.deliver-to-meta{margin:0;font-size:.95rem;overflow-wrap:anywhere}.deliver-to-actions{margin:10px 0 0;gap:8px;flex-wrap:wrap;align-items:center}
.list-address{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;max-width:360px;font-weight:600}
.proof-notice{margin-bottom:16px}.proof-notice .button{margin-inline-start:8px}
.proof-choice{gap:10px;flex-wrap:wrap;margin:10px 0}.proof-choice label.button{cursor:pointer}
canvas.signature-pad{display:block;width:100%;height:200px;margin:8px 0 6px;border:2px dashed var(--line,#d6dae3);border-radius:12px;background:#fff;touch-action:none}
.proof-photo{display:block;max-width:100%;max-height:260px;margin:8px auto;border-radius:10px}
:root[data-theme="dark"] .deliver-to{background:#18233a;border-color:#2c3d63}:root[data-theme="dark"] .deliver-to-label{color:#a9c1f2}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .deliver-to{background:#18233a;border-color:#2c3d63}:root:not([data-theme="light"]) .deliver-to-label{color:#a9c1f2}}
/* 5.1: Inventory rows open the product; read-only product view */
.product-view{display:flex;gap:16px;align-items:flex-start;margin-bottom:14px}.product-view-img{width:96px;height:96px;object-fit:contain;border-radius:12px;background:#fff;border:1px solid var(--line)}
.product-view-head{min-width:0;flex:1}.product-view-head h3{margin:0 0 6px;overflow-wrap:anywhere}.product-view .small{margin:6px 0}
.product-view-stock td,.product-view-stock th{white-space:nowrap}.chip{display:inline-block;padding:2px 8px;margin:2px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line)}
@media (max-width:700px){.product-view{flex-direction:column}.product-view-img{width:120px;height:120px}}
/* 5.2: daily approvals summary (Today card and window) */
.approvals-summary-totals{margin:0 0 10px;display:flex;flex-wrap:wrap;gap:6px}.approvals-summary-card .today-row small .badge{margin-inline-end:4px}
/* 5.2.2: serial numbers in transfers (picked with the item on New transfer and drafts; confirmed at receiving) */
.transfer-serials{margin:6px 0 12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.transfer-serials .transfer-serial-count{font-weight:600}
.transfer-serials .transfer-serial-count.ok{color:var(--green,#1a7f37)}
.transfer-serial-scan{width:100%;margin:8px 0}
.serial-choices{display:flex;flex-wrap:wrap;gap:6px 14px;max-height:220px;overflow:auto}
.serial-choice{display:inline-flex;align-items:center;gap:6px;min-height:36px}
.transfer-serial-edit{margin:12px 0}
.transfer-serial-edit summary{cursor:pointer;font-weight:600}
.transfer-confirm{margin:16px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.transfer-confirm-item{margin-top:10px}
.serial-confirm-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0;border-top:1px solid var(--line)}
.serial-confirm-row .mono{overflow-wrap:anywhere}
/* 6.0.11: product cards in the inbox (what the website chat customer sees) and the reply box's product picker. */
.ix-products{display:flex;gap:8px;overflow-x:auto;padding:6px 0 2px;max-width:100%}
.ix-product{flex:0 0 200px;display:flex;gap:8px;align-items:flex-start;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface-solid,#fff)}
.ix-product img,.ix-pick img{width:44px;height:44px;object-fit:contain;border-radius:8px;background:var(--surface-2,#f8f9fb);flex:0 0 auto}
.ix-product div{display:flex;flex-direction:column;gap:2px;min-width:0}
.ix-product strong{font-size:.8125rem;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ix-product-noimg{width:44px;height:44px;display:grid;place-items:center;border-radius:8px;background:var(--surface-2,#f8f9fb);flex:0 0 auto}
.ix-picker{border:1px solid var(--line);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:6px;background:var(--surface-2,#f8f9fb)}
.ix-pick-list{display:flex;flex-direction:column;gap:4px;max-height:240px;overflow:auto}
.ix-pick{display:flex;align-items:center;gap:10px;text-align:start;border:1px solid transparent;border-radius:10px;padding:6px 8px;background:var(--surface-solid,#fff);color:inherit}
.ix-pick>span:nth-child(2){flex:1;min-width:0}
.ix-pick.active{border-color:var(--accent);background:var(--accent-soft,#fbeaee)}
.ix-picked{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.ix-picked .chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:999px;background:var(--accent-soft,#fbeaee);font-size:.8125rem}
form[data-form="ai-webchat"] input[type=color]{height:44px;padding:4px 6px;cursor:pointer;background:var(--surface-solid,#fff)}
/* 6.0.12: AI Training → when the AI replies: immediately, or after the minutes (dimmed while Reply immediately is chosen). */
.ai-cover-when{display:grid;gap:8px;border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.ai-cover-when .click-label{align-items:flex-start;justify-content:flex-start;line-height:1.35;text-align:start}
.ai-cover-when input[type=radio]{width:18px;height:18px;min-height:0;flex:0 0 18px;margin:2px 0 0;padding:0;accent-color:var(--accent)}
.ai-cover-wait{max-width:220px;margin-inline-start:26px}
.ai-cover-when:has(input[value="now"]:checked) .ai-cover-wait{opacity:.5}
/* 6.0.14: AI Training → Website chat → the picture in the chat's circle. */
.webchat-logo-row{display:flex;gap:14px;align-items:center;border-bottom:1px solid var(--line)}
.webchat-logo-preview{flex:0 0 64px;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:#fff;box-shadow:0 0 0 2px var(--line);color:var(--brand,#9B1C2E);font-weight:700;font-size:22px}
.webchat-logo-preview img{width:100%;height:100%;object-fit:contain;display:block}
.webchat-logo-row input[type=file]{max-width:240px;font-size:.875rem}
/* 6.0.14: AI Training → Active campaigns. */
.inline-form{display:inline}
.campaign-row{flex-wrap:wrap;gap:8px 12px}
.campaign-row .info{flex:1 1 280px;min-width:0}
.campaign-row .actions{flex-wrap:wrap}
.campaign-form{border:1px solid var(--line);border-radius:12px;padding:12px;margin-top:12px}
/* 6.0.18: AI Training → Train the AI (the owner's conversation with the model) */
.ai-train-log{display:flex;flex-direction:column;gap:8px;max-height:380px;overflow:auto;padding:10px;margin-top:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);overscroll-behavior:contain}
.ai-train-msg{max-width:85%;padding:8px 12px;border-radius:12px;white-space:pre-wrap;line-height:1.45;font-size:.95rem}
.ai-train-msg.owner{align-self:flex-end;background:var(--accent);color:#fff}
.ai-train-msg.ai{align-self:flex-start;background:var(--surface-solid);border:1px solid var(--line);color:var(--ink)}
.ai-train-proposal{border:1.5px dashed var(--accent);border-radius:12px;padding:10px 12px;margin-top:8px}
.ai-train-edit{border-top:1px solid var(--line);padding-top:12px}
/* 6.0.22: Meta's error under a failed / not-confirmed message, and the WhatsApp template preview */
.ix-error{margin-top:4px;color:var(--danger);white-space:pre-wrap;overflow-wrap:anywhere}
.ix-template-preview{margin:8px 0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);white-space:pre-wrap;overflow-wrap:anywhere}
.ix-tick.unconfirmed{opacity:.7}
:root{--danger:#a52b48}
:root[data-theme="dark"]{--danger:#ff8fa3}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--danger:#ff8fa3}}
/* ===== 6.0.25 Inbox (owner: "fix the windows sizing on ipad … ios style and cards style") =====
   The Inbox is exactly as tall as the screen below it (--ix-h, set by inbox-ui.js fit()); panes scroll inside it. Its own width decides
   the layout (container query): under 700 px one pane (the list, or the chat with Back), from 700 px list + chat, from 1120 px also the
   customer cards; below that the customer panel is a sheet over the chat. Bubbles grouped as on a phone; Send beside the text field. */
:root{--ix-bg:#f2f3f7;--ix-pane:#fff;--ix-in:#e9e9ef;--ix-in-ink:#1a2030;--ix-out:var(--accent);--ix-out-ink:#fff;--ix-ai:#fbe7ec;--ix-ai-ink:#5a1023;--ix-note:#fff6d9;--ix-note-line:#f0dc9c;--ix-active:#fbeaee;--ix-field:#f5f6f9;--ix-fill:#7676801c;--ix-shade:0 1px 2px rgba(20,25,40,.06),0 2px 8px rgba(20,25,40,.04)}
:root[data-theme="dark"]{--ix-bg:#0f1218;--ix-pane:#171b22;--ix-in:#272c35;--ix-in-ink:#e8ebf1;--ix-ai:#3a1d27;--ix-ai-ink:#ffd9e1;--ix-note:#332a18;--ix-note-line:#5c4720;--ix-active:#331e27;--ix-field:#1e232b;--ix-fill:#7676803d;--ix-shade:0 1px 2px rgba(0,0,0,.35)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ix-bg:#0f1218;--ix-pane:#171b22;--ix-in:#272c35;--ix-in-ink:#e8ebf1;--ix-ai:#3a1d27;--ix-ai-ink:#ffd9e1;--ix-note:#332a18;--ix-note-line:#5c4720;--ix-active:#331e27;--ix-field:#1e232b;--ix-fill:#7676803d;--ix-shade:0 1px 2px rgba(0,0,0,.35)}}
.ix-wrap{container:ix/inline-size;height:var(--ix-h,calc(100dvh - 250px));min-height:340px}
.ix{position:relative;display:grid;grid-template-columns:minmax(0,1fr);height:100%;border:1px solid var(--line);border-radius:22px;overflow:hidden;background:var(--ix-pane);box-shadow:var(--ix-shade)}
.ix-list,.ix-main,.ix-side{min-height:0;min-width:0;display:flex;flex-direction:column}
.ix[data-pane="chat"] .ix-list,.ix[data-pane="list"] .ix-main{display:none}
.ix-side,.ix-scrim{display:none}
@container ix (min-width:700px){
  .ix{grid-template-columns:minmax(280px,38%) minmax(0,1fr)}
  .ix[data-pane] .ix-list,.ix[data-pane] .ix-main{display:flex}
  .ix-list{border-inline-end:1px solid var(--line)}
  .ix-back{display:none!important}
}
@container ix (min-width:1000px){.ix{grid-template-columns:minmax(290px,330px) minmax(0,1fr)}}
.ix[data-info="1"] .ix-side{display:flex;position:absolute;inset-block:0;inset-inline-end:0;width:min(360px,92%);z-index:7;box-shadow:0 12px 40px rgba(15,20,35,.22);animation:ix-in .22s ease}
.ix[data-info="1"] .ix-scrim{display:block;position:absolute;inset:0;z-index:6;border:0;padding:0;background:rgba(15,20,32,.28);cursor:default}
@container ix (min-width:1120px){
  .ix:not([data-info="0"]){grid-template-columns:minmax(290px,330px) minmax(0,1fr) minmax(270px,310px)}
  .ix:not([data-info="0"]) .ix-side{display:flex;position:static;width:auto;box-shadow:none;animation:none}
  .ix .ix-scrim{display:none!important}
}
@keyframes ix-in{from{transform:translateX(24px);opacity:0}to{transform:none;opacity:1}}
[dir=rtl] .ix[data-info="1"] .ix-side{animation-name:ix-in-rtl}@keyframes ix-in-rtl{from{transform:translateX(-24px);opacity:0}to{transform:none;opacity:1}}
/* list of conversations: cards */
.ix-list{background:var(--ix-bg)}
.ix-list-head{display:flex;flex-direction:column;gap:8px;padding:12px 12px 10px;border-bottom:1px solid var(--line)}
.ix-seg{display:flex;gap:2px;padding:3px;border-radius:12px;background:var(--ix-fill);overflow-x:auto;scrollbar-width:none}.ix-seg::-webkit-scrollbar{display:none}
.ix-seg-btn{flex:1 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:32px;padding:5px 7px;border:0;border-radius:9px;background:none;color:var(--ink-2);font:inherit;font-size:12.5px;font-weight:600;white-space:nowrap;cursor:pointer}
.ix-seg-btn.active{background:var(--ix-pane);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12),0 0 0 .5px rgba(0,0,0,.04)}
.ix-count{min-width:18px;padding:0 5px;border-radius:9px;background:var(--accent);color:#fff;font-size:11px;line-height:18px;text-align:center}.ix-count.soft{background:var(--ix-fill);color:var(--ink-2)}
.ix-search-row{display:flex;gap:6px}
.ix .ix-search{flex:1;min-width:0;display:flex;align-items:center;gap:6px;padding:0 10px;border-radius:11px;background:var(--ix-fill);color:var(--muted);font-weight:400}
.ix-search svg{width:16px;height:16px;flex:0 0 auto}
.ix .ix-search input{flex:1;min-width:0;min-height:36px;padding:6px 0;border:0;background:none;box-shadow:none;font-size:16px}
.ix .ix-chan-select{width:auto;max-width:46%;min-height:36px;padding:6px 10px;border:0;border-radius:11px;background-color:var(--ix-fill);font-size:13px}
.ix-rows{flex:1;min-height:0;overflow:auto;padding:8px;display:flex;flex-direction:column;gap:6px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.ix-rows-note{padding:18px;text-align:center;color:var(--muted);font-size:.875rem}
.ix-row{display:flex;align-items:flex-start;gap:11px;width:100%;flex:0 0 auto;padding:11px 12px;border:1px solid transparent;border-radius:16px;background:var(--ix-pane);box-shadow:var(--ix-shade);color:inherit;font:inherit;text-align:start;cursor:pointer;transition:background .15s}
.ix-row:hover{background:color-mix(in srgb,var(--ix-pane) 92%,var(--accent))}
.ix-row.active{background:var(--ix-active);border-color:color-mix(in srgb,var(--accent) 30%,transparent)}
.ix-row-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ix-row-top{display:flex;align-items:baseline;gap:8px}
.ix-row-top strong{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:600}
.ix-row-time{flex:0 0 auto;font-size:12px;color:var(--muted)}
.ix-row.unread .ix-row-time{color:var(--accent);font-weight:650}.ix-row.unread .ix-row-top strong{font-weight:700}
.ix-row-preview{font-size:13.5px;line-height:1.35;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.ix-row.unread .ix-row-preview{color:var(--ink)}
.ix-row-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
.ix-tag{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;background:var(--ix-fill);color:var(--ink-2);font-size:11.5px;font-weight:600;line-height:1.5;white-space:nowrap}
.ix-tag.green{background:#1f9d5720;color:#16804a}.ix-tag.blue{background:#2f6fe01f;color:#2a63c9}.ix-tag.pink{background:#c135841c;color:#b02a73}.ix-tag.purple{background:#6c4ad61f;color:#5b3dc0}.ix-tag.amber{background:#e8a3172a;color:#975f00}.ix-tag.red{background:#d9304a22;color:#b3213b}
.ix-unread{flex:0 0 auto;align-self:center;min-width:22px;height:22px;padding:0 7px;border-radius:11px;background:var(--accent);color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center}
.ix-avatar{position:relative;flex:0 0 auto;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(180deg,#a5adbd,#848c9c);color:#fff;font-size:15px;font-weight:600;letter-spacing:.3px}
.ix-avatar>svg{width:24px;height:24px}
.ix-chan{position:absolute;inset-block-end:-2px;inset-inline-end:-3px;width:19px;height:19px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#8a93a3;box-shadow:0 0 0 2px var(--ix-pane)}
.ix-chan svg{width:11px;height:11px}
.ix-chan.whatsapp{background:#22b45e}.ix-chan.messenger,.ix-chan.fb_comment{background:#2f74e8}.ix-chan.instagram,.ix-chan.ig_comment{background:linear-gradient(135deg,#f9a03f,#d6337a 55%,#7a3fd1)}.ix-chan.webchat{background:#6c4ad6}.ix-chan.email{background:#6b7486}
/* the conversation */
.ix-main{position:relative;background:var(--ix-pane)}
.ix-empty{flex:1;display:grid;place-content:center;justify-items:center;gap:10px;padding:40px;text-align:center;color:var(--muted)}.ix-empty>svg{width:44px;height:44px;opacity:.45}
.ix-top{position:relative;z-index:3;flex:0 0 auto;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--ix-pane) 84%,transparent);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}
.ix-head{display:flex;align-items:center;gap:10px;padding:10px 12px}
.ix-head .ix-avatar{width:38px;height:38px;font-size:14px}
.ix-title{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.3}
.ix-title strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:650}
.ix-sub{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;color:var(--muted)}
.ix-head-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.ix-head-actions .button.small{border-radius:999px;min-height:34px;padding:6px 14px}
.ix-icon{flex:0 0 auto;display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:50%;background:var(--ix-fill);color:var(--accent);cursor:pointer}.ix-icon svg{width:20px;height:20px}
.ix-back{display:inline-flex;align-items:center;gap:0;flex:0 0 auto;min-height:36px;padding:0 4px 0 0;border:0;background:none;color:var(--accent);font:inherit;font-size:16px;cursor:pointer}.ix-back svg{width:24px;height:24px}
[dir=rtl] .ix-back svg{transform:scaleX(-1)}
.ix-toolbar{display:flex;align-items:center;gap:6px;padding:0 12px 10px;overflow-x:auto;scrollbar-width:none}.ix-toolbar::-webkit-scrollbar{display:none}
.ix .ix-toolbar select{flex:0 0 auto;width:auto;max-width:220px;min-height:32px;padding:5px 30px 5px 12px;border:0;border-radius:999px;background-color:var(--ix-fill);font-size:13px;font-weight:550}
.ix-toolbar .button.small{flex:0 0 auto;min-height:32px;padding:5px 12px;border-radius:999px}
.ix-notice{flex:0 0 auto;margin:8px 12px 0}
.ix-thread-wrap{position:relative;flex:1;min-height:0}
.ix-thread{position:absolute;inset:0;overflow:auto;display:flex;flex-direction:column;padding:12px 14px 16px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.ix-empty-thread{margin:auto;color:var(--muted);font-size:.875rem}
.ix-sep{align-self:center;margin:16px 0 6px;font-size:11.5px;color:var(--muted)}.ix-sep strong{font-weight:650}
.ix-msg{display:flex;flex-direction:column;align-items:flex-start;max-width:min(78%,560px);margin-top:2px}
.ix-msg.first{margin-top:8px}
.ix-msg.out{align-self:flex-end;align-items:flex-end}
.ix-bubble{max-width:100%;padding:8px 13px;border-radius:19px;background:var(--ix-in);color:var(--ix-in-ink);font-size:15px;line-height:1.4}
.ix-msg.out .ix-bubble{background:var(--ix-out);color:var(--ix-out-ink)}
.ix-msg.out.ai .ix-bubble{background:var(--ix-ai);color:var(--ix-ai-ink)}
.ix-msg.in:not(.first) .ix-bubble{border-start-start-radius:6px}.ix-msg.in:not(.last) .ix-bubble,.ix-msg.in.last .ix-bubble{border-end-start-radius:6px}
.ix-msg.out:not(.first) .ix-bubble{border-start-end-radius:6px}.ix-msg.out:not(.last) .ix-bubble,.ix-msg.out.last .ix-bubble{border-end-end-radius:6px}
.ix-msg.in.first.last .ix-bubble{border-start-start-radius:19px}.ix-msg.out.first.last .ix-bubble{border-start-end-radius:19px}
.ix-msg.out .ix-bubble a{color:inherit;text-decoration:underline}
.ix-text{white-space:pre-wrap;overflow-wrap:anywhere}
.ix-explain{margin-top:6px;opacity:.8}
.ix-subject{margin-bottom:4px}
.ix-bubble.media{padding:0;background:none!important}
.ix-img{display:block;max-width:min(260px,100%);max-height:320px;margin-top:6px;border-radius:16px;object-fit:cover}
.ix-bubble.media .ix-img{margin:0}.ix-bubble.media>a+a .ix-img{margin-top:4px}
.ix-file{display:inline-block;margin-top:6px;color:inherit}
.ix-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:3px 8px 0;font-size:11px;color:var(--muted)}
.ix-msg.note{align-self:center;align-items:center;max-width:min(92%,560px);margin-top:10px}
.ix-msg.note .ix-bubble{background:var(--ix-note);color:var(--ink);border:1px solid var(--ix-note-line);border-radius:14px;font-size:14px}
.ix-draft{align-self:flex-end;display:flex;flex-direction:column;gap:6px;max-width:min(84%,560px);margin-top:12px;padding:10px 12px;border:1.5px dashed color-mix(in srgb,var(--accent) 55%,transparent);border-radius:18px;background:var(--ix-pane)}
.ix-draft .ix-meta{margin:0}.ix-draft .actions{gap:6px}.ix-draft .button.small{border-radius:999px}
.ix-msg .ix-products{max-width:100%}.ix-msg.out .ix-product{color:var(--ink)}
.ix-tick.read{color:#2563eb}.ix-tick.failed{color:var(--danger)}
.ix-msg .ix-error{margin:3px 8px 0;max-width:100%}
.ix-jump{position:absolute;inset-block-end:12px;inset-inline-end:14px;z-index:2;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:6px 14px;border:0;border-radius:999px;background:var(--accent);color:#fff;font:inherit;font-size:13px;font-weight:600;box-shadow:0 6px 18px rgba(168,25,57,.3);cursor:pointer}.ix-jump svg{width:16px;height:16px}.ix-jump[hidden]{display:none}
/* the reply box */
.ix-composer{position:relative;z-index:3;flex:0 0 auto;display:flex;flex-direction:column;gap:8px;padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:color-mix(in srgb,var(--ix-pane) 88%,transparent);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}
.ix-extra:empty,.ix-extra:has(>.ix-picked-wrap:empty:only-child){display:none}
.ix-compose-row{display:flex;align-items:flex-end;gap:8px}
.ix .ix-input{flex:1;min-width:0;min-height:40px;max-height:168px;padding:9px 15px;border:1px solid var(--line);border-radius:20px;background:var(--ix-field);font-size:16px;line-height:1.4;resize:none;overflow-y:auto}
.ix .ix-input:focus{border-color:color-mix(in srgb,var(--accent) 45%,var(--line));box-shadow:none}
.ix-composer.note .ix-input{background:var(--ix-note);border-color:var(--ix-note-line)}
.ix-send,.ix-plus{flex:0 0 auto;display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:50%;cursor:pointer}
.ix-send{background:var(--accent);color:#fff;box-shadow:0 2px 8px rgba(168,25,57,.25)}.ix-send svg{width:20px;height:20px;stroke-width:2.4}
.ix-composer.note .ix-send{background:#c98a12;box-shadow:none}
.ix-plus{background:var(--ix-fill);color:var(--ink-2);transition:transform .2s}.ix-plus svg{width:22px;height:22px}
.ix-composer.tools-open .ix-plus{transform:rotate(45deg)}
.ix-tray{display:none;flex-wrap:wrap;gap:8px}.ix-composer.tools-open .ix-tray{display:flex}
.ix .ix-tool{position:relative;display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:7px 14px;border:1px solid var(--line);border-radius:999px;background:var(--ix-pane);color:var(--ink-2);font:inherit;font-size:13.5px;font-weight:550;cursor:pointer}
.ix-tool svg{width:18px;height:18px;color:var(--accent)}
.ix-tool input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.ix-composer.note .ix-note-toggle{background:var(--ix-note);border-color:var(--ix-note-line)}
.ix-files:not([hidden]){display:flex}
.ix-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:5px 6px 5px 10px;border-radius:999px;background:var(--ix-fill);font-size:13px}.ix-chip>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ix-chip svg{width:15px;height:15px;flex:0 0 auto}
.ix-chip-x{display:grid;place-items:center;width:22px;height:22px;min-height:22px;padding:0;border:0;border-radius:50%;background:var(--ix-pane);color:var(--muted);cursor:pointer}
.ix-comment-actions,.ix-template-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.ix-comment-actions .button.small,.ix-template-actions .button.small{border-radius:999px}.ix-grow{flex:1}
.ix-template label{display:grid;gap:5px}
.ix .ix-picker{border-radius:16px;background:var(--ix-bg)}
.ix .ix-pick{border-radius:12px;background:var(--ix-pane)}
/* customer cards */
.ix-side{background:var(--ix-bg);border-inline-start:1px solid var(--line)}
.ix-side-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px 6px}.ix-side-head h3{font-size:15px}
.ix-side-body{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:6px 10px 16px;overscroll-behavior:contain}
.ix-card{padding:12px 14px;border-radius:16px;background:var(--ix-pane);box-shadow:var(--ix-shade)}
.ix-card h4{margin:0 0 6px;font-size:11.5px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.ix-person{display:flex;align-items:center;gap:10px}.ix-person strong{display:block;overflow-wrap:anywhere}
.ix-detail{margin-top:8px;overflow-wrap:anywhere}
.ix-order{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:9px 0;border:0;border-top:1px solid var(--line-2);background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}.ix-card h4+.ix-order{border-top:0}
.ix-link{display:flex;gap:6px;margin:10px 0 4px}.ix-link input{flex:1;min-width:0;font-size:16px}
.ix-link-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-top:1px solid var(--line-2)}
@media(max-width:700px){.ix{border-radius:18px}.ix-msg{max-width:86%}.ix-head-actions .button.small{padding:6px 12px}}
/* 6.0.25: from 721 to 1200 px the page margin is 24 px; the top bar still reached 36 px past it, so every page scrolled sideways by 12 px on iPads held sideways. */
@media (min-width:701px) and (max-width:1200px){.topbar{margin-inline:-24px;padding-inline:24px}}
.ix-seg.fade-end{-webkit-mask-image:linear-gradient(to right,#000 82%,transparent);mask-image:linear-gradient(to right,#000 82%,transparent)}.ix-seg.fade-start{-webkit-mask-image:linear-gradient(to left,#000 82%,transparent);mask-image:linear-gradient(to left,#000 82%,transparent)}.ix-seg.fade-start.fade-end{-webkit-mask-image:linear-gradient(to right,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to right,transparent,#000 14%,#000 86%,transparent)}
[dir=rtl] .ix-seg.fade-end{-webkit-mask-image:linear-gradient(to left,#000 82%,transparent);mask-image:linear-gradient(to left,#000 82%,transparent)}[dir=rtl] .ix-seg.fade-start{-webkit-mask-image:linear-gradient(to right,#000 82%,transparent);mask-image:linear-gradient(to right,#000 82%,transparent)}
/* 6.0.25: a phone shows the open chat full screen, sized to the visible area (--ix-vvh / --ix-vvt from visualViewport) so the keyboard never covers the reply box. */
.ix.ix-full{position:fixed;inset-inline:0;top:var(--ix-vvt,0px);height:var(--ix-vvh,100dvh);z-index:45;border:0;border-radius:0;box-shadow:none}
.ix.ix-full .ix-head{padding-top:calc(10px + env(safe-area-inset-top,0px))}
html.ix-chat-open,html.ix-chat-open body{overflow:hidden;overscroll-behavior:none}html.ix-chat-open .tabbar{display:none}
.ix-toolbar .ix-held{flex:0 0 auto;min-height:28px;background:var(--ix-ai);color:var(--ix-ai-ink)}/* 6.0.27 */
/* 6.8.1: transfer items ticked as prepared; Box / Shelf next to each item */
.transfer-comparison input.transfer-prepared{width:22px;height:22px;accent-color:var(--accent);cursor:pointer}
.transfer-comparison input.transfer-prepared:disabled{cursor:default}
.transfer-box{line-height:1.5}.transfer-box strong{font-size:14px;white-space:nowrap}
@media (max-width:700px){.transfer-comparison[data-cards] td.tc-product{display:block}.transfer-comparison[data-cards] td.tc-product::before{display:none}.transfer-comparison[data-cards] .transfer-boxes{text-align:end}}
.transfer-prepared-summary{margin-top:16px}.transfer-prepared-summary .muted{margin-inline-start:6px}
/* 7.0.1: quantity box and remove on a saved transfer */
.transfer-qty{display:inline-flex;gap:6px;align-items:center}.transfer-qty-input{width:5.5em;min-height:36px;font-size:16px}.transfer-line-remove{min-width:36px}.transfer-edits{margin:8px 0 0}
/* 6.8.3: Settings → Connections → Google mailboxes */
.gm-notice{padding:11px 14px;border-radius:10px;font-size:.875rem;line-height:1.55;margin-bottom:12px;border:1px solid var(--line)}
.gm-notice.ok{background:var(--ok-soft);color:var(--ok)}.gm-notice.error{background:var(--accent-soft);color:var(--accent)}
.gm-ready{margin:12px 0}.gm-setup{margin:14px 0;padding:16px;border:1px solid var(--line);border-radius:12px}.gm-setup h3{margin-bottom:6px}
.gm-steps{margin:12px 0 14px;padding-inline-start:20px;display:grid;gap:12px;font-size:.9rem;line-height:1.55}
.gm-copy{display:flex;gap:8px;align-items:center;margin:6px 0;flex-wrap:wrap}.gm-copy code{direction:ltr;unicode-bidi:isolate;overflow-wrap:anywhere;padding:4px 8px;border-radius:6px;background:var(--line);color:var(--ink)}
.gm-boxes{display:grid;gap:12px;margin-top:14px}.gm-box{padding:14px;border:1px solid var(--line);border-radius:12px;display:grid;gap:8px}
.gm-box-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center}.gm-box-head [data-raw]{direction:ltr;unicode-bidi:isolate;overflow-wrap:anywhere}
.gm-box .issue,.gm-setup .issue{color:var(--danger,var(--accent))}
:root[data-theme="dark"] .gm-notice.ok,:root:not([data-theme="light"]) .gm-notice.ok{background:#173328;color:#8fd9b6;border-color:#24493a}
:root[data-theme="dark"] .gm-notice.error,:root:not([data-theme="light"]) .gm-notice.error{background:#3a1c25;color:var(--danger);border-color:#55283a}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]) .gm-notice.ok{background:var(--ok-soft);color:var(--ok);border-color:var(--line)}:root:not([data-theme="dark"]) .gm-notice.error{background:var(--accent-soft);color:var(--accent);border-color:var(--line)}}

/* 7.0.0: Z report (day close) and the privacy page */
.z-report h2{font-size:18px;margin:0 0 4px}.z-report h3{font-size:15px;margin:16px 0 6px}
.z-table{width:100%;border-collapse:collapse;margin:4px 0 8px}.z-table td,.z-table th{padding:5px 8px;border-bottom:1px solid var(--line);text-align:start}.z-table .num{text-align:end;white-space:nowrap}
.privacy-table td,.privacy-table th{white-space:normal;vertical-align:top}.privacy-table td:first-child{min-width:240px}
/* 7.1.0: split shipments (Shipments box in the order window, Split shipment dialog) */
.split-box{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0 0 16px;background:var(--surface-2)}
.split-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.split-head h3{margin:0}
.split-list{display:grid;gap:6px;margin-bottom:8px}
.split-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 8px;border-radius:9px}
.split-row.current{background:color-mix(in srgb,var(--accent) 7%,transparent)}
.split-open{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer;text-align:start;flex:1 1 220px;min-width:0}
.split-open:hover strong{text-decoration:underline}
.split-summary{margin:10px 0 6px}
/* 7.2.0: bank SMS approvals (Settings → Connections → Bank SMS, approval cards) */
:root .notice.ok{background:#e8f6ee;color:#17643a;border-color:#bfe3cd}
:root[data-theme="dark"] .notice.ok{background:#16301f;color:#9fdcb4;border-color:#244a33}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .notice.ok{background:#16301f;color:#9fdcb4;border-color:#244a33}}
.bsms-key{margin:12px 0;padding:12px;border:1px dashed var(--line);border-radius:10px}
.bsms-steps,.bsms-test{margin-top:14px}.bsms-steps summary,.bsms-test summary{cursor:pointer;font-weight:600}
.bsms-attention{margin-top:16px}.bsms-attention h3{margin:0 0 6px}
.bsms-result{display:grid;gap:4px;margin-top:10px}
#bank-sms-card h3{font-size:15px;margin:18px 0 8px}
#bank-sms-card .gm-copy code{overflow-wrap:anywhere}
/* 7.3.0: Google mailboxes by app password; Google sign-in folded under a summary */
.gm-password{display:grid;gap:10px;padding:12px;border:1px dashed var(--line);border-radius:10px}.gm-password .gm-steps{margin:0}
.gm-password input[dir="ltr"]{text-align:left}.gm-alt{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.gm-alt>summary{cursor:pointer;font-weight:600;font-size:.9rem;color:var(--muted)}.gm-alt[open]>summary{margin-bottom:8px;color:var(--ink)}

/* ===== 8.0 layout layer (PLAN-8.0 Part 3): grouped sidebar, role homes, KPI strip, "+" menu, store switch, More sheet groups,
   iPad icon sidebar, one-line delivery fee on phones. Colours come from the theme tokens. ===== */
.nav-section+.nav-section{margin-top:2px}
.kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:0 0 16px}
.kpi-tile{display:grid;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);text-decoration:none;min-width:0;box-shadow:var(--card-shadow,none)}
.kpi-tile:hover{border-color:var(--line-2)}
.kpi-label{font-size:12px;color:var(--muted)}
.kpi-tile strong{font-size:1.25rem;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kpi-tile small{font-size:11px;color:var(--muted)}
.kpi-tile small b{font-weight:600}.kpi-tile small b.up{color:var(--ok)}.kpi-tile small b.down{color:var(--danger)}
.kpi-spark{width:100%;height:22px;color:var(--accent)}
.home-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:16px;align-items:start}
.home-branches{margin-bottom:16px}
.home-shortcuts{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.recent-row{width:100%;text-align:start;background:none;border:0;cursor:pointer;font:inherit;color:inherit}
.recent-row .badge{flex:0 0 auto}
.create-menu{position:relative}
.create-menu>summary{list-style:none;cursor:pointer;white-space:nowrap}
.create-menu>summary::-webkit-details-marker{display:none}
.create-popover{position:absolute;inset-inline-end:0;top:calc(100% + 6px);z-index:40;min-width:200px;display:grid;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--surface-solid,var(--surface));box-shadow:0 10px 30px var(--shadow)}
.create-popover>a,.create-popover>button{display:block;padding:10px 12px;border-radius:8px;color:var(--ink);text-decoration:none;background:none;border:0;text-align:start;font:inherit;cursor:pointer;min-height:40px}
.create-popover>a:hover,.create-popover>button:hover{background:var(--surface-2)}
.store-switch{display:inline-flex;border:1px solid var(--line-2);border-radius:999px;overflow:hidden;flex:0 0 auto}
.store-switch a{padding:6px 14px;color:var(--ink-2);text-decoration:none;font-size:13px;min-height:32px;display:flex;align-items:center}
.store-switch a.active{background:var(--accent);color:#fff}
.demo-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;font-size:12px;white-space:nowrap;background:var(--warn-soft,#fdf5e7);color:var(--warn);border:1px solid var(--line)}
.demo-pill svg{width:14px;height:14px}
.more-group+.more-group{margin-top:14px}
.more-group h3{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 8px}
@media(max-width:1099px){.home-grid{grid-template-columns:1fr}}
/* iPad (721–1099 px): the sidebar keeps its groups as icons; the label shows on hover (title) and in the account menu. */
@media(min-width:701px) and (max-width:1099px){
  :root{--sidebar:84px}
  .sidebar .brand span,.sidebar .nav a span,.sidebar .nav-group,.sidebar .account>div:last-child,.sidebar-bottom>.link-button,.sidebar-bottom>.button,.sidebar-bottom>.role-select{display:none}
  .sidebar .nav a{justify-content:center;padding:10px 0;position:relative}
  .sidebar .nav a .nav-count{position:absolute;top:2px;inset-inline-end:6px;font-size:10px}
  .sidebar .nav-section+.nav-section{border-top:1px solid var(--line);padding-top:4px;margin-top:4px}
  .sidebar .brand{justify-content:center;padding-inline:0}
  .sidebar .account{justify-content:center;padding-inline:0}
  .mobile-account{display:block;position:relative}
}
/* Phones: the delivery fee is one line in the item cards (label and amount), not a product card. */
@media(max-width:700px){
  .table-wrap[data-cards] tr.delivery-fee-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;padding:8px 12px}
  .table-wrap[data-cards] tr.delivery-fee-row td{padding:0}
  .table-wrap[data-cards] tr.delivery-fee-row td:nth-child(2),.table-wrap[data-cards] tr.delivery-fee-row td:nth-child(4){display:none}
  .table-wrap[data-cards] tr.delivery-fee-row td[data-label]::before{content:none}
  .table-wrap[data-cards] tr.delivery-fee-row td.line-product{flex:1 1 auto}
  .table-wrap[data-cards] tr.delivery-fee-row:has(form) td:nth-child(3){display:none}/* the box already shows the amount */
  .table-wrap[data-cards] tr.delivery-fee-row td.line-product{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
  .table-wrap[data-cards] tr.delivery-fee-row form{margin-top:0!important}
  .kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .create-menu>summary span{display:none}
  .demo-pill span{display:none}
  .store-switch a{padding:6px 10px}
}
/* ===== 8.0.1 record tabs layer (PLAN-8.0 3.4): order / invoice window in five tabs under a sticky header, product window and
   customer card in tabs, Change delivery menu, More list, Activity filters. Colours come from the theme tokens. ===== */
dialog.erp-modal>.modal-body{--mb-pad:25px}
@media(max-width:700px){dialog.erp-modal>.modal-body{--mb-pad:18px}}
@media(max-width:700px){dialog.erp-modal>.modal-body{--mb-pad:16px}}
.order-head{position:sticky;top:calc(-1 * var(--mb-pad));z-index:4;margin:calc(-1 * var(--mb-pad)) calc(-1 * var(--mb-pad)) 12px;padding:var(--mb-pad) var(--mb-pad) 0;background:var(--surface-solid,#fff);border-bottom:1px solid var(--line)}
.order-head .steps{margin-bottom:8px}
.order-head .next-action{margin-bottom:8px;padding:8px 12px}
.order-head-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;margin-bottom:6px}
.order-head-amount{font-size:.9rem;white-space:nowrap}
.order-head-row{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;flex-wrap:wrap}
.record-tabs{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;margin-bottom:-1px;min-width:0}
.record-tabs::-webkit-scrollbar{display:none}
.record-tab{position:relative;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font:inherit;font-size:.9rem;font-weight:500;padding:9px 12px;white-space:nowrap;cursor:pointer;min-height:40px}
.record-tab:hover{color:var(--ink)}
.record-tab.active{color:var(--ink);border-bottom-color:var(--accent,#a81939);font-weight:600}
.tab-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--warn,#c97a00);margin-inline-start:5px;vertical-align:middle}
.record-panel{padding-top:4px}
.record-panel>.meta-grid:first-child{margin-top:4px}
.order-more{position:relative;display:flex;align-items:center;padding-bottom:6px}
.order-more-toggle{display:none}
.order-more-list{flex-wrap:wrap;justify-content:flex-end;gap:6px}
.order-tab-actions:empty{display:none}
.order-tab-actions{margin-bottom:10px}
.change-delivery{margin:12px 0}
.change-delivery-list{display:none;flex-direction:column;align-items:stretch;gap:6px;margin-top:8px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.change-delivery.open .change-delivery-list{display:flex}
.change-delivery-list .button{justify-content:flex-start;text-align:start}
.change-delivery-toggle .icon{width:16px;height:16px}
.order-delivery-meta,.order-amounts{margin-bottom:12px}
.activity-filters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.activity-filter{border:1px solid var(--line);background:var(--surface);color:var(--muted);font:inherit;font-size:.85rem;border-radius:999px;padding:6px 12px;min-height:34px;cursor:pointer}
.activity-filter.active{color:var(--ink);border-color:var(--accent,#a81939);font-weight:600}
@media(max-width:700px){
  .order-head .steps{margin-bottom:6px}
  .order-head .step small{display:none}
  .order-more-toggle{display:inline-flex}
  .order-more-list{display:none;position:absolute;inset-inline-end:0;top:100%;z-index:6;flex-direction:column;align-items:stretch;min-width:220px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface-solid,#fff);box-shadow:0 12px 30px #0002}
  .order-more.open .order-more-list{display:flex}
  .order-more-list .button{justify-content:flex-start}
  .record-tab{padding:9px 10px;font-size:.875rem}
}
.error-box.visible+.order-head{margin-top:0}
.order-head-row .order-more{order:-1;flex-basis:100%;justify-content:flex-end}
@media(max-width:700px){.order-head-row{flex-wrap:nowrap;align-items:center}.order-head-row .order-more{order:0;flex-basis:auto;padding-bottom:0}.order-head-row .record-tabs{flex:1 1 auto}}
@media(max-width:700px){
  .order-head .steps{gap:3px}
  .order-head .step{flex-direction:row;justify-content:center;gap:4px;padding:5px 3px;font-size:.72rem}
  .order-head .step-dot{width:16px;height:16px;font-size:10px;flex:none}
  .order-head .next-action{padding:6px 10px;font-size:.85rem}
  .order-head .next-action small{display:none}
  .order-head-meta{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:6px;margin-bottom:2px}
  .order-head-meta::-webkit-scrollbar{display:none}
  .order-head-meta>.actions{flex-wrap:nowrap}
  .order-head-meta .badge{white-space:nowrap}
  .order-head-amount{font-size:.82rem}
}
@media(max-width:700px){.order-head-amount{order:-1}}
/* ===== 8.0.2 layer (PLAN-8.0 3.5): saved views chip row, ⌘K Recent group and prefix hint, reminder settings. Tokens only. ===== */
.views-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:-4px 0 14px}
.view-chip{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;background:var(--surface);overflow:hidden}
.view-chip.active{border-color:var(--accent,#a81939);box-shadow:inset 0 0 0 1px var(--accent,#a81939)}
.view-chip-name{border:0;background:none;color:var(--ink);font:inherit;font-size:.85rem;padding:6px 10px;min-height:32px;cursor:pointer;white-space:nowrap}
.view-chip-x{border:0;border-inline-start:1px solid var(--line);background:none;color:var(--muted);font-size:1rem;line-height:1;padding:6px 9px;min-height:32px;cursor:pointer}
.view-chip-x:hover{color:var(--danger,#c0392b)}
.view-save{border:1px dashed var(--line-2,var(--line));background:none;color:var(--muted);font:inherit;font-size:.85rem;border-radius:999px;padding:6px 12px;min-height:32px;cursor:pointer}
.view-save:hover{color:var(--ink)}
.gs-prefix{padding:6px 12px 2px;font-size:.75rem;color:var(--muted)}
.reminder-settings label{display:flex;align-items:center;gap:8px}
@media(max-width:700px){.views-bar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}.views-bar::-webkit-scrollbar{display:none}.view-chip-name,.view-chip-x,.view-save{min-height:40px}}
/* 8.0.2: on phones the search box was squeezed by the top bar's buttons (8.0.0 "+"): it keeps a tap target and opens full width. */
@media(max-width:700px){
  .topbar{position:relative}
  .topbar .global-search{flex:1 1 48px;min-width:48px;padding:0 10px;gap:6px}
  .topbar .global-search .kbd{display:none}
  .topbar .global-search input{flex:1 1 auto;min-width:0;width:100%}
  .topbar .global-search:focus-within{position:absolute;inset-inline:12px;top:50%;transform:translateY(-50%);z-index:40;background:var(--surface-solid)}
}

/* ===== 8.0.3 layer (owner): same-SKU scanning guide in the order window, the item count in Prepare / Hand over. Warning colours as .notice.warning. ===== */
.scan-guide{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 10px;font-size:13px}
.scan-guide-open{padding:8px 10px;border-radius:10px;background:var(--warn-soft,#fff5e4);color:#8a5a12;border:1px solid #f0d9a8}
:root[data-theme="dark"] .scan-guide-open{background:#3a2a1a;color:#f0c38e;border-color:#5a4020}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .scan-guide-open{background:#3a2a1a;color:#f0c38e;border-color:#5a4020}}
.scan-guide bdi{font-variant-numeric:tabular-nums}
fieldset.form-section{border:1px solid var(--line);border-radius:12px;padding:10px 14px 12px;margin:12px 0 0;min-width:0}fieldset.form-section legend{padding:0 6px;font-weight:600;font-size:13px}
.count-confirm input{max-width:180px;font-size:18px;font-variant-numeric:tabular-nums}
@media (max-width:700px){.scan-guide .button{min-height:44px}.count-confirm input{max-width:none}}

/* ===== 8.0.5 layer (owner): the call window (recording player, transcript, attach to a customer) and call badges. ===== */
.call-window h3{margin:16px 0 8px;font-size:.95rem}
.call-window .call-facts{margin-bottom:4px}.call-window .call-phone{font-size:1.05rem}
.call-actions{margin-top:8px}
.call-player{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.call-player audio{flex:1 1 260px;min-width:0;width:100%;height:40px}
.call-badges{display:inline-flex;gap:4px;flex-wrap:wrap;vertical-align:middle}.call-badges .badge{font-size:.78rem;padding:2px 6px}
.call-summary{background:var(--surface-soft,#f6f7fa);border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:8px;font-size:.9rem}
ol.transcript{list-style:none;margin:8px 0;padding:0;display:grid;gap:6px;max-height:min(46vh,420px);overflow-y:auto;border:1px solid var(--line);border-radius:12px;padding:10px}
.t-line{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:start;font-size:.9rem;line-height:1.6}
.t-who{font-size:.75rem;font-weight:650;padding:2px 7px;border-radius:7px;background:#f1f3f7;color:#5a6476;white-space:nowrap;margin-top:2px}
.t-line.agent .t-who{background:#edf3fd;color:#356da8}.t-line.customer .t-who{background:#eaf5ef;color:#287659}
.t-text{overflow-wrap:anywhere;white-space:pre-wrap}
.call-attach{display:flex;gap:8px;margin:8px 0}.call-attach input{flex:1;min-width:0}
#call-attach-results .list-item{padding:10px 0}
button.list-item.call-item{width:100%;background:none;border:0;border-bottom:1px solid var(--line);text-align:start;color:inherit;cursor:pointer;padding:12px 4px}
button.list-item.call-item:hover{background:#fafbfe}
:root[data-theme="dark"] .t-who{background:#2a3142;color:#c5cbd8}:root[data-theme="dark"] .t-line.agent .t-who{background:#1e2e46;color:#9cc0ee}:root[data-theme="dark"] .t-line.customer .t-who{background:#1c3329;color:#93d1b2}
:root[data-theme="dark"] .call-summary{background:#1d2230}:root[data-theme="dark"] button.list-item.call-item:hover{background:#1d2230}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .t-who{background:#2a3142;color:#c5cbd8}:root:not([data-theme="light"]) .t-line.agent .t-who{background:#1e2e46;color:#9cc0ee}:root:not([data-theme="light"]) .t-line.customer .t-who{background:#1c3329;color:#93d1b2}
  :root:not([data-theme="light"]) .call-summary{background:#1d2230}:root:not([data-theme="light"]) button.list-item.call-item:hover{background:#1d2230}}
@media (max-width:700px){.call-player .button,.call-attach .button,.call-actions .button{min-height:44px}.call-attach input{font-size:16px}}

/* ===== 8.0.6 layer (owner): incoming call ring banner, call status (Online / Away), Voiso check. ===== */
#call-ring{position:fixed;top:12px;left:50%;transform:translate(-50%,-140%);z-index:120;display:flex;align-items:center;gap:12px;width:min(560px,calc(100% - 24px));padding:12px 14px;border-radius:16px;
  background:var(--surface-solid,#fff);border:1px solid var(--line);box-shadow:0 12px 40px #1d294533;transition:transform .2s ease;color:inherit}
#call-ring.open{transform:translate(-50%,0)}
.call-ring-icon{font-size:26px;line-height:1;animation:call-ring-shake 1.2s ease-in-out infinite}
.call-ring-text{flex:1;min-width:0;display:grid;gap:2px}.call-ring-text strong{font-size:1rem}
.call-ring-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@keyframes call-ring-shake{0%,50%,100%{transform:rotate(0)}10%,30%{transform:rotate(-14deg)}20%,40%{transform:rotate(14deg)}}
@media (prefers-reduced-motion:reduce){.call-ring-icon{animation:none}#call-ring{transition:none}}
.call-presence{border:1px solid var(--line);border-radius:999px;background:transparent;color:inherit;padding:6px 11px;font-size:.85rem;font-weight:600;white-space:nowrap;cursor:pointer}
.call-presence.online{color:#287659;border-color:#bfe3d0;background:#eaf5ef}.call-presence.away{color:#737c8f}
.account-popover .call-presence{width:100%;text-align:start}
.voiso-check{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}.voiso-check li{display:flex;gap:8px;align-items:flex-start;line-height:1.5}
.voiso-check li span{flex:0 0 22px;height:22px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:.8rem}
.voiso-check li.ok span{background:#eaf5ef;color:#287659}.voiso-check li.bad span{background:#fff5e4;color:#a87620}.voiso-check code{font-size:.8rem;overflow-wrap:anywhere}
:root[data-theme="dark"] #call-ring{background:#1b2030;box-shadow:0 12px 40px #0008}:root[data-theme="dark"] .call-presence.online{background:#1c3329;border-color:#2c5a45;color:#93d1b2}
:root[data-theme="dark"] .voiso-check li.ok span{background:#1c3329;color:#93d1b2}:root[data-theme="dark"] .voiso-check li.bad span{background:#3a2a1a;color:#f0c38e}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) #call-ring{background:#1b2030;box-shadow:0 12px 40px #0008}:root:not([data-theme="light"]) .call-presence.online{background:#1c3329;border-color:#2c5a45;color:#93d1b2}
  :root:not([data-theme="light"]) .voiso-check li.ok span{background:#1c3329;color:#93d1b2}:root:not([data-theme="light"]) .voiso-check li.bad span{background:#3a2a1a;color:#f0c38e}}
@media (max-width:700px){.topbar .topbar-presence{display:none}#call-ring{top:8px;flex-wrap:wrap}.call-ring-actions{width:100%}.call-ring-actions .button{flex:1;min-height:44px}}
/* 8.0.6 (owner: "flashing screen with ringtone"): the screen pulses with the ring, once every 1.2 s (well under three flashes a second);
   it never blocks a tap (pointer-events none) and sits under the ring banner. Reduced motion: a steady glow. */
#call-flash{position:fixed;inset:0;z-index:110;pointer-events:none;opacity:0;background:radial-gradient(ellipse at center,transparent 55%,#a8193926 100%);box-shadow:inset 0 0 0 6px #a81939,inset 0 0 60px 10px #a8193966}
body.call-ringing #call-flash{animation:call-flash 1.2s ease-in-out infinite}
@keyframes call-flash{0%,100%{opacity:0}45%,55%{opacity:1}}
@media (prefers-reduced-motion:reduce){body.call-ringing #call-flash{animation:none;opacity:.7}}
/* 8.0.7: Voiso panel head. The note takes the free space (the old rule also stretched the small buttons), colours follow the theme,
   the Voiso page itself stays on white; on phones the note wraps under the buttons. */
#voiso-dock{background:var(--surface-solid,var(--surface,#fff));color:var(--ink)}
#voiso-dock iframe{background:#fff}
.voiso-dock-head{border-bottom-color:var(--line)}
.voiso-dock-head .small{flex:initial}
.voiso-dock-head .voiso-dock-note{flex:1;min-width:0}
.voiso-dock-head .button{flex:none}
@media (max-width:700px){#voiso-dock{inset:8px}.voiso-dock-head{flex-wrap:wrap}.voiso-dock-head .voiso-dock-note{order:3;flex-basis:100%}}
/* The incoming-call banner and the screen flash sit above the Voiso panel (z-index 900); before 8.0.7 an open panel hid the banner. */
#call-ring{z-index:950}#call-flash{z-index:940}
/* 8.0.9: Phone app & notifications window (public/app/push-ui.js) and the Today line offering it on phones. */
.push-window h3{font-size:.95rem;margin:18px 0 8px}.push-window h3:first-of-type{margin-top:4px}
.push-steps{margin:8px 0 0;padding-inline-start:22px}.push-steps li{margin:4px 0}
.push-kinds{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px 16px}
.push-devices{list-style:none;margin:0;padding:0}.push-devices li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-top:1px solid var(--line)}
.push-devices li>span{min-width:0;overflow-wrap:anywhere}.push-devices .button{flex:none}
.push-link{display:flex;gap:8px;align-items:center}.push-link input{flex:1;min-width:0}
.push-hint{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}.push-hint .actions{flex:none}
/* 8.1.0: Voiso check window, panel section and the message for Voiso; the panel uses more of narrower screens (Voiso's workspace wants
   1300 × 768 for its best layout). */
.voiso-check-h{font-size:.95rem;margin:16px 0 6px}
.voiso-message{width:100%;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;background:var(--surface-solid,var(--surface,#fff));color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:10px;resize:vertical}
@media (max-width:1400px){#voiso-dock{inset:8px}}
/* 8.1.1: the Voiso panel on tablets and wide screens. The workspace is drawn at Voiso's minimum size and scaled to the panel
   (communications.js fitDock); on wide screens it sits beside incrediERP (html.voiso-side, --voiso-w), which then uses the icon
   sidebar of the iPad layout; a window shown while the panel is open does not lock the screen (core.js releaseModal): it sits
   beside the panel, or in front of it (behind it once the panel is opened again) in the full window. */
#voiso-dock .voiso-frame{position:relative;flex:1 1 auto;min-height:0;overflow:hidden;background:#fff}
#voiso-dock .voiso-frame iframe{position:absolute;top:0;left:0;width:100%;height:100%;min-height:0;border:0;transform-origin:0 0}
.voiso-dock-turn{display:none;color:var(--warn,#9a6a00)}
@media (orientation:portrait) and (min-width:701px) and (max-width:1199px) and (any-pointer:coarse){#voiso-dock .voiso-dock-turn{display:inline}}
@media (min-width:701px){.voiso-dock-head .voiso-dock-note{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
#voiso-dock[data-layout="side"]{inset-block:0;inset-inline-start:auto;inset-inline-end:0;width:var(--voiso-w);border-radius:0;box-shadow:none;border-inline-start:1px solid var(--line)}
html.voiso-side .shell{padding-inline-end:var(--voiso-w)}
html.voiso-side{--sidebar:84px}
html.voiso-side .sidebar .brand span,html.voiso-side .sidebar .nav a span,html.voiso-side .sidebar .nav-group,html.voiso-side .sidebar .account>div:last-child,html.voiso-side .sidebar-bottom>.link-button,html.voiso-side .sidebar-bottom>.button,html.voiso-side .sidebar-bottom>.role-select{display:none}
html.voiso-side .sidebar .nav a{justify-content:center;padding:10px 0;position:relative}
html.voiso-side .sidebar .nav a .nav-count{position:absolute;top:2px;inset-inline-end:6px;font-size:10px}
html.voiso-side .sidebar .nav-section+.nav-section{border-top:1px solid var(--line);padding-top:4px;margin-top:4px}
html.voiso-side .sidebar .brand,html.voiso-side .sidebar .account{justify-content:center;padding-inline:0}
html.voiso-side .mobile-account{display:block;position:relative}
dialog.erp-modal[open]:not(:modal){position:fixed;inset-block:0;inset-inline-start:0;inset-inline-end:var(--voiso-w,0px);z-index:910;box-shadow:0 20px 60px rgba(20,30,50,.35)}
dialog.erp-modal:not(.drawer)[open]:not(:modal){margin:auto}
dialog.erp-modal.behind-voiso[open]:not(:modal){z-index:880}
html.voiso-side dialog.erp-modal:modal{inset-inline-end:var(--voiso-w)}
html.voiso-side dialog.erp-modal:not(.drawer){width:min(var(--dlg-w,720px),calc(100vw - var(--voiso-w) - 48px))}
html.voiso-side dialog.erp-modal.drawer{width:min(760px,calc(100vw - var(--voiso-w)))}
html.voiso-side:not([dir=rtl]) #call-ring,html.voiso-side:not([dir=rtl]) #toast{left:calc((100vw - var(--voiso-w)) / 2)}
html.voiso-side[dir=rtl] #call-ring,html.voiso-side[dir=rtl] #toast{left:calc(var(--voiso-w) + (100vw - var(--voiso-w)) / 2)}
html.voiso-side:not([dir=rtl]) #voiso-pop{right:calc(var(--voiso-w) + 20px)}
html.voiso-side[dir=rtl] #voiso-pop{left:calc(var(--voiso-w) + 20px)}
/* 8.2.0: website chat visitors on the store now: green dot = online, amber = the store open in the background */
.ix-presence{display:inline-block;width:9px;height:9px;border-radius:50%;background:#22b45e;flex:0 0 auto;vertical-align:middle;margin-inline-end:5px}
.ix-presence.away{background:#e8a317}
.ix-presence.online{animation:ix-pulse 2.4s ease-out infinite}
@keyframes ix-pulse{0%{box-shadow:0 0 0 0 #22b45e66}70%{box-shadow:0 0 0 6px #22b45e00}100%{box-shadow:0 0 0 0 #22b45e00}}
@media (prefers-reduced-motion:reduce){.ix-presence.online{animation:none}}
.ix-avatar>.ix-presence{position:absolute;inset-block-start:-1px;inset-inline-end:-1px;width:12px;height:12px;margin:0;box-shadow:0 0 0 2px var(--ix-pane)}
.ix-avatar>.ix-presence.online{animation:none}
.ix-seg-btn .ix-presence{width:7px;height:7px;margin-inline-end:4px;animation:none}
.ix-count.green{background:#1f9d57}
.ix-tag.ix-page{max-width:15em;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.ix-presence-line{display:flex;align-items:center;flex-wrap:wrap;gap:0 4px;margin-top:1px}
.ix-presence-line[hidden]{display:none}
.ix-main .ix-title .ix-presence-line strong{font-size:inherit;font-weight:600;color:var(--ink,inherit);line-height:inherit}
.ix-presence-line a{color:var(--info,#2456a6);text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
:root[data-theme="dark"] .ix-tag.green{background:#1f9d5733;color:#5fd394}:root[data-theme="dark"] .ix-tag.amber{background:#e8a31733;color:#f3c165}
:root[data-theme="dark"] .ix-presence-line a{color:#8fb4ff}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .ix-tag.green{background:#1f9d5733;color:#5fd394}:root:not([data-theme="light"]) .ix-tag.amber{background:#e8a31733;color:#f3c165}:root:not([data-theme="light"]) .ix-presence-line a{color:#8fb4ff}}
/* 8.2.1: shelf moves waiting for approval, and the Move to shelf search results */
.box-waiting{display:block;color:var(--warn,#a35a00);margin-top:3px;white-space:normal}
.box-waiting strong{color:inherit}
.box-move-matches{display:flex;flex-direction:column;gap:4px;margin:-6px 0 10px}
.box-move-matches:empty{display:none}
.box-move-hit{display:block;width:100%;text-align:start;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-solid,#fff);color:inherit;font:inherit;cursor:pointer;min-height:44px}
.box-move-hit:hover,.box-move-hit:focus-visible{border-color:var(--accent);outline:none}
.box-move-table td{vertical-align:top}
.box-move-table td:first-child{white-space:normal;min-width:170px}
:root[data-theme="dark"] .box-waiting{color:#f3c165}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .box-waiting{color:#f3c165}}
/* 8.3.0: Watch live + Take over side by side on a session card (stacked on narrow cards) */
.rl-actions{display:flex;flex-direction:column;gap:6px;align-items:stretch}
@media (max-width:700px){.rl-actions{flex-direction:row;flex-wrap:wrap;align-items:center}}
/* 9.0.0 (B-01, B-02): phones. The 1.x rule that makes every scan-panel and footer button full width squeezed the Receive Stock scan
   box to 36 px beside a full-width Camera button, and pushed the third footer button (Discard) off the screen. */
@media (max-width:700px){.receive-scanrow .button{width:auto;flex:none}.receive-scanrow .lc-input{flex:1;min-width:0}
  .form-footer{flex-wrap:wrap}.form-footer .button{flex:1 1 100%}}
/* 9.0.1: the return flow (units with their photos and choices, the Faulty ticks of the return form) */
.return-units{margin:16px 0}.return-units h3{margin-bottom:6px}
.return-unit{display:flex;gap:14px;justify-content:space-between;align-items:flex-start;padding:12px 0;border-top:1px solid var(--line)}
.return-unit>div:first-child{flex:1;min-width:0}.return-unit .small{margin-top:4px}
.return-choice{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:8px}.return-choice .check{display:inline-flex!important;width:auto}
.return-thumbs{display:flex;gap:6px}.return-thumbs img{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid var(--line);display:block}
.return-faulty-list{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:6px}.return-faulty-list .check{display:inline-flex!important;width:auto}
.return-state .badge{margin-inline-end:6px}.return-money{margin:12px 0}
@media (max-width:700px){.return-unit{flex-direction:column}.return-unit-photos{align-self:flex-start}}
.return-choice input,.return-faulty-list input{width:auto!important;min-width:0;min-height:0;flex:none;margin:0}.return-choice .check{gap:6px;white-space:nowrap}
/* 9.0.2 (F9): an order someone else is working on is read-only here: the banner says who; the action buttons, forms and steppers
   are hidden (reading, printing, tabs and moving between orders stay). The server refuses the writes anyway (423). */
.order-lock-banner{margin:0 16px 10px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.order-lock-banner .button{margin-inline-start:auto}
#modal.order-locked .modal-body form,#modal.order-locked .modal-body .qty-stepper,#modal.order-locked .modal-body .line-edit-links,#modal.order-locked .modal-body .scan-panel,
#modal.order-locked .modal-body button[data-act]:not([data-act="print"]):not([data-act="order"]):not([data-act="record-tab"]):not([data-act="order-more"]):not([data-act="close"]):not(.lock-keep){display:none!important}
.order-lock-chip{margin-top:4px}
/* ===== 9.0.3 grid layer: window sizes, the item grid (frozen header, own scroll, editable cells, totals), Receive Stock on desktop ===== */
dialog.erp-modal.size-content{--dlg-w:1200px;width:fit-content;min-width:min(720px,calc(100vw - 32px));max-width:min(1200px,calc(100vw - 32px))}
dialog.erp-modal.size-wide{--dlg-w:1440px}
dialog.erp-modal.size-full{--dlg-w:100vw;width:calc(100vw - 32px);height:calc(100dvh - 32px);max-height:calc(100dvh - 32px)}
.erp-grid-wrap{overflow:auto;max-height:min(56vh,620px);border:1px solid var(--line);border-radius:12px;background:var(--surface-solid,#fff)}
.erp-grid{width:100%;border-collapse:separate;border-spacing:0;font-size:14px}
.erp-grid thead th{position:sticky;top:0;z-index:2;background:var(--surface-2,var(--surface-solid,#f6f6f7));text-align:start;font-weight:600;font-size:12px;color:var(--muted);padding:8px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
.erp-grid tfoot td{position:sticky;bottom:0;z-index:2;background:var(--surface-2,var(--surface-solid,#f6f6f7));padding:8px 10px;border-top:1px solid var(--line)}
.erp-grid td{padding:6px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
.erp-grid tbody tr.selected td{background:color-mix(in srgb,var(--accent,#c8102e) 8%,transparent)}
.erp-grid tbody tr.warn td{background:color-mix(in srgb,#f59e0b 12%,transparent)}
.erp-grid .num{text-align:end}.erp-grid th.num{text-align:end}
.erp-grid .grid-cell{width:100%;min-width:56px;min-height:34px;padding:4px 8px;border:1px solid transparent;border-radius:8px;background:transparent;font:inherit;color:inherit}
.erp-grid .grid-cell:hover{border-color:var(--line)}.erp-grid .grid-cell:focus{outline:2px solid var(--accent,#c8102e);outline-offset:-1px;background:var(--surface-solid,#fff)}
.erp-grid td.num .grid-cell{text-align:end}
.erp-grid .grid-empty td{text-align:center;color:var(--muted);padding:22px}
.receive-desk{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.receive-desk .scan-panel{position:sticky;top:0;z-index:3}
@media(min-width:1280px){.receive-desk{grid-template-columns:minmax(0,1fr) 300px}.receive-aside{position:sticky;top:0;align-self:start}}
.receive-aside{display:flex;flex-direction:column;gap:12px}.receive-aside .receive-facts{border:1px solid var(--line);border-radius:12px;padding:12px}
.receive-aside .receive-facts dl{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;margin:8px 0 0}.receive-aside .receive-facts dt{color:var(--muted);font-size:12px}
.grid-keys{font-size:12px;color:var(--muted);margin-top:6px}.grid-keys kbd{font:inherit;border:1px solid var(--line);border-radius:5px;padding:0 4px}
.receiving-today .list-item{align-items:center}
.receipt-amendments .amend-row{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
@media(max-width:700px){.grid-keys{display:none}}
.erp-grid td[data-col="name"]{white-space:normal;min-width:160px}.erp-grid td[data-col="status"]{white-space:normal}.receive-main .grid-keys{margin-bottom:10px}
/* 9.0.4: New invoice / New order on the grid (customer left, items right), the totals list, Park / Recall */
.order-desk{display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
@media(min-width:1100px){.order-desk{grid-template-columns:minmax(300px,380px) minmax(0,1fr)}.order-desk-left .form-grid{grid-template-columns:1fr 1fr}}
.order-desk-right .form-section{position:sticky;top:0;z-index:3;background:var(--surface-solid,#fff);padding-bottom:8px}
.order-totals{margin-top:10px;display:flex;justify-content:flex-end}
.order-totals-list{display:grid;grid-template-columns:auto auto;gap:4px 18px;margin:0;min-width:240px}.order-totals-list dt{color:var(--muted)}.order-totals-list dd{margin:0;text-align:end}
.erp-grid td[data-col="name"] .subline{white-space:normal}
/* 9.0.5: the red banner while a customer's self-help request waits (the order is locked for staff) */
.notice.customer-request-banner{background:#fff0f2;border:1px solid #f3c6ce;color:#a02540}.notice.customer-request-banner .small{color:inherit;opacity:.9}
:root[data-theme="dark"] .notice.customer-request-banner{background:#3a1d24;border-color:#6a2a3a;color:#f3b3c0}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .notice.customer-request-banner{background:#3a1d24;border-color:#6a2a3a;color:#f3b3c0}}
.self-help-address-change{display:grid;gap:2px}.self-help-address-change .old{color:var(--muted);text-decoration:line-through}
/* 9.0.7 (AUDIT-9.0 B-06, B-07): touch screens of every width (iPads run as desktop browsers): 16 px fields so iOS Safari does not zoom
   on focus, and 44 px tap targets for the small link buttons, sort heads, record tabs, the dialog close and the navigation links. */
@media (any-pointer:coarse){input,select,textarea,#global-search,#location-filter,.search{font-size:16px}
  .link-button,.record-tab,.nav a{min-height:44px}.link-button{display:inline-flex;align-items:center;justify-content:center;min-width:44px}
  .sort-head{min-height:44px;display:inline-flex;align-items:center}.modal-close{min-width:44px;min-height:44px}}
/* 9.5.0 P1: availability (Available / Away) — the chip in the top bar, Inbox, Calls and the account menu; the dot on Team → People. */
:root{--presence-on:#1F7A5C;--presence-on-soft:#E6F4EE;--presence-on-line:#bfe3d0;--presence-off:#8a93a3}
:root[data-theme="dark"]{--presence-on:#93d1b2;--presence-on-soft:#1c3329;--presence-on-line:#2c5a45;--presence-off:#8b93a6}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--presence-on:#93d1b2;--presence-on-soft:#1c3329;--presence-on-line:#2c5a45;--presence-off:#8b93a6}}
.presence-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;background:transparent;color:inherit;padding:6px 11px;font-size:.85rem;font-weight:600;white-space:nowrap;cursor:pointer;max-width:260px;overflow:hidden;text-overflow:ellipsis}
.presence-chip.online{color:var(--presence-on);border-color:var(--presence-on-line);background:var(--presence-on-soft)}
.presence-chip.away{color:var(--presence-off)}
.presence-dot{display:inline-block;width:9px;height:9px;border-radius:50%;flex:0 0 auto;background:var(--presence-off);vertical-align:middle}
.presence-dot.online{background:var(--presence-on)}
.presence-line{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.presence-actions{margin-top:6px}
.account-popover .presence-chip{width:100%;max-width:none;justify-content:flex-start}
table.presence-hours input[type=time]{min-width:7.5em}
/* Phones: the one-row top bar has no room; the status sits in the account menu, as the 8.0.6 call status did. */
@media (max-width:700px){.topbar .presence-chip.topbar-presence{display:none}}
/* 9.5.0 P2: tasks — overdue in red, the count on Today / Tasks, home rows with their buttons. */
:root{--task-overdue:#B42318;--task-high:#A81939}
:root[data-theme="dark"]{--task-overdue:#ff8f84;--task-high:#ff8fa3}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--task-overdue:#ff8f84;--task-high:#ff8fa3}}
.task-overdue{color:var(--task-overdue);font-weight:600}
.task-row-overdue td:first-child{box-shadow:inset 3px 0 0 var(--task-overdue)}
[dir="rtl"] .task-row-overdue td:first-child{box-shadow:inset -3px 0 0 var(--task-overdue)}
.task-row-high .link-button{font-weight:600}
.nav-count.task-count[hidden]{display:none}
.nav-count.task-count.alert{background:var(--task-overdue);color:#fff}
.tabbar a{position:relative}.tabbar a .task-count{position:absolute;top:2px;inset-inline-end:18%;font-size:.7rem;min-width:18px;padding:0 5px}
.task-home-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.task-home-row .actions{flex-wrap:wrap}
.task-home-row.danger b{color:var(--task-overdue)}
.task-table td.actions{white-space:nowrap}
.task-history{margin-top:12px}.task-history ul{margin:6px 0 0;padding-inline-start:18px}
@media (max-width:700px){.task-table td.actions{white-space:normal}}
/* 9.5.0 P4: team notes, the outcome bar, calls by hour. */
.team-notes{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}.team-notes h3 .small{font-weight:400}
.note-list{list-style:none;margin:6px 0;padding:0}.note-list li{padding:8px 0;border-bottom:1px solid var(--line)}.note-list p{margin:0 0 2px}
.note-follow{margin:6px 0}.note-follow summary{cursor:pointer;font-size:.85rem}
.outcome-bar{position:fixed;inset-inline:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:60;display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;max-width:560px;margin-inline:auto;padding:10px 14px;border-radius:14px;background:var(--warn-soft,#FFF1DE);color:var(--warn,#A35A00);border:1px solid currentColor;font-weight:600}
:root[data-theme="dark"] .outcome-bar{background:#3a2a12;color:#ffc56b}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .outcome-bar{background:#3a2a12;color:#ffc56b}}
@media (max-width:700px){.outcome-bar{bottom:calc(76px + env(safe-area-inset-bottom))}}
.call-hours{display:grid;grid-template-columns:repeat(24,1fr);gap:2px;align-items:end;height:90px;direction:ltr}
.call-hours span{display:flex;flex-direction:column;justify-content:flex-end;height:100%}.call-hours i{display:block;height:var(--h);min-height:1px;background:var(--accent);border-radius:3px 3px 0 0}
.call-hours b{font-size:.6rem;font-weight:400;color:var(--muted);text-align:center}
/* 9.5.0 P5: the customer timeline. */
:root{--tl-in:#2456A6;--tl-out:#1F7A5C}
:root[data-theme="dark"]{--tl-in:#8db4f0;--tl-out:#93d1b2}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--tl-in:#8db4f0;--tl-out:#93d1b2}}
.timeline{margin-top:6px}.timeline-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.timeline-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}.timeline-tools input[type=search]{flex:1 1 180px;min-width:0}
.timeline-weeks{display:grid;grid-template-columns:repeat(12,1fr);gap:4px;height:54px;align-items:end;direction:ltr}
.timeline-weeks span{display:flex;gap:2px;align-items:flex-end;height:100%}.timeline-weeks i{flex:1;height:var(--h);min-height:1px;border-radius:3px 3px 0 0}
.timeline-weeks i.in,.timeline-legend .dot-in{background:var(--tl-in)}.timeline-weeks i.out,.timeline-legend .dot-out{background:var(--tl-out)}
.timeline-legend .dot-in,.timeline-legend .dot-out{display:inline-block;width:9px;height:9px;border-radius:2px;vertical-align:middle}
.timeline-list{list-style:none;margin:10px 0 0;padding:0}.timeline-list li{display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px;padding:8px 0;border-bottom:1px solid var(--line)}
.timeline-list p{margin:0 0 2px;overflow-wrap:anywhere}.tl-icon{font-size:1.05rem;line-height:1.4}
.timeline-list li.tl-in{border-inline-start:3px solid var(--tl-in);padding-inline-start:6px}.timeline-list li.tl-out{border-inline-start:3px solid var(--tl-out);padding-inline-start:6px}
/* 9.5.0 P6: service goals and Send and update. */
.sla-box{margin:10px 0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.sla-box h3{margin:0 0 6px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}.sla-clocks{margin:0 0 8px;padding-inline-start:18px}.sla-clocks li{margin:2px 0}
.split-send{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}.split-menu{position:relative}.split-menu>summary{list-style:none;cursor:pointer}.split-menu>summary::-webkit-details-marker{display:none}
.split-items{position:absolute;inset-inline-end:0;z-index:5;display:flex;flex-direction:column;gap:6px;min-width:220px;margin-top:6px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface-solid);box-shadow:var(--shadow)}
.split-items .button{justify-content:flex-start;min-height:44px}
@media (max-width:700px){.split-items{position:static;min-width:0}}
.ticket-fields{margin:10px 0}.ticket-fields>summary{cursor:pointer}
/* 9.5.0 P7: the preferred courier. */
.courier-pref{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin:8px 0}.courier-pref form{margin:0}.courier-pref select{min-width:120px}
.aramex-test{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}.aramex-test ol{margin:6px 0;padding-inline-start:20px}
/* 9.5 windows layer (P8): record windows above the pages, the taskbar, the phone chips, the pop-out page. */
/* 9.6.0 / 9.6.1 (owner's videos: fields and buttons inside a window did not take a tap, on an iPad, then on an iPhone): the layer has no box at
   all. Covering the screen with pointer-events:none, and then a box of no size, both made Safari drop taps in a window body that scrolls;
   each window is fixed to the viewport and carries its own z-index (restack() in public/app/windows.js: 60 / 30 on phones). */
#windows{display:contents}
.erp-window{position:fixed;pointer-events:auto;display:flex;flex-direction:column;min-width:320px;min-height:240px;background:var(--surface-solid);color:var(--ink);border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 50px rgba(15,25,45,.22);overflow:hidden}
.erp-window.active{box-shadow:0 24px 70px rgba(15,25,45,.32);border-color:var(--accent,#2f6fe0)}
.erp-window.minimized{display:none}
.erp-window[data-snap="full"],.erp-window[data-snap="left"],.erp-window[data-snap="right"]{border-radius:0}
.window-head{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line);background:var(--surface-2);cursor:grab;user-select:none;touch-action:none}
.window-head:active{cursor:grabbing}.window-title{flex:1;min-width:0;margin:0;font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.window-chip:empty{display:none}.window-buttons{display:flex;gap:2px}
.window-button{min-width:36px;min-height:36px;border:0;border-radius:8px;background:transparent;color:var(--ink-2);font-size:1rem;cursor:pointer}.window-button:hover{background:var(--surface-3)}
.window-body{flex:1;overflow:auto;padding:14px 16px}
.window-resize{position:absolute;inset-inline-end:0;bottom:0;width:18px;height:18px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 50%,var(--line) 50%)}
[dir="rtl"] .window-resize{cursor:nesw-resize;background:linear-gradient(225deg,transparent 50%,var(--line) 50%)}
#taskbar{position:fixed;bottom:0;inset-inline-start:var(--sidebar,0);inset-inline-end:0;z-index:61;display:flex;gap:6px;padding:6px 10px calc(6px + env(safe-area-inset-bottom,0px));background:var(--glass,var(--surface));border-top:1px solid var(--line);backdrop-filter:blur(14px);overflow-x:auto}
.voiso-side #taskbar{inset-inline-end:var(--voiso-w,0)}
.has-taskbar .shell{padding-bottom:52px}
.task{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;background:var(--surface-solid);max-width:240px;flex:0 1 auto}
.task.active{border-color:var(--accent,#2f6fe0)}.task.minimized{opacity:.75}
.task-open{display:flex;align-items:center;gap:6px;min-height:40px;padding:0 10px;border:0;background:transparent;color:var(--ink);cursor:pointer;min-width:0}
.task-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}.task-dot{width:8px;height:8px;border-radius:50%;background:var(--accent,#2f6fe0)}
.task-close{min-width:36px;min-height:40px;border:0;background:transparent;color:var(--muted);cursor:pointer}
#voiso-dock.minimized{display:none}
@media (max-width:700px){
  .erp-window{inset:0 0 calc(64px + env(safe-area-inset-bottom,0px)) 0 !important;width:auto !important;height:auto !important;border-radius:0;border:0;min-width:0}
  .window-resize,.window-button[data-act="win-max"],.window-button[data-act="win-pop"]{display:none}
  #taskbar{inset-inline-start:0;bottom:calc(64px + env(safe-area-inset-bottom,0px));padding:4px 8px;background:transparent;border:0;backdrop-filter:none;justify-content:center}
  .task{max-width:33%;box-shadow:0 4px 14px rgba(15,25,45,.18)}.task-title{max-width:90px}.has-taskbar .shell{padding-bottom:0}
}
.popout .sidebar,.popout .topbar,.popout .tabbar,.popout #taskbar,.popout .top-bar{display:none !important}
.popout .erp-window{inset:0 !important;width:auto !important;height:auto !important;border-radius:0}
/* 9.5 windows layer (P9): order, invoice and draft windows: the sticky order header inside the window body, the J / K arrows in the title
   bar, the read-only lock per window (as #modal.order-locked in the drawer). */
.erp-window[data-kind="order"] .window-body,.erp-window[data-kind="invoice"] .window-body,.erp-window[data-kind="draft"] .window-body{--mb-pad:16px;padding:16px}
/* 9.6.2: the arrows sit at the end of the title bar (.window-nav), apart from the Mac buttons at its start. */
.window-nav{display:flex;align-items:center;flex:none}.window-nav:empty{display:none}
.window-nav .order-nav{display:flex;align-items:center;gap:2px}
.window-nav .order-nav-btn{display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--surface-solid);color:var(--ink-2);cursor:pointer}
.window-nav .order-nav-btn:disabled{opacity:.35;cursor:default}.window-nav .order-nav-btn .icon{width:16px;height:16px}
.erp-window.order-locked .window-body form,.erp-window.order-locked .window-body .qty-stepper,.erp-window.order-locked .window-body .line-edit-links,.erp-window.order-locked .window-body .scan-panel,
.erp-window.order-locked .window-body button[data-act]:not([data-act="print"]):not([data-act="order"]):not([data-act="record-tab"]):not([data-act="order-more"]):not([data-act="close"]):not(.lock-keep){display:none!important}
.erp-window .window-chip .badge{font-size:.72rem}
@media (max-width:700px){.window-nav .order-nav-btn{width:44px;height:44px}}
/* 9.5.0 P10: duplicate customers. */
.dup-tabs{margin:0 0 12px}.dup-list{display:grid;gap:12px}
.dup-pair{border:1px solid var(--line);border-radius:14px;background:var(--surface-solid);padding:12px 14px}
.dup-head{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:10px}
.dup-cards{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:start}
.dup-card{min-width:0;border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:var(--surface-2)}.dup-card p{margin:2px 0;overflow-wrap:anywhere}
.dup-name{font-weight:600;text-align:start}.dup-vs{align-self:center;color:var(--muted);font-size:1.2rem}
.dup-pair .actions{margin-top:10px;flex-wrap:wrap}.dup-keep{display:flex;gap:8px;align-items:flex-start;margin:6px 0}.merged-trail{margin:4px 0 10px}
@media (max-width:700px){.dup-cards{grid-template-columns:1fr}.dup-vs{display:none}}
/* 9.5.0 P11: customer segments and template sends. */
.seg-list{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr))}
.seg-card{border:1px solid var(--line);border-radius:14px;background:var(--surface-solid);padding:12px 14px;min-width:0}
.seg-head{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:8px}.seg-name{font-weight:600;text-align:start;overflow-wrap:anywhere}
.seg-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}.seg-chips .badge{max-width:100%;overflow-wrap:anywhere;white-space:normal}
.seg-card .actions{flex-wrap:wrap;margin-top:8px}.seg-sub{margin:20px 0 8px;font-size:1rem}.seg-pager{justify-content:center;margin:10px 0}
.seg-counts{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px;margin:10px 0}
.seg-count{display:flex;flex-direction:column;align-items:center;border:1px solid var(--line);border-radius:10px;padding:8px 6px;background:var(--surface-2)}
.seg-count b{font-size:1.15rem}.seg-count small{color:var(--muted)}.seg-count.good b{color:var(--green)}.seg-count.bad b{color:var(--accent)}
.seg-kinds{border:0;padding:0;margin:0}.seg-kinds legend{font-weight:600;margin-bottom:4px}.seg-kinds .check{display:flex;gap:8px;align-items:flex-start;margin:4px 0}
.seg-tpl-body{margin:10px 0;padding:10px 12px;border-inline-start:3px solid var(--line);background:var(--surface-2);border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere}
.seg-add{margin-top:8px}#seg-add-hits .list-item{margin:4px 0}
/* 9.5.0 P12: customer surveys (Settings → New features → Customer surveys). */
.survey-form{margin-top:10px;display:grid;gap:10px}.survey-form h3{font-size:.95rem;margin:8px 0 0}
.survey-text{border:1px solid var(--line);border-radius:10px;padding:8px 10px;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}
.survey-text legend{font-weight:600;font-size:.875rem;padding:0 4px}.survey-text textarea{width:100%}
@media (max-width:700px){.survey-text{grid-template-columns:1fr}}
.tl-survey .tl-icon{filter:none}
/* 9.5.0 P13: warranty (templates table, unit page, the ticket's coverage). */
.wt-name{min-width:120px}.wt-words{min-width:200px}.wt-months{width:80px;min-width:80px}
.unit-card{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:10px 0;display:grid;gap:8px;background:var(--surface-2)}
.unit-list{margin:4px 0 10px;padding-inline-start:18px}.unit-list li{margin:4px 0}
.warranty-items{margin:4px 0 10px;padding-inline-start:18px}.warranty-items li{margin:6px 0}.warranty-unit{margin-top:10px}
@media (max-width:700px){.wt-name,.wt-words,.wt-months{min-width:0;width:100%}}
/* 9.5.0 P14: landed costs (the document window, the receipt picker). */
.lc-num{width:96px;min-width:96px}.landed-form h3{margin:14px 0 6px}.landed-form select{min-width:120px}
.landed-pick{display:grid;gap:6px;max-height:50vh;overflow:auto;padding:4px 0}.landed-pick .check{align-items:flex-start}
#landed-preview{border:1px solid var(--line);border-radius:12px;padding:8px 10px;background:var(--surface-2)}
@media (max-width:700px){.lc-num,.landed-form select{min-width:0;width:100%}.landed-form .form-footer .button.soft{flex:1 1 40%}}
/* 9.5.0 P15: purchase orders (the expected items inside a receipt from a PO). */
.receive-po{border:1px solid var(--line);border-radius:12px;background:var(--surface-2);margin:10px 0;overflow:hidden}.receive-po .card-head{padding:10px 12px;flex-wrap:wrap}.receive-po h3{font-size:.95rem;margin:0}.receive-po>p{padding:0 12px 10px;margin:0}
.receive-po table td,.receive-po table th{padding:8px 12px}
/* 9.5.0 P16: order recommendations. */
.plan-stats{grid-template-columns:repeat(3,minmax(0,1fr));margin:6px 0 10px}.plan-table tr.plan-late td:first-child{box-shadow:inset 3px 0 0 var(--danger,#ad2541)}[dir="rtl"] .plan-table tr.plan-late td:first-child{box-shadow:inset -3px 0 0 var(--danger,#ad2541)}
.plan-table .badge{margin:2px 0;white-space:normal}.plan-table td{vertical-align:top;white-space:normal}.plan-table td:nth-child(2){min-width:180px}.plan-table td:nth-child(4){min-width:150px}
@media (max-width:700px){.plan-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.plan-stats .stat{padding:12px}.plan-stats .stat-number{font-size:1.4rem}}
/* 9.5.0 release fix (P8 windows on phones): the open-windows bar floats over the bottom of a window; taps pass through its empty part and
   each window leaves room under its last line so that line can be scrolled above the window chips. */
@media (max-width:700px){
  /* 9.6.0 (owner's iPhone screenshot: the window chip sat over the form): a window ends above the windows bar, which has its own strip
     between the window and the tab bar, so a chip never covers a field and nothing needs pointer-events:none. */
  #taskbar{inset-inline-end:0;bottom:var(--tabbar-space,calc(72px + env(safe-area-inset-bottom,0px)));background:var(--glass,var(--surface));border-top:1px solid var(--line);justify-content:flex-start;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
  /* 9.6.1: the heights come from public/app/windows.js fitBars (tab bar + its gap, windows bar); the fallbacks are the iPhone's. */
  .has-taskbar .erp-window{bottom:calc(var(--tabbar-space,calc(72px + env(safe-area-inset-bottom,0px))) + var(--taskbar-h,52px)) !important}
}

/* 9.6.0 (owner, 30 Oct): the account block folds down to its name line (public/app/nav-chrome.js); the sidebar folds to icons
   (html.nav-collapsed) and, like the iPad width and the Voiso side panel, opens over the page while the pointer is on it. */
.brand .nav-toggle{margin-inline-start:auto;width:32px;height:32px;border-radius:10px;border:0;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer;flex:none;padding:0}
.brand .nav-toggle:hover,.brand .nav-toggle:focus-visible{background:var(--nav-active);color:var(--ink)}
.brand .nav-toggle .icon{width:18px;height:18px}
.sidebar .account{width:100%;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;border-radius:14px;text-align:start}
.sidebar .account:hover,.sidebar .account:focus-visible{background:var(--nav-active)}
.account-text{display:flex;flex-direction:column;min-width:0;flex:1}
.account-text .account-info{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.account-chevron{display:grid;color:var(--muted);transition:transform .24s ease}
.account-chevron .icon{width:16px;height:16px}
.sidebar-bottom.open .account-chevron{transform:rotate(180deg)}
.account-menu{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .26s ease,opacity .2s ease}
.sidebar-bottom.open .account-menu{grid-template-rows:1fr;opacity:1}
.account-menu-inner{min-height:0;overflow:hidden}
.account-menu-inner>.button{margin-top:6px}
@media(max-width:700px){.brand .nav-toggle{display:none}}
@media(min-width:701px){
  .shell{transition:grid-template-columns .26s cubic-bezier(.2,.8,.2,1)}
  .sidebar{overflow-x:hidden;transition:width .26s cubic-bezier(.2,.8,.2,1),box-shadow .26s ease}
  .sidebar .nav a{white-space:nowrap}
  html.nav-collapsed{--sidebar:84px}
  html.nav-collapsed .sidebar .brand span,html.nav-collapsed .sidebar .nav a span,html.nav-collapsed .sidebar .nav-group,
  html.nav-collapsed .sidebar .account-text,html.nav-collapsed .sidebar .account-chevron,html.nav-collapsed .sidebar .account-menu{display:none}
  html.nav-collapsed .sidebar .nav a{justify-content:center;padding-inline:0;position:relative}
  html.nav-collapsed .sidebar .nav a .nav-count{position:absolute;top:2px;inset-inline-end:6px;font-size:10px}
  html.nav-collapsed .sidebar .nav-section+.nav-section{border-top:1px solid var(--line);padding-top:4px;margin-top:4px}
  html.nav-collapsed .sidebar .brand{justify-content:center;padding-inline:0;flex-wrap:wrap;row-gap:10px}
  html.nav-collapsed .sidebar .brand .nav-toggle{margin-inline-start:0}
  html.nav-collapsed .sidebar .account{justify-content:center;padding-inline:0}
  html.voiso-side .sidebar .account-text,html.voiso-side .sidebar .account-chevron,html.voiso-side .sidebar .account-menu,html.voiso-side .sidebar .nav-toggle{display:none}
}
@media(min-width:701px) and (max-width:1099px){
  .sidebar .account-text,.sidebar .account-chevron,.sidebar .account-menu,.sidebar .nav-toggle{display:none}
}
@keyframes nav-label-in{from{opacity:0}to{opacity:1}}
/* opened by the pointer (or the keyboard): full width over the page, the page itself does not move */
@media(min-width:701px) and (hover:hover){
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within){width:232px;z-index:30;box-shadow:0 18px 50px #0b122433,var(--glass-shadow,0 0 0 transparent);transition-delay:.08s}
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within) :is(.brand span,.nav a span){display:inline;animation:nav-label-in .2s ease .1s both}
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within) .nav-group{display:block;animation:nav-label-in .2s ease .1s both}
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within) .account-text{display:flex;animation:nav-label-in .2s ease .1s both}
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within) .account-chevron{display:grid}
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within) .account-menu{display:grid}
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within) .nav a{justify-content:flex-start;padding-inline:13px}
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within) .nav a .nav-count{position:static;font-size:inherit}
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within) .brand{justify-content:flex-start;padding-inline:10px;flex-wrap:nowrap}
  html.nav-collapsed .sidebar:is(:hover,:focus-within) .brand .nav-toggle{margin-inline-start:auto}
  :is(html.nav-collapsed,html.voiso-side) .sidebar:is(:hover,:focus-within) .account{justify-content:flex-start;padding-inline:8px}
}
@media(min-width:701px) and (max-width:1099px) and (hover:hover){
  html .sidebar:is(:hover,:focus-within){width:232px;z-index:30;box-shadow:0 18px 50px #0b122433,var(--glass-shadow,0 0 0 transparent);transition-delay:.08s}
  html .sidebar:is(:hover,:focus-within) :is(.brand span,.nav a span){display:inline;animation:nav-label-in .2s ease .1s both}
  html .sidebar:is(:hover,:focus-within) .nav-group{display:block;animation:nav-label-in .2s ease .1s both}
  html .sidebar:is(:hover,:focus-within) .account-text{display:flex;animation:nav-label-in .2s ease .1s both}
  html .sidebar:is(:hover,:focus-within) :is(.account-chevron,.account-menu){display:grid}
  html .sidebar:is(:hover,:focus-within) .nav a{justify-content:flex-start;padding-inline:13px}
  html .sidebar:is(:hover,:focus-within) .nav a .nav-count{position:static;font-size:inherit}
  html .sidebar:is(:hover,:focus-within) .brand{justify-content:flex-start;padding-inline:10px}
  html .sidebar:is(:hover,:focus-within) .account{justify-content:flex-start;padding-inline:8px}
}
@media (prefers-reduced-motion: reduce){.shell,.sidebar,.account-menu,.account-chevron{transition:none}.sidebar *{animation:none !important}}

/* 9.6.0 (owner): Inbox reactions and Admin's Delete message (public/inbox-ui.js). The tools sit beside the bubble, shown under the pointer
   (always, a little faded, on touch screens); the emoji row opens from React; reactions hang under the bubble like a phone's. */
.ix-msg{position:relative}
.ix-bubble-row{display:flex;align-items:center;gap:6px;max-width:100%;position:relative}
.ix-bubble-row>.ix-bubble{min-width:0}
.ix-msg.out .ix-bubble-row{flex-direction:row-reverse}
.ix-msg-tools{display:flex;align-items:center;gap:4px;z-index:2;white-space:nowrap;flex:none}
.ix-msg.out .ix-msg-tools{flex-direction:row-reverse}
.ix-tool{width:30px;height:30px;border-radius:50%;border:1px solid var(--line);background:var(--surface-solid);color:var(--ink-2);display:grid;place-items:center;font-size:15px;line-height:1;cursor:pointer;padding:0}
.ix-tool:hover,.ix-tool:focus-visible{background:var(--nav-active);color:var(--ink)}
.ix-tool.danger:hover,.ix-tool.danger:focus-visible{color:#c0392b}
.ix-react-pick{display:none;position:absolute;bottom:calc(100% + 6px);inset-inline-start:0;z-index:3;align-items:center;gap:2px;padding:3px 6px;border-radius:22px;border:1px solid var(--line);background:var(--surface-solid);box-shadow:0 6px 18px #0b12241f}
.ix-msg.out .ix-react-pick{inset-inline-start:auto;inset-inline-end:0}/* above the message line, from the bubble's outer edge toward the middle of the chat */
.ix-msg.picking .ix-react-pick{display:inline-flex}
.ix-react-pick button{border:0;background:transparent;font-size:20px;line-height:1;width:34px;height:34px;border-radius:50%;cursor:pointer;padding:0;transition:transform .12s ease}
.ix-react-pick button:hover,.ix-react-pick button:focus-visible{transform:scale(1.18);background:var(--nav-active)}
.ix-react-pick button.on{background:var(--nav-active);box-shadow:inset 0 0 0 1.5px var(--accent)}
@media(hover:hover){.ix-msg-tools{opacity:0;transition:opacity .15s ease}.ix-msg:hover .ix-msg-tools,.ix-msg:focus-within .ix-msg-tools,.ix-msg.picking .ix-msg-tools{opacity:1}}
@media(hover:none){.ix-msg-tools{display:none}.ix-msg.show-tools .ix-msg-tools,.ix-msg.picking .ix-msg-tools{display:flex}.ix-tool{width:36px;height:36px}}
.ix-reactions{display:flex;gap:3px;margin-top:-7px;margin-inline-start:10px;position:relative;z-index:1}
.ix-msg.out .ix-reactions{margin-inline-start:0;margin-inline-end:10px}
.ix-reaction{background:var(--surface-solid);border:1px solid var(--line);border-radius:12px;padding:0 6px;font-size:14px;line-height:22px;box-shadow:0 1px 3px #0b122414}
.ix-reaction.team{border-color:var(--accent)}
.ix-msg.reacted .ix-meta{margin-top:2px}
.ix-msg .ix-bubble.ix-removed,.ix-msg.out .ix-bubble.ix-removed{background:transparent;border:1px dashed var(--line);color:var(--muted);font-style:italic;font-size:14px}

/* 9.6.0 (owner: "macOS 27 style"): the window buttons at the start of the title bar as Mac dots: close red, minimize yellow, full screen
   green; their symbols show while the pointer is on them (always on touch screens); grey on a window that is not in front until the
   pointer comes. The tap area is larger than the dot (the dot is drawn inside the button). */
.window-buttons.mac{display:flex;align-items:center;gap:0;margin-inline-end:2px;flex:none}
.window-button.mac{min-width:22px;min-height:28px;width:22px;padding:0;border:0;background:transparent;display:grid;place-items:center;cursor:pointer;border-radius:50%}
.window-button.mac:hover{background:transparent}
.window-button.mac span{width:13px;height:13px;border-radius:50%;display:grid;place-items:center;font-size:10px;line-height:1;font-weight:700;color:transparent;box-shadow:inset 0 0 0 .5px #0000002e;transition:background .15s ease,color .12s ease}
.window-button.mac.close span{background:#ff5f57}.window-button.mac.min span{background:#febc2e}.window-button.mac.max span{background:#28c840}
.window-buttons.mac:hover .window-button.mac span,.window-button.mac:focus-visible span{color:#00000099}
.window-button.mac:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.erp-window:not(.active) .window-buttons.mac:not(:hover) .window-button.mac span{background:var(--line);box-shadow:inset 0 0 0 .5px #0000001f}
.window-button.pop{min-width:30px;min-height:28px;font-size:.95rem;color:var(--muted)}
@media(hover:none){.window-button.mac{width:30px;min-width:30px;min-height:36px}.window-button.mac span{width:16px;height:16px;font-size:11px;color:#0000008c}}
/* 9.6.0: phones keep only close and minimize (a window is the whole screen there); after the Mac-dot rules so they win. */
@media (max-width:700px){.window-buttons.mac .window-button.mac.max,.window-head .window-button.pop{display:none}}
/* 9.7.5: the sign-in window over the page when the 8-hour sign-in ended (public/app/session-login.js) */
dialog.session-ended{width:min(420px,calc(100vw - 32px));padding:24px}
.session-ended-form{display:grid;gap:12px}.session-ended-form h2{margin:0;font-size:1.25rem}.session-ended-form .actions{display:flex;flex-wrap:wrap;gap:8px}.session-ended-form .error-box:empty{display:none}
/* 9.7.7: "Name from another product" choices (public/app/shopify-refetch.js) */
.line-name-list{display:grid;gap:6px;margin-top:6px}
.line-name-choice{display:flex;width:100%;text-align:start;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:transparent;color:inherit;cursor:pointer;min-height:44px}
.line-name-choice:hover,.line-name-choice:focus-visible{border-color:var(--accent)}
.line-name-choice .info{display:flex;flex-direction:column;gap:2px;min-width:0}
.line-name-choice .detail{font-size:.85em;color:var(--muted)}
/* 9.7.9: Inbox – AI replies stopped tag sits in the toolbar like the 'AI suggests only' tag */
.ix-stopped{flex:0 0 auto;min-height:28px}
/* 9.7.10: product window – the orders and invoices holding a branch's units (opened from On hand / Reserved) */
.product-held{margin-top:14px;padding:14px 16px;border:1px solid var(--line);border-radius:14px}.product-held h4{margin:0 0 4px}.product-held .table-wrap{margin-top:8px}.held-link{font-variant-numeric:tabular-nums}
/* 9.8.0: iPhone box label photo per unit (order window Packing column) */
.iphone-box{margin-top:6px;display:grid;gap:6px}.iphone-box-unit{padding:6px 8px;border:1px dashed var(--line);border-radius:10px}.iphone-box-unit .actions-inline{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}.iphone-box-proof .mono{overflow-wrap:anywhere}
/* 10.0.0: Rephrase with AI in the Inbox reply box */
.ix-rephrase{flex:0 0 auto;display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:50%;cursor:pointer;background:var(--ix-fill);font-size:18px;line-height:1}.ix-rephrase:hover{filter:brightness(.96)}.ix-rephrase.busy{animation:ix-rephrase-spin 1s linear infinite;opacity:.7}@keyframes ix-rephrase-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.ix-rephrase.busy{animation:none}}
.ix-rephrased{display:flex;align-items:center;gap:10px;justify-content:space-between;font-size:12.5px;color:var(--ink-2);background:var(--ix-fill);border-radius:10px;padding:6px 10px;margin-bottom:6px}
/* 10.0.0: the Inbox in its own window (public/app/inbox-window.js): the window gives it its height; the page keeps a short card */
.erp-window[data-kind="inbox"] .window-body{display:flex;flex-direction:column;gap:8px;padding:10px 12px;overflow:hidden}.erp-window[data-kind="inbox"] .window-body>.error-box:empty{display:none}
.erp-window[data-kind="inbox"] .ix-wrap{flex:1 1 auto;height:auto;min-height:0}.erp-window[data-kind="inbox"] .ix{border-radius:16px}
.ix-window-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ix-window-bar .ix-grow{flex:1}.inbox-elsewhere{max-width:640px}
.ix-window-bar .views-bar{margin:0}
/* 10.0.0: phones: an open chat covers the screen (6.0.25); the windows bar waits under it until Back */
html.ix-chat-open #taskbar{display:none}
.window-choose .list-item{justify-content:space-between;gap:12px}.window-choose .list-item>span:first-child{flex:1;min-width:0}
/* 10.0.0 UI fine-tuning */
.search{background:var(--input-bg,#ffffffc0);color:var(--ink)}
.kpi-tile{container-type:inline-size}.kpi-tile strong{font-size:min(1.25rem,10.5cqi)}
.table-wrap[data-cards] td strong.mono{white-space:nowrap}
.mobile-account .lang-menu{display:none}
@media(max-width:700px){.topbar>.lang-button{display:none}.mobile-account .lang-menu{display:inline-flex}.topbar>select{min-width:96px}}
/* 10.5.5: the bulk edit window keeps its Save bar in view like a dialog's (the list of rows scrolls under it) */
.erp-window .window-body form[data-form="bulkedit-save"]>.form-footer:last-child{position:sticky;bottom:-1px;background:var(--glass-strong,var(--surface-solid,#fff));-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);padding:12px 0;margin-top:14px;border-top:1px solid var(--glass-line,var(--line));z-index:2}
/* 10.5.6: P&L filters (Margins, Suggested prices) in one wrapping row instead of one full-width field each */
.pnl-filter{flex-wrap:wrap;gap:8px;align-items:center}
.pnl-filter select,.pnl-filter input:not([type=checkbox]){width:auto;flex:0 1 220px;min-width:140px}
@media (max-width:700px){.pnl-filter select,.pnl-filter input:not([type=checkbox]){flex:1 1 100%}}
/* 10.6: Money → P&L → Margins: a row with a typed price or category waits for Save all */
.pnl-margins tr.pnl-edited td{background:var(--warn-soft)}
.pnl-margins th .link-button{color:inherit;font-weight:600;text-decoration:none}
/* 10.8.6: Margins by parent product: the parent row, its variants indented under it */
.pnl-margins tr.pnl-parent td{background:var(--surface-2,rgba(127,127,127,.06));border-top:2px solid var(--line,rgba(127,127,127,.25))}
.pnl-margins tr.pnl-parent .pnl-fold{font-size:1rem;width:1.6em;text-decoration:none}
.pnl-margins tr.pnl-variant td:nth-child(2){padding-inline-start:2.2em}
.pnl-margins tr.pnl-variant.pnl-edited td{background:var(--warn-soft)}
/* 10.6.2: product brief (Admin) at the top of the product window's Stock tab */
.product-brief{margin:4px 0 14px}
.product-brief-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.product-brief-stats .stat{padding:12px 14px;min-width:0}
.product-brief-stats .stat-number{font-size:1.45rem;line-height:1.25;margin:4px 0 2px;overflow-wrap:anywhere}
.product-brief .badge{white-space:normal;display:inline-block;line-height:1.3;margin:2px 0}
/* 10.7.0: supplier invoices (review and analysis) wrap inside the window */
.si-table td{white-space:normal;vertical-align:top}.si-table td .subline{white-space:normal}.si-table .line-product{min-width:160px}
/* 10.8.0: courier pickups: a pickup row opens its shipments; shipments collected outside incrediERP's pickups stand out */
tr.click-row{cursor:pointer}
tr.click-row:hover td{background:color-mix(in srgb,var(--accent,#2563eb) 6%,transparent)}
.notice.cp-extras{border-inline-start:4px solid var(--danger);margin-bottom:12px}
.notice.cp-extras .table-wrap{margin-top:8px}
/* 10.8.1: who is replying to a chat (the first team member typing; Admin locks the others for 30 s) */
.ix-main>.ix-lock{margin:6px 12px 0;flex:none}
.ix-composer.ix-locked{opacity:.6}
.ix-composer.ix-locked .ix-input{cursor:not-allowed}
/* 11.0.0 P1: the Other inquiries notice, the orders linked to a chat and the Link an order form (above the thread) */
.ix-other,.ix-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ix-other-actions{display:flex;flex-wrap:wrap;gap:6px;margin-inline-start:auto}
.ix-linked{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px}
.ix-link-order{display:flex;flex-wrap:wrap;gap:6px;align-items:center;width:100%}
.ix-link-order input{flex:1 1 220px;min-width:0}
.ix-link-preview{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;width:100%;padding:8px 10px;border-radius:10px;background:var(--surface-2);border:1px solid var(--line)}
/* 11.0.0 P2: the post a comment is under (above the thread), its products and Admin's Edit products */
.ix-post{display:flex;gap:10px;align-items:flex-start}
.ix-post>img{width:64px;height:64px;object-fit:cover;border-radius:10px;flex:0 0 auto;border:1px solid var(--line)}
.ix-post-body{flex:1 1 auto;min-width:0;display:grid;gap:4px}
.ix-post-caption{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ix-post-products{display:flex;flex-wrap:wrap;gap:6px}
/* 11.0.7: several stories in one chat; the other frames of a video story */
.ix-post-several+.ix-post-several{margin-top:6px}
/* 11.0.8: the stories drawer at the top of a chat (closed: one bar; open: the cards, scrolling inside it) */
.ix-stories{display:block}
.ix-stories-bar{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;min-height:44px;margin:0}
.ix-stories-bar::-webkit-details-marker{display:none}
.ix-stories-thumbs{display:flex;flex:0 0 auto}
.ix-stories-thumbs img{width:32px;height:32px;object-fit:cover;border-radius:7px;border:2px solid var(--line);margin-inline-start:-8px}
.ix-stories-thumbs img:first-child{margin-inline-start:0}
.ix-stories-text{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ix-stories-toggle{flex:0 0 auto;color:var(--accent);font-weight:600}
.ix-stories[open] .ix-show,.ix-stories:not([open]) .ix-hide{display:none}
.ix-stories-body{max-height:45vh;overflow:auto;overscroll-behavior:contain}
.ix-stories-body>.ix-post{margin:6px 0 0}
.ix-post-frames{display:flex;gap:4px}
.ix-post-frames img{width:40px;height:40px;object-fit:cover;border-radius:6px;border:1px solid var(--line)}
.ix-post-product{padding:3px 8px;border-radius:8px;background:var(--surface-2);border:1px solid var(--line)}
.ix-post-edit{display:grid;gap:6px;margin-top:4px}
/* 11.0.0 P3: Settings → Data → Product backups (tokens only) */
.pb-progress{display:flex;align-items:center;gap:8px;font-size:.875rem;color:var(--info,#2456A6);margin-bottom:10px}
.pb-progress .spinner{width:12px;height:12px;border-radius:50%;border:2px solid currentColor;border-inline-end-color:transparent;animation:pb-spin .9s linear infinite;display:inline-block}
@keyframes pb-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.pb-progress .spinner{animation:none}}
.pb-changes{display:inline-flex;gap:6px;font-variant-numeric:tabular-nums;direction:ltr}.pb-add{color:var(--ok,#1F7A5C)}.pb-del{color:var(--accent)}.pb-chg{color:var(--warn,#A35A00)}
.pb-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.pb-table td{vertical-align:top}
.link-button{background:none;border:0;padding:0;cursor:pointer;color:inherit;font:inherit;text-decoration:underline dotted}
.pb-fold{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-bottom:10px;background:var(--surface-2)}.pb-fold summary{cursor:pointer}.pb-fold ul{margin:8px 0 0;padding-inline-start:18px;display:grid;gap:4px;font-size:.875rem;max-height:320px;overflow:auto}
.pb-restore{display:grid;gap:12px}.pb-restore .chips{display:flex;gap:6px;flex-wrap:wrap}.pb-plan{max-height:min(52vh,520px);overflow:auto;border:1px solid var(--line);border-radius:10px}.pb-plan td{white-space:normal}.pb-plan td:first-child{width:36px}
.pb-restore input[name=confirm]{font-family:ui-monospace,Menlo,monospace;letter-spacing:.5px}
/* 11.0.0 P4: P&L Overview (decisions, tiles) */
.pnl-decisions .list-item{align-items:flex-start;flex-wrap:wrap;gap:10px 14px}.pnl-decision .info p{margin-top:3px}
.pnl-decision-actions{flex-wrap:wrap;gap:6px}.pnl-decision-actions input{min-height:36px}
.pnl-tiles .pnl-tile{color:inherit;text-decoration:none;display:block}.pnl-tiles .pnl-tile:hover{border-color:var(--line)}
@media (max-width:700px){.pnl-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.pnl-decision-actions{width:100%}}
/* 11.0.0 P5: Stock → Products grouped by parent; the parent window */
tr.parent-row td{background:var(--surface-2)}tr.parent-row .fold{font-size:1rem;min-width:28px;text-decoration:none}
tr[data-variant-row] td:nth-child(2){padding-inline-start:40px}
.parent-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}.parent-all{margin-bottom:12px;gap:10px}.parent-grid td{vertical-align:top}
@media (max-width:700px){tr[data-variant-row] td:nth-child(2){padding-inline-start:12px}}
/* 11.0.0 P6: Money → P&L → UAE → Products to push */
.uae-push-title{display:flex;gap:10px;align-items:flex-start;min-width:0}
.uae-push-title img{width:40px;height:40px;object-fit:contain;border-radius:8px;background:var(--surface-2,var(--surface));flex:none}
.uae-push-title strong{overflow-wrap:anywhere}
.uae-push-list td{vertical-align:top}
.uae-push-window .product-view-img{max-width:120px;max-height:120px;object-fit:contain;float:inline-end;margin:0 0 8px 12px}
.uae-push-window .form-footer{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:flex-end}
@media (max-width:700px){.uae-push-window .product-view-img{float:none;display:block;margin:0 0 8px}}
.uae-push-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:10px 0}
.uae-push-filters input[type=search]{flex:1 1 260px;min-width:0}
.uae-push-filters select{flex:0 1 240px;min-width:0}
.uae-push-actions{display:flex;flex-direction:column;gap:6px;align-items:stretch}
.uae-push-list td.actions-cell{width:1%;padding-inline-end:16px}
@media (max-width:700px){.uae-push-actions{flex-direction:row;flex-wrap:wrap}}
/* 11.0.0 P7: the order / invoice window — the lines' foot (units and items total), the More list in four groups, the header's
   "Paid in full", and the scan box kept in view on phones (on desktop it sits above the lines). */
.order-lines-foot td{background:var(--surface-2,#f6f7fa);border-top:1px solid var(--line)}
.order-more-group{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.order-more-group+.order-more-group{border-inline-start:1px solid var(--line);padding-inline-start:8px}
.paid-in-full{color:var(--green,#287659);font-weight:600}
@media (max-width:700px){
  .order-more-group{flex-direction:column;align-items:stretch}
  .order-more-group+.order-more-group{border-inline-start:0;padding-inline-start:0;border-top:1px solid var(--line);padding-top:6px;margin-top:2px}
  .table-wrap[data-cards] tr.order-lines-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 16px;padding:8px 12px;background:var(--surface-2,#f6f7fa)}
  .table-wrap[data-cards] tr.order-lines-foot td{padding:0;background:none;border:0}
  .table-wrap[data-cards] tr.order-lines-foot td.foot-label{display:none}
  .table-wrap:has(.order-detail-lines)+.scan-panel{position:sticky;bottom:0;z-index:3;box-shadow:0 -6px 16px #0000000f}
}
/* 11.0.0 P8: Edit receipt — each item its own card; the list of edits under the receipt. */
.receipt-edit-line{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:8px 0;background:var(--surface-2,#f6f7fa)}
.receipt-edit-line>p{margin-bottom:6px}
.receipt-edit-changes{margin:4px 0 0;padding-inline-start:18px}
.serial-corrected{color:var(--muted)}
/* 11.0.1: the note on a line whose serial only Admin can change wraps inside the Packing cell (tables are nowrap). */
.subline.serial-locked{white-space:normal;max-width:11em;line-height:1.3}
/* 11.1.3 (owner screenshot: "Photo or file", "Products", "Internal note" squeezed into overlapping circles): the message action buttons'
   round .ix-tool size (30 px; 36 px on touch screens) also hit the reply box tray, which shares the class. The tray keeps its pills. */
.ix-tray .ix-tool{width:auto;height:auto;flex:0 0 auto;white-space:nowrap}
.ix-insert-product svg{color:var(--accent)}
.ix-insert-product.active{background:var(--nav-active);color:var(--ink)}
/* 11.5: UAE orders (Admin): the order window's parts and AWBs, and the printed UAE tax invoice. */
.uo-customer{display:flex;flex-wrap:wrap;gap:24px;margin-top:12px}.uo-customer>div{min-width:200px}
.uo-awb{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-top:10px}.uo-awb ul{margin:6px 0;padding-inline-start:18px}
.uo-pickup legend{font-weight:600}
.uae-invoice{font-size:13px;color:#111}.uae-invoice h1{font-size:22px;margin:0}.uae-invoice h3{font-size:13px;margin:0 0 4px;text-transform:uppercase;letter-spacing:.04em;color:#555}
.uae-invoice-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border-bottom:2px solid #111;padding-bottom:10px;margin-bottom:12px}
.uae-invoice-meta{text-align:end}.uae-invoice-parties{display:flex;flex-wrap:wrap;gap:24px;margin-bottom:14px}.uae-invoice-parties>div{flex:1 1 180px}
.uae-invoice table{width:100%;border-collapse:collapse;white-space:normal}.uae-invoice th,.uae-invoice td{border-bottom:1px solid #ddd;padding:6px 4px;text-align:start;vertical-align:top}
.uae-invoice .money,.uae-invoice th:nth-child(n+2){text-align:end}.uae-invoice-totals{max-width:360px;margin:12px 0 0 auto}[dir="rtl"] .uae-invoice-totals{margin:12px auto 0 0}
.uae-invoice-totals td:first-child{color:#444}.uae-invoice .small{font-size:11px;color:#555}
.uo-kinds{display:flex;flex-wrap:wrap;gap:8px 24px;border:1px solid var(--line);border-radius:10px;padding:8px 12px}.uo-kinds legend{padding:0 4px}
.uo-radio{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px;width:auto!important}.uo-radio input{width:auto!important;margin:0;flex:0 0 auto}
.uo-search{gap:8px;flex-wrap:nowrap;flex:1 1 320px;justify-content:flex-end;max-width:520px}.uo-search input{flex:1 1 auto;min-width:0}.uo-customer{font-size:14px}
.print-document .uae-invoice th,.print-document .uae-invoice td{text-align:start}.print-document .uae-invoice th:nth-child(n+2),.print-document .uae-invoice td:nth-child(n+2){text-align:end}

/* ---- 12.0.1 approvals: Rules table, evidence chips, PIN sheet, receipt photos (tokens only; glass arrives with 12.0.2) ---- */
:root{--apr-ok:#1a7f4b}
:root[data-theme="dark"]{--apr-ok:#5fd19a}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--apr-ok:#5fd19a}}
.apr-rules{display:flex;flex-direction:column}
.apr-rule{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 18px;align-items:start;padding:14px 16px;border-top:1px solid var(--line)}
.apr-rule:first-child{border-top:0}
.apr-rule.off .apr-rule-main strong{color:var(--muted)}
.apr-rule-main p{margin:4px 0 0}
.apr-rule-side{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;justify-content:flex-end;max-width:520px}
.apr-rule-extra{grid-column:1/-1}
.apr-field{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--muted);max-width:150px}
.apr-field.full{max-width:none}
.apr-field input,.apr-switch select{min-height:36px}
.apr-field input{width:120px}
.apr-fees{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.apr-fee{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.apr-fee select,.apr-fee input{min-height:36px;max-width:190px}
.apr-fee input{width:120px}
.apr-try{display:flex;flex-direction:column;gap:6px;align-items:flex-start;margin-top:8px}
.apr-try textarea{width:100%}
.apr-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.apr-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 9px;border-radius:999px;font-size:12px;line-height:1.6;background:var(--surface-2,var(--bg));border:1px solid var(--line);color:var(--ink)}
.apr-chip.ok{border-color:color-mix(in srgb,var(--apr-ok) 45%,var(--line));color:var(--apr-ok)}
.apr-chip.warn{border-color:color-mix(in srgb,var(--danger) 45%,var(--line));color:var(--danger)}
.apr-item{align-items:flex-start;gap:12px}
.apr-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:flex-end;max-width:46%}
.apr-why{max-width:260px;text-align:end}
.apr-pin-notice{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;margin-bottom:12px}
.apr-pin-reqs{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.apr-pin-req{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.apr-pin-req:has(input:checked){border-color:var(--accent)}
.apr-pin-input{font-size:22px;letter-spacing:.35em;text-align:center}
.apr-photos{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
.apr-photo{width:76px;height:76px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
.apr-attach{cursor:pointer}
@media (max-width:700px){
  .apr-rule{grid-template-columns:minmax(0,1fr)}
  .apr-rule-side{justify-content:flex-start;max-width:none}
  .apr-item{flex-direction:column}
  .apr-actions{max-width:none;justify-content:flex-start}
  .apr-why{text-align:start;max-width:none}
  .apr-fee select,.apr-fee input{max-width:none;flex:1 1 140px}
  .apr-pin-input{font-size:20px}
}
label.apr-bosta[hidden]{display:none!important}
.apr-pin-req input[type=radio]{width:18px;height:18px;min-height:0;flex:none;margin-top:3px}
.apr-pin-req .subline{display:block}
/* ===== 12.0.4 Smarter chat AI: Inbox additions (memory strip, thumbs, transcript, comparison card) and AI Agents → Quality.
   One block; colours, lines and surfaces only from the tokens (light and dark follow them). ===== */
.ix-memory{padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:var(--ix-pane);color:var(--ink-2);line-height:1.5;overflow-wrap:anywhere}
.ix-mem-head{font-weight:600;color:var(--ink)}.ix-mem-line{margin-top:3px}.ix-mem-q{color:var(--ink)}
.ix-thumbs{display:inline-flex;gap:4px;margin-inline-start:6px;vertical-align:middle}
.ix-thumb{border:1px solid var(--line);background:var(--surface-solid);color:var(--ink-2);border-radius:999px;min-width:36px;min-height:28px;padding:2px 8px;font-size:.8125rem;line-height:1.2;cursor:pointer}
.ix-thumb.on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface-solid));color:var(--ink)}
.ix-msg>.ix-thumbs{margin-top:2px;align-self:flex-end}
.ix-transcript{margin-top:6px;padding-top:6px;border-top:1px dashed var(--line);font-size:.875rem;line-height:1.5;overflow-wrap:anywhere}
.ix-transcript-label{display:block;font-size:.75rem;color:var(--muted);margin-bottom:2px}
.ix-compare{margin:6px 0;max-width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface-solid);color:var(--ink)}
.ix-compare table{font-size:.8125rem;white-space:normal;min-width:100%}.ix-compare th,.ix-compare td{padding:6px 9px;vertical-align:top;border-bottom:1px solid var(--line);background:none;color:inherit;text-align:start}
.ix-compare tr:last-child th,.ix-compare tr:last-child td{border-bottom:0}.ix-compare tr:first-child th{font-weight:600;background:var(--surface-2)}.ix-compare tr th:first-child{color:var(--muted);white-space:nowrap}
.aiq-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.aiq-period{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.aiq-period select{width:auto}
.aiq-stats{margin-bottom:0}.aiq-stat .stat-number{font-size:1.6rem}.aiq-note{margin-top:-8px}
.aiq-table td,.aiq-table th{padding:9px 14px;white-space:normal}.aiq-bar{min-width:90px}.aiq-bar span{background:var(--accent)}
.aiq-chips{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:10px 0}
.aiq-inline{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin:12px 0}.aiq-inline label{display:flex;flex-direction:column;gap:4px;flex:1 1 200px;min-width:0}.aiq-inline input[type=number]{max-width:110px}
.aiq-inline .aiq-check,.aiq-switch{flex-direction:row;align-items:flex-start;gap:8px}.aiq-inline .aiq-check input,.aiq-switch input{width:auto;flex:0 0 auto;margin-top:3px}
.aiq-switches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;margin:14px 0 18px}.aiq-switch{display:flex}.aiq-switch span{display:flex;flex-direction:column;gap:2px;min-width:0}
.aiq-role{border:1px solid var(--line);border-radius:12px;padding:10px 14px;margin:12px 0}.aiq-role legend{padding:0 6px;font-weight:600}.aiq-role-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.aiq-run{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.aiq-run h3{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.aiq-run h4{margin:14px 0 4px}
.aiq-case{align-items:flex-start;padding-inline:0}.aiq-case .detail{white-space:pre-wrap;overflow-wrap:anywhere}.aiq-proposal{padding:14px 22px;border-bottom:1px solid var(--line)}
.aiq .list-item{padding-inline:22px}.aiq .card-body .list-item{padding-inline:0}
@media(max-width:900px){.aiq-role-grid{grid-template-columns:1fr 1fr}.aiq-switches{grid-template-columns:1fr}}
@media(max-width:700px){.aiq-role-grid{grid-template-columns:1fr}.aiq-inline label{flex-basis:100%}.aiq-table td,.aiq-table th{padding:8px 10px}.ix-thumb{min-height:36px;min-width:44px}}
