/* DigitalCenter per-device app zoom; default is set before first paint in index.html. */
html{zoom:var(--dc-app-zoom,.9)}
:root{--bg:#f4f6fa;--surface:#fff;--surface-2:#f8f9fc;--ink:#172033;--muted:#7b8495;--line:#e8ebf1;--accent:#e46a35;--accent-2:#ff9a62;--accent-soft:#fff0e8;--nav:#101724;--nav-2:#182334;--green:#269b70;--green-soft:#e9f7f1;--blue:#4776dd;--blue-soft:#edf2ff;--red:#d95757;--red-soft:#fff0f0;--amber:#b77b21;--amber-soft:#fff6e7;--shadow:0 12px 34px rgba(24,39,75,.055);--radius:18px;font-family:'Pinar',Tahoma,Arial,sans-serif;color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:inherit;font-size:13px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}.hidden{display:none!important}#toast-root{position:fixed;z-index:1000;top:18px;left:18px;display:grid;gap:8px}.toast{min-width:240px;max-width:360px;background:#172033;color:#fff;padding:13px 16px;border-radius:12px;box-shadow:0 12px 30px #10172430;animation:toastIn .25s ease;font-size:12px}.toast.error{background:#a93636}.toast.success{background:#187d5c}@keyframes toastIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
/* login */.login-shell{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr;background:#fff}.login-art{position:relative;overflow:hidden;background:radial-gradient(circle at 15% 10%,#34445e 0,transparent 34%),linear-gradient(145deg,#111a29,#0c121d 72%);color:#fff;padding:42px 7%;display:flex;flex-direction:column;justify-content:space-between;min-height:700px}.brand-mark{width:42px;height:42px;border:1px solid #ffffff48;border-radius:14px;display:grid;place-items:center;background:#ffffff12;color:white}.brand-symbol{font-size:12px;font-weight:900;letter-spacing:-1px}.brand-mark.large{width:58px;height:58px;border-radius:19px;font-size:18px}.login-art-copy{position:relative;z-index:1;margin-top:-60px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:var(--accent);margin-bottom:14px}.login-art h1{font-size:clamp(34px,4vw,58px);line-height:1.45;margin:0 0 20px;font-weight:800;letter-spacing:-1.5px}.login-art h1 span{color:#ff9b69}.login-art-copy p{font-size:14px;color:#b9c3d3;line-height:2}.login-art-bottom{position:relative;z-index:1;color:#9caabd;font-size:11px;display:flex;align-items:center;gap:9px}.pulse-dot,.online-dot{width:7px;height:7px;border-radius:50%;background:#48c394;box-shadow:0 0 0 4px #48c39422}.orb{position:absolute;border-radius:50%;border:1px solid #ffffff12}.orb-one{width:480px;height:480px;right:-100px;top:18%;box-shadow:0 0 0 50px #ffffff05,0 0 0 100px #ffffff03}.orb-two{width:230px;height:230px;right:24%;bottom:12%;background:radial-gradient(circle,#f27b4920,transparent 70%);border-color:#f27b4920}.login-panel{padding:70px clamp(32px,7vw,110px);display:flex;flex-direction:column;justify-content:center;max-width:700px;width:100%;margin:auto}.mobile-brand{display:none;align-items:center;gap:12px;font-weight:800;margin-bottom:40px}.mobile-brand .brand-mark{background:var(--nav)}.login-heading{margin-bottom:28px}.login-heading h2{font-size:27px;margin:0 0 8px;letter-spacing:-.5px}.login-heading p{color:var(--muted);margin:0}.stack-form{display:grid;gap:17px}.stack-form label,.field label{display:grid;gap:8px;font-size:12px;font-weight:700;color:#394257}.stack-form input,.field input,.field select,.field textarea,.password-wrap input{width:100%;height:46px;border:1px solid var(--line);border-radius:11px;background:#fbfcfe;padding:0 14px;outline:none;color:var(--ink);transition:.2s}.stack-form input:focus,.field input:focus,.field select:focus,.field textarea:focus{border-color:#ef9c75;box-shadow:0 0 0 3px #e46a3515;background:white}.password-wrap{position:relative}.password-wrap input{padding-left:45px}.eye-btn{position:absolute;left:10px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#8e97a7;font-size:16px}.btn{border:0;border-radius:11px;padding:11px 17px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:9px;transition:transform .15s,box-shadow .15s,background .15s;white-space:nowrap}.btn:hover{transform:translateY(-1px)}.btn-primary{background:linear-gradient(120deg,#e56d39,#f18b55);color:#fff;box-shadow:0 7px 16px #e46a3525}.btn-primary:hover{box-shadow:0 9px 22px #e46a3540}.btn-wide{width:100%;height:48px;margin-top:4px}.btn-light{background:#f1f3f7;color:#3e485b}.btn-outline{background:#fff;border:1px solid var(--line);color:#3f495a}.btn-danger{background:var(--red-soft);color:var(--red)}.btn-success{background:var(--green-soft);color:var(--green)}.btn-small{padding:7px 10px;font-size:11px;border-radius:9px}.demo-box{background:#f7f8fb;border:1px solid #edf0f5;border-radius:14px;padding:15px;margin-top:27px}.demo-title{font-size:11px;font-weight:800;margin-bottom:10px}.tiny-lock{color:var(--accent);margin-left:5px}.demo-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.demo-grid button{border:1px solid #e9ecf2;background:#fff;border-radius:8px;padding:8px 10px;text-align:right;display:flex;justify-content:space-between;gap:6px;color:#667084;font-size:10px}.demo-grid button b{font-family:Arial,sans-serif;color:#263248;font-size:10px}.demo-box small{display:block;color:#8c95a3;margin-top:10px;font-size:10px}.login-foot{text-align:center;color:#9da5b2;font-size:10px;margin-top:28px}
/* app shell */.app-shell{min-height:100vh;display:flex;direction:rtl}.sidebar{width:258px;flex:0 0 258px;background:linear-gradient(180deg,var(--nav),#121c2a);color:#dce3ef;display:flex;flex-direction:column;padding:23px 15px 16px;min-height:100vh;position:sticky;top:0;height:100vh;z-index:30}.side-brand{display:flex;align-items:center;gap:11px;padding:0 8px 23px;border-bottom:1px solid #ffffff12;position:relative}.side-brand .brand-mark{background:linear-gradient(135deg,#e56d39,#a84428);border:0}.side-brand strong{display:block;font-size:13px;color:white}.side-brand small{display:block;color:#8592a7;font-size:10px;margin-top:2px}.mobile-close{display:none;margin-right:auto;background:#ffffff12;border:0;color:#fff;border-radius:7px;font-size:20px;width:30px;height:30px}.side-user{display:flex;align-items:center;gap:10px;padding:20px 7px 22px}.avatar,.top-avatar{width:36px;height:36px;background:linear-gradient(135deg,#f5a47d,#d85c35);border-radius:12px;display:grid;place-items:center;color:#fff;font-weight:800;font-size:13px}.side-user-info{min-width:0;flex:1}.side-user-info strong{display:block;font-size:11px;color:white;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-user-info small{color:#8290a6;font-size:9px}.side-user .online-dot{width:6px;height:6px;box-shadow:none}.nav-caption{color:#69788f;font-size:9px;padding:0 11px 9px;font-weight:800;letter-spacing:1px}.main-nav{display:grid;gap:4px}.nav-item{width:100%;border:0;background:transparent;color:#9ba8bb;border-radius:10px;padding:11px 12px;display:flex;align-items:center;gap:12px;text-align:right;font-size:11px;transition:.18s}.nav-item:hover{background:#ffffff0d;color:#fff}.nav-item.active{background:linear-gradient(100deg,#e56d392d,#e56d3912);color:#ffab83;box-shadow:inset -2px 0 #f07c49}.nav-item .nav-icon{width:19px;height:19px;display:grid;place-items:center;font-size:16px;opacity:.95}.nav-item .nav-count{margin-right:auto;background:#e36a38;color:white;border-radius:20px;padding:2px 6px;font:10px Arial,sans-serif}.sidebar-bottom{margin-top:auto}.help-card{display:flex;align-items:center;gap:9px;padding:12px;background:#ffffff09;border:1px solid #ffffff0e;border-radius:12px;margin-bottom:13px}.help-icon{width:26px;height:26px;border-radius:8px;background:#e56d3924;color:#f39265;display:grid;place-items:center;font-weight:800}.help-card strong{font-size:10px;display:block;color:#e3e8f0}.help-card small{font-size:8px;color:#7e8ba0}.help-card button{margin-right:auto;background:transparent;border:0;color:#8190a5}.logout-btn{width:100%;display:flex;align-items:center;gap:11px;border:0;background:transparent;color:#a4afbf;padding:11px 12px;text-align:right;font-size:11px;border-radius:9px}.logout-btn:hover{background:#ffffff0a;color:#fff}.logout-arrow{margin-right:auto}.side-version{color:#526177;font:8px Arial,sans-serif;text-align:center;letter-spacing:1.3px;padding-top:13px}.main-column{min-width:0;flex:1;display:flex;flex-direction:column}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 34px;background:#ffffffdb;border-bottom:1px solid var(--line);backdrop-filter:blur(20px);position:sticky;top:0;z-index:20}.topbar-start,.topbar-actions{display:flex;align-items:center;gap:18px}.breadcrumb{display:flex;align-items:center;gap:10px;color:#9aa2b0;font-size:10px}.breadcrumb b{color:#d6dae2;font-weight:400}.breadcrumb strong{color:#263147;font-size:11px}.hamburger{display:none;border:0;background:#f1f3f7;border-radius:9px;width:35px;height:35px;color:#344055}.today-chip{height:34px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 11px;display:flex;align-items:center;gap:8px;font-size:10px;color:#6e788b}.calendar-mini{font-size:15px;color:#e47a4d}.icon-button{position:relative;width:36px;height:36px;border:1px solid var(--line);background:#fff;border-radius:10px;color:#778194;font-size:18px}.notification-dot{position:absolute;width:7px;height:7px;border-radius:50%;background:#e45849;top:6px;right:7px;border:1px solid #fff}.top-avatar{width:34px;height:34px;border-radius:11px;font-size:11px}.page-content{padding:28px 34px 36px;flex:1;max-width:1800px;width:100%;margin:0 auto}.app-footer{height:42px;padding:0 34px;color:#a1a9b6;font-size:9px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e9ecf1;background:#fff8}
/* common content */.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:23px}.page-head h1{font-size:21px;margin:0 0 5px;font-weight:800;letter-spacing:-.5px}.page-head p{margin:0;color:var(--muted);font-size:11px}.page-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.section-title{font-size:13px;font-weight:800;margin:0}.section-subtitle{color:var(--muted);font-size:10px;margin-top:4px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:17px;box-shadow:var(--shadow);position:relative;overflow:hidden}.stat-card:after{content:"";position:absolute;width:90px;height:90px;border-radius:50%;left:-32px;bottom:-50px;background:var(--stat-bg,#fff2eb)}.stat-top{display:flex;justify-content:space-between;align-items:center}.stat-icon{width:37px;height:37px;border-radius:11px;background:var(--stat-bg,#fff2eb);color:var(--stat-color,var(--accent));display:grid;place-items:center;font-size:17px}.stat-label{color:#858e9d;font-size:10px;font-weight:600}.stat-value{font-size:23px;font-weight:800;letter-spacing:-.8px;margin-top:13px;line-height:1.4}.stat-foot{font-size:9px;color:#a0a8b4;margin-top:2px}.content-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(270px,.8fr);gap:15px}.panel{background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow);min-width:0}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:17px 18px;border-bottom:1px solid #f0f2f6;gap:10px}.panel-body{padding:16px 18px}.text-link{border:0;background:transparent;color:var(--accent);font-size:10px;font-weight:700}.table-wrap{overflow-x:auto;width:100%}table{border-collapse:collapse;width:100%;white-space:nowrap}th{background:#fafbfc;color:#929aaa;font-size:9px;font-weight:700;text-align:right;padding:11px 14px;border-bottom:1px solid var(--line)}td{font-size:10px;padding:12px 14px;border-bottom:1px solid #f1f3f6;color:#465166}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fcfcfd}.td-main{font-weight:700;color:#273349}.td-muted{color:#929bab;font-size:9px;margin-top:3px}.empty-state{text-align:center;padding:42px 15px;color:#939bab}.empty-state .empty-icon{font-size:26px;color:#c4cbd5;margin-bottom:10px}.empty-state strong{display:block;font-size:11px;color:#677286}.empty-state small{display:block;font-size:9px;margin-top:4px}.status{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:7px;font-size:9px;font-weight:700}.status:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}.status.testing{background:var(--amber-soft);color:var(--amber)}.status.accounting{background:var(--blue-soft);color:var(--blue)}.status.stocked{background:var(--green-soft);color:var(--green)}.status.rejected{background:var(--red-soft);color:var(--red)}.status.read{background:#f1f3f6;color:#858e9d}.category-chip{display:inline-block;padding:4px 8px;border-radius:6px;background:#f3f5f9;color:#68758b;font-size:9px}.money{font-weight:800;direction:ltr;unicode-bidi:plaintext;display:inline-block}.money small{font-size:9px;color:#9ba3b0;font-weight:500;margin-right:4px}.search-input{height:36px;border:1px solid var(--line);border-radius:9px;padding:0 12px;background:#fff;outline:none;min-width:190px;font-size:10px}.search-input:focus{border-color:#ef9c75}.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.filter-select{height:36px;border:1px solid var(--line);border-radius:9px;background:white;padding:0 10px;color:#647087;font-size:10px;outline:none}.stock-low-list{display:grid;gap:0}.stock-low-item{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #f1f3f6}.stock-low-item:last-child{border-bottom:0}.product-avatar{width:36px;height:36px;background:#f3f5f9;border-radius:10px;display:grid;place-items:center;color:#69778c;font-size:15px}.stock-low-meta{flex:1;min-width:0}.stock-low-meta strong{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stock-low-meta small{color:#9aa2af;font-size:9px}.stock-count{font-size:10px;font-weight:800;color:var(--red);background:var(--red-soft);border-radius:7px;padding:5px 8px}.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:20px}.quick-action{background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px;display:flex;gap:10px;align-items:center;text-align:right;transition:.18s}.quick-action:hover{border-color:#f0b094;box-shadow:var(--shadow);transform:translateY(-1px)}.quick-icon{width:34px;height:34px;border-radius:10px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:16px}.quick-action strong{display:block;font-size:10px}.quick-action small{color:#9aa2af;font-size:8px;display:block;margin-top:3px}
/* forms */.form-panel{padding:20px}.form-section{margin-bottom:20px}.form-section:last-child{margin-bottom:0}.form-section-head{display:flex;align-items:center;gap:8px;padding-bottom:11px;margin-bottom:14px;border-bottom:1px solid #f0f2f6}.form-section-head .step-number{width:23px;height:23px;border-radius:8px;background:var(--accent-soft);color:var(--accent);font-size:10px;font-weight:800;display:grid;place-items:center}.form-section-head strong{font-size:11px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.field{min-width:0}.field.full{grid-column:1/-1}.field.span-2{grid-column:span 2}.field input,.field select{height:42px;font-size:11px}.field textarea{height:82px;resize:vertical;padding:11px 13px;font-size:11px}.field .help{font-size:9px;color:#9aa2af;margin-top:5px}.field-required{color:#e36d3d}.form-actions{display:flex;justify-content:flex-start;gap:8px;padding-top:17px;border-top:1px solid #eff1f5;margin-top:19px}.form-note{padding:11px 13px;background:#f7f8fb;color:#778195;border-radius:9px;font-size:10px;line-height:1.9;margin-bottom:15px}.form-note strong{color:#46536b}.sale-calculator{background:linear-gradient(135deg,#192538,#25364f);color:white;border-radius:14px;padding:16px;margin-top:15px}.calc-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.calc-heading strong{font-size:11px}.calc-heading span{color:#aebbd0;font-size:9px}.calc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.calc-cell{background:#ffffff0c;border:1px solid #ffffff12;border-radius:9px;padding:10px}.calc-cell small{color:#9caec6;font-size:9px;display:block}.calc-cell strong{font-size:13px;display:block;margin-top:6px}.calc-result{border-top:1px solid #ffffff1c;margin-top:12px;padding-top:12px;display:flex;align-items:center;justify-content:space-between}.calc-result small{color:#b7c4d7;font-size:10px}.calc-result strong{font-size:19px;color:#ffb184}.installment-table{margin-top:12px;background:#ffffff09;border-radius:9px;overflow:hidden}.installment-table th{background:#ffffff0b;color:#b5c1d4;border-color:#ffffff10}.installment-table td{color:#e9edf5;border-color:#ffffff10}.print-hint{font-size:9px;color:#929bab;margin-top:8px}
/* notifications and users */.notification-list{display:grid;gap:9px}.notification-item{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:white}.notification-item.unread{border-right:3px solid var(--accent);background:#fffdfb}.notification-icon{width:34px;height:34px;border-radius:10px;background:#fff0e8;color:#de7042;display:grid;place-items:center;flex:0 0 auto}.notification-copy{flex:1;min-width:0}.notification-copy strong{font-size:11px;display:block}.notification-copy p{font-size:10px;color:#758094;margin:4px 0 6px}.notification-copy small{color:#a1a9b6;font-size:9px}.user-card{display:flex;align-items:center;gap:11px}.user-avatar{width:34px;height:34px;background:#f1f3f7;color:#68758a;border-radius:10px;display:grid;place-items:center;font-weight:800}.permission-tags{display:flex;flex-wrap:wrap;gap:4px;max-width:230px}.permission-tag{font-size:8px;padding:4px 6px;border-radius:5px;background:#f2f4f8;color:#667389}.action-buttons{display:flex;gap:5px}
/* modal */.modal-backdrop{position:fixed;inset:0;background:#10172488;backdrop-filter:blur(5px);z-index:100;display:grid;place-items:center;padding:20px}.modal{background:#fff;border-radius:18px;width:min(740px,100%);max-height:92vh;overflow:auto;box-shadow:0 30px 100px #07101f55;animation:modalIn .2s ease}.modal.small{width:min(480px,100%)}@keyframes modalIn{from{opacity:0;transform:translateY(9px) scale(.99)}to{opacity:1;transform:none}}.modal-head{padding:18px 21px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.modal-head h3{margin:0;font-size:14px}.modal-head p{margin:4px 0 0;color:#929bab;font-size:9px}.modal-close{border:0;background:#f3f5f8;color:#748096;width:29px;height:29px;border-radius:8px;font-size:18px}.modal-body{padding:20px}.modal-foot{padding:14px 20px;border-top:1px solid var(--line);display:flex;justify-content:flex-start;gap:8px}.check-row{display:flex;gap:14px;flex-wrap:wrap}.check-label{display:flex;align-items:center;gap:7px;font-size:10px;color:#556176}.check-label input{accent-color:var(--accent)}
/* invoice print */.print-root{display:none}.invoice-paper{direction:rtl;color:#202735;background:white;font-family:'Pinar',Tahoma,Arial,sans-serif;width:100%;padding:22px 25px;border:1px solid #d9dee6}.invoice-top{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:2px solid #242c39;padding-bottom:13px}.invoice-brand{font-size:18px;font-weight:900}.invoice-brand small{display:block;font-size:10px;font-weight:500;margin-top:6px}.invoice-meta{text-align:left;font-size:10px;line-height:2}.invoice-meta strong{font-size:14px}.invoice-title{text-align:center;font-size:15px;font-weight:900;margin:17px 0}.invoice-info{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:13px}.invoice-info div{border:1px solid #d7dce4;padding:8px;font-size:10px;min-height:32px}.invoice-info span{color:#667084}.invoice-info b{margin-right:5px}.invoice-table{width:100%;border-collapse:collapse;margin:12px 0}.invoice-table th,.invoice-table td{border:1px solid #bfc6d0;padding:9px 7px;text-align:center;font-size:10px;color:#202735;background:white}.invoice-table th{font-weight:800;background:#f1f3f6}.invoice-total{display:flex;justify-content:flex-end;margin-top:12px}.invoice-total div{min-width:230px;border:1px solid #aeb7c4;padding:10px;font-size:11px;line-height:2}.invoice-notes{border:1px solid #d4d9e1;padding:10px;min-height:45px;font-size:10px;margin-top:12px}.invoice-signatures{display:flex;justify-content:space-between;margin-top:42px;font-size:10px}.invoice-signatures span{border-top:1px solid #8993a2;padding:8px 22px 0}.invoice-foot{font-size:9px;color:#626d7d;border-top:1px dashed #aeb6c3;margin-top:18px;padding-top:9px;line-height:1.8}
@media print{html{zoom:1!important}@page{size:A4;margin:12mm}body{background:white!important}.app-shell,.login-shell,#modal-root,#toast-root{display:none!important}.print-root{display:block!important}.invoice-paper{border:0;padding:0}.invoice-table th,.invoice-table td{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@media(max-width:1120px){.sidebar{width:230px;flex-basis:230px}.page-content{padding:24px}.topbar{padding:0 24px}.stats-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.login-shell{grid-template-columns:1fr}.login-art{display:none}.login-panel{padding:35px 24px;max-width:520px;min-height:100vh}.mobile-brand{display:flex}.sidebar{position:fixed;right:0;top:0;transform:translateX(105%);transition:transform .25s;box-shadow:-20px 0 60px #0b142355;width:270px;height:100vh}.sidebar.open{transform:translateX(0)}.mobile-close{display:block}.hamburger{display:block}.topbar{height:64px;padding:0 16px}.page-content{padding:20px 16px 28px}.content-grid{grid-template-columns:1fr}.topbar-start,.topbar-actions{gap:10px}.today-chip{display:none}.app-footer{padding:0 16px}}
@media(max-width:560px){.page-head{flex-direction:column;align-items:stretch}.page-head-actions{width:100%}.page-head-actions .btn{flex:1}.stats-grid{gap:9px}.stat-card{padding:12px}.stat-value{font-size:18px}.stat-icon{width:31px;height:31px}.quick-actions{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr 1fr;gap:10px}.field.span-2{grid-column:span 2}.calc-grid{grid-template-columns:1fr 1fr}.calc-cell:last-child{grid-column:1/-1}.panel-head{padding:13px}.panel-body{padding:12px}.search-input{min-width:125px;flex:1}.demo-grid{grid-template-columns:1fr}.breadcrumb{font-size:9px}.page-head h1{font-size:18px}}

/* ===== Digital Center refresh: Pinar typography, clearer hierarchy ===== */
/* Pinar DS4 — only the three user-approved weights are bundled. */
@font-face{font-family:'Pinar';src:url('/fonts/Pinar-DS4-Bold.ttf') format('truetype');font-style:normal;font-weight:700;font-display:swap}
@font-face{font-family:'Pinar';src:url('/fonts/Pinar-DS4-ExtraBold.ttf') format('truetype');font-style:normal;font-weight:800;font-display:swap}
@font-face{font-family:'Pinar';src:url('/fonts/Pinar-DS4-Black.ttf') format('truetype');font-style:normal;font-weight:900;font-display:swap}
:root{--accent:#bd8a2d;--accent-2:#e2b453;--accent-soft:#fbf4e5;--nav:#111a29;--nav-2:#1b2a40;font-family:'Pinar',Tahoma,Arial,sans-serif}
html,body,button,input,select,textarea{font-family:'Pinar',Tahoma,Arial,sans-serif;font-synthesis:none}
body{font-size:14px;line-height:1.85}
button,input,select,textarea{font-size:13px}
.page-head h1{font-size:23px;line-height:1.6}
.page-head p,.page-head .subtitle{font-size:12px;line-height:1.9}
.section-title{font-size:14px}
.section-subtitle{font-size:11px;line-height:1.8}
.nav-item{font-size:13px;min-height:44px}
.side-brand strong{font-size:14px}
.side-brand small,.side-user-info small{font-size:11px}
.table-wrap th{font-size:11px;line-height:1.7;padding:13px 11px;white-space:nowrap}
.table-wrap td{font-size:12px;line-height:1.8;padding:12px 11px}
.td-main{font-size:12px}
.td-muted,.category-chip,.status{font-size:10px}
.field label,.stack-form label{font-size:13px;line-height:1.75}
.field input,.field select,.field textarea,.stack-form input{font-size:13px;min-height:44px}
.field .help,.form-note{font-size:11px;line-height:1.9}
.btn{font-size:12px}
.panel-head{gap:12px}
.panel{border-radius:16px}
/* Centered login screen */
.login-shell{min-height:100vh;display:grid;place-items:center;padding:28px 16px;background:radial-gradient(circle at 50% 12%,#30415b 0,transparent 37%),linear-gradient(145deg,#0d1522,#101b2b 72%)}
.login-art{display:none!important}
.login-panel{width:min(500px,100%);max-width:500px;margin:auto;padding:30px 38px 24px;background:#fff;border:1px solid #ffffff55;border-radius:24px;box-shadow:0 28px 90px #050b15a8;min-height:0;display:flex;flex-direction:column;justify-content:center}
.login-brand-center{text-align:center;margin:0 0 20px;display:flex;flex-direction:column;align-items:center;gap:5px}
.login-brand-center img{width:108px;height:108px;object-fit:contain;display:block}
.login-brand-name{font-size:21px;font-weight:800;color:#172338;letter-spacing:-.2px}
.login-brand-name b{color:#bd8a2d}
.login-brand-sub{font-size:11px;color:#7b8494}
.login-heading{text-align:center;margin:0 0 22px}
.login-heading .eyebrow{font-size:10px;letter-spacing:1.5px}
.login-heading h2{font-size:23px;line-height:1.7;margin:0 0 5px;color:#172338}
.login-heading p{font-size:12px;line-height:1.9;color:#788395}
.stack-form{gap:14px}
.stack-form input{height:49px;border-radius:12px;background:#fafbfd;border-color:#dce1e9;padding:0 14px}
.password-wrap input{padding-left:46px}
.btn-wide{height:50px;margin-top:4px;background:linear-gradient(115deg,#b7842b,#d9ae54);box-shadow:0 9px 20px #bd8a2d2a}
.demo-box{margin-top:19px;border:1px solid #e8ebf0;background:#f9fafc;border-radius:12px;padding:11px 13px}
.demo-box summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:center;padding:3px 0;color:#566175}
.demo-box summary::-webkit-details-marker{display:none}
.demo-grid{margin-top:10px}
.demo-grid button{font-size:11px;padding:8px 9px}
.demo-box>small{display:block;text-align:center;font-size:10px;line-height:1.8;color:#7b8494;margin-top:9px}
.login-foot{text-align:center;color:#a0a8b5;font-size:10px;margin-top:16px}
.mobile-brand{display:none}
/* Installment selection dialog and cheque-number entry */
.installment-choice-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:14px;padding:13px 14px;border:1px solid #e8e2d3;border-radius:13px;background:#fffcf5}
.installment-choice{display:grid;gap:3px;min-width:0}
.installment-choice b{font-size:13px;color:#263246}
.installment-choice span{font-size:11px;color:#7d8797}
.installment-config-backdrop{position:absolute;inset:0;z-index:120;display:grid;place-items:center;padding:18px;background:#111a29a8;backdrop-filter:blur(5px);border-radius:18px}
.installment-config-card{width:min(430px,100%);background:#fff;border-radius:18px;padding:22px;box-shadow:0 24px 80px #050b1555}
.installment-config-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:18px}
.installment-config-head small{color:#bd8a2d;font-size:11px;font-weight:700}
.installment-config-head h3{font-size:18px;margin:4px 0 0;color:#172338}
.installment-config-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}
.config-option{border:1px solid #e4e8ee;border-radius:12px;padding:13px;display:flex;gap:9px;align-items:flex-start;cursor:pointer}
.config-option:has(input:checked){border-color:#c7983b;background:#fffaf0;box-shadow:0 0 0 2px #c7983b16}
.config-option input{accent-color:#bd8a2d;margin-top:4px}
.config-option span{display:grid;gap:3px}
.config-option b{font-size:13px;color:#283449}
.config-option small{font-size:10px;color:#7b8494;line-height:1.7}
.config-note{font-size:11px;line-height:1.9;padding:11px 13px;background:#f7f8fb;border-radius:10px;color:#667287;margin-top:14px}
.installment-config-actions{display:flex;justify-content:flex-start;gap:8px;margin-top:17px}
.cheque-number-input{width:116px;min-width:95px;height:34px;border:1px solid #d5dce6;border-radius:8px;padding:0 8px;text-align:center;background:#fff;font-size:11px}
.cheque-number-input:focus{outline:2px solid #bd8a2d30;border-color:#bd8a2d}
#sale-calc .calc-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
#sale-calc .calc-cell strong{font-size:13px;line-height:1.8;overflow-wrap:anywhere}
#sale-calc .calc-result strong{font-size:18px}
#sale-calc .installment-table td{font-size:11px;padding:8px 7px}
#sale-calc .installment-table th{font-size:10px;padding:9px 7px}
#sale-calc .installment-table table{min-width:640px}
/* Print-ready branded receipt */
.print-root{display:none}
.invoice-paper{direction:rtl;position:relative;box-sizing:border-box;width:100%;min-height:255mm;padding:0 0 54mm;border:0;background:#fff;color:#192235;font-family:'Pinar',Tahoma,Arial,sans-serif;}
.invoice-top{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:0 0 8px;border-bottom:2px solid #bd8a2d;min-height:37mm}
.invoice-logo{width:25mm;height:25mm;object-fit:contain;display:block;margin:0 auto 1mm}
.invoice-brand{font-size:19px;font-weight:800;line-height:1.5;display:flex;flex-direction:column;align-items:center;color:#18253a}
.invoice-brand span{color:#263954}
.invoice-brand b{color:#bd8a2d;font-size:20px}
.invoice-brand small{display:block;color:#68758a;font-size:9px;font-weight:500;margin-top:1mm}
.invoice-meta{position:absolute;right:0;top:8mm;text-align:right;font-size:10px;line-height:2;color:#28354a;background:#f7f8fa;border-right:3px solid #bd8a2d;border-radius:0 5px 5px 0;padding:6px 8px}
.invoice-meta strong{font-size:12px;color:#bd8a2d}
.invoice-main{padding-top:2mm}
.invoice-title{text-align:center;font-size:15px;font-weight:800;color:#1d2a40;margin:5mm 0 4mm}
.invoice-info{display:grid;grid-template-columns:repeat(3,1fr);gap:2.5mm;margin-bottom:4mm}
.invoice-info div{border:1px solid #dce2eb;border-right:2px solid #c7983b;border-radius:5px;padding:2.2mm 2.5mm;font-size:10px;min-height:10mm;background:#fcfdff}
.invoice-info span{color:#68758a}
.invoice-info b{margin-right:4px;color:#18253a}
.invoice-table{width:100%;border-collapse:collapse;margin:3mm 0 4mm;table-layout:auto}
.invoice-table th,.invoice-table td{border:1px solid #cfd6e0;padding:2.5mm 2mm;text-align:center;font-size:9.5px;line-height:1.6;color:#202d42;background:white}
.invoice-table th{font-weight:800;background:#eff3f8;color:#24354d}
.invoice-table tbody tr:nth-child(even) td{background:#fbfcfe}
.invoice-table small{font-size:8.5px;color:#7c8798}
.invoice-subhead{font-size:11px;font-weight:800;color:#25364d;margin:4mm 0 1mm}
.cheque-print-table{max-width:145mm;margin-right:0}
.invoice-total{display:flex;justify-content:flex-end;margin-top:4mm}
.invoice-total>div{min-width:82mm;border:1px solid #d2d9e3;border-radius:6px;padding:3mm 4mm;font-size:10px;line-height:2;background:#fbfcfe}
.sale-total-grid{display:grid;grid-template-columns:1fr auto;gap:1mm 8mm;align-items:center}
.sale-total-grid span{color:#68758a}
.sale-total-grid b{color:#1a273d;text-align:left;direction:rtl}
.sale-total-grid strong{color:#9b6d19;font-size:13px;border-top:1px solid #e7ddc8;padding-top:1mm}
.invoice-notes{border:1px solid #d5dce6;border-radius:5px;padding:2.5mm 3mm;min-height:11mm;font-size:9.5px;margin-top:4mm;background:#fff}
.invoice-signatures{display:flex;justify-content:space-between;margin-top:12mm;font-size:10px;color:#344158}
.invoice-signatures span{border-top:1px solid #8994a4;padding:2mm 12mm 0}
.invoice-print-footer{position:fixed;left:0;right:0;bottom:0;background:#fff;padding-top:1.5mm;border-top:1.5px solid #bd8a2d;color:#303b4e}
.contract-warning{border:1px solid #c98d36;border-radius:4px;background:#fffaf0;color:#613f0d;padding:1.2mm 2mm;font-size:7.5px;font-weight:700;line-height:1.55;margin-bottom:1.2mm}
.contract-terms{margin:0;padding:0 4mm 0 0;columns:1;column-gap:4mm;font-size:6.8px;line-height:1.45;color:#39465a}
.contract-terms li{padding-right:0;margin:0 0 .45mm;break-inside:avoid}
.contract-ack{font-size:6.8px;font-weight:700;color:#28364b;margin:.8mm 0 1mm}
.brand-contact-strip{display:grid;grid-template-columns:1fr 19mm 19mm;gap:3mm;align-items:center;border-radius:4px;background:#111a29;color:#fff;padding:1.5mm 2mm;min-height:19mm}
.contact-address{display:flex;flex-direction:column;gap:.7mm;min-width:0}
.contact-address b{font-size:9px;color:#e0b052}
.contact-address span{font-size:7.2px;color:#f1f4f8;line-height:1.5}
.contact-phones{direction:rtl;font-weight:700;letter-spacing:.1px}
.social-qr{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4mm;min-width:0}
.social-qr img{width:14mm;height:14mm;object-fit:cover;border-radius:2px;background:#fff}
.social-qr small{font-family:Arial,sans-serif;font-size:5.8px;line-height:1.2;color:#e7bd68;direction:ltr;white-space:nowrap}
@media print{
 @page{size:A4 portrait;margin:9mm 10mm 58mm}
 html,body{background:#fff!important;font-family:'Pinar',Tahoma,Arial,sans-serif!important}
 .app-shell,.login-shell,#modal-root,#toast-root{display:none!important}
 .print-root{display:block!important}
 .invoice-paper{border:0;padding:0 0 0;min-height:0}
 .invoice-print-footer{position:fixed;left:10mm;right:10mm;bottom:2mm}
 .invoice-table th,.invoice-table td{-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .invoice-paper,.invoice-main,.invoice-print-footer{break-inside:avoid}
}
@media(max-width:820px){.login-panel{padding:26px 22px 20px}.login-brand-center img{width:92px;height:92px}.login-brand-name{font-size:19px}.login-heading h2{font-size:21px}}
@media(max-width:560px){body{font-size:13px}.page-head h1{font-size:20px}.table-wrap td{font-size:11px;padding:10px 8px}#sale-calc .calc-grid{grid-template-columns:1fr 1fr}.installment-choice-row .btn{width:100%}.installment-config-options{grid-template-columns:1fr}}


/* Iranian locale: Jalali date controls and Tehran time presentation */
.date-field{position:relative;min-width:0}
.jalali-date-control{position:relative;display:flex;align-items:center;gap:6px}
.jalali-date-control input.jalali-date-input{direction:ltr;text-align:center;letter-spacing:.2px;padding:0 43px 0 12px;font-variant-numeric:tabular-nums}
.jalali-calendar-toggle{position:absolute;left:7px;top:50%;transform:translateY(-50%);width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:8px;background:#f2f4f8;color:#6f7889}
.jalali-calendar-toggle:hover{background:var(--accent-soft);color:var(--accent)}
.jalali-calendar{position:absolute;z-index:160;top:calc(100% - 2px);right:0;width:min(310px,100%);padding:12px;background:#fff;border:1px solid #e3e7ee;border-radius:14px;box-shadow:0 16px 42px #14223822}
.jalali-calendar[hidden]{display:none!important}
.jalali-calendar-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;color:#253149}
.jalali-calendar-head strong{font-size:13px}
.jalali-calendar-head button{width:30px;height:30px;border:1px solid #e6e9ef;background:#f8f9fb;border-radius:8px;color:#344258;font-size:20px;line-height:1}
.jalali-weekdays,.jalali-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.jalali-weekdays{margin-bottom:5px;color:#8a93a2;font-size:10px;font-weight:700}
.jalali-weekdays span{padding:5px 0}
.jalali-day{min-width:0;height:32px;border:0;border-radius:8px;background:#fff;color:#344258;font-size:11px}
.jalali-day:not(.empty):hover{background:var(--accent-soft);color:#916514}
.jalali-day.selected{background:var(--nav-2);color:#fff;font-weight:800}
.jalali-day.empty{pointer-events:none}
input[type=tel],input[name=phone],input[name=national_id],input[name=iban]{font-variant-numeric:tabular-nums}

.field input[type="hidden"]{display:none!important}


/* Customer history lookup in the sale form */
.customer-lookup-wrap{position:relative;margin:0 0 13px;padding:11px 13px 9px;background:#fafbfd;border:1px solid #e4e8ef;border-radius:12px}
.customer-lookup-wrap>label{display:block;font-size:11px;font-weight:700;color:#354258;margin-bottom:6px}
.customer-lookup-input{position:relative}
.customer-lookup-input input{width:100%;height:42px;border:1px solid #dbe1ea;border-radius:9px;background:#fff;padding:0 38px 0 12px;font:inherit;font-size:12px;outline:none}
.customer-lookup-input input:focus{border-color:#bd8a2d;box-shadow:0 0 0 3px #bd8a2d18}
.customer-lookup-input span{position:absolute;right:11px;top:50%;transform:translateY(-50%);color:#8993a4;display:flex}
.customer-lookup-wrap>small{display:block;font-size:10px;color:#8590a0;margin-top:6px}
.customer-search-results{position:relative;z-index:20;margin-top:6px;border:1px solid #e3e7ee;border-radius:10px;background:#fff;box-shadow:0 12px 28px #17243a14;overflow:hidden;max-height:220px;overflow-y:auto}
.customer-search-results[hidden]{display:none!important}
.customer-search-result{width:100%;display:flex;align-items:center;gap:9px;padding:9px 11px;text-align:right;background:#fff;border:0;border-bottom:1px solid #eef0f4;cursor:pointer;color:#243149}
.customer-search-result:last-child{border-bottom:0}
.customer-search-result:hover{background:#fffaf0}
.customer-result-avatar{width:32px;height:32px;display:grid;place-items:center;flex:0 0 32px;border-radius:9px;background:#f6eedc;color:#9b6c1a;font-weight:800}
.customer-result-main{display:grid;gap:1px;flex:1;min-width:0}
.customer-result-main b{font-size:11px}
.customer-result-main small,.customer-result-meta{font-size:9px;color:#7d8797}
.customer-result-meta{white-space:nowrap}
.customer-search-state{padding:12px;font-size:10px;color:#778397;text-align:center}
.customer-search-state.error{color:#b44b43}

/* Refined single-page A4 sales and purchase invoice */
@media print{
 @page{size:A4 portrait;margin:7mm 8mm 7mm}
 html,body{width:auto!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
 body{font-family:'Pinar',Tahoma,Arial,sans-serif!important}
 .print-root{display:block!important;width:100%!important;margin:0!important;padding:0!important}
 .invoice-paper{display:flex!important;flex-direction:column!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;height:auto!important;max-height:none!important;margin:0 auto!important;padding:0!important;border:0!important;overflow:visible!important;zoom:.98}
 .invoice-top{display:block!important;position:relative!important;width:100%!important;height:21mm!important;min-height:21mm!important;padding:0 0 1.5mm!important;margin:0!important;border-bottom:1.2px solid #bd8a2d!important;text-align:center!important;break-inside:avoid!important;box-sizing:border-box!important}
 .invoice-logo{display:block!important;position:absolute!important;left:1.5mm!important;right:auto!important;top:.5mm!important;width:18mm!important;height:18mm!important;object-fit:contain!important;margin:0!important}
 .invoice-brand{display:block!important;position:absolute!important;left:23mm!important;right:46mm!important;top:50%!important;transform:translateY(-50%)!important;text-align:center!important;direction:rtl!important;font-size:15px!important;line-height:1.25!important;min-width:0!important}
 .invoice-brand span,.invoice-brand b,.invoice-brand small{display:block!important}
 .invoice-brand b{font-size:17px!important}
 .invoice-brand small{font-size:8px!important;margin-top:.7mm!important}
 .invoice-meta{display:block!important;position:absolute!important;left:auto!important;right:1.5mm!important;top:.5mm!important;width:43mm!important;box-sizing:border-box!important;direction:rtl!important;text-align:right!important;font-size:8px!important;line-height:1.65!important;padding:1.5mm 2mm!important;border-radius:0 4px 4px 0!important}
 .invoice-meta strong{font-size:10px!important}
 .invoice-main{padding-top:0!important;break-inside:avoid!important}
 .invoice-title{font-size:12px!important;margin:2.3mm 0 1.8mm!important;line-height:1.45!important}
 .invoice-info{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1mm!important;margin-bottom:1.5mm!important}
 .invoice-info div{min-height:0!important;padding:1.4mm 1.7mm!important;font-size:8px!important;line-height:1.45!important}
 .invoice-table{margin:1.5mm 0 2mm!important;break-inside:avoid!important}
 .invoice-table th,.invoice-table td{padding:1.5mm 1.3mm!important;font-size:8px!important;line-height:1.35!important}
 .invoice-table small{font-size:7.2px!important}
 .invoice-subhead{font-size:8px!important;margin:1.5mm 0 .5mm!important}
 .cheque-print-table{max-width:115mm!important;margin:1mm 0 1.5mm!important}
 .invoice-total{margin-top:1.5mm!important}
 .invoice-total>div{min-width:67mm!important;padding:1.7mm 2.5mm!important;font-size:8px!important;line-height:1.55!important}
 .sale-total-grid{gap:.3mm 5mm!important}
 .sale-total-grid strong{font-size:9px!important;padding-top:.5mm!important}
 .invoice-notes{min-height:0!important;padding:1.5mm 2mm!important;font-size:7.8px!important;margin-top:1.7mm!important;line-height:1.45!important}
 .invoice-signatures{margin-top:3.5mm!important;font-size:7.8px!important;break-inside:avoid!important}
 .invoice-signatures span{padding:1mm 8mm 0!important}
 .invoice-print-footer{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;display:block!important;flex:0 0 auto!important;margin-top:2mm!important;padding-top:1mm!important;border-top:1px solid #bd8a2d!important;break-inside:avoid!important}
 .contract-warning{font-size:7px!important;padding:.8mm 1.4mm!important;margin-bottom:.8mm!important;line-height:1.35!important}
 .contract-terms{columns:2!important;column-gap:4mm!important;padding-right:3mm!important;font-size:6.6px!important;line-height:1.32!important}
 .contract-terms li{margin-bottom:.35mm!important;break-inside:avoid!important}
 .contract-ack{font-size:6.5px!important;margin:.6mm 0 .8mm!important;line-height:1.35!important}
 .brand-contact-strip{display:flex!important;flex-direction:row!important;gap:2mm!important;min-height:16mm!important;padding:1.1mm 1.5mm!important;border-radius:2px!important}
 .contact-address{flex:1 1 auto!important;gap:.4mm!important;min-width:0!important}
 .contact-address b{font-size:7.5px!important}
 .contact-address span{font-size:6.4px!important;line-height:1.3!important}
 .social-qr{flex:0 0 14mm!important}.social-qr img{width:11mm!important;height:11mm!important}
 .social-qr small{font-size:5px!important}
 .invoice-paper,.invoice-main,.invoice-print-footer,.invoice-top,.invoice-info,.invoice-table,.invoice-notes,.invoice-signatures{break-after:avoid-page!important;break-before:avoid-page!important}
}

/* Keep long cheque schedules compact and on one A4 page. */
.cheque-print-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2.5mm;align-items:start}
.cheque-print-grid .cheque-print-table{width:100%;max-width:none;margin:1mm 0 1.5mm}
.cheque-print-grid .cheque-print-table th,.cheque-print-grid .cheque-print-table td{padding:1mm .8mm;font-size:7px;line-height:1.2}
@media print{
 .cheque-print-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:2mm!important;break-inside:avoid!important}
 .cheque-print-grid .cheque-print-table{margin:0!important;table-layout:fixed!important}
 .cheque-print-grid .cheque-print-table th,.cheque-print-grid .cheque-print-table td{padding:.65mm .5mm!important;font-size:6.5px!important;line-height:1.15!important}
 .invoice-notes{max-height:14mm!important;overflow:hidden!important;overflow-wrap:anywhere!important}
 .invoice-main{break-inside:avoid-page!important}
 .invoice-signatures{break-inside:avoid-page!important}
}

/* v1.1.7 – consistent field alignment, stronger controls and sale add-ons */
.modal{width:min(880px,calc(100vw - 32px))}
.modal-body{padding:22px 24px}
.modal .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;column-gap:18px;row-gap:16px}
.modal .form-grid .field.full,.modal .form-grid .field.span-2{grid-column:1/-1}
.modal .form-section{margin-bottom:22px}
.modal .form-section-head{align-items:center;min-height:34px;margin-bottom:15px;padding-bottom:10px}
.modal .form-section-head strong{line-height:1.7}
.modal .field{display:flex;flex-direction:column;align-self:start;min-width:0;gap:0}
.modal .field>label{display:flex;flex-direction:column;align-items:stretch;gap:7px;width:100%;min-width:0;line-height:1.7}
.modal .field input:not([type=hidden]),.modal .field select,.modal .field textarea{box-sizing:border-box;width:100%;min-width:0;min-height:46px;height:46px;padding:0 13px;border:1.5px solid #c8d1de;border-radius:11px;background:#fff;color:#202d42;font-size:13px;line-height:1.6;box-shadow:0 1px 2px #12243b08;transition:border-color .16s,box-shadow .16s,background .16s}
.modal .field textarea{height:88px;min-height:88px;padding:10px 13px;resize:none;line-height:1.8}
.modal .field input:not([type=hidden]):focus,.modal .field select:focus,.modal .field textarea:focus{border-color:#c18d33;box-shadow:0 0 0 3px #bd8a2d20;background:#fff}
.modal .field input:disabled{background:#f0f2f6;color:#6e7888;border-color:#d7dee8}
.modal .field .help{font-size:10px;line-height:1.65;color:#6f7b8f;margin:6px 2px 0;min-height:0}
.modal .field input.money-entry{direction:ltr;text-align:right;font-variant-numeric:tabular-nums;letter-spacing:.15px;font-weight:700}
.modal .field input.jalali-date-input{direction:ltr;text-align:center}
.modal .form-actions{align-items:center;flex-wrap:wrap;padding-top:17px;margin-top:20px}
.modal .form-note{border:1px solid #d9e0ea;background:#f6f8fb;color:#56647a}
.modal input[type=checkbox],.modal input[type=radio]{accent-color:#bd8a2d}
/* Clearer outlines outside modals too: inventory filters and page-level controls. */
.search-input,.filter-select,.toolbar input,.toolbar select{border:1.5px solid #cbd4e0;background:#fff;color:#27364e}
.search-input:focus,.filter-select:focus{border-color:#bd8a2d;outline:0;box-shadow:0 0 0 3px #bd8a2d18}
.field input:not([type=hidden]),.field select,.field textarea{border-color:#cbd4e0}
.field textarea{resize:none}
/* Money inputs */
.money-entry{font-variant-numeric:tabular-nums;direction:ltr;text-align:right}
/* Extra items on an invoice */
.sale-addons-section{margin-top:18px;padding:14px 15px;border:1.5px solid #cbd6e4;border-radius:14px;background:#fafbfd}
.sale-addons-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.sale-addons-head>div{display:grid;gap:3px;min-width:0}
.sale-addons-head b{font-size:12px;color:#27354c}
.sale-addons-head small{font-size:10px;color:#738095;line-height:1.7}
.addon-row{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(85px,.45fr) minmax(165px,.8fr) 34px;align-items:end;gap:10px;padding:12px 10px;margin-top:9px;border:1.5px solid #d6deea;border-radius:11px;background:#fff}
.addon-row label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700;color:#46536a;line-height:1.7}
.addon-row select,.addon-row input:not([type=hidden]){height:42px;min-height:42px;width:100%;min-width:0;border:1.5px solid #cbd4e0;border-radius:9px;background:#fff;padding:0 10px;color:#243149;font:inherit;font-size:12px}
.addon-row select:focus,.addon-row input:focus{outline:0;border-color:#bd8a2d;box-shadow:0 0 0 3px #bd8a2d18}
.addon-row .addon-price input{direction:ltr;text-align:right;font-weight:700}
.addon-stock-hint{display:block;margin-top:4px;color:#718096;font-size:9px;line-height:1.6;min-height:14px}
.addon-remove{width:34px;height:38px;border:1px solid #f0d3d0;border-radius:9px;background:#fff6f5;color:#c34e45;font-size:21px;line-height:1}
.addon-remove:hover{background:#ffe9e6}
.cheque-first-input{height:34px;width:118px;max-width:100%;border:1.5px solid #cbd4e0;border-radius:8px;padding:0 8px;text-align:center;direction:ltr;font:inherit;font-size:11px;background:#fff;color:#1f2e45}
.cheque-first-input:focus{outline:0;border-color:#bd8a2d;box-shadow:0 0 0 3px #bd8a2d18}
.auto-cheque-number{display:inline-block;direction:ltr;font-weight:800;min-width:52px}
#sale-calc .calc-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
#sale-calc .calc-cell strong{overflow-wrap:anywhere;font-size:12px}
@media(max-width:680px){
 .modal{width:calc(100vw - 18px);max-height:94vh}
 .modal-body{padding:16px}
 .modal .form-grid{grid-template-columns:1fr;gap:13px}
 .modal .form-grid .field.span-2,.modal .form-grid .field.full{grid-column:1}
 .addon-row{grid-template-columns:1fr 1fr;gap:10px}
 .addon-product{grid-column:1/-1}
 .addon-remove{grid-column:1/-1;width:100%;height:34px}
 #sale-calc .calc-grid{grid-template-columns:1fr 1fr}
}

/* v1.1.7 field layout finishing: no nested field wrappers, equal heights and predictable grid rows */
.modal .form-grid{grid-auto-flow:row;grid-auto-rows:min-content}
.modal .form-grid>.field{margin:0;min-height:0}
.modal .form-grid>.field.full{grid-column:1/-1}
.modal .field .help{min-height:0}
.modal .field textarea{display:block}
.money-entry::placeholder{color:#9aa5b4;opacity:1}

/* v1.1.8 - larger, clearer final sales invoice */
@media print{
  @page{size:A4 portrait;margin:5mm 7mm 5mm}
  html,body{margin:0!important;padding:0!important;background:#fff!important}
  .print-root{width:100%!important;margin:0!important;padding:0!important}
  .invoice-paper{box-sizing:border-box!important;width:100%!important;height:287mm!important;min-height:287mm!important;max-height:287mm!important;margin:0!important;padding:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;zoom:1!important}
  .invoice-top{flex:0 0 20mm!important;height:20mm!important;min-height:20mm!important}
  .invoice-main{flex:0 0 auto!important;width:100%!important;min-width:0!important}
  .invoice-title{font-size:13px!important;margin:1.8mm 0 1.5mm!important}
  .invoice-info{gap:1.2mm!important;margin-bottom:1.8mm!important}
  .invoice-info div{padding:1.6mm 2mm!important;font-size:8.5px!important;line-height:1.55!important;min-height:9mm!important}
  .invoice-table{width:100%!important;margin:1.7mm 0 2mm!important;table-layout:fixed!important}
  .invoice-table th,.invoice-table td{font-size:8.5px!important;line-height:1.45!important;padding:1.7mm 1.3mm!important;overflow-wrap:anywhere!important}
  .invoice-subhead{font-size:9.5px!important;margin:1.8mm 0 1mm!important}
  .cheque-print-table{width:100%!important;max-width:none!important;margin:1mm 0 1.8mm!important;table-layout:fixed!important}
  .cheque-print-table th,.cheque-print-table td{font-size:8.2px!important;padding:1.35mm 1mm!important;line-height:1.35!important}
  .cheque-print-table th:last-child,.cheque-print-table td:last-child{text-align:center!important;font-weight:700!important}
  .invoice-total.sale-total{display:block!important;width:100%!important;margin:2mm 0 2mm!important;padding:0!important}
  .invoice-total.sale-total>div{display:grid!important;width:100%!important;min-width:0!important;box-sizing:border-box!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1.5mm!important;padding:0!important;border:0!important;background:transparent!important}
  .sale-summary-cell{min-width:0!important;min-height:14mm!important;box-sizing:border-box!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:center!important;gap:1mm!important;padding:1.6mm 2.2mm!important;border:1.1px solid #9daabd!important;border-right:2px solid #bd8a2d!important;border-radius:2mm!important;background:#fbfcfe!important;text-align:right!important}
  .sale-summary-cell span{font-size:8.5px!important;line-height:1.35!important;color:#56647a!important;white-space:normal!important}
  .sale-summary-cell b{font-size:10.5px!important;line-height:1.4!important;color:#1b2940!important;overflow-wrap:anywhere!important;font-weight:800!important}
  .invoice-notes{display:block!important;box-sizing:border-box!important;width:100%!important;min-height:27mm!important;height:27mm!important;max-height:27mm!important;margin:2mm 0 0!important;padding:2mm 2.5mm!important;border:1.2px solid #9daabd!important;border-radius:1.5mm!important;font-size:9.5px!important;line-height:1.6!important;overflow:hidden!important}
  .invoice-notes>b{display:block!important;font-size:10px!important;margin-bottom:1mm!important;color:#25354d!important}
  .invoice-notes-content{min-height:17mm!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;background:repeating-linear-gradient(to bottom,transparent 0,transparent 5.2mm,#dce2eb 5.2mm,#dce2eb 5.45mm)!important;padding-bottom:1mm!important}
  .invoice-signatures{display:grid!important;grid-template-columns:1fr 1fr!important;gap:5mm!important;width:100%!important;margin:3mm 0 0!important;padding:0!important;break-inside:avoid!important}
  .signature-box{box-sizing:border-box!important;position:relative!important;display:flex!important;align-items:flex-end!important;justify-content:center!important;min-height:27mm!important;height:27mm!important;padding:2mm 3mm!important;border:1.1px solid #9daabd!important;border-radius:1.5mm!important;background:repeating-linear-gradient(to bottom,#fff 0,#fff 6.1mm,#e1e6ed 6.1mm,#e1e6ed 6.35mm)!important}
  .signature-box b{position:absolute!important;bottom:1.8mm!important;right:3mm!important;padding:0 1.5mm!important;background:#fff!important;font-size:9px!important;color:#34445c!important}
  .invoice-print-footer{position:static!important;display:block!important;flex:0 0 auto!important;width:100%!important;box-sizing:border-box!important;margin-top:auto!important;padding:0!important;border:0!important;break-inside:avoid!important}
  .contract-warning{font-size:8.4px!important;line-height:1.5!important;padding:1.3mm 2mm!important;margin:0 0 1.2mm!important}
  .contract-terms{columns:2!important;column-gap:5mm!important;padding:0 4mm 0 0!important;margin:0!important;font-size:8px!important;line-height:1.5!important;color:#26354b!important}
  .contract-terms li{margin:0 0 .8mm!important;padding-right:.3mm!important;break-inside:avoid!important}
  .contract-ack{font-size:8px!important;line-height:1.5!important;margin:1mm 0 1.5mm!important;color:#25354d!important;font-weight:700!important}
  .brand-contact-strip{display:grid!important;grid-template-columns:minmax(0,1fr) 27mm 27mm!important;gap:3mm!important;align-items:center!important;min-height:30mm!important;height:30mm!important;box-sizing:border-box!important;padding:2mm 3mm!important;background:#111a29!important;border-top:1.2px solid #bd8a2d!important;border-radius:1.5mm!important}
  .contact-address{gap:1mm!important;min-width:0!important}
  .contact-address b{font-size:10px!important;color:#e0b052!important}
  .contact-address span{font-size:8.5px!important;line-height:1.5!important;color:#f1f4f8!important}
  .social-qr{width:27mm!important;min-width:27mm!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:1mm!important}
  .social-qr img{display:block!important;width:22mm!important;height:22mm!important;object-fit:contain!important;padding:1mm!important;box-sizing:border-box!important;background:#fff!important;border:1px solid #e5d3a4!important;border-radius:1mm!important;image-rendering:pixelated!important}
  .social-qr small{font-size:6.7px!important;line-height:1.2!important;color:#f4d88f!important}
  .invoice-paper,.invoice-main,.invoice-print-footer,.invoice-top,.invoice-info,.invoice-table,.invoice-notes,.invoice-signatures,.brand-contact-strip{break-inside:avoid!important;break-after:avoid-page!important}
  .print-root.many-cheques .cheque-print-grid{gap:2mm!important}
  .print-root.many-cheques .cheque-print-table th,.print-root.many-cheques .cheque-print-table td{font-size:7.1px!important;padding:.85mm .65mm!important;line-height:1.2!important}
  .print-root.many-cheques .invoice-notes{min-height:22mm!important;height:22mm!important;max-height:22mm!important}
  .print-root.many-cheques .signature-box{min-height:23mm!important;height:23mm!important}
  .print-root.many-cheques .brand-contact-strip{min-height:27mm!important;height:27mm!important}
  .print-root.many-cheques .social-qr img{width:19mm!important;height:19mm!important}
  .print-root.many-cheques .contract-terms{font-size:7.5px!important;line-height:1.35!important}
}

/* v1.1.8 final print-fit pass: leave a clean lower margin and keep all footer items visible */
@media print{
  @page{size:A4 portrait;margin:5mm 7mm}
  .invoice-paper{height:282mm!important;min-height:282mm!important;max-height:282mm!important}
  .invoice-top{flex-basis:19mm!important;height:19mm!important;min-height:19mm!important}
  .sale-summary-cell{min-height:12.5mm!important;padding:1.3mm 2mm!important}
  .invoice-notes{height:25mm!important;min-height:25mm!important;max-height:25mm!important}
  .invoice-notes-content{min-height:16mm!important}
  .invoice-signatures{margin-top:2.5mm!important}
  .signature-box{height:25mm!important;min-height:25mm!important}
  .brand-contact-strip{height:29mm!important;min-height:29mm!important}
  .social-qr img{width:21mm!important;height:21mm!important}
  .print-root.many-cheques .invoice-paper{height:282mm!important;min-height:282mm!important;max-height:282mm!important}
  .print-root.very-many-cheques .cheque-print-grid-3{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1.3mm!important;align-items:start!important}
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table{width:100%!important;max-width:none!important;table-layout:fixed!important;margin:0!important}
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table th,
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table td{font-size:6.2px!important;line-height:1.1!important;padding:.45mm .25mm!important;overflow-wrap:anywhere!important}
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table th:nth-child(1),
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table td:nth-child(1){width:8%!important}
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table th:nth-child(2),
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table td:nth-child(2){width:29%!important}
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table th:nth-child(3),
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table td:nth-child(3){width:25%!important}
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table th:nth-child(4),
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table td:nth-child(4){width:38%!important}
  .print-root.very-many-cheques .invoice-notes{height:21mm!important;min-height:21mm!important;max-height:21mm!important}
  .print-root.very-many-cheques .signature-box{height:21mm!important;min-height:21mm!important}
  .print-root.very-many-cheques .brand-contact-strip{height:26mm!important;min-height:26mm!important}
  .print-root.very-many-cheques .social-qr img{width:18mm!important;height:18mm!important}
  .print-root.very-many-cheques .contract-terms{font-size:7.1px!important;line-height:1.28!important}
}

/* Dashboard 1.2.0 — rial finance overview and independent history charts */
.stats-grid.dashboard-stats{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.dashboard-range-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:0 0 14px;padding:11px 14px;background:#fff;border:1px solid #dfe4ec;border-radius:13px}
.dashboard-range-toolbar>span{font-size:11px;color:#68758a;font-weight:700}
.range-buttons{display:flex;gap:6px;flex-wrap:wrap}
.range-btn{min-width:62px;padding:7px 12px;border:1px solid #d8dee8;border-radius:9px;background:#fff;color:#627087;font-size:10px;font-weight:700}
.range-btn:hover{border-color:#c99b44;color:#916514}
.range-btn.active{background:#18283e;color:#fff;border-color:#18283e;box-shadow:0 4px 10px #18283e1b}
.dashboard-charts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:0 0 16px}
.history-chart-panel{min-width:0;overflow:hidden}
.history-chart-panel .panel-head{min-height:70px}
.chart-total{display:grid;gap:3px;text-align:left;white-space:nowrap}
.chart-total small{color:#8993a3;font-size:9px}
.chart-total b{font-size:12px;color:#25334a}
.history-chart-scroll{width:100%;overflow-x:auto;overflow-y:hidden;direction:rtl;padding:14px 14px 3px;scrollbar-width:thin;scrollbar-color:#cbd3df transparent}
.history-chart-grid{min-width:100%;height:220px;position:relative;display:flex;align-items:stretch;background:repeating-linear-gradient(to bottom,transparent 0,transparent 48px,#eef1f5 49px,#eef1f5 50px)}
.history-chart-columns{display:flex;align-items:flex-end;gap:7px;width:max-content;min-width:100%;height:100%;padding:0 2px}
.history-bar-column{width:35px;min-width:35px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;position:relative}
.history-bar-value{height:18px;max-width:54px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;color:#778398;line-height:18px}
.history-bar-track{width:17px;flex:1;max-height:174px;min-height:2px;display:flex;align-items:flex-end;border-radius:6px 6px 3px 3px;background:#f1f3f7;overflow:hidden}
.history-bar-fill{width:100%;min-height:0;border-radius:6px 6px 2px 2px;background:linear-gradient(180deg,#64a7ee,#4776d9);transition:height .25s ease}
.history-bar-fill.sales{background:linear-gradient(180deg,#60c7a1,#25976d)}
.history-bar-fill.purchases{background:linear-gradient(180deg,#efbd68,#c58c31)}
.history-bar-column small{height:19px;line-height:19px;white-space:nowrap;color:#7f8999;font-size:8px;direction:rtl}
.chart-footnote{padding:5px 16px 12px;color:#9aa3b0;font-size:9px}
@media(max-width:1280px){.stats-grid.dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){.stats-grid.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-charts-grid{grid-template-columns:1fr}.dashboard-range-toolbar{align-items:flex-start;flex-direction:column}.range-buttons{width:100%}.range-btn{flex:1}}
@media(max-width:480px){.stats-grid.dashboard-stats{grid-template-columns:1fr 1fr;gap:8px}.dashboard-range-toolbar{padding:10px}.history-chart-grid{height:195px}.history-bar-track{max-height:150px}}

.stats-grid.dashboard-stats .stat-value{font-size:17px;letter-spacing:0;line-height:1.65;overflow-wrap:anywhere}


/* v1.3.0 — staff activity, exchange workflow, guarantee cheque, and dark mode */
.theme-toggle-btn{height:36px;display:inline-flex;align-items:center;gap:7px;padding:0 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);font-size:10px;font-weight:700;white-space:nowrap}
.theme-toggle-btn:hover{border-color:var(--accent);color:var(--accent)}
.activity-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:13px 0 18px}
.activity-stats-grid.compact{grid-template-columns:repeat(4,minmax(0,1fr))}
.activity-stat{min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);display:grid;gap:5px}
.activity-stat small{font-size:10px;color:var(--muted);line-height:1.5}
.activity-stat b{font-size:13px;overflow-wrap:anywhere;color:var(--ink)}
.activity-user-head{display:flex;align-items:center;gap:10px;padding:12px;background:var(--surface-2);border:1px solid var(--line);border-radius:12px}
.activity-user-head>div{flex:1;display:grid;gap:3px;min-width:0}
.activity-user-head>div>b{font-size:14px;color:var(--ink)}
.activity-user-head small{font-size:10px;color:var(--muted)}
.activity-section{margin-top:17px}
.activity-section h4{font-size:12px;color:var(--ink);margin:0 0 8px}
.user-activity-modal{max-height:68vh;overflow:auto;padding:1px 3px}
.user-activity-modal .table-wrap{border:1px solid var(--line);border-radius:10px}
.user-activity-modal th{font-size:10px}.user-activity-modal td{font-size:10px}
.sale-detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.sale-detail-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2)}
.sale-detail-head>div:first-child{display:grid;gap:4px;min-width:0}
.sale-detail-head small{color:var(--muted);font-size:10px}.sale-detail-head h3{margin:0;color:var(--ink);font-size:16px}.sale-detail-head span{color:var(--muted);font-size:11px}
.current-device-pill{max-width:48%;display:grid;gap:4px;padding:10px 12px;border-radius:10px;background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent) 45%,var(--line))}
.current-device-pill b{font-size:12px;color:var(--ink);overflow-wrap:anywhere}
.btn-exchange{background:linear-gradient(115deg,#6c4bd0,#9671ed);color:white;border:1px solid #6c4bd0;box-shadow:0 7px 16px #6c4bd02a}
.btn-exchange:hover{background:linear-gradient(115deg,#5c3fc0,#8760df);color:white}
.exchange-current-label{font-size:10px;color:#7551c9;background:#f1ecff;border-radius:6px;padding:2px 6px;display:inline-block;margin-top:3px}
.exchange-intro{display:flex;align-items:center;gap:12px;padding:13px;border-radius:12px;background:#f3efff;border:1px solid #ded4ff;color:#5536ad;margin-bottom:13px}
.exchange-intro p{margin:3px 0 0;font-size:10px;color:#6c5a99;line-height:1.8}
.exchange-symbol{width:43px;height:43px;display:grid;place-items:center;background:#fff;border-radius:12px;color:#704bd0}
.exchange-device-comparison{display:grid;grid-template-columns:1fr 32px 1fr;align-items:center;gap:8px;margin-bottom:16px}
.exchange-device-comparison>div{min-width:0;padding:11px;border:1px solid var(--line);border-radius:10px;display:grid;gap:4px;background:var(--surface-2)}
.exchange-device-comparison small,.exchange-device-comparison span{font-size:9px;color:var(--muted)}
.exchange-device-comparison b{font-size:11px;color:var(--ink);overflow-wrap:anywhere}
.exchange-arrow{text-align:center;color:#7652d2;font-size:20px}
.exchange-form-note{border:1px solid #ded4ff;background:#faf8ff;padding:10px;border-radius:9px;color:#625180;font-size:10px;line-height:1.8}
.guarantee-form-block{margin-top:15px;padding:13px;border:1px solid #ddc998;background:#fffbf1;border-radius:12px}
.guarantee-toggle{display:flex;align-items:center;gap:10px;cursor:pointer}
.guarantee-toggle input{accent-color:#bd8a2d;width:17px;height:17px}
.guarantee-toggle span{display:grid;gap:2px}
.guarantee-toggle b{font-size:12px;color:#483819}
.guarantee-toggle small{font-size:10px;color:#8b7955}
.guarantee-fields{margin-top:12px;padding-top:12px;border-top:1px solid #eadfca}
.guarantee-fields[hidden]{display:none!important}
.guarantee-card{border:1px solid #ddc998;background:#fffbf1;padding:11px;border-radius:10px;color:#58431a;font-size:10px;line-height:1.9}
.guarantee-card>b{display:block;color:#966b17;font-size:12px;margin-bottom:4px}

/* Dark theme is user-selectable and stored on this browser only. */
:root[data-theme="dark"]{color-scheme:dark;--bg:#0e1521;--surface:#151f2e;--surface-2:#1b283a;--ink:#e9edf5;--muted:#a4afc0;--line:#344258;--accent:#d5a64a;--accent-2:#e7bd68;--accent-soft:#3a3020;--green-soft:#18372f;--blue-soft:#1e2d4d;--red-soft:#3d252a;--amber-soft:#3c3020;--shadow:0 12px 34px rgba(0,0,0,.22)}
:root[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
:root[data-theme="dark"] .app-shell,:root[data-theme="dark"] .main-column{background:var(--bg)}
:root[data-theme="dark"] .topbar,:root[data-theme="dark"] .app-footer{background:#131d2b;border-color:var(--line);color:var(--muted)}
:root[data-theme="dark"] .breadcrumb strong,:root[data-theme="dark"] .page-head h1,:root[data-theme="dark"] .section-title,:root[data-theme="dark"] .td-main{color:var(--ink)}
:root[data-theme="dark"] .panel,:root[data-theme="dark"] .stat-card,:root[data-theme="dark"] .quick-action,:root[data-theme="dark"] .dashboard-range-toolbar,:root[data-theme="dark"] .panel-head{background:var(--surface);border-color:var(--line);color:var(--ink)}
:root[data-theme="dark"] .panel-head{border-bottom-color:var(--line)}
:root[data-theme="dark"] .table-wrap th{background:#202d40;color:#bac4d2;border-color:var(--line)}
:root[data-theme="dark"] .table-wrap td{color:#d5dce7;border-color:#2b394d}
:root[data-theme="dark"] tbody tr:hover{background:#1c293b}
:root[data-theme="dark"] .field input,:root[data-theme="dark"] .field select,:root[data-theme="dark"] .field textarea,:root[data-theme="dark"] .stack-form input,:root[data-theme="dark"] .search-input,:root[data-theme="dark"] .filter-select,:root[data-theme="dark"] .cheque-number-input,:root[data-theme="dark"] .jalali-date-input{background:#111b29!important;color:#edf1f7!important;border-color:#43536b!important}
:root[data-theme="dark"] .field label,:root[data-theme="dark"] .stack-form label,:root[data-theme="dark"] .form-section-head strong,:root[data-theme="dark"] .field-required{color:#dce4f0}
:root[data-theme="dark"] .form-note,:root[data-theme="dark"] .help-card,:root[data-theme="dark"] .demo-box,:root[data-theme="dark"] .installment-choice-row,:root[data-theme="dark"] .notification-item,:root[data-theme="dark"] .activity-user-head,:root[data-theme="dark"] .activity-stat,:root[data-theme="dark"] .sale-detail-head,:root[data-theme="dark"] .exchange-device-comparison>div{background:var(--surface-2);border-color:var(--line);color:var(--ink)}
:root[data-theme="dark"] .notification-copy strong,:root[data-theme="dark"] .stock-low-meta strong,:root[data-theme="dark"] .quick-action strong,:root[data-theme="dark"] .activity-stat b,:root[data-theme="dark"] .sale-detail-head h3{color:var(--ink)}
:root[data-theme="dark"] .modal,:root[data-theme="dark"] .installment-config-card{background:var(--surface);color:var(--ink)}
:root[data-theme="dark"] .modal-head,:root[data-theme="dark"] .modal-foot{border-color:var(--line)}
:root[data-theme="dark"] .modal-head h3,:root[data-theme="dark"] .installment-config-head h3{color:var(--ink)}
:root[data-theme="dark"] .modal-close,:root[data-theme="dark"] .jalali-calendar-head button{background:#29384d;color:#e6edf7;border-color:#3d4c63}
:root[data-theme="dark"] .jalali-calendar{background:#172335;border-color:#3b4a60}
:root[data-theme="dark"] .jalali-calendar-head strong,:root[data-theme="dark"] .jalali-day{color:#dce5f2;background:#172335}
:root[data-theme="dark"] .jalali-day.selected{background:#bd8a2d;color:#101827}
:root[data-theme="dark"] .config-option{background:#1b293b;border-color:#3d4b60}
:root[data-theme="dark"] .config-option b{color:#e6edf7}
:root[data-theme="dark"] .config-note{background:#202c3e;color:#b8c4d4}
:root[data-theme="dark"] .theme-toggle-btn,:root[data-theme="dark"] .today-chip,:root[data-theme="dark"] .icon-button{background:#1b283a;border-color:var(--line);color:#e7edf6}
:root[data-theme="dark"] .empty-state strong{color:#d5ddeb}
:root[data-theme="dark"] .category-chip,:root[data-theme="dark"] .permission-tag{background:#27354a;color:#cbd5e3}
:root[data-theme="dark"] .login-shell{background:radial-gradient(circle at 50% 12%,#263951 0,transparent 37%),linear-gradient(145deg,#080d15,#0d1624 72%)}
:root[data-theme="dark"] .sale-calculator{background:linear-gradient(135deg,#101a2a,#1d2d43)}
:root[data-theme="dark"] .activity-section h4{color:var(--ink)}
:root[data-theme="dark"] .activity-section .table-wrap{border-color:var(--line)}
:root[data-theme="dark"] .user-activity-modal .table-wrap{background:var(--surface)}
:root[data-theme="dark"] .exchange-intro{background:#292341;border-color:#4a3b70;color:#e2d9ff}
:root[data-theme="dark"] .exchange-intro p{color:#c1b5e0}
:root[data-theme="dark"] .exchange-symbol{background:#382e55;color:#e4d9ff}
:root[data-theme="dark"] .exchange-device-comparison b{color:#e8edf6}
:root[data-theme="dark"] .guarantee-form-block,:root[data-theme="dark"] .guarantee-card{background:#332b1b;border-color:#69552b;color:#f3e6c6}
:root[data-theme="dark"] .guarantee-toggle b{color:#f2e3bf}
:root[data-theme="dark"] .guarantee-toggle small{color:#c3b28b}
:root[data-theme="dark"] .btn-light{background:#26354a;color:#e0e8f3}
@media(max-width:820px){.activity-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.activity-stats-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.sale-detail-head{align-items:stretch;flex-direction:column}.current-device-pill{max-width:none}}
@media(max-width:560px){.theme-toggle-btn span{display:none}.activity-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.exchange-device-comparison{grid-template-columns:1fr}.exchange-arrow{transform:rotate(-90deg)}}

/* Guarantee section on the printed sale invoice. */
.guarantee-print-section{margin:2mm 0;padding:2mm 2.5mm;border:1px solid #b9a16e;border-right:2px solid #bd8a2d;border-radius:1.5mm;background:#fffdf8;color:#26354b;font-size:8.5px;line-height:1.5;break-inside:avoid}
.guarantee-print-section>b{display:block;color:#8e681b;font-size:9px;margin-bottom:1mm}
.guarantee-print-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1mm 3mm}
.guarantee-print-grid span{min-width:0;overflow-wrap:anywhere}
.guarantee-print-grid strong{font-weight:800;color:#18253a}
@media print{.guarantee-print-section{font-size:7.8px!important;padding:1.3mm 2mm!important;margin:1.2mm 0!important}.guarantee-print-grid{gap:.6mm 2mm!important}.guarantee-print-section>b{font-size:8.4px!important}}

@media print{
  .invoice-info-sales{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:1mm!important}
  .invoice-info-sales div{min-width:0!important;font-size:8px!important;overflow-wrap:anywhere!important}
  .invoice-info-sales div b{display:block!important;margin-top:.5mm!important;font-size:8.5px!important}
  .invoice-meta{width:47mm!important;font-size:10px!important;line-height:1.8!important;padding:2mm 2.5mm!important}
  .invoice-meta strong{font-size:12.5px!important}
  .invoice-meta .invoice-meta-no{font-size:14px!important;font-weight:900!important}
  .invoice-meta .invoice-meta-date{font-size:12px!important;font-weight:800!important}
  .guarantee-print-section{box-sizing:border-box!important;width:100%!important;min-height:13mm!important;margin:1mm 0!important;padding:1.2mm 2mm!important;font-size:7.8px!important;line-height:1.35!important}
  .guarantee-print-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:.6mm 2mm!important}
  .print-root.many-cheques .guarantee-print-section{min-height:10mm!important;padding:.7mm 1.5mm!important;font-size:7px!important}
  .print-root.very-many-cheques .guarantee-print-section{min-height:8mm!important;padding:.5mm 1mm!important;font-size:6.2px!important;line-height:1.2!important}
  .print-root.very-many-cheques .guarantee-print-grid{gap:.3mm 1mm!important}
}

/* Version 1.3.0: larger invoice identifier and date with consistent alignment. */
.invoice-meta-line{display:flex;align-items:baseline;justify-content:space-between;gap:2mm;border-top:1px solid #e6dcc5;padding-top:.6mm;margin-top:.4mm;white-space:nowrap}
.invoice-meta-line span{font-size:8px;color:#6b7688}
.invoice-meta-line .invoice-meta-no{font-size:15px!important;font-weight:900!important;letter-spacing:.35px;color:#19283e!important}
.invoice-meta-line .invoice-meta-date{font-size:12px!important;font-weight:800!important;color:#8c671b!important}
@media print{
 .invoice-meta-line{gap:1.5mm!important;padding-top:.5mm!important;margin-top:.35mm!important}
 .invoice-meta-line span{font-size:8px!important}
 .invoice-meta-line .invoice-meta-no{font-size:15px!important}
 .invoice-meta-line .invoice-meta-date{font-size:12.5px!important}
}

/* Admin employee activity: readable purchase detail cards in the staff report. */
.purchase-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:14px}
.purchase-detail-cell{min-width:0;padding:11px 12px;border:1px solid var(--line);border-right:3px solid var(--accent);border-radius:10px;background:var(--surface-2);display:grid;gap:4px}
.purchase-detail-cell small{font-size:10px;color:var(--muted)}
.purchase-detail-cell b{font-size:12px;color:var(--ink);overflow-wrap:anywhere;line-height:1.8}
:root[data-theme="dark"] .purchase-detail-cell{background:var(--surface-2);border-color:var(--line)}
@media(max-width:820px){.purchase-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.purchase-detail-grid{grid-template-columns:1fr}}


/* v1.3.1 — print layout correction: legibility first, no clipping */
@media print {
  @page { size: A4 portrait; margin: 5mm 6mm 5mm; }
  html, body {
    width: auto !important; min-width: 0 !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; background: #fff !important;
    color: #172338 !important; -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body { font-family: 'Pinar', Tahoma, Arial, sans-serif !important; }
  body > *:not(.print-root) { display: none !important; }
  body > .print-root { display: block !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
  .print-root .invoice-paper {
    display: flex !important; flex-direction: column !important; box-sizing: border-box !important;
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    height: auto !important; min-height: 285mm !important; max-height: none !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    overflow: visible !important; zoom: 1 !important;
  }
  .print-root .invoice-top {
    position: relative !important; display: block !important; flex: 0 0 20mm !important;
    width: 100% !important; height: 20mm !important; min-height: 20mm !important;
    margin: 0 0 1mm !important; padding: 0 0 1mm !important;
    border-bottom: 1.4px solid #bd8a2d !important; box-sizing: border-box !important;
    break-inside: avoid !important;
  }
  .print-root .invoice-logo { position: absolute !important; left: 1.5mm !important; right: auto !important; top: 0 !important; width: 19mm !important; height: 19mm !important; margin: 0 !important; object-fit: contain !important; }
  .print-root .invoice-brand { position: absolute !important; left: 23mm !important; right: 48mm !important; top: 50% !important; transform: translateY(-50%) !important; display: block !important; min-width: 0 !important; text-align: center !important; font-size: 16px !important; line-height: 1.25 !important; }
  .print-root .invoice-brand span,.print-root .invoice-brand b,.print-root .invoice-brand small { display:block !important; }
  .print-root .invoice-brand b { font-size: 18px !important; }
  .print-root .invoice-brand small { margin-top: .7mm !important; font-size: 8.8px !important; }
  .print-root .invoice-meta { position:absolute !important; left:auto !important; right:1.5mm !important; top:0 !important; width:45mm !important; padding:1.1mm 2mm !important; box-sizing:border-box !important; text-align:right !important; line-height:1.5 !important; font-size:9px !important; }
  .print-root .invoice-meta strong { font-size:11px !important; }
  .print-root .invoice-meta-line { gap:1.5mm !important; padding-top:.5mm !important; margin-top:.4mm !important; }
  .print-root .invoice-meta-line span { font-size:8.8px !important; }
  .print-root .invoice-meta-line .invoice-meta-no { font-size:17px !important; }
  .print-root .invoice-meta-line .invoice-meta-date { font-size:14px !important; }
  .print-root .invoice-main { display:block !important; flex:0 0 auto !important; width:100% !important; min-width:0 !important; padding:0 !important; overflow:visible !important; break-inside:auto !important; }
  .print-root .invoice-title { margin:1.6mm 0 1.5mm !important; font-size:14px !important; line-height:1.45 !important; }
  .print-root .invoice-info { display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:1.2mm !important; margin:0 0 2mm !important; }
  .print-root .invoice-info div { min-width:0 !important; min-height:10mm !important; padding:1.5mm 1.8mm !important; border:1px solid #aebbd0 !important; border-right:2px solid #bd8a2d !important; border-radius:1.2mm !important; font-size:9.5px !important; line-height:1.5 !important; overflow-wrap:anywhere !important; }
  .print-root .invoice-info div b { display:block !important; margin:.4mm 0 0 !important; font-size:10px !important; line-height:1.4 !important; }
  .print-root .invoice-table { width:100% !important; max-width:100% !important; margin:1.5mm 0 2mm !important; table-layout:fixed !important; border-collapse:collapse !important; break-inside:auto !important; }
  .print-root .invoice-table thead { display:table-header-group !important; }
  .print-root .invoice-table tr { break-inside:avoid !important; page-break-inside:avoid !important; }
  .print-root .invoice-table th,.print-root .invoice-table td { padding:1.8mm 1.3mm !important; border:1px solid #b9c6d8 !important; font-size:9.6px !important; line-height:1.45 !important; overflow-wrap:anywhere !important; }
  .print-root .invoice-table small { font-size:8.2px !important; line-height:1.3 !important; }
  .print-root .invoice-subhead { margin:1.6mm 0 .7mm !important; font-size:10px !important; line-height:1.4 !important; }
  .print-root .cheque-print-table { width:100% !important; max-width:100% !important; margin:1mm 0 1.5mm !important; table-layout:fixed !important; }
  .print-root .cheque-print-table th,.print-root .cheque-print-table td { padding:1.2mm 1mm !important; font-size:9.2px !important; line-height:1.35 !important; }
  .print-root .cheque-print-grid { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:2mm !important; align-items:start !important; break-inside:avoid !important; }
  .print-root .cheque-print-grid .cheque-print-table { margin:0 !important; }
  .print-root .cheque-print-grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:1.5mm !important; }
  .print-root .cheque-print-grid-3 .cheque-print-table th,.print-root .cheque-print-grid-3 .cheque-print-table td { padding:.8mm .6mm !important; font-size:7.8px !important; line-height:1.2 !important; }
  .print-root .guarantee-print-section { width:100% !important; box-sizing:border-box !important; min-height:11mm !important; margin:1.4mm 0 !important; padding:1.3mm 2mm !important; border:1px solid #b9a16e !important; border-right:2px solid #bd8a2d !important; font-size:9px !important; line-height:1.45 !important; break-inside:avoid !important; }
  .print-root .guarantee-print-section>b { font-size:10px !important; margin-bottom:.7mm !important; }
  .print-root .guarantee-print-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:.7mm 2mm !important; }
  .print-root .invoice-total.sale-total { display:block !important; width:100% !important; margin:1.7mm 0 1.5mm !important; padding:0 !important; }
  .print-root .invoice-total.sale-total>div { display:grid !important; width:100% !important; min-width:0 !important; box-sizing:border-box !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:1.3mm !important; padding:0 !important; border:0 !important; background:transparent !important; }
  .print-root .sale-summary-cell { display:flex !important; flex-direction:column !important; justify-content:center !important; gap:.6mm !important; min-width:0 !important; min-height:11mm !important; box-sizing:border-box !important; padding:1.1mm 2mm !important; border:1px solid #9eacc1 !important; border-right:2px solid #bd8a2d !important; border-radius:1.2mm !important; background:#fbfcfe !important; text-align:right !important; }
  .print-root .sale-summary-cell span { font-size:9px !important; line-height:1.35 !important; color:#52617a !important; }
  .print-root .sale-summary-cell b { font-size:11px !important; line-height:1.4 !important; color:#172338 !important; overflow-wrap:anywhere !important; }
  .print-root .invoice-notes { display:block !important; width:100% !important; height:14mm !important; min-height:14mm !important; max-height:14mm !important; box-sizing:border-box !important; margin:1.5mm 0 0 !important; padding:1.2mm 2mm !important; border:1px solid #9eacc1 !important; border-radius:1.2mm !important; font-size:9.5px !important; line-height:1.45 !important; overflow:hidden !important; }
  .print-root .invoice-notes>b { display:block !important; font-size:10px !important; margin-bottom:.5mm !important; }
  .print-root .invoice-notes-content { min-height:8mm !important; white-space:pre-wrap !important; overflow-wrap:anywhere !important; background:repeating-linear-gradient(to bottom,transparent 0,transparent 4mm,#dce2eb 4mm,#dce2eb 4.2mm) !important; }
  .print-root .invoice-signatures { display:grid !important; grid-template-columns:1fr 1fr !important; gap:4mm !important; width:100% !important; margin:2mm 0 0 !important; padding:0 !important; break-inside:avoid !important; }
  .print-root .signature-box { position:relative !important; display:flex !important; align-items:flex-end !important; justify-content:center !important; box-sizing:border-box !important; height:18mm !important; min-height:18mm !important; padding:1.5mm 2mm !important; border:1px solid #9eacc1 !important; border-radius:1.2mm !important; background:repeating-linear-gradient(to bottom,#fff 0,#fff 5mm,#e1e6ed 5mm,#e1e6ed 5.2mm) !important; }
  .print-root .signature-box b { position:absolute !important; bottom:1.2mm !important; right:2.5mm !important; padding:0 1mm !important; background:#fff !important; font-size:9px !important; color:#34445c !important; }
  .print-root .invoice-print-footer { position:static !important; display:block !important; flex:0 0 auto !important; width:100% !important; box-sizing:border-box !important; margin:2.5mm 0 0 !important; padding:1.2mm 0 0 !important; border-top:1px solid #bd8a2d !important; break-inside:avoid !important; }
  .print-root .contract-warning { font-size:9px !important; line-height:1.45 !important; padding:1mm 1.8mm !important; margin:0 0 1mm !important; }
  .print-root .contract-terms { columns:2 !important; column-gap:5mm !important; padding:0 4mm 0 0 !important; margin:0 !important; font-size:8.7px !important; line-height:1.42 !important; color:#26354b !important; }
  .print-root .contract-terms li { margin:0 0 .65mm !important; padding-right:.3mm !important; break-inside:avoid !important; }
  .print-root .contract-ack { font-size:8.4px !important; line-height:1.4 !important; margin:1mm 0 1.2mm !important; color:#25354d !important; font-weight:700 !important; }
  .print-root .brand-contact-strip { display:grid !important; grid-template-columns:minmax(0,1fr) 25mm 25mm !important; gap:2.5mm !important; align-items:center !important; min-height:26mm !important; height:26mm !important; box-sizing:border-box !important; padding:1.5mm 2.5mm !important; background:#fff !important; border:1.3px solid #bd8a2d !important; border-radius:1.5mm !important; }
  .print-root .contact-address { display:flex !important; flex-direction:column !important; gap:.8mm !important; min-width:0 !important; }
  .print-root .contact-address b { font-size:10px !important; color:#9a6d19 !important; }
  .print-root .contact-address span { font-size:8.8px !important; line-height:1.4 !important; color:#26354b !important; }
  .print-root .social-qr { display:flex !important; align-items:center !important; justify-content:center !important; gap:.7mm !important; width:25mm !important; min-width:25mm !important; }
  .print-root .social-qr img { display:block !important; width:20mm !important; height:20mm !important; object-fit:contain !important; padding:0 !important; box-sizing:border-box !important; background:#fff !important; border:0 !important; border-radius:0 !important; image-rendering:pixelated !important; }
  .print-root .social-qr small { font-size:6.8px !important; line-height:1.1 !important; color:#59677c !important; }
  .print-root .invoice-table,.print-root .invoice-notes,.print-root .invoice-signatures,.print-root .guarantee-print-section,.print-root .brand-contact-strip { break-inside:avoid !important; page-break-inside:avoid !important; }
  .print-root.many-cheques .cheque-print-grid .cheque-print-table th,.print-root.many-cheques .cheque-print-grid .cheque-print-table td { font-size:8.2px !important; padding:.75mm .55mm !important; }
  .print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table th,.print-root.very-many-cheques .cheque-print-grid-3 .cheque-print-table td { font-size:7.2px !important; padding:.55mm .35mm !important; line-height:1.15 !important; }
}


/* v1.3.1 pagination correction: use normal document flow, not a flex-page box */
@media print {
  .print-root .invoice-paper {
    display:block !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    break-inside:auto !important;
    page-break-inside:auto !important;
  }
  .print-root .invoice-top { position:relative !important; display:block !important; height:20mm !important; min-height:20mm !important; margin-bottom:1mm !important; }
  .print-root .invoice-main { display:block !important; flex:none !important; height:auto !important; break-before:auto !important; break-after:auto !important; break-inside:auto !important; page-break-before:auto !important; page-break-after:auto !important; page-break-inside:auto !important; }
  .print-root .invoice-print-footer { display:block !important; position:static !important; margin-top:2.5mm !important; break-before:auto !important; break-after:auto !important; break-inside:avoid !important; }
  .print-root .invoice-info,.print-root .invoice-title,.print-root .invoice-subhead { break-before:auto !important; break-after:auto !important; }
  .print-root .invoice-total,.print-root .guarantee-print-section,.print-root .invoice-notes,.print-root .invoice-signatures { break-before:auto !important; break-after:auto !important; }
}

/* Small vertical balance correction to keep the standard sale invoice on one A4 sheet */
@media print{
  .print-root .invoice-notes{height:11mm!important;min-height:11mm!important;max-height:11mm!important;margin-top:1mm!important;padding:1mm 1.8mm!important}
  .print-root .invoice-notes-content{min-height:6mm!important;background:repeating-linear-gradient(to bottom,transparent 0,transparent 3.4mm,#dce2eb 3.4mm,#dce2eb 3.6mm)!important}
  .print-root .invoice-signatures{margin-top:1.2mm!important}
  .print-root .signature-box{height:16mm!important;min-height:16mm!important}
  .print-root .guarantee-print-section{min-height:9mm!important;margin:1mm 0!important;padding:1mm 1.8mm!important}
  .print-root .brand-contact-strip{height:24mm!important;min-height:24mm!important;padding:1mm 2mm!important}
  .print-root .social-qr{width:23mm!important;min-width:23mm!important}
  .print-root .social-qr img{width:19mm!important;height:19mm!important}
  .print-root .invoice-print-footer{margin-top:1.5mm!important;padding-top:.8mm!important}
}

/* v1.3.2 — rebuilt A4 invoice layout. This block intentionally overrides all legacy print rules above. */
.print-root{display:block;width:100%;margin:0 auto;padding:0;background:#fff;color:#172338;direction:rtl}
.invoice-paper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;min-height:281mm;margin:0 auto;padding:0;border:0;background:#fff;color:#172338;font-family:'Pinar',Tahoma,Arial,sans-serif;direction:rtl}
.invoice-top{direction:ltr;display:grid;grid-template-columns:25mm minmax(0,1fr) 50mm;align-items:center;column-gap:3mm;box-sizing:border-box;width:100%;height:29mm;min-height:29mm;margin:0 0 2.5mm;padding:0 0 2mm;border-bottom:1.5px solid #bd8a2d;position:relative;text-align:center}
.invoice-logo{position:static;width:23mm;height:23mm;max-width:100%;object-fit:contain;display:block;grid-column:1;grid-row:1;margin:0 auto}
.invoice-brand{position:static;grid-column:2;grid-row:1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;margin:0;transform:none;text-align:center;direction:rtl;color:#18263b;font-size:18px;font-weight:800;line-height:1.45}
.invoice-brand span{display:block;font-size:16px;color:#22334b}
.invoice-brand b{display:block;font-size:21px;color:#a87920;line-height:1.4}
.invoice-brand small{display:block;margin-top:1mm;font-size:9px;line-height:1.5;color:#6e7a8d;font-weight:500;white-space:normal}
.invoice-meta{position:static;grid-column:3;grid-row:1;align-self:stretch;display:flex;flex-direction:column;justify-content:center;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:2mm 2.5mm;background:#fffdf8;border:1px solid #d8c18d;border-right:3px solid #bd8a2d;border-radius:2mm;text-align:right;direction:rtl;line-height:1.45;color:#26344a}
.invoice-meta-title{font-size:11px;font-weight:800;color:#9b6d19;margin-bottom:1.4mm;white-space:normal}
.invoice-meta-line{display:flex;align-items:center;justify-content:space-between;gap:2mm;padding-top:.8mm;margin-top:.6mm;border-top:1px solid #eadfca;white-space:nowrap}
.invoice-meta-line span{font-size:8.5px;color:#68758a}
.invoice-meta-line .invoice-meta-no{font-size:18px!important;font-weight:900;color:#172338!important;letter-spacing:.5px;direction:ltr;unicode-bidi:plaintext}
.invoice-meta-line .invoice-meta-date{font-size:13.5px!important;font-weight:800;color:#8d681e!important;direction:rtl}
.invoice-main{display:block;flex:0 0 auto;width:100%;min-width:0;margin:0;padding:0;overflow:visible}
.invoice-title{display:none!important}
.invoice-info{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.8mm;margin:0 0 2.7mm;padding:0;direction:rtl}
.invoice-info-cell{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;gap:.8mm;min-width:0;min-height:13mm;padding:1.5mm 2mm;border:1px solid #b9c5d6;border-right:2px solid #bd8a2d;border-radius:1.3mm;background:#fbfcff;line-height:1.4;overflow:hidden}
.invoice-info-cell span{font-size:8.5px;color:#6f7b8d;white-space:nowrap}
.invoice-info-cell b{display:block;min-width:0;font-size:10px;font-weight:700;color:#19283e;line-height:1.45;overflow-wrap:anywhere;word-break:break-word;white-space:normal}
.invoice-table{width:100%;max-width:100%;margin:0 0 2.5mm;border-collapse:collapse;table-layout:fixed;direction:rtl}
.invoice-table.product-table .col-row{width:7%}
.invoice-table.product-table .col-description{width:36%}
.invoice-table.product-table .col-code{width:12%}
.invoice-table.product-table .col-qty{width:8%}
.invoice-table.product-table .col-unit{width:18%}
.invoice-table.product-table .col-sum{width:19%}
.invoice-table th,.invoice-table td{box-sizing:border-box;border:1px solid #bdc9d9;padding:1.7mm 1.4mm;text-align:center;vertical-align:middle;font-size:9.3px;line-height:1.5;color:#1d2b40;background:#fff;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.invoice-table th{background:#edf2f8;color:#263852;font-size:9.2px;font-weight:800;line-height:1.45}
.invoice-table tbody tr:nth-child(even) td{background:#fafbfd}
.invoice-table td.product-description{text-align:right;padding-right:2mm;white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-break:anywhere}
.invoice-table td.product-description strong{display:block;font-size:9.5px;font-weight:700;line-height:1.5;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.invoice-table td.product-description small{display:block;margin-top:.6mm;font-size:8px;line-height:1.45;color:#748196;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.invoice-subhead{margin:1.7mm 0 1mm;font-size:10.5px;font-weight:800;line-height:1.5;color:#26364e}
.cheque-print-table{width:100%;max-width:100%;margin:0 0 2mm;table-layout:fixed}
.cheque-print-table th,.cheque-print-table td{padding:1.25mm 1.1mm;font-size:9px;line-height:1.4}
.cheque-print-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2.2mm;align-items:start;width:100%;break-inside:avoid}
.cheque-print-grid .cheque-print-table{margin:0}
.cheque-print-grid-3{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5mm}
.cheque-print-grid-3 .cheque-print-table th,.cheque-print-grid-3 .cheque-print-table td{padding:.9mm .6mm;font-size:7.5px;line-height:1.3}
.guarantee-print-section{box-sizing:border-box;width:100%;min-width:0;margin:1.8mm 0;padding:1.8mm 2.5mm;border:1px solid #c9b17d;border-right:2.5px solid #bd8a2d;border-radius:1.5mm;background:#fffdf8;font-size:9px;line-height:1.55;break-inside:avoid}
.guarantee-print-section>b{display:block;margin-bottom:1mm;color:#8c661d;font-size:10px}
.guarantee-print-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1mm 3mm}
.guarantee-print-grid span{min-width:0;overflow-wrap:anywhere}
.invoice-total.sale-total{display:block;width:100%;margin:2mm 0;padding:0}
.invoice-total.sale-total>div,.sale-summary-grid{display:grid;width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.7mm;box-sizing:border-box;padding:0;border:0;background:transparent}
.sale-summary-cell{display:flex;flex-direction:column;justify-content:center;gap:.7mm;box-sizing:border-box;min-width:0;min-height:12mm;padding:1.5mm 2mm;border:1px solid #aebbd0;border-right:2px solid #bd8a2d;border-radius:1.2mm;background:#fbfcff;text-align:right}
.sale-summary-cell span{font-size:8.7px;line-height:1.4;color:#6b778b}
.sale-summary-cell b{font-size:10.3px;line-height:1.45;color:#172338;overflow-wrap:anywhere;word-break:break-word}
.invoice-total.purchase-total{display:flex;justify-content:flex-start;margin:2mm 0}
.invoice-total.purchase-total>div{display:grid;grid-template-columns:auto auto;gap:1mm 4mm;min-width:65mm;padding:2mm 3mm;border:1px solid #b9c5d6;border-radius:1.5mm;font-size:9px}
.invoice-notes{box-sizing:border-box;width:100%;min-height:13mm;height:auto;max-height:none;margin:2mm 0 0;padding:1.8mm 2.4mm;border:1px solid #aebbd0;border-radius:1.3mm;background:#fff;font-size:9px;line-height:1.6;overflow:visible}
.invoice-notes>b{display:none!important}
.invoice-notes-content{min-height:0;white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.7;color:#344258;background:none}
.invoice-signatures{display:grid;grid-template-columns:1fr 1fr;gap:4mm;width:100%;margin:2.5mm 0 0;padding:0;break-inside:avoid}
.signature-box{position:relative;box-sizing:border-box;display:flex;align-items:flex-end;justify-content:center;height:16mm;min-height:16mm;padding:1.5mm 2mm;border:1px solid #b8c4d5;border-radius:1.3mm;background:repeating-linear-gradient(to bottom,#fff 0,#fff 4.8mm,#e0e6ef 4.8mm,#e0e6ef 5mm)}
.signature-box b{position:absolute;bottom:1.2mm;right:2.5mm;padding:0 1mm;background:#fff;font-size:8.8px;color:#35445b}
.invoice-print-footer{display:block;box-sizing:border-box;width:100%;margin-top:auto;padding:0;border:0;background:#fff;color:#303e53}
.invoice-print-footer.has-contract{margin-top:auto}
.contract-warning{box-sizing:border-box;margin:0 0 1.3mm;padding:1.1mm 2mm;border:1px solid #bd8a2d;border-radius:1mm;background:#fffaf0;color:#5b431b;font-size:8.5px;line-height:1.45}
.contract-terms{columns:2;column-gap:5mm;margin:0;padding:0 4mm 0 0;color:#344258;font-size:8.3px;line-height:1.48}
.contract-terms li{margin:0 0 .8mm;padding-right:.5mm;break-inside:avoid;overflow-wrap:anywhere}
.contract-ack{margin:1mm 0 1.7mm;font-size:8px;font-weight:700;line-height:1.45;color:#293950}
.brand-contact-strip{display:grid;grid-template-columns:minmax(0,1fr) 30mm 30mm;gap:3mm;align-items:center;box-sizing:border-box;width:100%;min-height:33mm;padding:1.8mm 2.5mm;border:1.3px solid #bd8a2d;border-radius:1.5mm;background:#fff;color:#26354b}
.contact-address{display:flex;flex-direction:column;gap:1mm;min-width:0;direction:rtl}
.contact-address b{font-size:10.5px;color:#936818}
.contact-address span{font-size:8.8px;line-height:1.55;color:#35445b;overflow-wrap:anywhere}
.contact-phones{direction:rtl;font-weight:700}
.social-qr{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.7mm;box-sizing:border-box;width:30mm;min-width:0;margin:0;padding:0;border:0;background:transparent}
.social-qr img{display:block;width:27mm;height:27mm;max-width:100%;object-fit:contain;margin:0;padding:0;border:0;border-radius:0;background:transparent;image-rendering:auto}
.social-qr figcaption{font-family:Arial,sans-serif;font-size:6.9px;line-height:1.1;color:#5c687a;direction:ltr;white-space:nowrap}

@media screen{
 .print-root{max-width:210mm;padding:8mm;margin:18px auto;background:#e8ebf0;box-shadow:0 5px 22px #17233820}
 .invoice-paper{background:#fff;padding:0 0 0;min-height:281mm;box-shadow:0 0 0 1px #d7dde7}
}
@media print{
 @page{size:A4 portrait;margin:8mm 9mm 8mm}
 html,body{width:auto!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important;color:#172338!important;font-family:'Pinar',Tahoma,Arial,sans-serif!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
 body>*:not(.print-root){display:none!important}
 body>.print-root{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:#fff!important;box-shadow:none!important}
 .print-root .invoice-paper{display:flex!important;flex-direction:column!important;width:100%!important;min-height:281mm!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;overflow:visible!important;box-shadow:none!important;break-inside:auto!important;page-break-inside:auto!important}
 .print-root .invoice-top{display:grid!important;grid-template-columns:25mm minmax(0,1fr) 50mm!important;height:29mm!important;min-height:29mm!important;margin:0 0 2.5mm!important;padding:0 0 2mm!important;break-inside:avoid!important}
 .print-root .invoice-logo{position:static!important;width:23mm!important;height:23mm!important;margin:0 auto!important}
 .print-root .invoice-brand{position:static!important;transform:none!important}
 .print-root .invoice-meta{position:static!important;width:100%!important;height:auto!important;padding:2mm 2.5mm!important}
 .print-root .invoice-main{display:block!important;flex:0 0 auto!important;width:100%!important;overflow:visible!important;break-inside:auto!important}
 .print-root .invoice-info,.print-root .product-table,.print-root .guarantee-print-section,.print-root .invoice-total,.print-root .invoice-notes,.print-root .invoice-signatures{break-inside:avoid!important;page-break-inside:avoid!important}
 .print-root .product-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
 .print-root .product-table td.product-description,.print-root .product-table td.product-description strong,.print-root .product-table td.product-description small{white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important}
 .print-root .invoice-print-footer{display:block!important;position:static!important;flex:0 0 auto!important;width:100%!important;margin-top:auto!important;break-inside:avoid!important;page-break-inside:avoid!important}
 .print-root .brand-contact-strip{background:#fff!important;min-height:33mm!important}
 .print-root .social-qr img{width:27mm!important;height:27mm!important;object-fit:contain!important}
 .print-root .sale-summary-cell,.print-root .invoice-info-cell,.print-root .guarantee-print-section,.print-root .signature-box,.print-root .brand-contact-strip{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
 .print-root .cheque-print-grid,.print-root .cheque-print-grid-3{break-inside:avoid!important;page-break-inside:avoid!important}
}
@media screen and (max-width:720px){.invoice-top{grid-template-columns:20mm minmax(0,1fr) 43mm;column-gap:2mm}.invoice-logo{width:19mm;height:19mm}.invoice-brand b{font-size:17px}.invoice-meta-line .invoice-meta-no{font-size:15px!important}.brand-contact-strip{grid-template-columns:minmax(0,1fr) 25mm 25mm}.social-qr{width:25mm}.social-qr img{width:22mm;height:22mm}}

/* v1.3.2 footer anchoring: standard receipts keep the brand/QR strip at the page bottom. */
@media screen, print{
 .print-root .invoice-paper{position:relative!important;display:block!important;min-height:281mm!important;height:auto!important;box-sizing:border-box!important;padding-bottom:58mm!important;overflow:visible!important}
 .print-root.purchase-invoice .invoice-paper{padding-bottom:37mm!important}
 .print-root .invoice-main{display:block!important;position:static!important;flex:none!important}
 .print-root .invoice-print-footer{position:absolute!important;left:0!important;right:0!important;bottom:0!important;display:block!important;width:100%!important;margin:0!important;padding:0!important;break-inside:avoid!important;page-break-inside:avoid!important}
 .print-root .brand-contact-strip{margin:0!important}
}
@media screen, print{
 .print-root.long-invoice .invoice-paper{position:static!important;min-height:0!important;height:auto!important;padding-bottom:0!important}
 .print-root.long-invoice .invoice-print-footer{position:static!important;margin-top:5mm!important}
}

/* Final print geometry: a fixed A4 content box with a reserved footer zone. */
@media print, screen{
 .print-root.sales-invoice .invoice-paper{display:block!important;position:relative!important;box-sizing:border-box!important;width:100%!important;height:281mm!important;min-height:281mm!important;max-height:281mm!important;padding:0!important;overflow:visible!important}
 .print-root.sales-invoice .invoice-main{display:block!important;box-sizing:border-box!important;padding:0 0 64mm!important;margin:0!important;overflow:visible!important}
 .print-root.sales-invoice .invoice-print-footer{position:absolute!important;left:0!important;right:0!important;bottom:0!important;display:block!important;box-sizing:border-box!important;width:100%!important;margin:0!important;padding:0!important}
 .print-root.sales-invoice .brand-contact-strip{height:31mm!important;min-height:31mm!important;max-height:31mm!important;box-sizing:border-box!important;padding:1mm 2mm!important;grid-template-columns:minmax(0,1fr) 27mm 27mm!important;gap:2mm!important}
 .print-root.sales-invoice .social-qr{width:27mm!important;min-width:27mm!important}
 .print-root.sales-invoice .social-qr img{width:25mm!important;height:25mm!important;max-width:25mm!important;max-height:25mm!important;object-fit:contain!important;padding:0!important;border:0!important;background:transparent!important}
 .print-root.sales-invoice .contract-warning{font-size:8px!important;line-height:1.35!important;padding:.8mm 1.5mm!important;margin:0 0 .8mm!important}
 .print-root.sales-invoice .contract-terms{font-size:7.8px!important;line-height:1.32!important;column-gap:4mm!important}
 .print-root.sales-invoice .contract-terms li{margin:0 0 .45mm!important}
 .print-root.sales-invoice .contract-ack{font-size:7.6px!important;line-height:1.3!important;margin:.7mm 0 1mm!important}
 .print-root.sales-invoice .invoice-info-cell{min-height:11mm!important;padding:1mm 1.7mm!important}
 .print-root.sales-invoice .invoice-table th,.print-root.sales-invoice .invoice-table td{padding:1.25mm 1.1mm!important}
 .print-root.sales-invoice .cheque-print-table th,.print-root.sales-invoice .cheque-print-table td{padding:.95mm .8mm!important}
 .print-root.sales-invoice .guarantee-print-section{margin:1mm 0!important;padding:1mm 1.8mm!important}
 .print-root.sales-invoice .sale-summary-cell{min-height:10mm!important;padding:1mm 1.7mm!important}
 .print-root.sales-invoice .invoice-notes{min-height:10mm!important;height:auto!important;margin-top:1mm!important;padding:1mm 1.8mm!important}
 .print-root.sales-invoice .signature-box{height:13mm!important;min-height:13mm!important}
 .print-root.purchase-invoice .invoice-paper{display:block!important;position:relative!important;box-sizing:border-box!important;width:100%!important;height:281mm!important;min-height:281mm!important;padding:0!important}
 .print-root.purchase-invoice .invoice-print-footer{position:absolute!important;left:0!important;right:0!important;bottom:0!important}
 .print-root.purchase-invoice .brand-contact-strip{height:31mm!important;min-height:31mm!important;padding:1mm 2mm!important}
 .print-root.purchase-invoice .social-qr img{width:25mm!important;height:25mm!important}
}
@media print{
 .print-root.long-invoice .invoice-paper{height:auto!important;min-height:0!important;max-height:none!important;padding:0!important}
 .print-root.long-invoice .invoice-main{padding-bottom:0!important}
 .print-root.long-invoice .invoice-print-footer{position:static!important;margin-top:5mm!important}
}
@media print{
 .print-root.sales-invoice .invoice-paper,.print-root.sales-invoice .invoice-main{break-inside:auto!important;page-break-inside:auto!important;break-before:auto!important;page-break-before:auto!important;break-after:auto!important;page-break-after:auto!important}
 .print-root.sales-invoice .invoice-signatures{break-inside:avoid!important;page-break-inside:avoid!important;margin-top:1.5mm!important}
}
/* Final pagination model: natural content flow, footer pushed to the page bottom when content fits. */
@media print{
 .print-root.sales-invoice .invoice-paper{display:flex!important;flex-direction:column!important;position:relative!important;box-sizing:border-box!important;width:100%!important;height:auto!important;min-height:281mm!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important;break-after:auto!important;page-break-after:auto!important}
 .print-root.sales-invoice .invoice-main{display:block!important;flex:0 0 auto!important;position:static!important;box-sizing:border-box!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important;break-before:auto!important;page-break-before:auto!important;break-after:auto!important;page-break-after:auto!important}
 .print-root.sales-invoice .invoice-print-footer{display:block!important;position:static!important;flex:0 0 auto!important;width:100%!important;margin-top:auto!important;padding:0!important;break-inside:avoid!important;page-break-inside:avoid!important}
 .print-root.sales-invoice .invoice-signatures{margin-top:1.5mm!important;break-inside:avoid!important;page-break-inside:avoid!important}
 .print-root.sales-invoice .brand-contact-strip{height:31mm!important;min-height:31mm!important;max-height:31mm!important;padding:1mm 2mm!important}
 .print-root.long-invoice .invoice-paper{min-height:0!important;height:auto!important}
 .print-root.long-invoice .invoice-print-footer{margin-top:5mm!important}
}

/* v1.3.2 hotfix — pin the sales contract/contact block to the A4 bottom edge. */
@media screen{
 .print-root.sales-invoice .invoice-paper{position:relative!important;display:block!important;width:100%!important;min-height:285mm!important;height:285mm!important;max-height:none!important;box-sizing:border-box!important;overflow:visible!important;padding:0!important}
 .print-root.sales-invoice .invoice-main{display:block!important;position:static!important;box-sizing:border-box!important;width:100%!important;padding:0 0 58mm!important;margin:0!important;overflow:visible!important}
 .print-root.sales-invoice .invoice-print-footer{position:absolute!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;margin:0!important;padding:0!important;break-inside:auto!important;page-break-inside:auto!important}
}
@media print{
 @page{size:A4 portrait;margin:6mm 8mm 6mm}
 html,body{margin:0!important;padding:0!important;width:auto!important;height:auto!important;overflow:visible!important}
 body>.print-root.sales-invoice{display:block!important;position:static!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:#fff!important;box-shadow:none!important;overflow:visible!important}
 body>.print-root.sales-invoice .invoice-paper{position:relative!important;display:block!important;width:100%!important;height:285mm!important;min-height:285mm!important;max-height:285mm!important;box-sizing:border-box!important;margin:0!important;padding:0!important;border:0!important;overflow:visible!important;break-inside:avoid!important;page-break-inside:avoid!important}
 body>.print-root.sales-invoice .invoice-main{display:block!important;position:static!important;width:100%!important;box-sizing:border-box!important;height:auto!important;min-height:0!important;margin:0!important;padding:0 0 58mm!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important}
 body>.print-root.sales-invoice .invoice-print-footer{display:block!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;box-sizing:border-box!important;margin:0!important;padding:0!important;background:#fff!important;break-inside:auto!important;page-break-inside:auto!important}
 body>.print-root.sales-invoice .brand-contact-strip{display:grid!important;grid-template-columns:minmax(0,1fr) 25mm 25mm!important;gap:2.5mm!important;align-items:center!important;width:100%!important;height:28mm!important;min-height:28mm!important;max-height:28mm!important;box-sizing:border-box!important;margin:0!important;padding:1mm 2mm!important;border:1.2px solid #bd8a2d!important;border-radius:1.5mm!important;background:#fff!important;overflow:visible!important}
 body>.print-root.sales-invoice .social-qr{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:25mm!important;min-width:25mm!important;height:26mm!important;min-height:26mm!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;overflow:visible!important}
 body>.print-root.sales-invoice .social-qr img{display:block!important;width:22mm!important;height:22mm!important;max-width:22mm!important;max-height:22mm!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;object-fit:contain!important}
 body>.print-root.sales-invoice .social-qr figcaption{display:block!important;margin:.3mm 0 0!important;padding:0!important;font-size:5.8px!important;line-height:1.1!important;white-space:nowrap!important}
 body>.print-root.sales-invoice .contract-warning{font-size:7.4px!important;line-height:1.3!important;margin:0 0 .7mm!important;padding:.7mm 1.3mm!important}
 body>.print-root.sales-invoice .contract-terms{columns:2!important;column-gap:4mm!important;margin:0!important;padding:0 3mm 0 0!important;font-size:7.1px!important;line-height:1.24!important}
 body>.print-root.sales-invoice .contract-terms li{margin:0 0 .35mm!important;padding-right:.2mm!important;break-inside:avoid!important}
 body>.print-root.sales-invoice .contract-ack{font-size:7px!important;line-height:1.2!important;margin:.5mm 0 .8mm!important}
 body>.print-root.sales-invoice .contact-address{gap:.4mm!important}
 body>.print-root.sales-invoice .contact-address b{font-size:9px!important}
 body>.print-root.sales-invoice .contact-address span{font-size:7.4px!important;line-height:1.35!important}
 body>.print-root.sales-invoice .invoice-table td.product-description,
 body>.print-root.sales-invoice .invoice-table td.product-description strong,
 body>.print-root.sales-invoice .invoice-table td.product-description small{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;max-width:100%!important}
 body>.print-root.sales-invoice .invoice-signatures{break-inside:avoid!important;page-break-inside:avoid!important}
 /* Very long receipts use natural pagination instead of a fixed footer overlay. */
 body>.print-root.sales-invoice.long-invoice .invoice-paper{height:auto!important;min-height:0!important;max-height:none!important;break-inside:auto!important;page-break-inside:auto!important}
 body>.print-root.sales-invoice.long-invoice .invoice-main{padding-bottom:0!important}
 body>.print-root.sales-invoice.long-invoice .invoice-print-footer{position:static!important;margin-top:5mm!important;break-inside:auto!important;page-break-inside:auto!important}
}


/* v1.3.3 — final A4 print fix: QR/contact footer anchored at the bottom without creating page 2. */
.invoice-notes-content{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;text-overflow:clip!important;line-height:1.65!important;text-align:justify!important}
@media screen{
 .print-root.sales-invoice .invoice-paper{position:relative!important;display:block!important;width:100%!important;min-height:285mm!important;height:285mm!important;max-height:none!important;box-sizing:border-box!important;overflow:visible!important;padding:0!important}
 .print-root.sales-invoice .invoice-main{display:block!important;position:static!important;box-sizing:border-box!important;width:100%!important;padding:0 0 58mm!important;margin:0!important;overflow:visible!important}
 .print-root.sales-invoice .invoice-print-footer{position:absolute!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;margin:0!important;padding:0!important;break-inside:auto!important;page-break-inside:auto!important}
}
@media print{
 @page{size:A4 portrait;margin:6mm 8mm 6mm}
 html,body{margin:0!important;padding:0!important;width:auto!important;height:auto!important;overflow:visible!important}
 body>.print-root.sales-invoice{display:block!important;position:static!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:#fff!important;box-shadow:none!important;overflow:visible!important}
 body>.print-root.sales-invoice .invoice-paper{position:relative!important;display:block!important;width:100%!important;height:285mm!important;min-height:285mm!important;max-height:285mm!important;box-sizing:border-box!important;margin:0!important;padding:0!important;border:0!important;overflow:visible!important;break-inside:avoid!important;page-break-inside:avoid!important}
 body>.print-root.sales-invoice .invoice-main{display:block!important;position:static!important;width:100%!important;box-sizing:border-box!important;height:auto!important;min-height:0!important;margin:0!important;padding:0 0 58mm!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important}
 body>.print-root.sales-invoice .invoice-print-footer{display:block!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;box-sizing:border-box!important;margin:0!important;padding:0!important;background:#fff!important;break-inside:auto!important;page-break-inside:auto!important}
 body>.print-root.sales-invoice .brand-contact-strip{display:grid!important;grid-template-columns:minmax(0,1fr) 25mm 25mm!important;gap:2.5mm!important;align-items:center!important;width:100%!important;height:28mm!important;min-height:28mm!important;max-height:28mm!important;box-sizing:border-box!important;margin:0!important;padding:1mm 2mm!important;border:1.2px solid #bd8a2d!important;border-radius:1.5mm!important;background:#fff!important;overflow:visible!important}
 body>.print-root.sales-invoice .social-qr{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:25mm!important;min-width:25mm!important;height:26mm!important;min-height:26mm!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;overflow:visible!important}
 body>.print-root.sales-invoice .social-qr img{display:block!important;width:22mm!important;height:22mm!important;max-width:22mm!important;max-height:22mm!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;object-fit:contain!important}
 body>.print-root.sales-invoice .social-qr figcaption{display:block!important;margin:.3mm 0 0!important;padding:0!important;font-size:5.8px!important;line-height:1.1!important;white-space:nowrap!important}
 body>.print-root.sales-invoice .contract-warning{font-size:7.4px!important;line-height:1.3!important;margin:0 0 .7mm!important;padding:.7mm 1.3mm!important}
 body>.print-root.sales-invoice .contract-terms{columns:2!important;column-gap:4mm!important;margin:0!important;padding:0 3mm 0 0!important;font-size:7.1px!important;line-height:1.24!important}
 body>.print-root.sales-invoice .contract-terms li{margin:0 0 .35mm!important;padding-right:.2mm!important;break-inside:avoid!important}
 body>.print-root.sales-invoice .contract-ack{font-size:7px!important;line-height:1.2!important;margin:.5mm 0 .8mm!important}
 body>.print-root.sales-invoice .contact-address{gap:.4mm!important}
 body>.print-root.sales-invoice .contact-address b{font-size:9px!important}
 body>.print-root.sales-invoice .contact-address span{font-size:7.4px!important;line-height:1.35!important}
 body>.print-root.sales-invoice .invoice-notes{height:auto!important;min-height:14mm!important;max-height:none!important;overflow:visible!important;padding:1.4mm 2mm!important}
 body>.print-root.sales-invoice .invoice-notes-content{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;height:auto!important;max-height:none!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere!important;word-break:normal!important;text-overflow:clip!important;line-height:1.65!important;text-align:justify!important}
 body>.print-root.sales-invoice .invoice-table td.product-description,
 body>.print-root.sales-invoice .invoice-table td.product-description strong,
 body>.print-root.sales-invoice .invoice-table td.product-description small{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;max-width:100%!important}
 body>.print-root.sales-invoice .invoice-signatures{break-inside:avoid!important;page-break-inside:avoid!important}
 /* Long invoices flow onto extra pages instead of shrinking text or covering rows. */
 body>.print-root.sales-invoice.long-invoice .invoice-paper{height:auto!important;min-height:0!important;max-height:none!important;break-inside:auto!important;page-break-inside:auto!important}
 body>.print-root.sales-invoice.long-invoice .invoice-main{padding-bottom:0!important}
 body>.print-root.sales-invoice.long-invoice .invoice-print-footer{position:static!important;margin-top:5mm!important;break-inside:auto!important;page-break-inside:auto!important}
}

@media print{
 body>.print-root.sales-invoice.long-invoice .invoice-paper{height:auto!important;min-height:0!important;max-height:none!important;}
 body>.print-root.sales-invoice.long-invoice .invoice-main{padding-bottom:0!important;}
 body>.print-root.sales-invoice.long-invoice .invoice-print-footer{display:flex!important;flex-direction:column!important;position:static!important;width:100%!important;min-height:273mm!important;box-sizing:border-box!important;margin:0!important;padding:0!important;break-before:page!important;page-break-before:always!important;break-inside:auto!important;page-break-inside:auto!important;}
 body>.print-root.sales-invoice.long-invoice .brand-contact-strip{margin-top:auto!important;}
}
@media print{
 body>.print-root.sales-invoice.long-invoice .invoice-print-footer{display:block!important;position:relative!important;width:100%!important;height:281mm!important;min-height:281mm!important;max-height:281mm!important;box-sizing:border-box!important;margin:0!important;padding:0!important;overflow:visible!important;break-before:page!important;page-break-before:always!important;break-inside:auto!important;page-break-inside:auto!important}
 body>.print-root.sales-invoice.long-invoice .brand-contact-strip{position:absolute!important;left:0!important;right:0!important;bottom:0!important;margin:0!important}
}


/* v1.3.4 — phone numbers are isolated LTR tokens in the requested RTL order. */
.print-root .contact-phones{
  display:flex!important;
  flex-direction:row!important;
  direction:rtl!important;
  unicode-bidi:isolate!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:nowrap!important;
  gap:2.2mm!important;
  white-space:nowrap!important;
  font-variant-numeric:tabular-nums!important;
  letter-spacing:0!important;
}
.print-root .contact-phones .contact-phone{
  display:inline-block!important;
  direction:ltr!important;
  unicode-bidi:isolate!important;
  white-space:nowrap!important;
  font-family:Arial,'Pinar',Tahoma,sans-serif!important;
  letter-spacing:.1px!important;
}
.print-root .contact-phones .contact-phone-separator{
  display:inline-block!important;
  direction:ltr!important;
  unicode-bidi:isolate!important;
  color:#bd8a2d!important;
  font-weight:700!important;
}
@media print{
  .print-root .contact-phones{gap:2mm!important;font-size:8.8px!important}
  .print-root .contact-phones .contact-phone{font-size:8.8px!important}
}



/* v1.3.5 — invoice layout follows the customer's edited PDF exactly. */
.print-root .invoice-brand{
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
  white-space:nowrap!important;min-width:0!important;gap:.8mm!important;
}
.print-root .invoice-brand-name{
  display:flex!important;flex-direction:row!important;align-items:baseline!important;justify-content:center!important;
  direction:rtl!important;white-space:nowrap!important;gap:1.1mm!important;line-height:1.2!important;
  font-size:18px!important;font-weight:800!important;color:#1d2c44!important;
}
.print-root .invoice-brand-name span{display:inline!important;color:#1e304a!important}
.print-root .invoice-brand-name b{display:inline!important;color:#a58a0b!important;font-size:18px!important}
.print-root .invoice-brand small{display:block!important;margin:0!important;font-size:8.5px!important;line-height:1.35!important;white-space:nowrap!important;color:#758196!important}
.print-root .invoice-meta{box-sizing:border-box!important;background:#fffdf8!important;border:1px solid #d8b76d!important;border-right:2px solid #c48a23!important;border-radius:0 1.5mm 1.5mm 0!important}
.print-root .invoice-meta-title{font-size:11px!important;font-weight:800!important;color:#a87519!important;line-height:1.6!important;padding-bottom:1mm!important;border-bottom:1px solid #eadfc9!important}
.print-root .invoice-meta-line{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:2mm!important;padding-top:.8mm!important;line-height:1.45!important}
.print-root .invoice-meta-line span{font-size:8px!important;color:#7d8797!important;white-space:nowrap!important}
.print-root .invoice-meta-no,.print-root .invoice-meta-date{font-size:14px!important;font-weight:800!important;color:#8b6717!important;white-space:nowrap!important}
.print-root .invoice-signatures .signature-box:first-child b{font-size:9px!important}
.print-root .invoice-signatures .signature-box:last-child b{font-size:9px!important}
.print-root .contract-terms{direction:rtl!important;text-align:justify!important}
.print-root .contract-terms li{direction:rtl!important;text-align:justify!important}
.print-root .brand-contact-strip{background:#fff!important;border:1.2px solid #c7922e!important;color:#25334a!important}
.print-root .contact-address b{font-size:11px!important;color:#a47719!important;white-space:nowrap!important}
.print-root .contact-address span{color:#45546c!important}
.print-root .contact-address .contact-phones{direction:rtl!important;justify-content:flex-start!important;gap:2.4mm!important;white-space:nowrap!important}
.print-root .contact-phones .contact-phone{font-family:Arial,sans-serif!important;font-size:9.5px!important;font-weight:800!important;color:#263750!important;direction:ltr!important;unicode-bidi:isolate!important}
.print-root .contact-phones .contact-phone-separator{color:#bd8a2d!important;font-size:10px!important}
.print-root .social-qr img{background:#fff!important;border:0!important;padding:0!important;object-fit:contain!important}

@media print{
  /* A4 coordinates match the uploaded reference: logo left, one-line wordmark center, invoice/date card right. */
  @page{size:A4 portrait;margin:5mm 8mm 5mm}
  .print-root.sales-invoice .invoice-paper{width:100%!important;height:287mm!important;min-height:287mm!important;max-height:287mm!important;padding:0!important;box-sizing:border-box!important;position:relative!important;overflow:visible!important}
  .print-root.sales-invoice .invoice-top{height:32mm!important;min-height:32mm!important;padding:0 0 2mm!important;border-bottom:1.2px solid #c7922e!important}
  .print-root.sales-invoice .invoice-logo{left:1mm!important;top:.5mm!important;width:26mm!important;height:26mm!important}
  .print-root.sales-invoice .invoice-brand{left:31mm!important;right:48mm!important;top:50%!important;transform:translateY(-50%)!important;position:absolute!important}
  .print-root.sales-invoice .invoice-brand-name{font-size:18px!important;gap:1.2mm!important}
  .print-root.sales-invoice .invoice-brand-name b{font-size:18px!important}
  .print-root.sales-invoice .invoice-brand small{font-size:8px!important}
  .print-root.sales-invoice .invoice-meta{right:1mm!important;top:.5mm!important;width:45mm!important;padding:1.8mm 2mm!important}
  .print-root.sales-invoice .invoice-meta-title{font-size:11px!important}
  .print-root.sales-invoice .invoice-meta-no,.print-root.sales-invoice .invoice-meta-date{font-size:14px!important}
  .print-root.sales-invoice .invoice-main{padding:0 0 0!important;margin:0!important}
  .print-root.sales-invoice .invoice-info{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:1mm!important;margin:1.5mm 0 2mm!important}
  .print-root.sales-invoice .invoice-info-cell{min-width:0!important;min-height:11mm!important;padding:1.3mm 1.7mm!important;box-sizing:border-box!important}
  .print-root.sales-invoice .invoice-info-cell b{overflow-wrap:anywhere!important}
  .print-root.sales-invoice .invoice-table{width:100%!important;table-layout:fixed!important;margin:1.5mm 0 2mm!important}
  .print-root.sales-invoice .product-table .col-row{width:7%!important}
  .print-root.sales-invoice .product-table .col-description{width:34%!important}
  .print-root.sales-invoice .product-table .col-code{width:12%!important}
  .print-root.sales-invoice .product-table .col-qty{width:9%!important}
  .print-root.sales-invoice .product-table .col-unit{width:19%!important}
  .print-root.sales-invoice .product-table .col-sum{width:19%!important}
  .print-root.sales-invoice .product-table th,.print-root.sales-invoice .product-table td{font-size:8.3px!important;padding:1.35mm 1mm!important;line-height:1.4!important}
  .print-root.sales-invoice .product-table td.product-description{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .print-root.sales-invoice .product-table td.product-description strong{white-space:normal!important;overflow-wrap:anywhere!important}
  .print-root.sales-invoice .product-table td.product-description small{white-space:normal!important;overflow-wrap:anywhere!important}
  .print-root.sales-invoice .invoice-subhead{font-size:9px!important;margin:1.3mm 0 .6mm!important}
  .print-root.sales-invoice .cheque-print-table{max-width:100%!important;width:100%!important;margin:1mm 0 1.5mm!important;table-layout:fixed!important}
  .print-root.sales-invoice .cheque-print-table th,.print-root.sales-invoice .cheque-print-table td{font-size:8px!important;padding:1.1mm .8mm!important;line-height:1.35!important}
  .print-root.sales-invoice .guarantee-print-section{margin:1.5mm 0!important;padding:1.6mm 2mm!important}
  .print-root.sales-invoice .sale-summary-grid{gap:1.2mm!important}
  .print-root.sales-invoice .sale-summary-cell{min-height:12mm!important;padding:1.5mm 2mm!important}
  .print-root.sales-invoice .sale-summary-cell span{font-size:8px!important}
  .print-root.sales-invoice .sale-summary-cell b{font-size:10px!important}
  .print-root.sales-invoice .invoice-notes{margin:1.5mm 0!important;padding:1.7mm 2mm!important;min-height:14mm!important}
  .print-root.sales-invoice .invoice-notes>b{font-size:9px!important}
  .print-root.sales-invoice .invoice-notes-content{font-size:8.4px!important;line-height:1.65!important}
  .print-root.sales-invoice .invoice-signatures{margin:2mm 0 0!important;gap:5mm!important;break-inside:avoid!important}
  .print-root.sales-invoice .signature-box{height:18mm!important;min-height:18mm!important;padding:1.5mm 2mm!important}
  .print-root.sales-invoice .invoice-print-footer{display:flex!important;flex-direction:column!important;position:absolute!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
  .print-root.sales-invoice .invoice-print-footer.has-contract{gap:1.1mm!important}
  .print-root.sales-invoice .contract-warning{font-size:7.9px!important;line-height:1.4!important;padding:1mm 1.7mm!important;margin:0!important}
  .print-root.sales-invoice .contract-terms{columns:2!important;column-gap:5mm!important;font-size:8px!important;line-height:1.45!important;margin:0!important;padding:0 3mm!important}
  .print-root.sales-invoice .contract-terms li{margin:0 0 .65mm!important;break-inside:avoid!important}
  .print-root.sales-invoice .contract-ack{font-size:8.3px!important;line-height:1.4!important;margin:.5mm 0 1mm!important}
  .print-root.sales-invoice .brand-contact-strip{display:grid!important;grid-template-columns:minmax(0,1fr) 27mm 27mm!important;gap:2.5mm!important;align-items:center!important;width:100%!important;height:33mm!important;min-height:33mm!important;max-height:33mm!important;margin:0!important;padding:1.2mm 2.5mm!important;box-sizing:border-box!important;border:1.2px solid #c7922e!important;border-radius:2mm!important;background:#fff!important}
  .print-root.sales-invoice .contact-address{gap:.7mm!important}
  .print-root.sales-invoice .contact-address b{font-size:10.5px!important}
  .print-root.sales-invoice .contact-address span{font-size:8px!important;line-height:1.45!important}
  .print-root.sales-invoice .contact-phones{gap:2mm!important}
  .print-root.sales-invoice .contact-phones .contact-phone{font-size:9px!important}
  .print-root.sales-invoice .social-qr{width:27mm!important;min-width:27mm!important;height:29mm!important;min-height:29mm!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
  .print-root.sales-invoice .social-qr img{width:24mm!important;height:24mm!important;max-width:24mm!important;max-height:24mm!important;object-fit:contain!important;border:0!important;padding:0!important;background:#fff!important}
  .print-root.sales-invoice .social-qr figcaption{font-size:6px!important;line-height:1.2!important;margin:.3mm 0 0!important;color:#59677a!important}
  .print-root.sales-invoice .invoice-paper,.print-root.sales-invoice .invoice-main{break-inside:avoid!important;page-break-inside:avoid!important}
}


/* v1.3.6 — sales agreement reference and final invoice header alignment */
.contract-number-field{margin-top:12px;max-width:420px}
.contract-number-field .field input{border-color:#c9ad70;background:#fffdf8}
.contract-number-field .help{line-height:1.7}
@media(max-width:560px){.contract-number-field{max-width:none}}
@media print{
  .print-root .invoice-top{display:grid!important;grid-template-columns:39mm minmax(0,1fr) 39mm!important;grid-template-areas:"logo brand meta"!important;direction:ltr!important;align-items:center!important;gap:2mm!important;position:relative!important;width:100%!important;height:31mm!important;min-height:31mm!important;max-height:31mm!important;padding:0 0 2mm!important;box-sizing:border-box!important;border-bottom:1.2px solid #c7922e!important}
  .print-root .invoice-logo{grid-area:logo!important;position:static!important;left:auto!important;right:auto!important;top:auto!important;transform:none!important;width:25mm!important;height:25mm!important;max-width:25mm!important;max-height:25mm!important;margin:0 auto!important;object-fit:contain!important}
  .print-root .invoice-brand{grid-area:brand!important;position:static!important;left:auto!important;right:auto!important;top:auto!important;transform:none!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;direction:rtl!important;width:100%!important;min-width:0!important;margin:0!important;white-space:nowrap!important}
  .print-root .invoice-brand-name{display:flex!important;align-items:center!important;justify-content:center!important;gap:1.2mm!important;white-space:nowrap!important;direction:rtl!important;line-height:1.35!important;font-size:17px!important}
  .print-root .invoice-brand-name span,.print-root .invoice-brand-name b{display:inline!important;font-size:17px!important;white-space:nowrap!important}
  .print-root .invoice-brand small{display:block!important;text-align:center!important;white-space:nowrap!important;font-size:7.7px!important;line-height:1.35!important;margin-top:1mm!important}
  .print-root .invoice-meta{grid-area:meta!important;position:static!important;left:auto!important;right:auto!important;top:auto!important;transform:none!important;width:39mm!important;max-width:39mm!important;min-width:0!important;margin:0!important;padding:1.5mm 1.7mm!important;box-sizing:border-box!important;direction:rtl!important;align-self:center!important}
  .print-root .invoice-meta-title{font-size:11px!important;white-space:nowrap!important;text-align:center!important}
  .print-root .invoice-meta-line{gap:1mm!important}
  .print-root .invoice-meta-no,.print-root .invoice-meta-date{font-size:14px!important}
}

/* Higher-specificity final print override for the three-part header. */
@media print{
  .print-root.sales-invoice .invoice-brand{grid-area:brand!important;position:static!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;margin:0!important;text-align:center!important;direction:rtl!important;}
  .print-root.sales-invoice .invoice-brand-name{position:static!important;width:100%!important;display:flex!important;justify-content:center!important;align-items:center!important;text-align:center!important;}
}


/* v1.3.7 — Pinar family is now loaded from the embedded Medium/SemiBold files above. */
:root{
  --bg:#f3f6fb;
  --surface:#ffffff;
  --surface-2:#f7f9fc;
  --ink:#17263d;
  --muted:#68778d;
  --line:#dce3ed;
  --accent:#b98324;
  --accent-2:#e1b657;
  --accent-soft:#fbf3e3;
  --nav:#101d31;
  --nav-2:#1a2e49;
  --green:#218b69;
  --green-soft:#e5f5ee;
  --blue:#356fbb;
  --blue-soft:#eaf2fc;
  --red:#c34f4f;
  --red-soft:#fff0ef;
  --amber:#a96b17;
  --amber-soft:#fff5df;
  font-family:'Pinar',Tahoma,Arial,sans-serif;
}
html,body,button,input,select,textarea{font-family:'Pinar',Tahoma,Arial,sans-serif}
html{font-size:16px}
body{font-size:15px;line-height:1.75;color:var(--ink);background:var(--bg)}
.page-content{padding:30px 38px 42px}
.page-head{gap:22px;margin-bottom:25px}
.page-head h1{font-size:26px!important;line-height:1.5!important;color:#172b47!important;letter-spacing:0!important}
.page-head p,.page-head .subtitle{font-size:14px!important;line-height:1.85!important;color:#65758d!important}
.section-title,.panel-head h2,.panel-head h3{font-size:16px!important;line-height:1.6!important;color:#203651!important}
.panel{border:1px solid #dce4ee!important;box-shadow:0 8px 24px rgba(25,48,78,.055)!important;border-radius:16px!important;background:#fff!important}
.panel-head{min-height:58px;padding:16px 19px!important;border-bottom:1px solid #e4e9f1!important;background:linear-gradient(180deg,#fff,#fbfcfe)!important}
.nav-caption{font-size:11px!important;color:#90a2ba!important}
.nav-item{font-size:14px!important;line-height:1.6!important;min-height:48px!important;padding:12px 14px!important;gap:13px!important}
.nav-item.active{background:linear-gradient(100deg,#bd8a2d38,#bd8a2d12)!important;color:#ffcf7a!important;box-shadow:inset -3px 0 #e2b657!important}
.nav-item:hover{background:#ffffff14!important;color:#fff!important}
.side-brand strong{font-size:15px!important}
.side-brand small{font-size:11px!important}
.side-user-info strong{font-size:13px!important}
.side-user-info small{font-size:11px!important}
.help-card strong{font-size:12px!important}
.help-card small{font-size:10px!important}
.breadcrumb{font-size:13px!important}
.breadcrumb strong{font-size:14px!important}
.today-chip{font-size:13px!important;height:39px!important}
.topbar{height:82px!important;padding-inline:38px!important}
.app-footer{font-size:11px!important}
.table-wrap{border-color:#d6e0ec!important;border-radius:13px!important}
.table-wrap th{font-size:13px!important;line-height:1.65!important;padding:14px 12px!important;background:#edf3fa!important;color:#344862!important;border-color:#d4deea!important}
.table-wrap td{font-size:14px!important;line-height:1.75!important;padding:13px 12px!important;color:#26374f!important;border-color:#e1e7ef!important}
.table-wrap tbody tr:nth-child(even){background:#f8fafd!important}
.table-wrap tbody tr:hover{background:#f0f6fd!important}
.field label,.stack-form label{font-size:14px!important;line-height:1.8!important;color:#34455d!important}
.field input:not([type=hidden]),.field select,.field textarea,.stack-form input{font-size:15px!important;min-height:49px!important;border:1.6px solid #c8d4e2!important;border-radius:11px!important;color:#1d2e47!important;background:#fff!important}
.field textarea{padding:11px 14px!important;line-height:1.8!important}
.field .help,.form-note,.form-hint,.help-text{font-size:12.5px!important;line-height:1.85!important;color:#687991!important}
.btn{font-size:14px!important;min-height:42px!important;padding:11px 17px!important}
.btn-small{font-size:12.5px!important;min-height:35px!important;padding:8px 12px!important}
.search-input,.filter-select,.toolbar input,.toolbar select{font-size:14px!important;min-height:44px!important;border:1.5px solid #c7d4e3!important;color:#243750!important}
.badge,.status-badge,.pill{font-size:12px!important;font-weight:700!important}
.stat-card{border:1px solid #dae3ee!important;background:linear-gradient(145deg,#fff,#f8fbff)!important;box-shadow:0 7px 18px rgba(30,55,85,.05)!important}
.stat-card .stat-label,.stat-card small{font-size:12.5px!important;color:#65758b!important}
.stat-card .stat-value,.stat-card strong{font-size:21px!important;color:#1d3555!important}
.chart-total small,.chart-footnote,.history-bar-column small{font-size:11px!important}
.activity-stat small,.activity-user-head small,.notification-copy small{font-size:11.5px!important}
.activity-stat b,.notification-copy strong{font-size:14px!important}
.toast{font-size:14px!important;line-height:1.7!important}
.modal{border:1px solid #ced9e6!important;box-shadow:0 25px 75px rgba(12,28,48,.24)!important}
.modal-head h3{font-size:19px!important}
.modal-head p,.modal-subtitle{font-size:13px!important}
.modal .field label{font-size:14px!important}
.modal .field input:not([type=hidden]),.modal .field select,.modal .field textarea{font-size:15px!important;min-height:49px!important}
.modal .field .help{font-size:12px!important}
.form-section-head strong{font-size:15px!important}

/* Invoice print: content may shrink by density tier, but no row or footer is hidden. */
@media print{
  @page{size:A4 portrait;margin:5mm 6mm 5mm}
  html,body{margin:0!important;padding:0!important;width:auto!important;min-width:0!important;background:#fff!important;color:#17263d!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  body>*:not(.print-root){display:none!important}
  body>.print-root{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:#fff!important;box-shadow:none!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-paper{
    display:flex!important;flex-direction:column!important;position:relative!important;
    width:100%!important;min-width:0!important;min-height:286mm!important;height:auto!important;max-height:none!important;
    margin:0!important;padding:0!important;border:0!important;overflow:visible!important;zoom:1!important;
    break-inside:auto!important;page-break-inside:auto!important;
  }
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-top{flex:0 0 27mm!important;height:27mm!important;min-height:27mm!important;max-height:27mm!important;margin:0 0 1.5mm!important;break-inside:avoid!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-main{display:block!important;position:static!important;flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-info,
  body>.print-root.sales-invoice:not(.long-invoice) .product-table tr,
  body>.print-root.sales-invoice:not(.long-invoice) .guarantee-print-section,
  body>.print-root.sales-invoice:not(.long-invoice) .sale-summary-cell,
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-notes,
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-signatures{break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice:not(.long-invoice) .product-table{width:100%!important;max-width:100%!important;table-layout:fixed!important;break-inside:auto!important;margin:1mm 0 1.5mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .product-table thead{display:table-header-group!important}
  body>.print-root.sales-invoice:not(.long-invoice) .product-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice:not(.long-invoice) .product-table th,
  body>.print-root.sales-invoice:not(.long-invoice) .product-table td{font-size:8.2px!important;line-height:1.32!important;padding:1.05mm .8mm!important;overflow-wrap:anywhere!important}
  body>.print-root.sales-invoice:not(.long-invoice) .product-table td.product-description,
  body>.print-root.sales-invoice:not(.long-invoice) .product-table td.product-description strong,
  body>.print-root.sales-invoice:not(.long-invoice) .product-table td.product-description small{white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-subhead{font-size:9px!important;margin:1mm 0 .5mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .cheque-print-table{width:100%!important;max-width:100%!important;table-layout:fixed!important;margin:.6mm 0 1mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .cheque-print-table th,
  body>.print-root.sales-invoice:not(.long-invoice) .cheque-print-table td{font-size:7.8px!important;line-height:1.2!important;padding:.7mm .55mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .cheque-print-grid{gap:1.5mm!important;break-inside:avoid!important}
  body>.print-root.sales-invoice:not(.long-invoice) .guarantee-print-section{margin:1mm 0!important;padding:1.2mm 1.8mm!important;font-size:8px!important;line-height:1.35!important}
  body>.print-root.sales-invoice:not(.long-invoice) .guarantee-print-section>b{font-size:8.7px!important;margin-bottom:.6mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .guarantee-print-grid{gap:.5mm 2mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-total.sale-total{margin:1mm 0!important;padding:0!important}
  body>.print-root.sales-invoice:not(.long-invoice) .sale-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .sale-summary-cell{min-height:9.5mm!important;padding:1mm 1.5mm!important;gap:.4mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .sale-summary-cell span{font-size:7.5px!important;line-height:1.2!important}
  body>.print-root.sales-invoice:not(.long-invoice) .sale-summary-cell b{font-size:9px!important;line-height:1.25!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-notes{height:auto!important;min-height:9mm!important;max-height:none!important;margin:1mm 0!important;padding:1.2mm 1.7mm!important;overflow:visible!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-notes>b{font-size:8px!important;margin:0 0 .5mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-notes-content{font-size:7.7px!important;line-height:1.4!important;white-space:normal!important;background:none!important;min-height:0!important;overflow:visible!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-signatures{grid-template-columns:1fr 1fr!important;gap:3mm!important;margin:1.5mm 0 0!important}
  body>.print-root.sales-invoice:not(.long-invoice) .signature-box{position:relative!important;display:flex!important;align-items:flex-end!important;justify-content:flex-start!important;height:15mm!important;min-height:15mm!important;padding:1mm 2mm!important;background:#fff!important;background-image:none!important;border:1px solid #a9b7c9!important;border-radius:1.2mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .signature-box:before,
  body>.print-root.sales-invoice:not(.long-invoice) .signature-box:after{display:none!important;content:none!important;background:none!important;border:0!important}
  body>.print-root.sales-invoice:not(.long-invoice) .signature-box b{position:static!important;display:inline-block!important;margin:0!important;padding:0!important;background:transparent!important;font-size:8.5px!important;color:#34445c!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-print-footer{position:static!important;display:flex!important;flex-direction:column!important;flex:0 0 auto!important;width:100%!important;margin-top:auto!important;padding:0!important;border:0!important;break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-print-footer.has-contract{gap:.7mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-warning{font-size:8px!important;line-height:1.35!important;padding:.8mm 1.3mm!important;margin:0!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-terms{columns:2!important;column-gap:4mm!important;margin:0!important;padding:0 3mm!important;font-size:8.4px!important;line-height:1.42!important;color:#26354b!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-terms li{margin:0 0 .5mm!important;padding:0!important;break-inside:avoid!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-ack{font-size:8.3px!important;line-height:1.35!important;margin:.5mm 0 .6mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .brand-contact-strip{display:grid!important;grid-template-columns:minmax(0,1fr) 27mm 27mm!important;gap:2.5mm!important;width:100%!important;min-height:29mm!important;height:29mm!important;max-height:29mm!important;margin:0!important;padding:1mm 2mm!important;box-sizing:border-box!important;border:1.2px solid #bd8a2d!important;border-radius:1.5mm!important;background:#fff!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contact-address{gap:.5mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contact-address b{font-size:9.5px!important;color:#9b6e1b!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contact-address span{font-size:7.4px!important;line-height:1.35!important;color:#34445a!important}
  body>.print-root.sales-invoice:not(.long-invoice) .social-qr{display:flex!important;width:27mm!important;height:27mm!important;min-width:27mm!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
  body>.print-root.sales-invoice:not(.long-invoice) .social-qr img{display:block!important;width:23mm!important;height:23mm!important;max-width:23mm!important;max-height:23mm!important;padding:0!important;margin:0!important;border:0!important;background:#fff!important;object-fit:contain!important}
  body>.print-root.sales-invoice:not(.long-invoice) .social-qr figcaption{display:block!important;font-size:5.8px!important;line-height:1.1!important;margin:.2mm 0 0!important;color:#65738a!important}

  /* Smaller tables for a moderately dense one-page invoice. */
  body>.print-root.sales-invoice.invoice-compact:not(.long-invoice) .product-table th,
  body>.print-root.sales-invoice.invoice-compact:not(.long-invoice) .product-table td{font-size:7.5px!important;padding:.8mm .6mm!important;line-height:1.2!important}
  body>.print-root.sales-invoice.invoice-compact:not(.long-invoice) .cheque-print-table th,
  body>.print-root.sales-invoice.invoice-compact:not(.long-invoice) .cheque-print-table td{font-size:7px!important;padding:.55mm .4mm!important;line-height:1.12!important}
  body>.print-root.sales-invoice.invoice-compact:not(.long-invoice) .sale-summary-cell{min-height:8.5mm!important}
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .invoice-top{height:24mm!important;min-height:24mm!important;max-height:24mm!important}
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .invoice-info-cell{min-height:8.5mm!important;padding:.7mm 1mm!important}
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .product-table th,
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .product-table td{font-size:6.8px!important;padding:.55mm .4mm!important;line-height:1.12!important}
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .cheque-print-table th,
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .cheque-print-table td{font-size:6.5px!important;padding:.4mm .3mm!important;line-height:1.05!important}
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .sale-summary-cell{min-height:7.8mm!important;padding:.6mm 1mm!important}
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .sale-summary-cell span{font-size:6.8px!important}
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .sale-summary-cell b{font-size:8px!important}

  /* More than the one-page capacity: all item rows flow across pages; terms + QR get a dedicated final page. */
  body>.print-root.sales-invoice.long-invoice .invoice-paper{display:block!important;position:static!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice.long-invoice .invoice-main{display:block!important;position:static!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice.long-invoice .invoice-top{break-inside:avoid!important}
  body>.print-root.sales-invoice.long-invoice .invoice-table{break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice.long-invoice .invoice-table thead{display:table-header-group!important}
  body>.print-root.sales-invoice.long-invoice .invoice-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice.long-invoice .product-table th,
  body>.print-root.sales-invoice.long-invoice .product-table td{font-size:8px!important;padding:1mm .7mm!important;line-height:1.25!important}
  body>.print-root.sales-invoice.long-invoice .invoice-print-footer{display:flex!important;flex-direction:column!important;position:relative!important;width:100%!important;height:281mm!important;min-height:281mm!important;max-height:281mm!important;box-sizing:border-box!important;margin:0!important;padding:0!important;overflow:visible!important;break-before:page!important;page-break-before:always!important;break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice.long-invoice .brand-contact-strip{position:absolute!important;left:0!important;right:0!important;bottom:0!important;margin:0!important}
  body>.print-root.sales-invoice.long-invoice .contract-warning{font-size:9px!important;line-height:1.5!important;padding:1.2mm 2mm!important}
  body>.print-root.sales-invoice.long-invoice .contract-terms{columns:2!important;font-size:9.2px!important;line-height:1.6!important;margin:1mm 0!important}
  body>.print-root.sales-invoice.long-invoice .contract-terms li{margin:0 0 1mm!important;break-inside:avoid!important}
  body>.print-root.sales-invoice.long-invoice .contract-ack{font-size:9px!important;line-height:1.5!important}

  /* Signature boxes must be blank: no artificial writing rules. */
  body>.print-root.sales-invoice .signature-box{background:#fff!important;background-image:none!important}
  body>.print-root.sales-invoice .signature-box:before,
  body>.print-root.sales-invoice .signature-box:after{display:none!important;content:none!important;background:none!important;border:0!important;box-shadow:none!important}
}

/* Restore crisp digital view for the invoice preview as well. */
@media screen{
 .print-root.sales-invoice .invoice-paper{min-height:0!important;height:auto!important;padding:0!important;overflow:visible!important}
 .print-root.sales-invoice .signature-box{background:#fff!important;background-image:none!important}
 .print-root.sales-invoice .signature-box:before,.print-root.sales-invoice .signature-box:after{display:none!important;content:none!important}
}

/* Contract clauses are deliberately larger for comfortable reading in print. */
@media print{
  body>.print-root.sales-invoice:not(.long-invoice) .contract-warning{font-size:9.2px!important;line-height:1.5!important;padding:1mm 1.5mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-terms{font-size:9.6px!important;line-height:1.52!important;column-gap:4.5mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-terms li{margin-bottom:.65mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-ack{font-size:9.3px!important;line-height:1.45!important}
  body>.print-root.sales-invoice.long-invoice .contract-warning{font-size:9.6px!important;line-height:1.55!important}
  body>.print-root.sales-invoice.long-invoice .contract-terms{font-size:10px!important;line-height:1.65!important}
  body>.print-root.sales-invoice.long-invoice .contract-ack{font-size:9.6px!important;line-height:1.5!important}
}

/* Readability pass: strengthen Pinar strokes and raise secondary labels without crowding layouts. */
:root{--muted:#53657d}
body{font-weight:500}
.page-head h1,.panel-head h2,.panel-head h3,.section-title{font-weight:700!important}
.page-head p,.page-head .subtitle{font-weight:500!important;color:#52647d!important}
.nav-item{font-weight:600!important;font-size:15px!important}
.nav-caption{font-weight:700!important}
.side-brand strong,.side-user-info strong,.help-card strong{font-weight:700!important}
.side-user-info small,.side-brand small,.help-card small{color:#aebbd0!important;font-weight:500!important}
.breadcrumb strong,.today-chip{font-weight:600!important}
.table-wrap th{font-weight:700!important;font-size:13.5px!important}
.table-wrap td{font-weight:500!important;font-size:14.5px!important;color:#1d304a!important}
.field label,.stack-form label,.modal .field label{font-weight:700!important;font-size:14.5px!important}
.field input:not([type=hidden]),.field select,.field textarea,.stack-form input{font-weight:500!important;font-size:15.5px!important}
.field .help,.form-note,.form-hint,.help-text{font-weight:500!important;color:#526780!important}
.btn{font-weight:700!important}
.stat-card .stat-label{font-size:13.5px!important;font-weight:600!important;color:#4c6079!important}
.stat-card .stat-value{font-size:22px!important;font-weight:700!important}
.stat-card .stat-foot{font-size:12.5px!important;font-weight:500!important;color:#667991!important}
.chart-total b,.activity-stat b{font-weight:700!important}
.chart-footnote,.chart-total small,.history-bar-column small{font-size:12px!important;color:#536781!important}
.panel-head .section-subtitle,.panel-head small{font-size:12px!important;color:#62748d!important}
@media(max-width:900px){
 .page-content{padding:22px 18px 30px}
 .topbar{padding-inline:18px!important}
 .nav-item{font-size:14px!important}
 .table-wrap{overflow-x:auto}
}

@media print{
  body>.print-root.sales-invoice.long-invoice.invoice-compact .product-table th,
  body>.print-root.sales-invoice.long-invoice.invoice-compact .product-table td{font-size:7.5px!important;padding:.8mm .55mm!important;line-height:1.18!important}
  body>.print-root.sales-invoice.long-invoice.invoice-dense .product-table th,
  body>.print-root.sales-invoice.long-invoice.invoice-dense .product-table td{font-size:6.8px!important;padding:.55mm .4mm!important;line-height:1.1!important}
}


/* v1.3.8 — readable cheque schedule, prominent agreement number, true A4-bottom QR footer. */
.contract-number-highlight,
.contract-number-placeholder{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  vertical-align:middle!important;min-width:20mm!important;box-sizing:border-box!important;
  padding:1mm 2.4mm!important;margin:0 .7mm!important;border:1px solid #c18a2d!important;
  border-radius:1.6mm!important;background:#fff2c9!important;color:#76500e!important;
  font-size:1.35em!important;font-weight:900!important;line-height:1.3!important;
  white-space:nowrap!important;direction:ltr!important;unicode-bidi:isolate!important;
  box-shadow:inset 0 0 0 .3mm #f7dfa2!important;
}
.contract-number-placeholder{font-size:1.05em!important;color:#987b45!important;background:#fffaf0!important;border-style:dashed!important}

@media print{
  /* 4 mm safe margin; the footer uses the full printable A4 height (289 mm). */
  @page{size:A4 portrait;margin:4mm 6mm 4mm}
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-paper{
    min-height:289mm!important;height:auto!important;max-height:none!important;
    display:flex!important;flex-direction:column!important;box-sizing:border-box!important;
  }
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-print-footer{
    position:static!important;display:flex!important;flex-direction:column!important;
    flex:0 0 auto!important;width:100%!important;margin-top:auto!important;
    padding:0!important;border:0!important;break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-print-footer.has-contract{gap:1mm!important}

  /* Cheque table is always full width; no 2/3-column mini-tables. */
  body>.print-root.sales-invoice .cheque-print-table{
    display:table!important;width:100%!important;max-width:100%!important;min-width:100%!important;
    table-layout:fixed!important;border-collapse:collapse!important;margin:1.3mm 0 1.8mm!important;
    break-inside:auto!important;page-break-inside:auto!important;
  }
  body>.print-root.sales-invoice .cheque-print-table thead{display:table-header-group!important}
  body>.print-root.sales-invoice .cheque-print-table tbody{display:table-row-group!important}
  body>.print-root.sales-invoice .cheque-print-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice .cheque-print-table th,
  body>.print-root.sales-invoice .cheque-print-table td{
    font-size:9.6px!important;line-height:1.4!important;padding:1.35mm 1.1mm!important;
    min-height:6.5mm!important;height:auto!important;vertical-align:middle!important;
    white-space:normal!important;overflow-wrap:anywhere!important;
  }
  body>.print-root.sales-invoice .invoice-subhead{font-size:10.8px!important;line-height:1.5!important;margin:1.8mm 0 .8mm!important;font-weight:800!important}

  /* Override legacy compact/dense classes so cheque text remains legible. */
  body>.print-root.sales-invoice.invoice-compact .cheque-print-table th,
  body>.print-root.sales-invoice.invoice-compact .cheque-print-table td,
  body>.print-root.sales-invoice.invoice-dense .cheque-print-table th,
  body>.print-root.sales-invoice.invoice-dense .cheque-print-table td,
  body>.print-root.sales-invoice.many-cheques .cheque-print-table th,
  body>.print-root.sales-invoice.many-cheques .cheque-print-table td,
  body>.print-root.sales-invoice.very-many-cheques .cheque-print-table th,
  body>.print-root.sales-invoice.very-many-cheques .cheque-print-table td{
    font-size:9.2px!important;line-height:1.35!important;padding:1.15mm .9mm!important;height:auto!important;
  }

  /* Contract paragraph and clauses are noticeably larger, including final-page layouts. */
  body>.print-root.sales-invoice .contract-warning{font-size:10.2px!important;line-height:1.6!important;padding:1.25mm 2mm!important;margin:0 0 1.4mm!important}
  body>.print-root.sales-invoice .contract-terms{columns:2!important;column-gap:5mm!important;font-size:10.8px!important;line-height:1.62!important;margin:0!important;padding:0 4mm 0 0!important;color:#20324b!important}
  body>.print-root.sales-invoice .contract-terms li{font-size:inherit!important;line-height:inherit!important;margin:0 0 1.05mm!important;padding:0 .5mm 0 0!important;break-inside:avoid!important}
  body>.print-root.sales-invoice .contract-ack{font-size:10.5px!important;line-height:1.55!important;margin:1.4mm 0 1.5mm!important;font-weight:800!important;color:#1d3049!important}
  body>.print-root.sales-invoice .invoice-notes-content{font-size:9.2px!important;line-height:1.65!important}
  body>.print-root.sales-invoice .contract-number-highlight{font-size:1.48em!important;min-width:23mm!important;padding:1.1mm 2.8mm!important;border-width:1.2px!important;background:#ffedb3!important;color:#654300!important;box-shadow:inset 0 0 0 .45mm #f5d782!important}
  body>.print-root.sales-invoice .contract-number-placeholder{font-size:1.1em!important}

  /* For multi-page invoices, the terms stay at the top of their final page and the QR/contact card is pushed to the physical bottom of that A4 page. */
  body>.print-root.sales-invoice.long-invoice .invoice-print-footer{
    display:flex!important;flex-direction:column!important;justify-content:flex-start!important;
    position:relative!important;width:100%!important;height:289mm!important;min-height:289mm!important;max-height:none!important;
    box-sizing:border-box!important;margin:0!important;padding:0!important;overflow:visible!important;
    break-before:page!important;page-break-before:always!important;break-inside:auto!important;page-break-inside:auto!important;
  }
  body>.print-root.sales-invoice.long-invoice .brand-contact-strip{
    position:static!important;left:auto!important;right:auto!important;bottom:auto!important;
    flex:0 0 auto!important;margin-top:auto!important;width:100%!important;
  }
}

/* v1.3.8 final cascade: override the earlier compact tiers and align the QR card to the lower print-safe edge. */
@media print{
  @page{size:A4 portrait;margin:4mm 6mm 2mm}

  body>.print-root.sales-invoice:not(.long-invoice) .invoice-paper{
    min-height:291mm!important;height:auto!important;max-height:none!important;
  }
  body>.print-root.sales-invoice:not(.long-invoice) .invoice-print-footer{
    display:flex!important;flex-direction:column!important;position:static!important;
    flex:0 0 auto!important;width:100%!important;margin-top:auto!important;
    padding:0!important;border:0!important;break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.sales-invoice.long-invoice .invoice-print-footer{
    display:flex!important;flex-direction:column!important;justify-content:flex-start!important;
    position:relative!important;width:100%!important;height:291mm!important;min-height:291mm!important;max-height:none!important;
    box-sizing:border-box!important;margin:0!important;padding:0!important;overflow:visible!important;
    break-before:page!important;page-break-before:always!important;break-inside:auto!important;page-break-inside:auto!important;
  }
  body>.print-root.sales-invoice.long-invoice .brand-contact-strip{
    position:static!important;left:auto!important;right:auto!important;bottom:auto!important;
    flex:0 0 auto!important;margin-top:auto!important;
  }
  body>.print-root.sales-invoice .brand-contact-strip{margin-bottom:0!important}

  /* One readable, full-width cheque table, even when compact/dense flags are present. */
  body>.print-root.sales-invoice:not(.long-invoice) .cheque-print-table th,
  body>.print-root.sales-invoice:not(.long-invoice) .cheque-print-table td,
  body>.print-root.sales-invoice.invoice-compact:not(.long-invoice) .cheque-print-table th,
  body>.print-root.sales-invoice.invoice-compact:not(.long-invoice) .cheque-print-table td,
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .cheque-print-table th,
  body>.print-root.sales-invoice.invoice-dense:not(.long-invoice) .cheque-print-table td,
  body>.print-root.sales-invoice.many-cheques:not(.long-invoice) .cheque-print-table th,
  body>.print-root.sales-invoice.many-cheques:not(.long-invoice) .cheque-print-table td,
  body>.print-root.sales-invoice.long-invoice .cheque-print-table th,
  body>.print-root.sales-invoice.long-invoice .cheque-print-table td,
  body>.print-root.sales-invoice.very-many-cheques .cheque-print-table th,
  body>.print-root.sales-invoice.very-many-cheques .cheque-print-table td{
    font-size:10px!important;line-height:1.42!important;padding:1.35mm 1mm!important;
    height:auto!important;min-height:7mm!important;vertical-align:middle!important;
  }
  body>.print-root.sales-invoice .cheque-print-table{width:100%!important;max-width:100%!important;table-layout:fixed!important}

  /* Contract copy: larger than the previous 8–10 px compact rules. */
  body>.print-root.sales-invoice:not(.long-invoice) .contract-warning,
  body>.print-root.sales-invoice.long-invoice .contract-warning{
    font-size:10.8px!important;line-height:1.58!important;padding:1.4mm 2mm!important;margin:0 0 1.5mm!important;
  }
  body>.print-root.sales-invoice:not(.long-invoice) .contract-terms,
  body>.print-root.sales-invoice.long-invoice .contract-terms{
    columns:2!important;column-gap:5mm!important;font-size:11.2px!important;
    line-height:1.62!important;margin:0!important;padding:0 4mm 0 0!important;color:#20324b!important;
  }
  body>.print-root.sales-invoice:not(.long-invoice) .contract-terms li,
  body>.print-root.sales-invoice.long-invoice .contract-terms li{
    font-size:inherit!important;line-height:inherit!important;margin:0 0 1.15mm!important;
    padding:0 .5mm 0 0!important;break-inside:avoid!important;
  }
  body>.print-root.sales-invoice:not(.long-invoice) .contract-ack,
  body>.print-root.sales-invoice.long-invoice .contract-ack{
    font-size:10.8px!important;line-height:1.55!important;margin:1.5mm 0 1.6mm!important;
    font-weight:800!important;color:#1d3049!important;
  }
  body>.print-root.sales-invoice .contract-number-highlight{
    font-size:13.2px!important;min-width:25mm!important;min-height:8mm!important;
    padding:1.35mm 3mm!important;margin-inline:1mm!important;border:1.3px solid #b77d19!important;
    border-radius:1.8mm!important;background:#ffecad!important;color:#634200!important;
    font-weight:900!important;line-height:1.35!important;box-shadow:inset 0 0 0 .55mm #f4d47d!important;
  }
}
@media print{
  body>.print-root.sales-invoice .invoice-notes-content{background:none!important;background-image:none!important}
}


/* v1.3.9 — hard single-page A4 rule for sales invoices.
   The JS print hook measures the complete natural content and applies one
   proportional scale to the whole paper. No section is allowed to create page 2. */
@media print{
  @page{size:A4 portrait;margin:3mm!important}
  html,body{width:100%!important;height:auto!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#fff!important}
  body>.print-root.sales-invoice{
    display:block!important;position:relative!important;width:100%!important;height:291mm!important;
    max-height:291mm!important;margin:0!important;padding:0!important;overflow:hidden!important;
    break-before:avoid-page!important;break-after:avoid-page!important;page-break-before:avoid!important;page-break-after:avoid!important;
  }
  body>.print-root.sales-invoice .invoice-paper{
    display:flex!important;position:relative!important;flex-direction:column!important;align-items:stretch!important;
    box-sizing:border-box!important;width:100%!important;height:291mm!important;min-height:291mm!important;max-height:291mm!important;
    margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;zoom:var(--invoice-fit-scale,1)!important;
    break-inside:avoid!important;page-break-inside:avoid!important;break-after:avoid-page!important;page-break-after:avoid!important;
  }
  body>.print-root.sales-invoice .invoice-top{flex:0 0 auto!important;break-inside:avoid!important;break-before:avoid!important}
  body>.print-root.sales-invoice .invoice-main{display:block!important;position:static!important;flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice .invoice-print-footer,
  body>.print-root.sales-invoice.long-invoice .invoice-print-footer{
    display:flex!important;position:static!important;flex:0 0 auto!important;flex-direction:column!important;
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin: auto 0 0!important;padding:0!important;overflow:visible!important;
    break-before:avoid!important;page-break-before:avoid!important;break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.sales-invoice .brand-contact-strip{position:static!important;flex:0 0 auto!important;margin:1mm 0 0!important;break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice.long-invoice .brand-contact-strip{position:static!important;margin-top:1mm!important}
  body>.print-root.sales-invoice .invoice-table,
  body>.print-root.sales-invoice .cheque-print-table{width:100%!important;max-width:100%!important;break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice .invoice-table tr,
  body>.print-root.sales-invoice .cheque-print-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice .contract-terms{columns:2!important;column-gap:4mm!important}
  body>.print-root.sales-invoice *{animation:none!important;transition:none!important}
}


/* v1.4.0 — final one-sheet print engine. The fit routine scales the complete
   invoice paper as a single object; no footer or contract section can spill to page 2. */
@media print{
  @page{size:A4 portrait;margin:3mm}
  html,body{width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#fff!important}
  body>*:not(.print-root){display:none!important}
  body>.print-root.sales-invoice{
    display:block!important;position:relative!important;box-sizing:border-box!important;
    width:100%!important;height:291mm!important;min-height:291mm!important;max-height:291mm!important;
    margin:0!important;padding:0!important;overflow:hidden!important;
    break-before:avoid-page!important;break-after:avoid-page!important;break-inside:avoid!important;
    page-break-before:avoid!important;page-break-after:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.sales-invoice .invoice-paper{
    display:flex!important;position:relative!important;flex-direction:column!important;align-items:stretch!important;
    box-sizing:border-box!important;width:100%!important;height:auto!important;min-height:289.5mm!important;max-height:none!important;
    margin:0!important;padding:0!important;border:0!important;overflow:visible!important;
    zoom:1!important;transform:none!important;transform-origin:top left!important;
    break-before:avoid-page!important;break-after:avoid-page!important;break-inside:auto!important;
    page-break-before:avoid!important;page-break-after:avoid!important;page-break-inside:auto!important;
  }
  body>.print-root.sales-invoice .invoice-top{flex:0 0 auto!important;break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice .invoice-main{display:block!important;position:static!important;flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice .invoice-print-footer{display:flex!important;position:static!important;flex:0 0 auto!important;flex-direction:column!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:auto 0 0!important;padding:0!important;overflow:visible!important;break-before:auto!important;page-break-before:auto!important;break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice .brand-contact-strip{display:grid!important;position:static!important;flex:0 0 auto!important;width:100%!important;margin:1mm 0 0!important;break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice .invoice-table,
  body>.print-root.sales-invoice .product-table,
  body>.print-root.sales-invoice .cheque-print-table,
  body>.print-root.sales-invoice .invoice-info,
  body>.print-root.sales-invoice .invoice-total,
  body>.print-root.sales-invoice .invoice-notes,
  body>.print-root.sales-invoice .invoice-signatures,
  body>.print-root.sales-invoice .guarantee-print-section,
  body>.print-root.sales-invoice .contract-warning,
  body>.print-root.sales-invoice .contract-terms,
  body>.print-root.sales-invoice .contract-ack{break-inside:auto!important;page-break-inside:auto!important;break-before:auto!important;page-break-before:auto!important;break-after:auto!important;page-break-after:auto!important;overflow:visible!important;max-height:none!important}
  body>.print-root.sales-invoice .invoice-table thead,
  body>.print-root.sales-invoice .cheque-print-table thead{display:table-header-group!important}
  body>.print-root.sales-invoice .invoice-table tbody,
  body>.print-root.sales-invoice .cheque-print-table tbody{display:table-row-group!important}
  body>.print-root.sales-invoice .invoice-table tr,
  body>.print-root.sales-invoice .cheque-print-table tr{break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice .contract-warning{font-size:7.2px!important;line-height:1.25!important;padding:.55mm 1mm!important;margin:0 0 .55mm!important;border-width:.6px!important}
  body>.print-root.sales-invoice .contract-terms{columns:2!important;column-gap:3mm!important;font-size:8.3px!important;line-height:1.3!important;margin:0!important;padding:0 2.5mm 0 0!important}
  body>.print-root.sales-invoice .contract-terms li{font-size:inherit!important;line-height:inherit!important;margin:0 0 .4mm!important;padding:0!important}
  body>.print-root.sales-invoice .contract-ack{font-size:7.8px!important;line-height:1.3!important;margin:.5mm 0 .6mm!important}
  body>.print-root.sales-invoice .invoice-notes-content{overflow:visible!important;max-height:none!important;height:auto!important}
  body>.print-root.sales-invoice .signature-box{background:#fff!important;background-image:none!important}
  body>.print-root.sales-invoice .signature-box:before,
  body>.print-root.sales-invoice .signature-box:after{display:none!important;content:none!important}
}


/* v1.4.1 — readable clause text and additional printer-safe room for the full QR card. */
@media print{
  body>.print-root.sales-invoice:not(.long-invoice) .contract-warning,
  body>.print-root.sales-invoice.long-invoice .contract-warning{font-size:6.8px!important;line-height:1.2!important;padding:.45mm .9mm!important;margin:0 0 .45mm!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-terms,
  body>.print-root.sales-invoice.long-invoice .contract-terms{font-size:7.6px!important;line-height:1.22!important;column-gap:3mm!important;margin:0!important;padding:0 2.2mm 0 0!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-terms li,
  body>.print-root.sales-invoice.long-invoice .contract-terms li{font-size:inherit!important;line-height:inherit!important;margin:0 0 .32mm!important;padding:0!important}
  body>.print-root.sales-invoice:not(.long-invoice) .contract-ack,
  body>.print-root.sales-invoice.long-invoice .contract-ack{font-size:7.4px!important;line-height:1.2!important;margin:.35mm 0 .45mm!important}
  body>.print-root.sales-invoice .brand-contact-strip{margin-bottom:0!important;break-inside:avoid!important;page-break-inside:avoid!important}
}


/* v1.4.2 — final clause sizing; bridge applies the exact print rules before JS measures. */
@media print{
  body>.print-root.sales-invoice .contract-warning{font-size:6.8px!important;line-height:1.2!important;padding:.45mm .9mm!important;margin:0 0 .45mm!important}
  body>.print-root.sales-invoice .contract-terms{font-size:7.6px!important;line-height:1.22!important;column-gap:3mm!important;margin:0!important;padding:0 2.2mm 0 0!important}
  body>.print-root.sales-invoice .contract-terms li{font-size:inherit!important;line-height:inherit!important;margin:0 0 .32mm!important;padding:0!important}
  body>.print-root.sales-invoice .contract-ack{font-size:7.4px!important;line-height:1.2!important;margin:.35mm 0 .45mm!important}
  body>.print-root.sales-invoice .brand-contact-strip{margin-bottom:0!important;break-inside:avoid!important;page-break-inside:avoid!important}
}


/* v1.5.0 — Excel inventory import review and buyer share links */
.import-mapping-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.import-preview{margin-top:16px;display:grid;gap:10px}
.import-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:13px 15px;border:1px solid #d7e2ef;border-radius:12px;background:linear-gradient(135deg,#f6f9fd,#fff)}
.import-preview-head>div:first-child{display:grid;gap:3px}.import-preview-head small{color:#64758d;font-size:12px}
.import-preview-counts{display:flex;gap:8px;flex-wrap:wrap}.import-preview-counts span{font-size:12px;font-weight:800;border-radius:20px;padding:6px 11px}
.import-valid{background:#e4f5ec;color:#16704f}.import-invalid{background:#fff0ed;color:#b13e35}
.import-preview-table{max-height:330px;overflow:auto;border:1px solid #dbe3ed;border-radius:11px}
.import-preview-table td{font-size:12px!important;padding:9px 8px!important;vertical-align:top}
.import-preview-table th{position:sticky;top:0;z-index:1;font-size:12px!important;padding:10px 8px!important}
.import-row-invalid{background:#fff7f5!important}.import-row-invalid td:last-child{color:#b13e35;font-size:11px!important;min-width:220px}
.import-row-valid td:last-child{color:#15734f;font-weight:700}
.import-preview .form-note{margin:0}.import-preview .form-note.error{border-color:#e4a9a4;background:#fff3f1;color:#9d302b}.import-preview .form-note.success{border-color:#aad7bd;background:#effaf3;color:#176746}
#inventory-import-file{display:block;width:100%;padding:12px;border:1.5px dashed #9fb1c6;border-radius:12px;background:#f8fbfe;font-family:inherit}
#inventory-import-form [data-act="commit-inventory-import"]:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.4)}
.share-created-card{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid #b9dec9;border-radius:12px;background:#f0faf4;margin-bottom:12px}
.share-created-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#dff3e7;color:#18704e;flex:none}
.share-created-card>div:last-child{display:grid;gap:3px}.share-created-card small{font-size:12px;color:#587166}
.share-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:14px 0}
#buyer-share-url{direction:ltr;text-align:left;font-family:Arial,sans-serif;font-size:13px!important;min-height:46px!important}
@media(max-width:650px){.import-mapping-grid{grid-template-columns:1fr}.import-preview-head{align-items:flex-start}.share-actions>*{flex:1 1 100%;justify-content:center}}


/* v1.5.3 — partial Excel import status: green rows are accepted, red rows are skipped. */
.form-note.warning{
  color:#85510f!important;background:#fff6e4!important;border:1px solid #edc77f!important;
  border-radius:10px!important;padding:12px 14px!important;line-height:1.8!important;
}
.import-result-summary{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 14px;
}
.import-result-summary>div{
  padding:11px 13px;border-radius:10px;font-size:13px;font-weight:800;
}
.import-result-summary .import-valid{color:#176b4b;background:#e7f6ee;border:1px solid #b5e2c9}
.import-result-summary .import-invalid{color:#a43d38;background:#fff0ee;border:1px solid #f0c1bd}
.import-preview-counts .import-valid,.import-preview-counts .import-invalid{font-weight:800}
@media(max-width:640px){.import-result-summary{grid-template-columns:1fr}}


/* v1.5.6 — new stock categories and trade-in workspace */
.trade-info-banner{
 display:flex;flex-direction:column;gap:5px;margin:0 0 16px;padding:15px 18px;
 border:1px solid #d9c59b;border-radius:13px;background:linear-gradient(110deg,#fff8e8,#fffdf8);
 color:#70501b;
}
.trade-info-banner b{font-size:15px;font-weight:800}
.trade-info-banner small{font-size:12.5px;line-height:1.8;color:#6b7585}
.trade-difference-card{
 display:flex;flex-direction:column;gap:6px;margin-top:14px;padding:16px 18px;
 border:1.5px solid #d8c18e;border-radius:13px;background:#fff8e8;
}
.trade-difference-card small{font-size:12px;color:#79633b;line-height:1.7}
.trade-difference-card strong{font-size:23px;font-weight:900;color:#254d3c;font-variant-numeric:tabular-nums}
.trade-difference-card span{font-size:12.5px;color:#59677b;line-height:1.7}
.trade-difference-plus{color:#16734e!important}
.trade-difference-minus{color:#b24b36!important}
#trade-form .form-section{margin-bottom:18px}
#trade-form .trade-difference-card{min-height:105px}
.nav-item[data-page="trades"] .nav-icon{color:#d9a843}
.category-chip{white-space:nowrap}


/* v1.5.7 — product search controls in sale/add-on/trade/replacement pickers. */
.inventory-picker-field{min-width:0}
.inventory-picker-search-row{position:relative;display:flex;align-items:center;margin:0 0 7px;min-width:0}
.inventory-picker-search-row input.inventory-select-search{width:100%;height:43px;min-height:43px;border:1.5px solid #bdcbdc;border-radius:10px;background:#fafdff;color:#1f314a;padding:0 40px 0 12px;font:inherit;font-size:13px;outline:none;transition:border-color .15s,box-shadow .15s}
.inventory-picker-search-row input.inventory-select-search::placeholder{color:#8290a3;font-size:12px}
.inventory-picker-search-row input.inventory-select-search:focus{border-color:#bd8a2d;background:#fff;box-shadow:0 0 0 3px #bd8a2d18}
.inventory-picker-search-row>span{position:absolute;right:13px;top:50%;transform:translateY(-50%);display:grid;place-items:center;color:#9a742d;pointer-events:none}
.inventory-picker-field>select,.addon-product>select{width:100%;min-width:0}
.picker-result-count{display:block;margin:3px 2px 5px;color:#728198;font-size:11px;line-height:1.6}
.addon-product .inventory-picker-search-row{margin-top:5px;margin-bottom:5px}
.addon-product .inventory-picker-search-row input.inventory-select-search{height:39px;min-height:39px;font-size:12px}
.addon-product .picker-result-count{font-size:10px;margin:2px 2px}
#sale-product-search-count{color:#7a8496}
@media(max-width:680px){
 .inventory-picker-search-row input.inventory-select-search{height:46px;min-height:46px;font-size:14px}
 .addon-product .inventory-picker-search-row input.inventory-select-search{height:42px;min-height:42px}
}


/* v1.5.8 — trade-in finance and engineer test tracking */
.trade-engineer-fields{margin-top:14px;padding:14px;border:1px dashed #d7b45b;background:#fffbef;border-radius:13px}
.trade-test-toggle{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid #e1c46f;background:#fff9e6;border-radius:12px;cursor:pointer}
.trade-test-toggle input{width:19px;height:19px;margin-top:3px;accent-color:#c58d19}
.trade-test-toggle b{display:block;color:#765410;font-size:14px}
.trade-test-toggle small{display:block;color:#786b54;font-size:12px;line-height:1.8;margin-top:3px}
.trade-test-status{display:flex;align-items:flex-start;gap:13px;padding:16px 18px;border:1px solid;border-radius:14px;margin:12px 0;line-height:1.8}
.trade-test-status-icon{width:35px;height:35px;flex:0 0 35px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:21px;font-weight:900}
.trade-test-status b{display:block;font-size:15px;margin-bottom:3px}
.trade-test-status p{margin:0;font-size:13px}
.trade-test-status small{display:block;font-size:12px;margin-top:4px;opacity:.9}
.trade-test-status.pending{background:#fff7dc;border-color:#e7be4b;color:#79590e}
.trade-test-status.pending .trade-test-status-icon{background:#f4d778;color:#71500b}
.trade-test-status.approved{background:#eaf8f0;border-color:#74c79a;color:#176541}
.trade-test-status.approved .trade-test-status-icon{background:#bde8ce;color:#176541}
.trade-test-status.rejected{background:#fff0ef;border-color:#e5a09a;color:#983c35}
.trade-test-status.rejected .trade-test-status-icon{background:#f4c8c3;color:#983c35}
.trade-test-status .form-actions{margin-top:10px;padding-top:8px}
.trade-test-badge{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:99px;font-size:11px;font-weight:800;background:#edf1f5;color:#57677a;white-space:nowrap}
.trade-test-badge.pending{background:#fff0bd;color:#805900}
.trade-test-badge.approved{background:#dff4e7;color:#1a7447}
.trade-test-badge.rejected{background:#fde4e1;color:#a64038}
.trade-installment-table{margin-top:10px}
#trade-calc .calc-grid{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}
#trade-calc .installment-table{max-height:250px;overflow:auto;border:1px solid var(--line);border-radius:10px}
#trade-calc .installment-table thead{position:sticky;top:0;z-index:2}
#trade-calc .installment-table th,#trade-calc .installment-table td{font-size:12px;padding:9px 8px}
#trade-calc .installment-table input{width:110px;min-height:34px;text-align:center;border:1px solid var(--accent);border-radius:7px;padding:5px}
@media(prefers-reduced-motion:no-preference){.trade-test-status.pending{animation:trade-pending-pulse 2.5s ease-in-out infinite}@keyframes trade-pending-pulse{50%{box-shadow:0 0 0 4px rgba(222,174,52,.12)}}}


/* v1.5.9 — differentiated purchase, cash-sale and installment invoice declarations. */
.seller-declaration-intro{font-weight:800;margin:0 0 2mm;text-align:right}
.seller-declaration-terms{direction:rtl;margin:0;padding:0 5mm 0 0;text-align:justify;line-height:1.65}
.seller-declaration-terms li{padding:0 .5mm 0 0;margin:0 0 1mm;break-inside:avoid}
.purchase-payment-confirmation{border:1px solid #c8a45c;background:#fffaf0;border-radius:2mm;padding:2mm 2.5mm;margin:1.5mm 0;font-size:9px;line-height:1.65;direction:rtl;text-align:justify}
.purchase-payment-confirmation>b{display:block;color:#8a641e;margin-bottom:1mm;font-size:9.5px}
.purchase-payment-confirmation strong{font-weight:800;color:#203650}
.purchase-extra-notes{border:1px solid #d8e0e9;border-radius:1.5mm;padding:1.5mm 2mm;margin:1mm 0;font-size:8px;line-height:1.5}
@media print{
 .print-root .seller-declaration-intro{font-size:9.2px!important;line-height:1.45!important;margin-bottom:1mm!important}
 .print-root .seller-declaration-terms{font-size:8.3px!important;line-height:1.38!important;columns:2;column-gap:4mm!important;padding-right:3mm!important}
 .print-root .seller-declaration-terms li{font-size:inherit!important;line-height:inherit!important;margin-bottom:.6mm!important;break-inside:avoid!important}
 .print-root .purchase-payment-confirmation{font-size:8.3px!important;line-height:1.42!important;margin:1mm 0!important;padding:1.2mm 1.8mm!important;break-inside:avoid!important}
 .print-root .purchase-payment-confirmation>b{font-size:8.8px!important;margin-bottom:.4mm!important}
 .print-root .purchase-extra-notes{font-size:7.8px!important;line-height:1.35!important;padding:1mm 1.5mm!important}
 .print-root.sales-invoice:not(.has-contract) .invoice-print-footer{margin-top:2mm!important}
}


/* v1.5.10 — phone service quick links on the engineer testing page. */
.btn-phone-services{display:inline-flex!important;align-items:center!important;gap:8px!important;background:linear-gradient(135deg,#183a5c,#285b80)!important;color:#fff!important;border:1px solid #244f70!important;box-shadow:0 7px 18px rgba(27,69,104,.18)!important;font-weight:800!important}
.btn-phone-services:hover{filter:brightness(1.08);transform:translateY(-1px)}
.phone-services-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:4px 0 16px}
.phone-service-card{min-width:0;display:flex;flex-direction:column;gap:9px;padding:17px 15px 14px;border:1px solid;border-radius:16px;box-shadow:0 8px 22px rgba(24,45,70,.07);background:#fff}
.phone-service-card.hamta{border-color:#c8dff3;background:linear-gradient(155deg,#f1f8ff,#fff 72%)}
.phone-service-card.customs{border-color:#f0d5aa;background:linear-gradient(155deg,#fff7e9,#fff 72%)}
.phone-service-card.hamyab{border-color:#bfe4d5;background:linear-gradient(155deg,#edfaf4,#fff 72%)}
.phone-service-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.phone-service-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px}
.hamta .phone-service-icon{background:#dceeff;color:#1766a6}
.customs .phone-service-icon{background:#ffebc9;color:#a76512}
.hamyab .phone-service-icon{background:#d8f3e6;color:#16845a}
.phone-service-tag{font-size:10px;font-weight:800;padding:5px 8px;border-radius:999px;background:#fff;color:#66758a;border:1px solid #e2e8f0}
.phone-service-card h4{font-size:14px;line-height:1.7;margin:3px 0 0;color:#1d3049}
.phone-service-card p{font-size:11px;line-height:1.9;color:#65748a;margin:0;min-height:42px}
.phone-service-link{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;margin-top:auto!important;min-height:41px!important;text-decoration:none!important;border-radius:10px!important;font-size:11px!important;font-weight:800!important}
.hamta .phone-service-link{background:#216da8!important;color:#fff!important;border-color:#216da8!important}
.customs .phone-service-link{background:#bd812b!important;color:#fff!important;border-color:#bd812b!important}
.hamyab .phone-service-link{background:#19835c!important;color:#fff!important;border-color:#19835c!important}
@media(max-width:680px){.phone-services-grid{grid-template-columns:1fr}.phone-service-card p{min-height:0}.page-head-actions .btn-phone-services{width:100%;justify-content:center}}


/* v1.5.11 — wider, taller phone-services dialog with four full-size service cards. */
.modal.phone-services-modal{
  width:min(1240px,calc(100vw - 40px))!important;
  max-width:1240px!important;
  max-height:calc(100vh - 36px)!important;
  min-height:390px!important;
  overflow:auto!important;
  border-radius:22px!important;
}
.phone-services-modal .modal-head{padding:21px 28px!important;min-height:76px!important}
.phone-services-modal .modal-head h3{font-size:21px!important}
.phone-services-modal .modal-head p{font-size:13px!important}
.phone-services-modal .modal-body{padding:25px 28px 22px!important;min-height:280px!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
.phone-services-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important;width:100%!important;margin:0 0 18px!important}
.phone-service-card{min-height:235px!important;padding:22px 19px 18px!important;gap:13px!important;border-radius:18px!important}
.phone-service-icon{width:58px!important;height:58px!important;border-radius:17px!important}
.phone-service-card h4{font-size:16px!important;line-height:1.8!important;min-height:52px!important}
.phone-service-card p{font-size:12.5px!important;line-height:2!important;min-height:58px!important}
.phone-service-tag{font-size:11px!important;padding:6px 10px!important}
.phone-service-link{min-height:46px!important;font-size:12px!important}
.phone-service-card.warranty{border-color:#cfc7f3;background:linear-gradient(155deg,#f4f0ff,#fff 72%)}
.warranty .phone-service-icon{background:#e8e1ff;color:#6545a8}
.warranty .phone-service-link{background:#6847ad!important;color:#fff!important;border-color:#6847ad!important}
.phone-services-modal .form-note{font-size:12px!important;line-height:1.8!important;padding:11px 14px!important;margin-top:auto!important}
.phone-services-modal .modal-foot{padding:14px 28px!important}
@media(max-width:1050px){.phone-services-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.phone-services-modal .modal-body{min-height:0!important}}
@media(max-width:600px){.modal.phone-services-modal{width:calc(100vw - 18px)!important;max-height:calc(100vh - 18px)!important;min-height:0!important}.phone-services-modal .modal-head,.phone-services-modal .modal-body{padding:16px!important}.phone-services-grid{grid-template-columns:1fr!important;gap:11px!important}.phone-service-card{min-height:0!important;padding:16px!important}.phone-service-card h4,.phone-service-card p{min-height:0!important}}


/* v1.5.12 — full-width phone-services banner on the engineer testing page. */
.phone-services-banner{
  direction:rtl!important;
  display:flex!important;
  align-items:center!important;
  gap:20px!important;
  width:100%!important;
  min-width:0!important;
  min-height:104px!important;
  box-sizing:border-box!important;
  margin:0 0 22px!important;
  padding:20px 26px!important;
  border:1px solid #234f70!important;
  border-radius:17px!important;
  background:linear-gradient(100deg,#173a5a 0%,#245b80 58%,#2e6a8b 100%)!important;
  color:#fff!important;
  text-align:right!important;
  cursor:pointer!important;
  box-shadow:0 9px 24px rgba(27,69,104,.18)!important;
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease!important;
}
.phone-services-banner:hover{transform:translateY(-2px)!important;filter:brightness(1.04)!important;box-shadow:0 13px 28px rgba(27,69,104,.22)!important}
.phone-services-banner:focus-visible{outline:3px solid #e2b657!important;outline-offset:3px!important}
.phone-services-banner-icon{
  width:62px!important;height:62px!important;flex:0 0 62px!important;
  display:grid!important;place-items:center!important;border-radius:17px!important;
  background:rgba(255,255,255,.14)!important;color:#fff!important;
  border:1px solid rgba(255,255,255,.22)!important;
}
.phone-services-banner-copy{display:flex!important;flex:1 1 auto!important;min-width:0!important;flex-direction:column!important;gap:5px!important}
.phone-services-banner-copy strong{font-size:20px!important;font-weight:900!important;line-height:1.5!important;color:#fff!important}
.phone-services-banner-copy small{font-size:13px!important;font-weight:500!important;line-height:1.8!important;color:#e4eff7!important;white-space:normal!important}
.phone-services-banner-action{
  flex:0 0 auto!important;display:inline-flex!important;align-items:center!important;gap:10px!important;
  padding:12px 17px!important;border-radius:11px!important;background:#fff!important;color:#1d4c6d!important;
  font-size:13px!important;font-weight:800!important;white-space:nowrap!important;
}
.phone-services-banner-action span{font-size:20px!important;line-height:1!important}
@media(max-width:760px){
 .phone-services-banner{min-height:90px!important;padding:16px!important;gap:13px!important;margin-bottom:18px!important}
 .phone-services-banner-icon{width:52px!important;height:52px!important;flex-basis:52px!important}
 .phone-services-banner-copy strong{font-size:17px!important}
 .phone-services-banner-copy small{font-size:11px!important}
 .phone-services-banner-action{padding:10px 12px!important;font-size:11px!important}
}
@media(max-width:520px){
 .phone-services-banner{flex-wrap:wrap!important;min-height:0!important}
 .phone-services-banner-copy{flex:1 1 calc(100% - 70px)!important}
 .phone-services-banner-action{width:100%!important;justify-content:center!important;box-sizing:border-box!important}
}


/* v1.5.13 — full application visual system: strong hierarchy, color-coded sections, accessible day/night palettes. */
:root{
 --bg:#f1f5fb;--surface:#ffffff;--surface-2:#f7faff;--surface-3:#edf3fb;
 --ink:#14243a;--muted:#52657e;--muted-2:#71839b;--line:#cbd8e8;--line-strong:#aebfd4;
 --accent:#d76532;--accent-2:#f08b50;--accent-soft:#fff0e5;
 --blue:#3578c8;--blue-soft:#e8f2ff;--green:#16875d;--green-soft:#e4f6ed;
 --purple:#7856bd;--purple-soft:#f0eaff;--amber:#a86b12;--amber-soft:#fff3d9;
 --red:#c34242;--red-soft:#ffeded;--chart-grid:#dce5f0;--chart-track:#e4ebf4;
 --shadow:0 9px 24px rgba(23,45,76,.075);
}
html{scroll-behavior:smooth}
body{font-size:14px!important;line-height:1.75!important;color:var(--ink)!important;background:var(--bg)!important}
button,input,select,textarea{font-family:inherit}
.page-content{max-width:1900px!important;padding:30px 38px 44px!important}
.page-head{align-items:center!important;margin-bottom:23px!important;gap:18px!important}
.page-title-wrap{display:flex!important;align-items:center!important;gap:14px!important;min-width:0!important}
.page-title-copy{min-width:0!important}
.page-title-icon{width:52px!important;height:52px!important;flex:0 0 52px!important;display:grid!important;place-items:center!important;border-radius:16px!important;background:linear-gradient(145deg,#e7f1ff,#d8e8fb)!important;border:1px solid #c5daf4!important;color:#2869ae!important;box-shadow:0 6px 15px rgba(41,103,173,.13)!important}
.page-icon-purchase{background:linear-gradient(145deg,#e2f6eb,#cceedd)!important;border-color:#b8e2ce!important;color:#168158!important}
.page-icon-testing{background:linear-gradient(145deg,#fff2d9,#ffe4af)!important;border-color:#f0d49a!important;color:#a66b12!important}
.page-icon-accounting{background:linear-gradient(145deg,#efe9ff,#ded3ff)!important;border-color:#d2c4f5!important;color:#7654b8!important}
.page-icon-inventory{background:linear-gradient(145deg,#e6f0ff,#d3e5ff)!important;border-color:#c4d9f4!important;color:#316fb4!important}
.page-icon-sales{background:linear-gradient(145deg,#e0f5f0,#c7ebe1)!important;border-color:#b5e0d3!important;color:#16866a!important}
.page-icon-exchange{background:linear-gradient(145deg,#f1eaff,#dfd0ff)!important;border-color:#d3c1f2!important;color:#7953bd!important}
.page-icon-notifications{background:linear-gradient(145deg,#fff0e5,#ffdec9)!important;border-color:#f3cbb0!important;color:#c25d2f!important}
.page-icon-users{background:linear-gradient(145deg,#e6f4ff,#d6eafb)!important;border-color:#c3dcef!important;color:#3479ad!important}
.page-head h1{font-size:25px!important;font-weight:900!important;line-height:1.5!important;color:#172b45!important;letter-spacing:0!important;margin:0 0 3px!important}
.page-head p{font-size:13px!important;font-weight:600!important;line-height:1.8!important;color:#536985!important;margin:0!important}
.page-head-actions{gap:9px!important}
.nav-item{font-size:14px!important;font-weight:700!important;min-height:46px!important;padding:12px 13px!important;color:#c1ccda!important}
.nav-item .nav-icon{width:22px!important;height:22px!important;font-size:18px!important}
.nav-item.active{background:linear-gradient(100deg,#df703d35,#df703d12)!important;color:#ffd0ad!important;box-shadow:inset -3px 0 #f08a54,0 4px 14px #09142338!important}
.nav-caption{font-size:10px!important;font-weight:900!important;color:#94a5bb!important;letter-spacing:.5px!important}
.side-brand strong{font-size:15px!important}.side-brand small{font-size:11px!important}
.side-user-info strong{font-size:13px!important}.side-user-info small{font-size:10px!important;color:#b4c1d2!important}
.topbar{background:rgba(255,255,255,.96)!important;border-bottom:1px solid #cbd8e8!important;box-shadow:0 2px 10px rgba(25,47,78,.035)!important}
.breadcrumb{font-size:12px!important;font-weight:700!important;color:#61758f!important}.breadcrumb strong{font-size:13px!important;font-weight:900!important;color:#203650!important}
.today-chip,.theme-toggle-btn,.icon-button{font-size:12px!important;font-weight:800!important;border:1.5px solid #cbd8e8!important;background:#fff!important;color:#344c69!important}
.panel{background:#fff!important;border:1px solid #cbd8e8!important;border-radius:16px!important;box-shadow:0 7px 20px rgba(27,53,88,.06)!important}
.panel-head{background:linear-gradient(180deg,#f1f6fc,#eaf1f9)!important;border-bottom:1px solid #c7d6e8!important;padding:16px 19px!important;min-height:58px!important}
.panel-head .section-title{font-size:15px!important;font-weight:900!important;color:#1b3554!important}
.section-title{font-size:15px!important;font-weight:900!important;line-height:1.7!important;color:#1b3554!important}
.section-subtitle{font-size:12px!important;font-weight:600!important;line-height:1.75!important;color:#5d718b!important}
.panel-body{padding:18px 20px!important}
.table-wrap{border:1px solid #cfdaea!important;border-radius:12px!important;background:#fff!important;overflow:auto!important}
table{font-size:13px!important}
th{font-size:12.5px!important;font-weight:900!important;color:#284360!important;background:#e8f0fa!important;padding:13px 12px!important;border-bottom:1px solid #bdcde0!important}
td{font-size:13px!important;font-weight:600!important;color:#263b56!important;padding:12px!important;border-bottom:1px solid #e0e8f1!important;line-height:1.7!important}
tbody tr:nth-child(even){background:#f6f9fd!important}tbody tr:hover{background:#eaf3ff!important}
.td-main{font-size:13px!important;font-weight:900!important;color:#173b61!important}.td-muted{font-size:11px!important;font-weight:600!important;color:#647b96!important}
.empty-state{color:#667b95!important}.empty-state .empty-icon{color:#8ba5c3!important}.empty-state strong{font-size:13px!important;font-weight:800!important;color:#405a77!important}.empty-state small{font-size:11px!important;color:#6b7f98!important}
.stat-card{border:1px solid #ccdaeb!important;box-shadow:0 7px 18px rgba(25,53,89,.07)!important}.stat-label{font-size:12px!important;font-weight:800!important;color:#455e7b!important}.stat-value{font-size:24px!important;font-weight:900!important;color:#1d3857!important}.stat-foot{font-size:11px!important;font-weight:600!important;color:#617994!important}
.quick-action{background:linear-gradient(120deg,#fff,#f5f9ff)!important;border:1px solid #ccdaeb!important;box-shadow:0 4px 12px rgba(31,65,105,.045)!important}.quick-action strong{font-size:13px!important;font-weight:900!important;color:#1d3c5e!important}.quick-action small{font-size:11px!important;font-weight:600!important;color:#647d98!important}.quick-icon{width:40px!important;height:40px!important;border-radius:13px!important}
.dashboard-range-toolbar{background:#fff!important;border:1px solid #cbd8e8!important;box-shadow:0 4px 14px rgba(30,55,88,.04)!important}.dashboard-range-toolbar>span{font-size:12px!important;font-weight:900!important;color:#38516e!important}.range-btn{font-size:12px!important;font-weight:800!important;min-height:38px!important;border:1.5px solid #c6d5e7!important;color:#405976!important;background:#f8fbff!important}.range-btn.active{background:#214d72!important;border-color:#214d72!important;color:#fff!important}
.history-chart-panel .panel-head{background:linear-gradient(180deg,#eef5fd,#e7f0fa)!important}.chart-total small{font-size:11px!important;color:#5e7590!important;font-weight:700!important}.chart-total b{font-size:14px!important;color:#1c3b5b!important;font-weight:900!important}.history-chart-grid{background:repeating-linear-gradient(to bottom,transparent 0,transparent 48px,var(--chart-grid) 49px,var(--chart-grid) 50px)!important}.history-bar-track{background:var(--chart-track)!important}.history-bar-fill{background:linear-gradient(180deg,#65aaf0,#286bb7)!important}.history-bar-fill.sales{background:linear-gradient(180deg,#57c99a,#16845d)!important}.history-bar-fill.purchases{background:linear-gradient(180deg,#f4c36b,#b87916)!important}.history-bar-value{font-size:10px!important;color:#405b79!important;font-weight:800!important}.history-bar-column small{font-size:10px!important;color:#526a87!important;font-weight:700!important}.chart-footnote{font-size:11px!important;color:#617995!important;font-weight:600!important}
.btn{font-size:13px!important;font-weight:900!important;min-height:40px!important;border-radius:10px!important;padding:10px 15px!important}.btn-primary{background:linear-gradient(130deg,#df703d,#bd4d27)!important;border-color:#be532e!important;color:#fff!important;box-shadow:0 5px 12px rgba(192,80,41,.18)!important}.btn-outline{background:#fff!important;border:1.5px solid #afc2d9!important;color:#294e73!important}.btn-light{background:#eaf1f8!important;border:1px solid #d4dfeb!important;color:#35516f!important}.btn-danger{background:#c64545!important;color:#fff!important}.btn-success{background:#18855e!important;color:#fff!important}
.field label,.stack-form label{font-size:13px!important;font-weight:900!important;color:#29415e!important}.field input,.field select,.field textarea,.stack-form input,.search-input,.filter-select,.toolbar input,.toolbar select{font-size:14px!important;font-weight:600!important;color:#243e5b!important;border:1.5px solid #becfe2!important;background:#fff!important;border-radius:10px!important;min-height:43px!important}.field input:focus,.field select:focus,.field textarea:focus,.search-input:focus,.filter-select:focus{outline:0!important;border-color:#4384c5!important;box-shadow:0 0 0 3px rgba(59,126,190,.14)!important}.field .help,.help,.form-note,.form-hint{font-size:11.5px!important;font-weight:600!important;line-height:1.85!important;color:#526a86!important}.form-note{background:#edf4fc!important;border:1px solid #cbdcf0!important;border-right:4px solid #4a87c1!important;border-radius:11px!important;padding:12px 15px!important}.form-note.success{background:#e8f7ee!important;border-color:#b8e3c9!important;border-right-color:#19875c!important;color:#176944!important}.form-note.warning{background:#fff5df!important;border-color:#efd39a!important;border-right-color:#c18824!important;color:#81550e!important}.form-note.error{background:#fff0ef!important;border-color:#f0b8b4!important;border-right-color:#c54545!important;color:#a23232!important}
.form-section{background:#fbfdff!important;border:1px solid #d4e0ed!important;border-radius:13px!important;padding:15px!important;margin-bottom:15px!important}.form-section-head{border-bottom:1px solid #d5e0ec!important}.form-section-head strong{font-size:14px!important;font-weight:900!important;color:#254363!important}.step-number{background:#e5effb!important;color:#286baa!important;border:1px solid #c7dbf0!important;width:27px!important;height:27px!important;font-size:12px!important}
.status{font-size:11px!important;font-weight:900!important;border:1px solid transparent!important}.status.testing{background:#fff3d8!important;color:#9b610c!important;border-color:#f0d59d!important}.status.accounting{background:#e7f1ff!important;color:#2d65a5!important;border-color:#c5d9f3!important}.status.stocked{background:#e3f6eb!important;color:#16734e!important;border-color:#b9e4cb!important}.status.rejected{background:#ffeded!important;color:#b63a3a!important;border-color:#efc0c0!important}.status.read{background:#e9eef5!important;color:#4e627a!important;border-color:#d0dae6!important}
.category-chip,.permission-tag{background:#e9f1fb!important;color:#315d89!important;border:1px solid #cedef0!important;font-size:11px!important;font-weight:800!important;padding:5px 8px!important;border-radius:8px!important}
.stock-low-item{border-bottom:1px solid #e1e9f2!important}.stock-low-meta strong{font-size:12px!important;font-weight:900!important;color:#25415f!important}.stock-low-meta small{font-size:10.5px!important;color:#687f99!important}.product-avatar{background:#eaf2fb!important;color:#3e6f9f!important}
.notification-item{background:#fff!important;border:1px solid #d3dfec!important;border-right:4px solid #4383c2!important;border-radius:12px!important;padding:14px!important}.notification-item.unread{background:#edf5ff!important;border-right-color:#d76c35!important}.notification-copy strong{font-size:13px!important;font-weight:900!important;color:#213b5a!important}.notification-copy p{font-size:12px!important;color:#405b78!important}.notification-copy small{font-size:10.5px!important;color:#6c8199!important}
.modal-backdrop{background:rgba(9,19,34,.64)!important;backdrop-filter:blur(7px)!important}.modal{border:1px solid #bacadd!important;box-shadow:0 30px 90px rgba(8,22,42,.28)!important;background:#fff!important}.modal-head{background:linear-gradient(180deg,#f2f7fd,#eaf1f9)!important;border-bottom:1px solid #cfdae8!important}.modal-head h3{font-size:16px!important;font-weight:900!important;color:#1d3858!important}.modal-head p{font-size:11px!important;color:#617894!important}.modal-body{color:#29415f!important}.modal-foot{background:#f5f8fc!important;border-top:1px solid #d2deeb!important}
.jalali-calendar{background:#fff!important;border:1.5px solid #c6d5e7!important;box-shadow:0 10px 30px rgba(20,45,76,.18)!important}.jalali-calendar-head{background:#edf4fc!important}.jalali-calendar-head strong,.jalali-day{color:#2c4563!important}.jalali-day:hover{background:#dcecff!important}.jalali-day.selected{background:#286da9!important;color:#fff!important}
.installment-choice-row,.installment-config-card{background:#f0f5fb!important;border:1px solid #cbd9e8!important;color:#243e5a!important}.config-option{background:#fff!important;border:1.5px solid #cbd9e8!important}.config-option b{color:#274566!important}.config-option.active{background:#e8f3ff!important;border-color:#4284c4!important}.config-note{background:#edf4fc!important;color:#496581!important}
.sale-calculator{background:linear-gradient(135deg,#183450,#24577a)!important;border:1px solid #35698e!important;box-shadow:0 9px 22px rgba(20,58,89,.16)!important}.calc-cell{background:rgba(255,255,255,.1)!important;border:1px solid rgba(255,255,255,.18)!important}.calc-cell small,.calc-result small{color:#d3e4f2!important}.calc-cell strong{color:#fff!important}.calc-result strong{color:#ffd18a!important}
.exchange-intro{background:linear-gradient(110deg,#f2eaff,#e9e1ff)!important;border-color:#cfc0f2!important;color:#4d3386!important}.exchange-intro p{color:#63518e!important}.exchange-symbol{background:#fff!important;color:#7650bc!important;box-shadow:0 4px 10px rgba(89,58,147,.1)!important}.exchange-device-comparison>div{background:#f1f6fd!important;border-color:#cedced!important}.exchange-device-comparison b{color:#25415f!important}.exchange-form-note{background:#f2edff!important;border-color:#d7c9f2!important;color:#584681!important}
.guarantee-form-block,.guarantee-card{background:#fff8e8!important;border:1.5px solid #e8ca8b!important;color:#674a16!important}.guarantee-toggle b{color:#604316!important}.guarantee-toggle small{color:#8b7145!important}.guarantee-fields{border-top-color:#e8d8b6!important}
.import-preview{border:1px solid #cbd9e8!important;background:#fff!important}.import-preview-head{background:#eef5fc!important;color:#294763!important}.import-row-valid{background:#edfaf2!important}.import-row-invalid{background:#fff1f0!important}.import-valid{background:#dff4e7!important;color:#136f48!important}.import-invalid{background:#ffe6e4!important;color:#a83333!important}
.trade-difference-card{border:1px solid #c9d9eb!important;background:#edf5ff!important;color:#20486c!important}.trade-test-badge.pending{background:#fff0cf!important;color:#96600d!important}.trade-test-badge.approved{background:#def5e7!important;color:#13724b!important}.trade-test-badge.rejected{background:#ffe4e3!important;color:#a83333!important}
.phone-services-banner{box-shadow:0 9px 24px rgba(20,68,104,.2)!important}.phone-service-card{box-shadow:0 6px 18px rgba(20,50,85,.08)!important}.phone-service-card h4{font-weight:900!important}.phone-service-card p{color:#536981!important;font-weight:600!important}
.share-created-card{background:#eaf8ef!important;border:1px solid #b9e3c8!important;color:#176b45!important}.share-created-card small{color:#47765d!important}
.help-card{background:#1b2b40!important;border:1px solid #344a63!important}.help-card strong{font-size:12px!important;color:#f1f5fb!important}.help-card small{font-size:10px!important;color:#c2cede!important}
.app-footer{background:#f7faff!important;border-color:#cdd9e8!important;color:#637995!important;font-size:10px!important;font-weight:600!important}

/* Stable, semantically distinct chart colors in both themes. */
.history-chart-grid{--chart-grid:#dce5f0!important;background:repeating-linear-gradient(to bottom,transparent 0,transparent 48px,var(--chart-grid) 49px,var(--chart-grid) 50px)!important}
.history-bar-track{background:#e3ebf4!important;border:1px solid #d3deeb!important}
.history-bar-fill{background:linear-gradient(180deg,#6eb1f3,#286ab5)!important}
.history-bar-fill.sales{background:linear-gradient(180deg,#5bd0a0,#16865d)!important}
.history-bar-fill.purchases{background:linear-gradient(180deg,#f5c36c,#b77a18)!important}

/* DARK THEME — override hard-coded white surfaces and inline light-mode styles as well as shared components. */
:root[data-theme="dark"]{
 color-scheme:dark;
 --bg:#0b1422;--surface:#141f30;--surface-2:#1b2a40;--surface-3:#22334b;
 --ink:#f1f5fc;--muted:#c0cbd9;--muted-2:#9caec3;--line:#354a63;--line-strong:#4b6380;
 --accent:#f08a55;--accent-2:#ffb17c;--accent-soft:#3c2b28;
 --blue:#71aef0;--blue-soft:#1d3550;--green:#55c695;--green-soft:#173c32;
 --purple:#b49af0;--purple-soft:#302849;--amber:#f2bd62;--amber-soft:#40331e;
 --red:#f08b8b;--red-soft:#43282e;--chart-grid:#31465f;--chart-track:#25374e;
 --shadow:0 12px 32px rgba(0,0,0,.28);
}
:root[data-theme="dark"] body,:root[data-theme="dark"] .app-shell,:root[data-theme="dark"] .main-column,:root[data-theme="dark"] #page-content{background:var(--bg)!important;color:var(--ink)!important}
:root[data-theme="dark"] .topbar,:root[data-theme="dark"] .app-footer{background:#111d2d!important;border-color:#344860!important;color:#b9c8da!important}
:root[data-theme="dark"] .breadcrumb,:root[data-theme="dark"] .breadcrumb strong{color:#e0e9f4!important}
:root[data-theme="dark"] .page-head h1,:root[data-theme="dark"] .section-title,:root[data-theme="dark"] .panel-head .section-title{color:#f3f6fc!important}
:root[data-theme="dark"] .page-head p,:root[data-theme="dark"] .section-subtitle{color:#bdcadd!important}
:root[data-theme="dark"] .page-title-icon{background:linear-gradient(145deg,#263c58,#1d3048)!important;border-color:#456383!important;color:#91c5ff!important;box-shadow:0 7px 18px rgba(0,0,0,.2)!important}
:root[data-theme="dark"] .page-icon-purchase{background:linear-gradient(145deg,#1b493b,#1a3a32)!important;border-color:#32765e!important;color:#72d9a9!important}
:root[data-theme="dark"] .page-icon-testing{background:linear-gradient(145deg,#493a20,#382e20)!important;border-color:#85672d!important;color:#ffcb6b!important}
:root[data-theme="dark"] .page-icon-accounting{background:linear-gradient(145deg,#3d3159,#2d2846)!important;border-color:#65528c!important;color:#c5b0ff!important}
:root[data-theme="dark"] .page-icon-inventory{background:linear-gradient(145deg,#213e5c,#1a3049)!important;border-color:#426a94!important;color:#8ac2ff!important}
:root[data-theme="dark"] .page-icon-sales{background:linear-gradient(145deg,#174b46,#173a38)!important;border-color:#317a70!important;color:#7fe0c9!important}
:root[data-theme="dark"] .page-icon-exchange{background:linear-gradient(145deg,#3a2f57,#302744)!important;border-color:#69518f!important;color:#ccb4ff!important}
:root[data-theme="dark"] .page-icon-notifications{background:linear-gradient(145deg,#533426,#402b24)!important;border-color:#8f573e!important;color:#ffb184!important}
:root[data-theme="dark"] .page-icon-users{background:linear-gradient(145deg,#22445b,#1b344b)!important;border-color:#416987!important;color:#9ed7fa!important}
:root[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#091321,#101f32)!important;border-left:1px solid #2d425a!important}
:root[data-theme="dark"] .nav-item{color:#d3ddeb!important}.nav-item:hover{color:#fff!important}
:root[data-theme="dark"] .nav-item.active{background:linear-gradient(100deg,#d76c3d3d,#d76c3d15)!important;color:#ffd0ad!important;box-shadow:inset -3px 0 #f08a55,0 4px 14px #0005!important}
:root[data-theme="dark"] .nav-caption{color:#9aacc2!important}
:root[data-theme="dark"] .panel,:root[data-theme="dark"] .stat-card,:root[data-theme="dark"] .quick-action,:root[data-theme="dark"] .dashboard-range-toolbar,:root[data-theme="dark"] .panel-head,:root[data-theme="dark"] .table-wrap{background:var(--surface)!important;border-color:var(--line)!important;color:var(--ink)!important;box-shadow:0 8px 22px rgba(0,0,0,.16)!important}
:root[data-theme="dark"] .panel-head{background:linear-gradient(180deg,#1b2c42,#18273a)!important;border-bottom-color:#3b506a!important}
:root[data-theme="dark"] .table-wrap{background:#121d2c!important}
:root[data-theme="dark"] table{background:transparent!important}
:root[data-theme="dark"] th{background:#253951!important;color:#e4edf8!important;border-color:#415873!important}
:root[data-theme="dark"] td{background:transparent!important;color:#e1e9f3!important;border-color:#31465e!important}
:root[data-theme="dark"] tbody tr:nth-child(even){background:#19283b!important}
:root[data-theme="dark"] tbody tr:nth-child(odd){background:#142235!important}
:root[data-theme="dark"] tbody tr:hover{background:#263b55!important}
:root[data-theme="dark"] .td-main{color:#f1f6ff!important}:root[data-theme="dark"] .td-muted{color:#b2c0d2!important}
:root[data-theme="dark"] .section-subtitle,:root[data-theme="dark"] .empty-state,:root[data-theme="dark"] .empty-state small{color:#bac8da!important}:root[data-theme="dark"] .empty-state strong{color:#e6edf7!important}:root[data-theme="dark"] .empty-state .empty-icon{color:#9bb7d5!important}
:root[data-theme="dark"] .stat-label{color:#d2deed!important}:root[data-theme="dark"] .stat-value{color:#f3f6fc!important}:root[data-theme="dark"] .stat-foot{color:#bdcadd!important}
:root[data-theme="dark"] .quick-action{background:linear-gradient(120deg,#1c2b40,#17263a)!important;border-color:#3a506b!important}:root[data-theme="dark"] .quick-action strong{color:#f2f6fc!important}:root[data-theme="dark"] .quick-action small{color:#b6c6d9!important}
:root[data-theme="dark"] .dashboard-range-toolbar>span{color:#dce7f4!important}:root[data-theme="dark"] .range-btn{background:#192a40!important;border-color:#405873!important;color:#d8e4f1!important}:root[data-theme="dark"] .range-btn.active{background:#d36c3c!important;border-color:#ed8b59!important;color:#fff!important}
:root[data-theme="dark"] .history-chart-panel .panel-head{background:linear-gradient(180deg,#1c3048,#17283e)!important}:root[data-theme="dark"] .chart-total small{color:#c0ccdb!important}:root[data-theme="dark"] .chart-total b{color:#f1f5fc!important}
:root[data-theme="dark"] .history-chart-grid{--chart-grid:#344c66!important;background:repeating-linear-gradient(to bottom,transparent 0,transparent 48px,#344c66 49px,#344c66 50px)!important}
:root[data-theme="dark"] .history-bar-track{background:#263a52!important;border-color:#3b536e!important}
:root[data-theme="dark"] .history-bar-fill{background:linear-gradient(180deg,#86c4ff,#397dc2)!important}
:root[data-theme="dark"] .history-bar-fill.sales{background:linear-gradient(180deg,#67e0ae,#16885e)!important}
:root[data-theme="dark"] .history-bar-fill.purchases{background:linear-gradient(180deg,#ffd27a,#b87918)!important}
:root[data-theme="dark"] .history-bar-value,:root[data-theme="dark"] .history-bar-column small,:root[data-theme="dark"] .chart-footnote{color:#c2d0e1!important}
:root[data-theme="dark"] .btn-outline{background:#1b2b40!important;border-color:#55708f!important;color:#e0ebf8!important}:root[data-theme="dark"] .btn-light{background:#263951!important;border-color:#405873!important;color:#e5edf7!important}
:root[data-theme="dark"] .search-input,:root[data-theme="dark"] .filter-select,:root[data-theme="dark"] .toolbar input,:root[data-theme="dark"] .toolbar select,:root[data-theme="dark"] .field input,:root[data-theme="dark"] .field select,:root[data-theme="dark"] .field textarea,:root[data-theme="dark"] .stack-form input,:root[data-theme="dark"] .cheque-number-input,:root[data-theme="dark"] .jalali-date-input,:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea{background:#101d2e!important;color:#f0f5fc!important;border-color:#4b6481!important;caret-color:#ffb17c!important}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#91a5bd!important;opacity:1!important}
:root[data-theme="dark"] select option{background:#17263a!important;color:#edf3fb!important}
:root[data-theme="dark"] .field label,:root[data-theme="dark"] .stack-form label,:root[data-theme="dark"] .form-section-head strong,:root[data-theme="dark"] .field-required{color:#e2ebf7!important}
:root[data-theme="dark"] .field .help,:root[data-theme="dark"] .help,:root[data-theme="dark"] .form-hint{color:#afc0d4!important}
:root[data-theme="dark"] .form-note,:root[data-theme="dark"] .demo-box,:root[data-theme="dark"] .installment-choice-row,:root[data-theme="dark"] .notification-item,:root[data-theme="dark"] .activity-user-head,:root[data-theme="dark"] .activity-stat,:root[data-theme="dark"] .sale-detail-head{background:#1a2a40!important;border-color:#3e5672!important;color:#e3ecf8!important}
:root[data-theme="dark"] .form-note strong{color:#f3f6fc!important}
:root[data-theme="dark"] .form-note.success{background:#153a2f!important;border-color:#2d7559!important;border-right-color:#57c997!important;color:#b4f0d1!important}
:root[data-theme="dark"] .form-note.warning{background:#3b301c!important;border-color:#7d642e!important;border-right-color:#e5b84f!important;color:#f8d891!important}
:root[data-theme="dark"] .form-note.error{background:#3c242a!important;border-color:#7d3c46!important;border-right-color:#ee7777!important;color:#ffc0c0!important}
:root[data-theme="dark"] .form-section{background:#142235!important;border-color:#3a506a!important}:root[data-theme="dark"] .form-section-head{border-bottom-color:#3a506a!important}:root[data-theme="dark"] .step-number{background:#233c58!important;color:#9fcaff!important;border-color:#44678e!important}
:root[data-theme="dark"] .status.testing{background:#40331d!important;color:#ffd17a!important;border-color:#82642b!important}:root[data-theme="dark"] .status.accounting{background:#1d3551!important;color:#9fc9ff!important;border-color:#3d628d!important}:root[data-theme="dark"] .status.stocked{background:#173d31!important;color:#7de1ae!important;border-color:#337b5d!important}:root[data-theme="dark"] .status.rejected{background:#48262d!important;color:#ffaaaa!important;border-color:#85404b!important}:root[data-theme="dark"] .status.read{background:#2a3b50!important;color:#c3d1e2!important;border-color:#465c76!important}
:root[data-theme="dark"] .category-chip,:root[data-theme="dark"] .permission-tag{background:#263c57!important;border-color:#496888!important;color:#d4e6fb!important}
:root[data-theme="dark"] .product-avatar{background:#263a52!important;color:#a8c9ec!important}:root[data-theme="dark"] .stock-low-meta strong{color:#eff5fc!important}:root[data-theme="dark"] .stock-low-meta small{color:#b6c6d8!important}
:root[data-theme="dark"] .notification-item{background:#192b41!important;border-color:#405a76!important}:root[data-theme="dark"] .notification-item.unread{background:#20364f!important;border-right-color:#ef8a58!important}:root[data-theme="dark"] .notification-copy strong{color:#f2f6fc!important}:root[data-theme="dark"] .notification-copy p{color:#d3deeb!important}:root[data-theme="dark"] .notification-copy small{color:#afc1d5!important}
:root[data-theme="dark"] .modal{background:#142235!important;border-color:#435c78!important;color:#eaf1f9!important}:root[data-theme="dark"] .modal-head{background:linear-gradient(180deg,#1e324b,#182a40)!important;border-color:#405873!important}:root[data-theme="dark"] .modal-head h3{color:#f3f7fd!important}:root[data-theme="dark"] .modal-head p{color:#b8c9dd!important}:root[data-theme="dark"] .modal-body{background:#142235!important;color:#e3edf8!important}:root[data-theme="dark"] .modal-foot{background:#17283d!important;border-color:#3c536d!important}
:root[data-theme="dark"] .modal-close{background:#30445c!important;border-color:#4c6785!important;color:#f2f6fc!important}
:root[data-theme="dark"] .jalali-calendar{background:#17283d!important;border-color:#4b6582!important}:root[data-theme="dark"] .jalali-calendar-head{background:#203650!important}:root[data-theme="dark"] .jalali-calendar-head strong,:root[data-theme="dark"] .jalali-day{background:#17283d!important;color:#e3edf8!important}:root[data-theme="dark"] .jalali-day:hover{background:#294361!important}:root[data-theme="dark"] .jalali-day.selected{background:#d36e3d!important;color:#fff!important}
:root[data-theme="dark"] .installment-config-card,:root[data-theme="dark"] .config-option{background:#1a2a40!important;border-color:#415a76!important;color:#e5eef8!important}:root[data-theme="dark"] .config-option b{color:#f2f6fc!important}:root[data-theme="dark"] .config-option.active{background:#243e5b!important;border-color:#6e9bc8!important}:root[data-theme="dark"] .config-note{background:#243951!important;color:#d0deed!important}
:root[data-theme="dark"] .sale-calculator{background:linear-gradient(135deg,#10243a,#183d5a)!important;border-color:#38658a!important}:root[data-theme="dark"] .calc-cell{background:#ffffff12!important;border-color:#ffffff27!important}:root[data-theme="dark"] .calc-cell small,:root[data-theme="dark"] .calc-result small{color:#d3e4f4!important}:root[data-theme="dark"] .calc-cell strong{color:#fff!important}:root[data-theme="dark"] .calc-result strong{color:#ffd18a!important}
:root[data-theme="dark"] .exchange-intro{background:linear-gradient(110deg,#30264a,#28213f)!important;border-color:#594779!important;color:#eee5ff!important}:root[data-theme="dark"] .exchange-intro p{color:#cbbce9!important}:root[data-theme="dark"] .exchange-symbol{background:#3b3157!important;color:#d7c5ff!important}:root[data-theme="dark"] .exchange-device-comparison>div{background:#1c2d44!important;border-color:#435a77!important}:root[data-theme="dark"] .exchange-device-comparison small,:root[data-theme="dark"] .exchange-device-comparison span{color:#b9c9dc!important}:root[data-theme="dark"] .exchange-device-comparison b{color:#f1f5fc!important}:root[data-theme="dark"] .exchange-form-note{background:#2d2643!important;border-color:#5b4c7d!important;color:#ddd2f5!important}
:root[data-theme="dark"] .guarantee-form-block,:root[data-theme="dark"] .guarantee-card{background:#352c1b!important;border-color:#806933!important;color:#f5e4bd!important}:root[data-theme="dark"] .guarantee-toggle b{color:#ffe2a2!important}:root[data-theme="dark"] .guarantee-toggle small{color:#d5c092!important}:root[data-theme="dark"] .guarantee-fields{border-top-color:#6c5933!important}
:root[data-theme="dark"] .import-preview,:root[data-theme="dark"] .import-preview-table{background:#142235!important;border-color:#405873!important}:root[data-theme="dark"] .import-preview-head{background:#20364f!important;color:#e5effa!important}:root[data-theme="dark"] .import-row-valid{background:#183b30!important}:root[data-theme="dark"] .import-row-invalid{background:#40262c!important}:root[data-theme="dark"] .import-valid{background:#20563e!important;color:#aaf0c7!important}:root[data-theme="dark"] .import-invalid{background:#5a2c34!important;color:#ffc0c0!important}
:root[data-theme="dark"] .trade-difference-card{background:#1e3852!important;border-color:#466b91!important;color:#e5f1fd!important}:root[data-theme="dark"] .trade-test-badge.pending{background:#4a3a1e!important;color:#ffda8e!important}:root[data-theme="dark"] .trade-test-badge.approved{background:#174331!important;color:#91eabc!important}:root[data-theme="dark"] .trade-test-badge.rejected{background:#4b282e!important;color:#ffb6b6!important}
:root[data-theme="dark"] .phone-service-card{background:#18283d!important;border-color:#425a75!important;box-shadow:0 8px 19px rgba(0,0,0,.2)!important}:root[data-theme="dark"] .phone-service-card.hamta{background:linear-gradient(155deg,#1c3854,#17263a 75%)!important;border-color:#426b91!important}:root[data-theme="dark"] .phone-service-card.customs{background:linear-gradient(155deg,#43351f,#242a32 75%)!important;border-color:#826b3f!important}:root[data-theme="dark"] .phone-service-card.hamyab{background:linear-gradient(155deg,#173d34,#182b35 75%)!important;border-color:#3b806a!important}:root[data-theme="dark"] .phone-service-card.warranty{background:linear-gradient(155deg,#30284c,#1e2739 75%)!important;border-color:#65568b!important}:root[data-theme="dark"] .phone-service-card h4{color:#f2f6fc!important}:root[data-theme="dark"] .phone-service-card p{color:#c4d2e2!important}:root[data-theme="dark"] .phone-service-tag{background:#24364c!important;color:#e0eaf6!important;border-color:#4a607a!important}
:root[data-theme="dark"] .hamta .phone-service-icon{background:#244c70!important;color:#a5d4ff!important}:root[data-theme="dark"] .customs .phone-service-icon{background:#60451d!important;color:#ffda91!important}:root[data-theme="dark"] .hamyab .phone-service-icon{background:#1e5747!important;color:#9ae8c5!important}:root[data-theme="dark"] .warranty .phone-service-icon{background:#493b70!important;color:#d0bdff!important}
:root[data-theme="dark"] .share-created-card{background:#173b30!important;border-color:#34775b!important;color:#b6f1d0!important}:root[data-theme="dark"] .share-created-card small{color:#a5d8be!important}
:root[data-theme="dark"] .help-card{background:#1b2c41!important;border-color:#3d5570!important}:root[data-theme="dark"] .help-card strong{color:#f0f5fb!important}:root[data-theme="dark"] .help-card small{color:#bdcadd!important}
:root[data-theme="dark"] .app-footer{background:#101c2b!important;border-color:#344960!important;color:#aebfd3!important}
:root[data-theme="dark"] .theme-toggle-btn,:root[data-theme="dark"] .today-chip,:root[data-theme="dark"] .icon-button{background:#20334b!important;border-color:#4b6481!important;color:#ecf3fb!important}
:root[data-theme="dark"] .top-avatar,:root[data-theme="dark"] .avatar{box-shadow:0 3px 10px rgba(0,0,0,.22)!important}
:root[data-theme="dark"] .text-link{color:#ffb17c!important}:root[data-theme="dark"] .btn-exchange{background:linear-gradient(115deg,#704bc3,#8864d3)!important;color:#fff!important}:root[data-theme="dark"] .exchange-current-label{background:#3c3159!important;color:#d6c5ff!important}
:root[data-theme="dark"] .online-dot{background:#55d7a1!important;box-shadow:0 0 0 4px rgba(85,215,161,.13)!important}
/* Inline white backgrounds occur in some generated headers; force them to the current theme surface. */
:root[data-theme="dark"] #page-content [style*="background:#fff"],
:root[data-theme="dark"] #page-content [style*="background: #fff"],
:root[data-theme="dark"] #page-content [style*="background:#ffffff"],
:root[data-theme="dark"] #page-content [style*="background: #ffffff"]{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
:root[data-theme="dark"] #page-content [style*="color:#172033"],:root[data-theme="dark"] #page-content [style*="color: #172033"]{color:var(--ink)!important}
:root[data-theme="dark"] ::selection{background:#426a91!important;color:#fff!important}

@media(max-width:1120px){.page-content{padding:24px!important}.stats-grid.dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){.page-content{padding:20px 16px 28px!important}.page-head h1{font-size:22px!important}.page-title-icon{width:46px!important;height:46px!important;flex-basis:46px!important}.nav-item{font-size:14px!important}.topbar{padding:0 16px!important}}
@media(max-width:560px){.page-content{padding:17px 12px 24px!important}.page-head{align-items:stretch!important;flex-direction:column!important}.page-head h1{font-size:21px!important}.page-head p{font-size:12px!important}.page-head-actions{width:100%!important}.page-head-actions .btn{flex:1}.table-wrap th{font-size:11px!important;padding:10px 8px!important}.table-wrap td{font-size:11px!important;padding:10px 8px!important}.section-title{font-size:14px!important}.section-subtitle{font-size:11px!important}.page-title-icon{width:42px!important;height:42px!important;flex-basis:42px!important}.stats-grid.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* v1.5.13 final pass — login, pickers, and compact chart labels. */
.page-icon-testing{color:#a66b12}
.history-bar-value{width:35px!important;max-width:35px!important;text-align:center!important;font-size:8px!important;letter-spacing:-.2px!important}
:root[data-theme="dark"] .login-shell{background:radial-gradient(circle at 50% 12%,#263c58 0,transparent 38%),linear-gradient(145deg,#08111e,#0b1727 72%)!important}
:root[data-theme="dark"] .login-panel{background:#152236!important;border:1px solid #405873!important;box-shadow:0 28px 90px rgba(0,0,0,.48)!important;color:#edf3fb!important}
:root[data-theme="dark"] .login-brand-name,:root[data-theme="dark"] .login-heading h2{color:#f1f6fd!important}
:root[data-theme="dark"] .login-brand-name b{color:#f3c36a!important}
:root[data-theme="dark"] .login-brand-sub,:root[data-theme="dark"] .login-heading p,:root[data-theme="dark"] .login-foot{color:#b6c6da!important}
:root[data-theme="dark"] .login-heading .eyebrow{color:#ffc184!important}
:root[data-theme="dark"] .stack-form label{color:#e2ebf7!important}
:root[data-theme="dark"] .stack-form input,:root[data-theme="dark"] .password-wrap input{background:#0f1c2e!important;color:#f1f6fc!important;border-color:#4c6684!important}
:root[data-theme="dark"] .eye-btn{color:#bfd0e3!important}
:root[data-theme="dark"] .demo-box{background:#1c2d43!important;border-color:#425b77!important}
:root[data-theme="dark"] .demo-title{color:#f1f5fb!important}
:root[data-theme="dark"] .demo-grid button{background:#263a53!important;border-color:#4b6480!important;color:#e1ebf7!important}
:root[data-theme="dark"] .demo-grid button b{color:#fff!important}
:root[data-theme="dark"] .demo-box small{color:#b8c8da!important}
:root[data-theme="dark"] .mobile-brand{color:#f0f5fc!important}
:root[data-theme="dark"] .login-panel .btn-primary{background:linear-gradient(120deg,#d96d3d,#b9532f)!important}
:root[data-theme="dark"] .customer-search-results{background:#17283d!important;border-color:#405873!important;box-shadow:0 12px 28px #0006!important}
:root[data-theme="dark"] .customer-search-result{background:#17283d!important;color:#e8f0f9!important;border-bottom-color:#3b5069!important}
:root[data-theme="dark"] .customer-search-result:hover{background:#263d58!important}
:root[data-theme="dark"] .customer-search-state{color:#c1cee0!important}
:root[data-theme="dark"] .customer-search-state.error{color:#ffaaaa!important}
:root[data-theme="dark"] .sale-addons-section{background:#18283c!important;border-color:#445c78!important}
:root[data-theme="dark"] .sale-addons-head b{color:#f1f6fc!important}
:root[data-theme="dark"] .sale-addons-head small{color:#bccbdd!important}
:root[data-theme="dark"] .addon-row{background:#17283d!important;border-color:#405873!important}
:root[data-theme="dark"] .addon-row label{color:#e1ebf7!important}
:root[data-theme="dark"] .addon-row select,:root[data-theme="dark"] .addon-row input:not([type=hidden]){background:#0f1d2f!important;color:#eef4fb!important;border-color:#4b6683!important}
:root[data-theme="dark"] .inventory-picker-search-row input.inventory-select-search{background:#0f1d2f!important;color:#eef4fb!important;border-color:#4b6683!important}
:root[data-theme="dark"] .inventory-picker-search-row input.inventory-select-search::placeholder{color:#a6b8cc!important}
:root[data-theme="dark"] .inventory-picker-search-row input.inventory-select-search:focus{background:#14263b!important;border-color:#e0af5a!important}
:root[data-theme="dark"] .picker-result-count{color:#b9c9dc!important}
:root[data-theme="dark"] .installment-choice b{color:#f1f6fc!important}:root[data-theme="dark"] .installment-choice span{color:#c0cddd!important}
:root[data-theme="dark"] .installment-config-head small{color:#f0c36b!important}
:root[data-theme="dark"] .installment-config-head h3{color:#f1f5fb!important}
:root[data-theme="dark"] .jalali-calendar-toggle{background:#2a3e57!important;color:#e6eff9!important}
:root[data-theme="dark"] .trade-test-toggle{background:#3b301d!important;border-color:#876b30!important}
:root[data-theme="dark"] .trade-test-toggle b{color:#ffdf91!important}
:root[data-theme="dark"] .trade-test-toggle small{color:#dfcca2!important}
:root[data-theme="dark"] .trade-test-status.pending{background:#40341f!important;border-color:#846b32!important;color:#ffde93!important}
:root[data-theme="dark"] .trade-test-status.pending .trade-test-status-icon{background:#795c22!important;color:#ffe6a5!important}
:root[data-theme="dark"] .trade-test-status.approved{background:#173d31!important;border-color:#3b8a66!important;color:#9aebbe!important}
:root[data-theme="dark"] .trade-test-status.rejected{background:#47282e!important;border-color:#99525b!important;color:#ffb8bd!important}
:root[data-theme="dark"] .import-preview-head>div:first-child small{color:#c0cddd!important}
:root[data-theme="dark"] .purchase-detail-cell{background:#1a2a40!important;border-color:#3e5672!important}
:root[data-theme="dark"] .purchase-detail-cell small{color:#bfccdc!important}:root[data-theme="dark"] .purchase-detail-cell b{color:#f0f5fb!important}
:root[data-theme="dark"] .history-chart-panel .section-subtitle{color:#c0cedd!important}
:root[data-theme="dark"] .history-bar-value{color:#dce8f6!important}
:root[data-theme="dark"] .toast{box-shadow:0 10px 30px #0008!important}

/* v1.5.14 — explicit trade-to-engineering submission and queue refresh. */
.trade-submit-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.trade-force-test-btn{background:linear-gradient(120deg,#c28a22,#e0ad45)!important;color:#fff!important;border:1px solid #aa7416!important;box-shadow:0 5px 14px rgba(178,126,26,.22)!important}
.trade-force-test-btn:hover{filter:brightness(1.04);transform:translateY(-1px)}
.trade-test-toggle{border:1.5px solid #d7a23b!important;background:#fff8e9!important}
#trade-engineer-fields:not([hidden]){border:1.5px dashed #c58c27!important;background:#fffaf0!important;border-radius:12px!important;padding:13px!important;margin-top:10px!important}
:root[data-theme="dark"] .trade-force-test-btn{background:linear-gradient(120deg,#9b6b1a,#bf8b2b)!important;color:#fff!important;border-color:#d4a247!important}
:root[data-theme="dark"] .trade-test-toggle{background:#342b1d!important;border-color:#a77a2b!important;color:#f6e7c7!important}
:root[data-theme="dark"] #trade-engineer-fields:not([hidden]){background:#2c251a!important;border-color:#9d742d!important}


/* v1.5.15 — purchase invoice declaration layout and distinct print titles. */
@media print{
  @page{size:A4 portrait;margin:5mm 7mm 5mm}
  html,body{background:#fff!important;color:#172338!important}
  body>.print-root.purchase-invoice{
    display:block!important;position:relative!important;box-sizing:border-box!important;
    width:100%!important;height:287mm!important;min-height:287mm!important;max-height:287mm!important;
    margin:0!important;padding:0!important;overflow:hidden!important;
    break-before:avoid-page!important;break-after:avoid-page!important;break-inside:avoid!important;
    page-break-before:avoid!important;page-break-after:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.purchase-invoice .invoice-paper{
    display:flex!important;position:relative!important;flex-direction:column!important;align-items:stretch!important;
    box-sizing:border-box!important;width:100%!important;height:287mm!important;min-height:287mm!important;max-height:287mm!important;
    margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;
    break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.purchase-invoice .invoice-top{flex:0 0 auto!important;height:29mm!important;min-height:29mm!important;margin:0 0 2mm!important}
  body>.print-root.purchase-invoice .invoice-main{
    display:flex!important;flex:0 0 auto!important;flex-direction:column!important;
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0!important;overflow:visible!important;
  }
  body>.print-root.purchase-invoice .invoice-info{margin-bottom:2mm!important;gap:1.5mm!important}
  body>.print-root.purchase-invoice .invoice-info-cell{min-height:12mm!important;padding:1.2mm 1.8mm!important}
  body>.print-root.purchase-invoice .product-table{margin-bottom:1.5mm!important}
  body>.print-root.purchase-invoice .product-table th,
  body>.print-root.purchase-invoice .product-table td{padding:1.35mm 1.1mm!important;line-height:1.4!important}
  body>.print-root.purchase-invoice .purchase-payment-confirmation{
    display:block!important;box-sizing:border-box!important;width:100%!important;
    margin:1mm 0 1.6mm!important;padding:1.6mm 2.2mm!important;
    font-size:8.6px!important;line-height:1.55!important;overflow:visible!important;
    white-space:normal!important;break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.purchase-invoice .purchase-payment-confirmation>b{font-size:9.2px!important;margin-bottom:.7mm!important}
  body>.print-root.purchase-invoice .invoice-total.purchase-total{
    display:flex!important;justify-content:flex-start!important;align-items:flex-start!important;
    width:100%!important;margin:0 0 1.5mm!important;padding:0!important;
  }
  body>.print-root.purchase-invoice .invoice-total.purchase-total>div{
    display:grid!important;grid-template-columns:auto auto!important;gap:.8mm 4mm!important;
    min-width:72mm!important;padding:1.6mm 2.5mm!important;font-size:8.8px!important;
  }
  body>.print-root.purchase-invoice .invoice-notes{
    display:block!important;box-sizing:border-box!important;width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:1mm 0 0!important;padding:1.8mm 2.4mm!important;
    overflow:visible!important;background:#fff!important;
    break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.purchase-invoice .invoice-notes>b{
    display:block!important;position:static!important;margin:0 0 1mm!important;
    padding:0!important;background:transparent!important;color:#8a641e!important;
    font-size:9.4px!important;font-weight:900!important;line-height:1.5!important;
  }
  body>.print-root.purchase-invoice .invoice-notes-content{
    display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    overflow:visible!important;white-space:normal!important;overflow-wrap:anywhere!important;
    background:none!important;font-size:8.5px!important;line-height:1.52!important;color:#26364e!important;text-align:justify!important;
  }
  body>.print-root.purchase-invoice .seller-declaration-intro{font-size:9.2px!important;line-height:1.5!important;margin:0 0 1mm!important;font-weight:900!important;color:#1d3555!important}
  body>.print-root.purchase-invoice .seller-declaration-terms{
    display:block!important;columns:2!important;column-gap:5mm!important;
    margin:0!important;padding:0 4mm 0 0!important;
    font-size:8.4px!important;line-height:1.48!important;color:#26364e!important;
  }
  body>.print-root.purchase-invoice .seller-declaration-terms li{
    font-size:inherit!important;line-height:inherit!important;margin:0 0 .8mm!important;
    padding:0 .5mm 0 0!important;break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.purchase-invoice .purchase-extra-notes{
    display:block!important;margin:1mm 0 0!important;padding:1.2mm 1.8mm!important;
    font-size:8px!important;line-height:1.45!important;
  }
  body>.print-root.purchase-invoice .invoice-signatures{
    display:grid!important;grid-template-columns:1fr 1fr!important;gap:4mm!important;
    width:100%!important;margin:2.2mm 0 0!important;padding:0!important;
    break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.purchase-invoice .signature-box{
    display:flex!important;position:relative!important;box-sizing:border-box!important;
    height:17mm!important;min-height:17mm!important;padding:1.5mm 2mm!important;
    background:#fff!important;background-image:none!important;
    border:1px solid #aebbd0!important;border-radius:1.3mm!important;
  }
  body>.print-root.purchase-invoice .signature-box:before,
  body>.print-root.purchase-invoice .signature-box:after{display:none!important;content:none!important}
  body>.print-root.purchase-invoice .signature-box b{font-size:8.8px!important;color:#26364e!important}
  body>.print-root.purchase-invoice .invoice-print-footer{
    display:block!important;position:absolute!important;left:0!important;right:0!important;bottom:0!important;
    flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0!important;overflow:visible!important;
    break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.purchase-invoice .brand-contact-strip{
    display:grid!important;position:static!important;width:100%!important;min-height:31mm!important;height:31mm!important;
    margin:0!important;padding:1mm 2mm!important;box-sizing:border-box!important;
    grid-template-columns:minmax(0,1fr) 28mm 28mm!important;gap:2mm!important;
    break-inside:avoid!important;page-break-inside:avoid!important;
  }
  body>.print-root.purchase-invoice .social-qr{width:28mm!important}
  body>.print-root.purchase-invoice .social-qr img{width:25mm!important;height:25mm!important}
}

/* v1.5.15 final purchase layout: keep declarations complete and place signatures immediately above the footer. */
@media print{
  body>.print-root.purchase-invoice .invoice-paper{display:flex!important;flex-direction:column!important;height:287mm!important;min-height:287mm!important;max-height:287mm!important}
  body>.print-root.purchase-invoice .invoice-main{
    display:flex!important;flex:1 1 auto!important;flex-direction:column!important;
    min-height:0!important;height:auto!important;max-height:none!important;
    padding:0 0 35mm!important;box-sizing:border-box!important;overflow:visible!important;
  }
  body>.print-root.purchase-invoice .invoice-info,
  body>.print-root.purchase-invoice .product-table,
  body>.print-root.purchase-invoice .purchase-payment-confirmation,
  body>.print-root.purchase-invoice .invoice-total.purchase-total,
  body>.print-root.purchase-invoice .purchase-extra-notes,
  body>.print-root.purchase-invoice .invoice-notes{flex:0 0 auto!important;}
  body>.print-root.purchase-invoice .invoice-notes{margin-top:1.3mm!important;padding:2mm 2.5mm!important;background:#fffdfa!important;border-right:2px solid #bd8a2d!important}
  body>.print-root.purchase-invoice .seller-declaration-terms{font-size:8.8px!important;line-height:1.52!important;column-gap:5mm!important}
  body>.print-root.purchase-invoice .seller-declaration-terms li{margin-bottom:.9mm!important;line-height:1.52!important}
  body>.print-root.purchase-invoice .invoice-signatures{
    flex:0 0 auto!important;margin: auto 0 0!important;padding-top:2mm!important;
    gap:4mm!important;grid-template-columns:1fr 1fr!important;
  }
  body>.print-root.purchase-invoice .signature-box{height:24mm!important;min-height:24mm!important}
  body>.print-root.purchase-invoice .invoice-print-footer{position:absolute!important;left:0!important;right:0!important;bottom:0!important}
}
@media print{
  /* The seller's seven legal declarations are easier to read as one full-width list. */
  body>.print-root.purchase-invoice .seller-declaration-terms{
    columns:1!important;column-count:1!important;
    font-size:9.2px!important;line-height:1.55!important;
    padding-right:4mm!important;
  }
  body>.print-root.purchase-invoice .seller-declaration-terms li{
    font-size:inherit!important;line-height:1.55!important;margin-bottom:.8mm!important;
  }
}

/* v1.5.17 — price list, accounting workflow and carton handover */
.accounting-tabs{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 17px;padding:7px;background:#fff;border:1px solid var(--line);border-radius:14px}
.accounting-tab{border:0;background:transparent;color:#697386;border-radius:10px;padding:10px 15px;font-weight:700;font-size:11px;transition:.18s}
.accounting-tab:hover{background:#f7f8fb;color:var(--ink)}
.accounting-tab.active{background:#fff0e8;color:#c65d2d;box-shadow:inset 0 0 0 1px #f5d6c6}
.price-edit-cell{display:flex;align-items:center;gap:7px;min-width:250px}
.price-list-input{width:100%;min-width:130px;height:37px;border:1px solid var(--line);border-radius:9px;background:#fbfcfe;padding:0 10px;direction:ltr;text-align:right;font-weight:700;color:var(--ink)}
.price-list-input:focus{outline:none;border-color:#ef9c75;box-shadow:0 0 0 3px #e46a3515;background:#fff}
.box-handover-list{display:grid;gap:14px}
.box-handover-card{padding:18px}
.box-handover-card .panel-head{margin:0 0 15px;align-items:flex-start}
.box-handover-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:0 0 14px}
.box-handover-meta>span{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-radius:10px;background:#f8f9fc;color:#748096;font-size:10px}
.box-handover-meta b{color:#303b50;font-size:11px}
.box-installments-list{display:grid;gap:7px}
.box-installment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:10px}
.box-installment-row>div{display:grid;gap:4px;min-width:0}
.box-installment-row>div b{font-size:11px;color:#2e394d}
.box-installment-row>div small{font-size:10px;color:var(--muted)}
.box-installment-row .status{white-space:nowrap}
.box-retention-note{display:flex;align-items:flex-start;gap:11px;margin-top:13px;padding:12px 14px;border:1px solid #f2d8c8;background:#fff8f3;border-radius:12px;color:#80563d}
.box-retention-icon{width:28px;height:28px;flex:0 0 28px;border-radius:9px;background:#ffeadf;color:#bf6339;display:grid;place-items:center;font-size:15px}
.box-retention-note>span:last-child{display:grid;gap:4px}
.box-retention-note b{font-size:11px;color:#a34e2c}
.box-retention-note small{font-size:10px;line-height:1.8;color:#896d5d}
@media(max-width:900px){.box-handover-meta{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.accounting-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-tab{padding:10px 7px}.box-handover-card{padding:13px}.box-handover-meta{grid-template-columns:1fr 1fr}.box-handover-meta>span{display:grid;gap:4px}.box-installment-row{align-items:flex-start}.box-installment-row .btn{white-space:normal}.price-edit-cell{min-width:210px}}
#sale-box-retention-note[hidden]{display:none!important}
.sale-phone-delivery-options{margin-top:12px}
.sale-phone-delivery-options[hidden]{display:none!important}
.sale-phone-delivery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sale-phone-status-toggle{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid #d6dfeb;border-radius:12px;background:#f8fafc;cursor:pointer;min-width:0}
.sale-phone-status-toggle input{width:18px;height:18px;flex:0 0 auto;margin:3px 0 0;accent-color:#bd8a2d}
.sale-phone-status-toggle span{display:grid;gap:4px;min-width:0}
.sale-phone-status-toggle b{font-size:12px;color:#243a55}
.sale-phone-status-toggle small{font-size:10px;line-height:1.8;color:#6f7f93}
@media(max-width:620px){.sale-phone-delivery-grid{grid-template-columns:1fr}}
:root[data-theme="dark"] .sale-phone-status-toggle{background:#1b2a40;border-color:#405671}
:root[data-theme="dark"] .sale-phone-status-toggle b{color:#f0f5fb}
:root[data-theme="dark"] .sale-phone-status-toggle small{color:#bdcadd}

/* v1.5.19 — stable navigation and 100%-zoom inventory layout; v1.5.20 — all Pinar DS3 weights. */
@media screen {
  html{min-height:100%;height:auto;overflow-x:hidden;overflow-y:auto;scroll-padding-top:84px}
  body{min-height:100vh;height:auto;overflow-x:hidden;overflow-y:auto}
  #app-shell{min-height:100vh;height:auto;overflow:visible;align-items:stretch}
  .sidebar{position:sticky;top:0;align-self:flex-start;height:100vh;max-height:100vh;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#53627a transparent}
  @supports (height:100dvh){.sidebar{height:100dvh;max-height:100dvh}}
  .sidebar-bottom{flex:0 0 auto;margin-top:auto;padding-top:12px}
  .main-nav{flex:0 0 auto}
  .main-column{min-width:0;min-height:100vh;overflow:visible}
  .topbar{flex:0 0 76px}
  .page-content{min-width:0;min-height:calc(100vh - 118px);flex:1 0 auto;overflow:visible}
  .app-footer{flex:0 0 42px}
  #page-content{min-width:0}

  .inventory-toolbar-panel{align-items:flex-end;flex-wrap:wrap;gap:12px;padding:12px 16px}
  .inventory-toolbar-panel>div:first-child{flex:1 1 330px;min-width:220px}
  .inventory-toolbar{display:grid;grid-template-columns:minmax(150px,.85fr) minmax(200px,1.5fr);gap:8px;flex:0 1 560px;width:min(100%,560px);min-width:0}
  .inventory-toolbar .filter-select,.inventory-toolbar .search-input{width:100%;min-width:0;height:39px;max-width:100%}
  .inventory-panel{min-width:0;overflow:hidden}
  .inventory-table-wrap{width:100%;max-width:100%;overflow-x:hidden}
  .inventory-table{width:100%;min-width:0;max-width:100%;table-layout:fixed;white-space:normal;border-collapse:collapse}
  .inventory-table th,.inventory-table td{min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.55;padding:10px 7px}
  .inventory-table th{font-size:11px;font-weight:800}
  .inventory-table td{font-size:11px;vertical-align:middle}
  .inventory-table th:nth-child(1),.inventory-table td:nth-child(1){width:22%}
  .inventory-table th:nth-child(2),.inventory-table td:nth-child(2){width:10%}
  .inventory-table th:nth-child(3),.inventory-table td:nth-child(3){width:7%}
  .inventory-table th:nth-child(4),.inventory-table td:nth-child(4){width:13%}
  .inventory-table th:nth-child(5),.inventory-table td:nth-child(5){width:6%}
  .inventory-table th:nth-child(6),.inventory-table td:nth-child(6),.inventory-table th:nth-child(7),.inventory-table td:nth-child(7){width:8%}
  .inventory-table th:nth-child(8),.inventory-table td:nth-child(8){width:6%}
  .inventory-table th:nth-child(9),.inventory-table td:nth-child(9){width:8%}
  .inventory-table th:nth-child(10),.inventory-table td:nth-child(10){width:12%}
  .inventory-table .td-main{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.6}
  .inventory-table .td-muted{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
  .inventory-serial{direction:ltr;unicode-bidi:plaintext;overflow-wrap:anywhere;word-break:break-all}
  .inventory-row-actions{display:grid;grid-template-columns:1fr;gap:5px;min-width:0}
  .inventory-row-actions .btn{width:100%;min-width:0;white-space:normal;line-height:1.4;padding:6px 5px;font-size:10px}
}

@media screen and (max-width:1120px){
  .page-content{padding:20px 18px 30px}
  .inventory-table th,.inventory-table td{padding:8px 5px;font-size:10px}
  .inventory-table th{font-size:10px}
  .inventory-row-actions .btn{font-size:9px}
}
@media screen and (max-width:1440px){
  .inventory-toolbar-panel{align-items:stretch;flex-direction:column}
  .inventory-toolbar-panel>div:first-child{min-width:0}
  .inventory-toolbar{width:100%;max-width:none;flex:1 1 auto}
  .inventory-table-wrap{overflow:visible}
  .inventory-table,.inventory-table tbody{display:block;width:100%}
  .inventory-table thead{display:none}
  .inventory-table tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:10px 0;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 3px 12px rgba(24,39,75,.035)}
  .inventory-table tbody tr:first-child{margin-top:0}
  .inventory-table td{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;width:auto!important;padding:8px 7px;border-bottom:1px solid var(--line);font-size:11px;min-width:0}
  .inventory-table td::before{content:attr(data-label);display:block;flex:0 0 auto;color:var(--muted);font-size:10px;font-weight:800;white-space:nowrap}
  .inventory-table td:first-child,.inventory-table td:last-child{grid-column:1/-1}
  .inventory-table td:first-child{display:block}
  .inventory-table td:first-child::before,.inventory-table td:last-child::before{margin-bottom:5px}
  .inventory-table td:last-child{display:block;border-bottom:0}
  .inventory-row-actions{display:flex;flex-wrap:wrap;gap:7px}
  .inventory-row-actions .btn{width:auto;flex:1 1 120px;font-size:10px}
  .inventory-table td[colspan]{grid-column:1/-1;display:block}
}
@media screen and (max-width:820px){
  .sidebar{position:fixed;top:0;right:0;bottom:auto;height:100vh;max-height:100vh;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;z-index:60}
  @supports (height:100dvh){.sidebar{height:100dvh;max-height:100dvh}}
  .sidebar-bottom{margin-top:auto}
  .main-column{min-height:100vh;width:100%}
  .topbar{flex-basis:64px}
  .page-content{min-height:calc(100vh - 106px);padding:18px 15px 26px}
}
@media screen and (max-width:560px){
  .inventory-toolbar{grid-template-columns:1fr}
  .inventory-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr));padding:7px}
  .inventory-table td{font-size:10px;padding:7px 5px}
  .inventory-table td::before{font-size:9px}
  .page-head{gap:12px;margin-bottom:15px}
  .page-head-actions{display:flex;flex-wrap:wrap}
  .page-head-actions .btn,.page-head-actions .action-buttons .btn{white-space:normal}
}


/* v1.5.24 — dedicated phone-carton archive and two-step checklist */
.box-archive-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}
.box-archive-summary>div{display:grid;gap:4px;padding:13px 15px;border:1px solid var(--line);border-radius:12px;background:#fff}
.box-archive-summary b{font-size:21px;color:var(--navy,#1e2b45);font-weight:800}
.box-archive-summary span{font-size:10px;color:var(--muted)}
.box-archive-checklist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.box-archive-check{display:flex;align-items:center;gap:10px;min-width:0;padding:12px;border:1px solid var(--line);border-radius:11px;background:#fafbfc}
.box-archive-tick{width:29px;height:29px;flex:0 0 29px;border-radius:9px;display:grid;place-items:center;font-weight:900;background:#eef1f5;color:#7d8999}
.box-archive-check.is-done{border-color:#b9e2cf;background:#f2fbf6}
.box-archive-check.is-done .box-archive-tick{background:#d8f3e4;color:#167344}
.box-archive-check>div{display:grid;gap:3px;min-width:0;flex:1}
.box-archive-check>div b{font-size:11px;color:#344056}
.box-archive-check>div small{font-size:10px;line-height:1.7;color:var(--muted)}
.box-archive-check-state{font-size:10px;font-weight:800;white-space:nowrap;color:#778397}
.box-archive-check.is-done .box-archive-check-state{color:#167344}
@media(max-width:900px){.box-archive-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.box-archive-checklist{grid-template-columns:1fr}}
@media(max-width:520px){.box-archive-summary>div{padding:10px}.box-archive-summary b{font-size:18px}.box-archive-check{align-items:flex-start}.box-archive-check-state{white-space:normal}}

/* Excel import review: selectable valid rows, checked by default. */
.import-selection-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 13px;border:1px solid #cbd9e8;border-radius:10px;background:#f5f8fc}
.import-selection-toolbar .check-label{display:inline-flex;align-items:center;gap:8px;margin:0;font-weight:800;color:#203d60}
.import-selection-toolbar input[type="checkbox"],.import-select-cell input[type="checkbox"]{width:17px;height:17px;accent-color:#203d60;cursor:pointer}
.import-selection-status{font-size:12px;font-weight:700;color:#52657d}
.import-select-cell{width:64px;min-width:64px;text-align:center!important;vertical-align:middle!important}
.import-select-cell input[type="checkbox"]{margin:0;vertical-align:middle}
.import-preview-table table{min-width:1120px}
:root[data-theme="dark"] .import-selection-toolbar{background:#20364f;border-color:#405873}
:root[data-theme="dark"] .import-selection-toolbar .check-label,:root[data-theme="dark"] .import-selection-status{color:#e5effa}


/* Phone-sales workflow: clear, high-contrast navy action cards. */
.mobile-review-checks{display:grid;grid-template-columns:1fr;gap:12px;margin:18px 0}
.workflow-check-card,.workflow-special-card{position:relative;display:flex;align-items:center;gap:14px;min-width:0;padding:17px 18px;border:1px solid #284f75;border-radius:15px;background:linear-gradient(135deg,#153653 0%,#204b70 100%);color:#fff;box-shadow:0 8px 20px rgba(16,42,68,.14);cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.workflow-check-card:hover,.workflow-special-card:hover{transform:translateY(-1px);box-shadow:0 11px 24px rgba(16,42,68,.2);border-color:#527ba2}
.workflow-check-card input[type=checkbox],.workflow-special-card input[type=checkbox]{appearance:none;-webkit-appearance:none;width:25px;height:25px;flex:0 0 25px;margin:0;border:2px solid #d5e1ee;border-radius:7px;background:#fff;cursor:pointer;position:relative;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.workflow-check-card input[type=checkbox]:checked,.workflow-special-card input[type=checkbox]:checked{background:#e3bd69;border-color:#f3d68f}
.workflow-check-card input[type=checkbox]:checked:after,.workflow-special-card input[type=checkbox]:checked:after{content:"✓";position:absolute;inset:0;display:grid;place-items:center;color:#173653;font-size:18px;font-weight:900}
.workflow-check-card input[type=checkbox]:focus-visible,.workflow-special-card input[type=checkbox]:focus-visible{outline:3px solid #f3d68f;outline-offset:3px}
.workflow-check-copy,.workflow-special-copy{display:grid;gap:5px;min-width:0;flex:1}
.workflow-check-copy b,.workflow-special-copy b{display:block;color:#fff;font-size:13px;font-weight:900;line-height:1.9}
.workflow-check-copy small,.workflow-special-copy small{display:block;color:#d6e2ef;font-size:11px;font-weight:500;line-height:1.9}
.workflow-check-tag,.workflow-special-tag{flex:0 0 auto;align-self:center;padding:6px 10px;border:1px solid #8ba6c1;border-radius:999px;background:#ffffff12;color:#f5d995;font-size:10px;font-weight:800;white-space:nowrap}
.workflow-check-card.is-exempt{border-color:#53718e;background:linear-gradient(135deg,#344d68,#405c78);cursor:default}
.workflow-check-card.is-exempt input[type=checkbox]{opacity:.75;cursor:not-allowed}
.workflow-check-card.is-exempt .workflow-check-tag{color:#e0ebf5;border-color:#91a7bd}
.workflow-special-card{align-items:flex-start;margin:8px 0 12px;padding:17px 18px}
.workflow-special-card input[type=checkbox]{margin-top:3px}
.workflow-special-copy b{font-size:14px}
.workflow-special-copy small{max-width:850px}
.workflow-special-card .workflow-special-tag{margin-top:2px}
.print-status-card{display:inline-flex;align-items:center;gap:8px;min-height:39px;padding:7px 12px;border:1px solid #294f73;border-radius:11px;background:linear-gradient(135deg,#153653,#204b70);color:#fff;box-shadow:0 4px 11px rgba(16,42,68,.12);vertical-align:middle;white-space:nowrap}
.print-status-card>i{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#e3bd69;color:#173653;font-size:15px;font-style:normal;font-weight:900}
.print-status-card>span{display:grid;gap:1px}
.print-status-card b{font-size:11px;line-height:1.5;color:#fff}
.print-status-card small{font-size:9px;line-height:1.5;color:#d3dfeb}
.action-buttons .print-status-card{margin-inline:2px}
@media(max-width:650px){
 .workflow-check-card,.workflow-special-card{align-items:flex-start;gap:11px;padding:14px 13px}
 .workflow-check-tag,.workflow-special-tag{font-size:9px;padding:5px 7px}
 .workflow-check-copy b,.workflow-special-copy b{font-size:12px;line-height:1.85}
 .workflow-check-copy small,.workflow-special-copy small{font-size:10px;line-height:1.85}
 .print-status-card{padding:6px 8px;gap:6px}
 .print-status-card small{display:none}
}
:root[data-theme="dark"] .workflow-check-card,:root[data-theme="dark"] .workflow-special-card,:root[data-theme="dark"] .print-status-card{border-color:#496b8d}
:root[data-theme="dark"] .workflow-check-card.is-exempt{background:linear-gradient(135deg,#344d68,#405c78)}

/* Navigation accordion: measured-height motion, subtle elevation and native SVG chevron */
.nav-group{width:100%;min-width:0}
.nav-group-toggle{position:relative}
.nav-group-toggle .nav-count{margin-right:auto}
.nav-chevron{width:17px;height:17px;flex:0 0 17px;display:grid;place-items:center;color:#8796aa;transition:transform .46s cubic-bezier(.22,1,.36,1),color .28s ease}
.nav-chevron svg{display:block;width:15px;height:15px;stroke-width:1.8}
.nav-group.open .nav-chevron{transform:rotate(180deg);color:#bdc9d8}
.nav-submenu{height:0;overflow:hidden;opacity:0;transform:translateY(-5px);transition:height .52s cubic-bezier(.22,1,.36,1),opacity .28s ease,transform .42s cubic-bezier(.22,1,.36,1);will-change:height,opacity,transform;pointer-events:none}
.nav-group.open .nav-submenu{opacity:1;transform:translateY(0);pointer-events:auto}
.nav-submenu-inner{display:grid;gap:4px;padding:6px 13px 9px 2px}
.nav-subitem{width:100%;min-height:37px;border:0;border-right:2px solid #ffffff20;border-radius:8px;background:#ffffff07;color:#aebbd0;display:flex;align-items:center;gap:8px;padding:7px 12px 7px 9px;text-align:right;font:inherit;font-size:11px;line-height:1.5;cursor:pointer;transition:background .22s ease,color .22s ease,border-color .22s ease,padding-right .22s ease}
.nav-subitem:hover{background:#ffffff12;color:#fff;padding-right:15px}
.nav-subitem.active{border-right-color:#f08a55;background:#df703d20;color:#ffd0ad}
.nav-count{flex:0 0 auto;min-width:19px;text-align:center}
.nav-subitem .nav-count{margin-right:auto;background:#e36a38;color:#fff;border-radius:14px;padding:1px 6px;font:10px Arial,sans-serif;box-shadow:0 2px 6px #0002}
.accounting-tab{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.accounting-tab .nav-count.tab-count{background:#e56d39;color:#fff;border-radius:12px;padding:1px 6px;font:10px Arial,sans-serif;min-width:18px}
@media(prefers-reduced-motion:reduce){.nav-submenu,.nav-chevron,.nav-subitem{transition:none!important;transform:none!important}}

/* v1.5.28: centered, wider login panel */
.login-shell{grid-template-columns:minmax(0,1fr);place-items:center;padding:34px 20px;min-height:100vh;background:radial-gradient(ellipse at 50% 8%,rgba(59,83,116,.62) 0%,rgba(59,83,116,0) 42%),radial-gradient(ellipse at 9% 84%,rgba(189,138,45,.13) 0%,rgba(189,138,45,0) 34%),radial-gradient(ellipse at 92% 90%,rgba(64,111,166,.17) 0%,rgba(64,111,166,0) 36%),linear-gradient(145deg,#0d1522 0%,#142238 52%,#0b1524 100%)}
.login-panel{width:min(100%,860px);max-width:860px;padding:46px clamp(28px,6vw,76px);background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}
.login-brand-center{margin-bottom:22px}
.login-heading{margin-bottom:22px}
.admin-password-btn{border:1px solid var(--line);background:#fff;color:#344055;border-radius:10px;padding:8px 12px;font-size:10px;font-weight:800;transition:.18s}
.admin-password-btn:hover{border-color:#e56d39;color:#c65a2e;background:#fff8f4}
@media(max-width:600px){.login-shell{padding:16px 12px}.login-panel{padding:28px 20px;border-radius:16px}.admin-password-btn{padding:7px 9px;font-size:9px}}


/* v1.5.28: premium navy / steel-blue / muted-gold login atmosphere */
.login-shell{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background-color:#0a1321;
  background-image:
    radial-gradient(ellipse 68% 70% at 12% 13%,rgba(68,105,153,.54) 0%,rgba(48,77,118,.25) 38%,rgba(35,56,86,0) 74%),
    radial-gradient(ellipse 49% 59% at 91% 15%,rgba(226,111,65,.17) 0%,rgba(193,116,67,.075) 39%,rgba(193,116,67,0) 75%),
    radial-gradient(ellipse 61% 52% at 84% 96%,rgba(190,145,65,.22) 0%,rgba(151,116,60,.09) 43%,rgba(151,116,60,0) 76%),
    radial-gradient(ellipse 45% 38% at 49% 53%,rgba(53,79,116,.34) 0%,rgba(36,57,87,.12) 54%,rgba(36,57,87,0) 100%),
    linear-gradient(132deg,#09121f 0%,#14263d 39%,#1a2d45 57%,#101d30 78%,#091320 100%);
  background-attachment:fixed;
}
.login-shell::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.62;
  background:
    radial-gradient(circle at 17% 22%,rgba(255,255,255,.075) 0,rgba(255,255,255,0) 27%),
    radial-gradient(circle at 78% 78%,rgba(239,166,91,.075) 0,rgba(239,166,91,0) 24%),
    repeating-linear-gradient(119deg,transparent 0,transparent 118px,rgba(255,255,255,.012) 119px,transparent 120px);
}
.login-shell::after{
  content:"";
  position:absolute;
  z-index:0;
  pointer-events:none;
  width:min(76vw,900px);
  aspect-ratio:1;
  top:-54%;
  right:-24%;
  border-radius:50%;
  border:1px solid rgba(214,226,242,.075);
  box-shadow:
    0 0 0 54px rgba(214,226,242,.022),
    0 0 0 108px rgba(214,226,242,.016),
    0 0 95px rgba(71,105,151,.12);
  transform:rotate(-16deg);
}
.login-panel{position:relative;z-index:1}
@media(max-width:600px){
  .login-shell::after{width:118vw;top:-35%;right:-55%;opacity:.7}
}
@media(prefers-reduced-motion:reduce){.login-shell::before,.login-shell::after{transition:none!important;animation:none!important}}

/* v1.5.29 — fast accessory checkout, multi-line invoices and two-page print layout. */
#sale-form .sale-customer-extra-fields{display:contents}
#sale-form .sale-quick-note{
  display:flex;flex-direction:column;gap:4px;margin:0 0 14px;padding:13px 16px;
  border:1px solid #c7dfd5;border-radius:12px;
  background:linear-gradient(115deg,#effaf4 0%,#f8fcfa 100%);color:#205d43;
}
#sale-form .sale-quick-note[hidden]{display:none!important}
#sale-form .sale-quick-note b{font-size:13px;font-weight:900}
#sale-form .sale-quick-note span{font-size:12px;line-height:1.8;color:#557969}
#sale-form .sale-quick-summary{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:15px 18px;border:1px solid #b9dacb;border-radius:13px;
  background:linear-gradient(110deg,#edf8f1,#fbfefc);color:#1b5a3e;
}
#sale-form .sale-quick-summary>div{display:flex;flex-direction:column;gap:4px}
#sale-form .sale-quick-summary b{font-size:14px;font-weight:900}
#sale-form .sale-quick-summary small{font-size:11.5px;line-height:1.7;color:#577b68}
#sale-form .sale-quick-summary>strong{font-size:18px;font-weight:900;white-space:nowrap;font-variant-numeric:tabular-nums}
#sale-form .sale-print-layout-section{margin-top:14px}
#sale-form .sale-addons-section .sale-addons-head small{max-width:540px;line-height:1.8}
#sale-form .addon-row .addon-product{min-width:240px}
#sale-form .addon-row .addon-stock-hint{display:block;line-height:1.6;margin-top:4px}

/* Two-page layout intentionally bypasses the single-page scaling engine. */
@media print{
  @page{size:A4 portrait;margin:8mm}
  html:has(body>.print-root.sales-invoice.invoice-two-page),
  body:has(>.print-root.sales-invoice.invoice-two-page){height:auto!important;min-height:0!important;overflow:visible!important}
  body>.print-root.sales-invoice.invoice-two-page{
    display:block!important;position:static!important;box-sizing:border-box!important;
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0!important;overflow:visible!important;
    break-inside:auto!important;page-break-inside:auto!important;break-after:auto!important;page-break-after:auto!important;
  }
  body>.print-root.sales-invoice.invoice-two-page .invoice-paper{
    display:block!important;position:static!important;box-sizing:border-box!important;
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0!important;border:0!important;overflow:visible!important;
    zoom:1!important;transform:none!important;break-inside:auto!important;page-break-inside:auto!important;
  }
  body>.print-root.sales-invoice.invoice-two-page .invoice-main,
  body>.print-root.sales-invoice.invoice-two-page .invoice-print-footer{
    display:block!important;position:static!important;width:100%!important;height:auto!important;
    min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;
    overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important;
  }
  body>.print-root.sales-invoice.invoice-two-page .invoice-top{break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice.invoice-two-page .invoice-page-two-start{
    display:block!important;break-before:page!important;page-break-before:always!important;
    margin-top:0!important;padding-top:0!important;
  }
  body>.print-root.sales-invoice.invoice-two-page .invoice-page-two-head{
    display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8mm!important;
    margin:0 0 4mm!important;padding:3mm 4mm!important;
    border:1px solid #cbd6e5!important;border-radius:2mm!important;
    background:#f1f5fa!important;color:#203957!important;font-size:10pt!important;
  }
  body>.print-root.sales-invoice.invoice-two-page .invoice-page-two-head span{font-size:9pt!important;font-weight:700!important}
  body>.print-root.sales-invoice.invoice-two-page .product-table,
  body>.print-root.sales-invoice.invoice-two-page .invoice-table{width:100%!important;max-width:100%!important;table-layout:fixed!important;break-inside:auto!important;page-break-inside:auto!important}
  body>.print-root.sales-invoice.invoice-two-page .product-table tr{height:auto!important;break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice.invoice-two-page .product-table th,
  body>.print-root.sales-invoice.invoice-two-page .product-table td{padding:3mm 2mm!important;font-size:10pt!important;line-height:1.7!important}
  body>.print-root.sales-invoice.invoice-two-page .invoice-info{break-inside:avoid!important;page-break-inside:avoid!important}
  body>.print-root.sales-invoice.invoice-two-page .invoice-total,
  body>.print-root.sales-invoice.invoice-two-page .invoice-notes,
  body>.print-root.sales-invoice.invoice-two-page .invoice-signatures,
  body>.print-root.sales-invoice.invoice-two-page .guarantee-print-section,
  body>.print-root.sales-invoice.invoice-two-page .contract-warning,
  body>.print-root.sales-invoice.invoice-two-page .contract-terms{break-inside:auto!important;page-break-inside:auto!important}
}

/* v1.5.29: accessory checkout hides contact fields reliably and keeps its invoice concise. */
#sale-form .sale-customer-extra-fields[hidden]{display:none!important}
.quick-accessory-invoice-total .sale-summary-grid{grid-template-columns:minmax(220px,1fr)!important;max-width:340px!important;margin-inline-start:auto!important}
.quick-accessory-invoice-total .sale-summary-cell{padding:3mm 4mm!important}
.quick-accessory-invoice-total .sale-summary-cell b{font-size:15pt!important}


/* v1.5.30 — clear navy product selectors and distinct device/accessory blocks */
#sale-form .inventory-picker-field{padding:15px;border:1.5px solid #9fb5cf;border-radius:15px;background:linear-gradient(180deg,#f8fbff 0%,#f1f6fc 100%);box-shadow:0 3px 12px #1739570b}
#sale-form .inventory-picker-field>label{color:#173957;font-weight:900}
#sale-form .inventory-picker-field .inventory-picker-search-row{border:1.5px solid #8da8c7;border-radius:11px;background:#fff;box-shadow:0 1px 3px #1739570a}
#sale-form .inventory-picker-field .inventory-picker-search-row:focus-within{border-color:#173957;box-shadow:0 0 0 3px #17395718}
#sale-form .inventory-picker-field>.inventory-picker-search-row input{border:0!important;box-shadow:none!important;background:transparent!important}
#sale-form .inventory-picker-field>select,#sale-form .device-row select,#sale-form .addon-row select{border:1.5px solid #9db2cc;border-radius:10px;box-shadow:0 1px 3px #1739570a;transition:border-color .18s,box-shadow .18s,background .18s}
#sale-form .inventory-picker-field>select:focus,#sale-form .device-row select:focus,#sale-form .addon-row select:focus{border-color:#173957;box-shadow:0 0 0 3px #17395718}
#sale-form .sale-device-add-section{display:grid;gap:8px;margin-top:13px;padding:12px;border:1.7px solid #173957;border-radius:13px;background:linear-gradient(135deg,#f0f5fb 0%,#e8f0f8 100%)}
#sale-form .sale-device-add-button{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:46px;padding:10px 15px;border:1.6px solid #173957;border-radius:10px;background:linear-gradient(110deg,#173957 0%,#244f73 100%);color:#fff;font:inherit;font-size:13px;font-weight:900;box-shadow:0 4px 10px #17395722;transition:transform .16s,box-shadow .16s,filter .16s}
#sale-form .sale-device-add-button:hover{filter:brightness(1.08);box-shadow:0 6px 14px #1739572a;transform:translateY(-1px)}
#sale-form .sale-device-add-button:active{transform:translateY(0);box-shadow:0 2px 5px #17395720}
#sale-form .sale-device-add-section>small{color:#526982;font-size:10px;line-height:1.8;padding-inline:3px}
#sale-form .device-row{border:1.5px solid #718eaf;background:#fff;box-shadow:0 2px 8px #1739570c}
#sale-form .device-row .device-product select[data-device-category]{border-color:#55799f;background:#f7faff;color:#173957;font-weight:800}
#sale-form .sale-addons-section{border:1.5px solid #a9bad0;background:linear-gradient(180deg,#f9fbfe 0%,#f3f6fa 100%)}
#sale-form .sale-addons-head b{color:#173957;font-weight:900}
#sale-form .sale-addons-head .btn{border-color:#315a82;color:#173957;background:#fff}
#sale-form .sale-addons-head .btn:hover{background:#edf3f9}
#sale-form .addon-row:not(.device-row){border-color:#bdcadd;background:#fff}
#sale-form .picker-result-count{color:#45617f;font-weight:700}
#sale-form .field input:not([type=hidden]):focus,#sale-form .field select:focus,#sale-form .field textarea:focus{border-color:#173957;box-shadow:0 0 0 3px #17395717}
@media(max-width:680px){#sale-form .inventory-picker-field{padding:11px}#sale-form .sale-device-add-section{padding:9px}}
:root[data-theme="dark"] #sale-form .inventory-picker-field{background:linear-gradient(180deg,#182a40 0%,#142338 100%);border-color:#526f91}
:root[data-theme="dark"] #sale-form .sale-device-add-section{background:linear-gradient(135deg,#182d45 0%,#203a57 100%);border-color:#6c89aa}
:root[data-theme="dark"] #sale-form .sale-device-add-section>small{color:#b9cbe0}
:root[data-theme="dark"] #sale-form .sale-addons-section{background:#18283c;border-color:#526982}
:root[data-theme="dark"] #sale-form .sale-addons-head b{color:#e1ebf7}
:root[data-theme="dark"] #sale-form .device-row{border-color:#526f91;background:#17283d}


/* v1.5.46 app64 — per-device 90% default, adjustable app zoom, full-height sidebar */
@media screen {
  html,body { min-height:var(--dc-app-scaled-vh,111.111vh)!important; }
  body { height:auto!important; }
  #login-screen.login-shell { min-height:var(--dc-app-scaled-vh,111.111vh)!important;height:auto!important; }
  #app-shell { min-height:var(--dc-app-scaled-vh,111.111vh)!important;height:auto!important;overflow:visible!important; }
  .main-column { min-height:var(--dc-app-scaled-vh,111.111vh)!important; }
  .sidebar {
    height:var(--dc-app-scaled-vh,111.111vh)!important;
    min-height:var(--dc-app-scaled-vh,111.111vh)!important;
    max-height:var(--dc-app-scaled-vh,111.111vh)!important;
    min-width:0!important;display:flex!important;flex-direction:column!important;
    overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch;
    scrollbar-width:thin;scrollbar-color:#657892 transparent;
    border-bottom-left-radius:16px;
  }
  .side-brand,.side-user,.nav-caption,.main-nav,.sidebar-bottom { flex-shrink:0!important; }
  .main-nav { min-height:max-content!important;flex:0 0 auto!important;padding-bottom:12px; }
  .sidebar-bottom {
    flex:0 0 auto!important;margin-top:auto!important;padding:14px 7px 14px!important;
    border-top:1px solid rgba(220,232,245,.13);
    border-radius:16px 16px 12px 12px;
    background:linear-gradient(180deg,rgba(255,255,255,.018),rgba(255,255,255,.055));
  }
  .help-card {border-color:rgba(120,157,195,.28)!important;background:linear-gradient(135deg,rgba(66,101,139,.23),rgba(255,255,255,.035))!important;border-radius:13px!important;}
  .logout-btn {border-radius:11px!important;}
  .side-version {padding-bottom:4px!important;}
  .app-zoom-control {display:flex;align-items:center;gap:6px;height:34px;padding:0 8px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#66758b;font-size:10px;font-weight:800;white-space:nowrap}
  .app-zoom-control select {height:27px;min-width:54px;border:0;background:transparent;color:#1b3551;font:inherit;font-size:11px;font-weight:900;outline:none;cursor:pointer}
}
@media(max-width:820px){
  .sidebar {height:var(--dc-app-scaled-vh,111.111vh)!important;max-height:var(--dc-app-scaled-vh,111.111vh)!important;min-height:var(--dc-app-scaled-vh,111.111vh)!important;flex-basis:270px!important;}
  .app-zoom-control>span {display:none}
}


/* Smooth, blurred navy/steel-blue/gold light instead of hard rings and patterns. */
.login-shell {
  position:relative !important;
  isolation:isolate !important;
  overflow:hidden !important;
  background-color:#0b1728 !important;
  background-image:linear-gradient(132deg,#101d31 0%,#1b3049 47%,#14243a 100%) !important;
  background-attachment:fixed !important;
}
.login-shell::before {
  content:"" !important;
  position:absolute !important;
  inset:-100px !important;
  z-index:0 !important;
  pointer-events:none !important;
  opacity:.92 !important;
  filter:blur(54px) !important;
  transform:scale(1.04) !important;
  background:
    radial-gradient(ellipse 48% 55% at 14% 16%,rgba(83,125,177,.54) 0%,rgba(64,99,145,.27) 43%,transparent 78%),
    radial-gradient(ellipse 42% 48% at 88% 22%,rgba(190,119,78,.22) 0%,rgba(151,101,72,.10) 46%,transparent 78%),
    radial-gradient(ellipse 50% 48% at 75% 91%,rgba(190,153,91,.24) 0%,rgba(143,122,80,.10) 48%,transparent 80%),
    radial-gradient(ellipse 45% 40% at 48% 58%,rgba(58,91,137,.28) 0%,transparent 76%) !important;
}
.login-shell::after {
  content:"" !important;
  position:absolute !important;
  z-index:0 !important;
  pointer-events:none !important;
  width:min(62vw,760px) !important;
  height:min(58vh,520px) !important;
  top:42% !important;
  left:-14% !important;
  border:0 !important;
  border-radius:50% !important;
  filter:blur(72px) !important;
  opacity:.54 !important;
  background:radial-gradient(ellipse at center,rgba(65,112,166,.25) 0%,rgba(189,138,77,.10) 38%,transparent 72%) !important;
  box-shadow:none !important;
  transform:none !important;
}
.login-panel { position:relative !important; z-index:1 !important; }
@media(max-width:600px) {
  .login-shell { padding:20px 12px !important; }
  .login-shell::after { width:120vw !important; height:55vh !important; top:48% !important; left:-45% !important; }
}

/* Wholesale accessory purchase invoices */
.wholesale-intro {
  border: 1px solid rgba(32, 67, 105, .18);
  border-right: 4px solid #203f63;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239,245,252,.96), rgba(255,255,255,.98));
  color: #304b69;
  line-height: 1.9;
  padding: 15px 18px;
  margin-bottom: 16px;
}
.wholesale-purchase-line {
  border: 1px solid #bdcfe4;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff 0%, #f7faff 100%);
  box-shadow: 0 5px 16px rgba(24,49,79,.055);
  padding: 15px;
  margin: 12px 0;
}
.wholesale-line-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:11px;
  margin-bottom:13px;
  border-bottom:1px solid #d8e3ef;
}
.wholesale-line-number {
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#183957;
  font-weight:800;
  background:#e8f0f9;
  border:1px solid #c7d8eb;
  border-radius:9px;
  padding:6px 11px;
}
.wholesale-line-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.wholesale-purchase-line .field input,
.wholesale-purchase-line .field select {
  border:1px solid #c1d2e6;
  background:#fff;
  min-height:43px;
}
.wholesale-purchase-line .field input:focus,
.wholesale-purchase-line .field select:focus {
  border-color:#244b73;
  box-shadow:0 0 0 3px rgba(36,75,115,.11);
}
.wholesale-line-total {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  align-items:center;
  color:#516b86;
  background:#eef4fa;
  border:1px solid #d6e2ef;
  border-radius:10px;
  margin-top:12px;
  padding:9px 12px;
  font-size:12px;
}
.wholesale-line-total b { color:#173b5e; font-size:13px; }
.wholesale-add-line {
  border:1px solid #25496e !important;
  color:#173957 !important;
  background:#f1f6fb !important;
  border-radius:11px !important;
  min-height:43px;
  font-weight:800;
}
.wholesale-add-line:hover { background:#e5eef8 !important; box-shadow:0 5px 13px rgba(23,57,87,.09); }
.wholesale-purchase-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:1px solid #294f75;
  border-radius:14px;
  padding:15px 18px;
  background:linear-gradient(130deg,#17314d,#244d70);
  color:#fff;
  margin:14px 0 18px;
  box-shadow:0 8px 20px rgba(23,49,77,.12);
}
.wholesale-purchase-summary div { display:flex; flex-direction:column; gap:5px; }
.wholesale-purchase-summary small { color:#d1dfed; font-size:11px; }
.wholesale-purchase-summary b { color:#fff; font-size:15px; }
.wholesale-purchase-summary strong { color:#fff; font-size:19px; font-weight:900; }
.wholesale-accessory-invoice .invoice-meta-title { color:#214969; }
@media(max-width:1050px) {
  .wholesale-line-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  .wholesale-line-grid { grid-template-columns:1fr; }
  .wholesale-purchase-summary { align-items:stretch; }
  .wholesale-purchase-summary strong { font-size:16px; }
}


/* Content warehouse module */
.content-warehouse-tabs{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 18px;padding:10px;background:linear-gradient(135deg,#f8fbff,#edf3fa);border:1px solid #c9d8e9;border-radius:16px;box-shadow:0 5px 16px rgba(18,45,76,.05)}
.content-warehouse-tab{display:inline-flex;align-items:center;gap:8px;border:1px solid #c5d5e8;border-radius:11px;padding:11px 16px;background:#fff;color:#173957;font:inherit;font-weight:700;cursor:pointer;transition:background .18s,border-color .18s,color .18s,transform .18s}
.content-warehouse-tab:hover{border-color:#315a84;background:#f3f7fc;transform:translateY(-1px)}
.content-warehouse-tab.active{background:linear-gradient(135deg,#173957,#244e73);border-color:#173957;color:#fff;box-shadow:0 5px 13px rgba(23,57,87,.18)}
.content-warehouse-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 18px}
.content-warehouse-stats>div,.content-purchase-summary{padding:15px 18px;border:1px solid #cfdaea;border-radius:14px;background:linear-gradient(145deg,#fff,#f5f8fc);box-shadow:0 5px 16px rgba(22,51,82,.05)}
.content-warehouse-stats small,.content-purchase-summary small{display:block;color:#60758c;font-weight:600;margin-bottom:7px}
.content-warehouse-stats b,.content-purchase-summary b,.content-purchase-summary strong{display:block;color:#173957;font-size:19px;font-weight:800}
.content-purchase-lines-head,.content-sale-lines-head{display:flex;flex-direction:column;gap:4px;margin:18px 0 10px;padding:13px 16px;background:#f1f6fc;border:1px solid #c9d8e9;border-right:4px solid #173957;border-radius:12px;color:#173957}
.content-purchase-lines-head small,.content-sale-lines-head small{color:#63788e;font-size:12px}
.content-purchase-line,.content-sale-line{padding:15px;margin:12px 0;border:1px solid #c8d7e9;border-radius:14px;background:#fff;box-shadow:0 4px 13px rgba(19,49,80,.04)}
.content-line-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;color:#173957}
.content-line-price,.content-price-preview{padding:12px 14px;min-height:43px;border:1px solid #bfcfe2;border-radius:10px;background:#f4f8fc;color:#173957;font-weight:800}
.content-purchase-summary{display:flex;justify-content:space-between;gap:14px;margin-top:16px}
.content-purchase-summary>div{display:flex;flex-direction:column;gap:4px}
.content-warehouse-tabs svg{flex:none}
@media(max-width:760px){.content-warehouse-stats{grid-template-columns:1fr}.content-purchase-summary{flex-direction:column}.content-warehouse-tab{flex:1;justify-content:center;padding:10px 8px;font-size:13px}}


/* v1.5.37: content-warehouse purchase invoice alignment */
@media print {
  body > .print-root.content-purchase-invoice .invoice-total.purchase-total {
    display:flex !important;
    flex-direction:row !important;
    justify-content:flex-end !important;
    direction:ltr !important;
    width:100% !important;
    margin:2mm 0 1.5mm !important;
    box-sizing:border-box !important;
  }
  body > .print-root.content-purchase-invoice .invoice-total.purchase-total > div {
    direction:rtl !important;
    text-align:right !important;
    margin:0 !important;
  }
  body > .print-root.content-purchase-invoice .brand-contact-strip {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 28mm 28mm 19mm 19mm !important;
    gap:1.7mm !important;
    align-items:center !important;
    height:29mm !important;
    min-height:29mm !important;
    max-height:29mm !important;
    box-sizing:border-box !important;
    padding:1.2mm 1.8mm !important;
    overflow:visible !important;
  }
  body > .print-root.content-purchase-invoice .invoice-signatures {
    display:contents !important;
    width:auto !important;
    margin:0 !important;
    padding:0 !important;
  }
  body > .print-root.content-purchase-invoice .signature-box {
    display:flex !important;
    position:relative !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:23mm !important;
    min-height:23mm !important;
    max-height:23mm !important;
    align-items:flex-end !important;
    justify-content:center !important;
    padding:1.2mm 1.3mm !important;
    border:1px solid #aebbd0 !important;
    border-radius:1.2mm !important;
    background:#fff !important;
    background-image:none !important;
    break-inside:avoid !important;
  }
  body > .print-root.content-purchase-invoice .signature-box b {
    right:1.2mm !important;
    bottom:1mm !important;
    left:1.2mm !important;
    padding:0 !important;
    background:#fff !important;
    font-size:7.8px !important;
    line-height:1.35 !important;
    text-align:center !important;
    white-space:normal !important;
  }
  body > .print-root.content-purchase-invoice .social-qr {
    width:19mm !important;
    min-width:19mm !important;
  }
  body > .print-root.content-purchase-invoice .social-qr img {
    width:16.5mm !important;
    height:16.5mm !important;
  }
  body > .print-root.content-purchase-invoice .social-qr figcaption {
    font-size:5.7px !important;
  }
}


/* v1.5.38 — align the first sale item with additional device rows. */
#sale-form .inventory-picker-field .primary-sale-category{margin:0 0 12px;}
#sale-form .inventory-picker-field .primary-sale-category .field{margin:0;}
#sale-form .inventory-picker-field .primary-sale-category .field>label{display:flex;flex-direction:column;gap:7px;color:#173957;font-weight:900;}
#sale-form .inventory-picker-field .primary-sale-category select{width:100%;min-height:43px;border:1.5px solid #9db2cc;border-radius:10px;background:#fff;color:#173957;font:inherit;font-size:13px;padding:0 12px;}
#sale-form .sale-primary-values{display:grid;grid-template-columns:minmax(0,1fr);gap:11px;margin-top:13px;padding:12px;border:1.4px solid #b7c9de;border-radius:11px;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);}
#sale-form .sale-primary-values .field{margin:0;min-width:0;}
#sale-form .sale-primary-values .field>label{display:flex;flex-direction:column;gap:6px;color:#314b68;font-weight:800;}
#sale-form .sale-primary-values .field input{width:100%;min-height:42px;border:1.5px solid #c1d0e2;border-radius:9px;background:#fff;padding:0 12px;}
#sale-form .device-row{display:grid;grid-template-columns:minmax(0,1fr) 34px;align-items:start;gap:10px;}
#sale-form .device-row-main{grid-column:1;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;}
#sale-form .device-row .device-product{grid-column:1;min-width:0;}
#sale-form .device-row-values{display:grid;grid-template-columns:minmax(0,1fr);gap:11px;padding:12px;border:1.4px solid #b7c9de;border-radius:11px;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);}
#sale-form .device-row-values .addon-quantity,#sale-form .device-row-values .addon-price{min-width:0;}
#sale-form .device-row-values .addon-quantity label,#sale-form .device-row-values .addon-price label{display:flex;flex-direction:column;gap:6px;}
#sale-form .device-row .addon-remove{grid-column:2;grid-row:1;align-self:start;justify-self:end;width:34px;height:34px;margin:0;}
:root[data-theme="dark"] #sale-form .sale-primary-values,:root[data-theme="dark"] #sale-form .device-row-values{background:linear-gradient(180deg,#17283d 0%,#142338 100%);border-color:#526f91;}
:root[data-theme="dark"] #sale-form .sale-primary-values .field>label,:root[data-theme="dark"] #sale-form .inventory-picker-field .primary-sale-category .field>label{color:#e1ebf7;}
:root[data-theme="dark"] #sale-form .inventory-picker-field .primary-sale-category select{background:#0f1d2f;color:#eef4fb;border-color:#4b6683;}
@media(max-width:680px){
  #sale-form .device-row{grid-template-columns:minmax(0,1fr) 30px;gap:8px;padding:10px 8px;}
  #sale-form .device-row .addon-remove{width:30px;height:32px;}
  #sale-form .sale-primary-values,#sale-form .device-row-values{padding:10px;}
}


/* v1.5.40 — printable invoice preview, warehouse selectors and consistent refresh actions. */
.page-refresh-button{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.warehouse-switch-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px}
.warehouse-switch-grid.single{grid-template-columns:minmax(0,1fr)}
.warehouse-switch-card{width:100%;min-width:0;display:flex;align-items:center;gap:12px;padding:13px 15px;border:1.5px solid #284b70;border-radius:13px;background:linear-gradient(135deg,#142b43 0%,#1d3c5a 58%,#244b6c 100%);color:#f4f7fb;text-align:right;box-shadow:0 7px 18px rgba(17,43,68,.12);cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease}
.warehouse-switch-card:hover{transform:translateY(-1px);border-color:#c18d3a;box-shadow:0 10px 24px rgba(17,43,68,.2)}
.warehouse-switch-card.active{border-color:#d7a64e;background:linear-gradient(135deg,#10243a 0%,#1a3c5b 60%,#274e6d 100%);box-shadow:inset -4px 0 0 #d7a64e,0 9px 22px rgba(17,43,68,.2)}
.warehouse-switch-icon{width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.18);border-radius:11px;background:rgba(255,255,255,.1);color:#f0c46d}
.warehouse-switch-card>span:nth-child(2){display:grid;gap:4px;flex:1;min-width:0}
.warehouse-switch-card b{font-size:12px;font-weight:900;color:#fff}
.warehouse-switch-card small{font-size:9px;line-height:1.7;color:#c5d5e5;white-space:normal}
.warehouse-switch-arrow{color:#d9b46c;display:grid;place-items:center;transition:transform .2s ease}
.warehouse-switch-card.active .warehouse-switch-arrow{transform:rotate(90deg)}
:root[data-theme="dark"] .warehouse-switch-card{border-color:#405c7a}

/* The preview must show the same invoice markup as print, but inside a scrollable modal. */
.invoice-preview-backdrop{position:fixed;inset:0;z-index:100500;display:flex;align-items:center;justify-content:center;padding:14px;background:rgba(7,17,30,.76);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.invoice-preview-dialog{display:flex;flex-direction:column;width:min(1120px,97vw);height:min(94vh,1050px);min-height:0;overflow:hidden;border:1px solid rgba(196,213,232,.8);border-radius:17px;background:#eef3f9;box-shadow:0 28px 90px rgba(0,0,0,.38);animation:invoicePreviewIn .2s ease-out}
@keyframes invoicePreviewIn{from{opacity:0;transform:translateY(9px) scale(.995)}to{opacity:1;transform:none}}
.invoice-preview-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 17px;background:linear-gradient(110deg,#142c45,#214866);color:#fff;border-bottom:1px solid #385b7b;flex:0 0 auto}
.invoice-preview-header>div{display:grid;gap:4px;min-width:0}
.invoice-preview-header b{font-size:13px;font-weight:900}
.invoice-preview-header small{font-size:9px;color:#c9d9e8;line-height:1.7}
.invoice-preview-header .modal-close{flex:0 0 31px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);color:#fff}
.invoice-preview-content{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px;background:linear-gradient(135deg,#e5edf6,#f5f7fa);direction:rtl}
.invoice-preview-content .print-root{display:block!important;position:relative!important;inset:auto!important;width:100%!important;max-width:210mm!important;margin:0 auto!important;padding:0!important;visibility:visible!important;opacity:1!important;overflow:visible!important}
.invoice-preview-content .invoice-paper{display:flex!important;flex-direction:column!important;position:relative!important;box-sizing:border-box!important;width:100%!important;max-width:210mm!important;min-width:0!important;min-height:0!important;height:auto!important;max-height:none!important;margin:0 auto!important;padding:9mm 10mm 0!important;overflow:visible!important;border:0!important;border-radius:2px!important;background:#fff!important;box-shadow:0 9px 30px rgba(20,42,65,.18)!important;zoom:1!important}
.invoice-preview-content .invoice-main{position:static!important;display:block!important;flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important}
.invoice-preview-content .invoice-print-footer{position:static!important;inset:auto!important;display:block!important;flex:0 0 auto!important;width:100%!important;margin-top:7mm!important;padding:0!important;break-inside:avoid!important}
.invoice-preview-content .invoice-page-two-start{margin-top:10mm;padding-top:7mm;border-top:2px dashed #c3ccd8;break-before:auto!important;page-break-before:auto!important}
.invoice-preview-content .invoice-page-two-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:4mm;color:#273b55;font-size:10px}
.invoice-preview-content .invoice-page-two-head span{color:#6d7d91;font-size:9px}
.invoice-preview-actions{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:12px 16px;border-top:1px solid #d2dce8;background:#fff;flex:0 0 auto}
.invoice-preview-actions .btn{min-width:150px}
:root[data-theme="dark"] .invoice-preview-dialog{background:#182437;border-color:#435873}
:root[data-theme="dark"] .invoice-preview-content{background:linear-gradient(135deg,#1c2a3d,#26364b)}
:root[data-theme="dark"] .invoice-preview-actions{background:#192639;border-color:#43536b}
@media(max-width:760px){
 .warehouse-switch-grid{grid-template-columns:1fr;gap:8px}
 .invoice-preview-backdrop{padding:5px}
 .invoice-preview-dialog{width:100%;height:97vh;border-radius:12px}
 .invoice-preview-content{padding:8px}
 .invoice-preview-content .invoice-paper{padding:6mm 5mm 0!important}
 .invoice-preview-actions{padding:9px;gap:7px}
 .invoice-preview-actions .btn{min-width:0;flex:1;padding-inline:8px}
 .invoice-preview-header{padding:10px 12px}
}


/* v1.5.41 — simplify the sale product picker and additional-device cards. */
#sale-form .inventory-picker-field{
  grid-column:1/-1!important;display:grid;gap:9px;padding:16px 17px!important;
  border:1px solid #d5e0ec!important;border-radius:13px!important;
  background:#fff!important;box-shadow:0 2px 8px rgba(23,57,87,.045)!important;
}
#sale-form .inventory-picker-field .primary-sale-category{margin:0 0 2px!important;max-width:100%;}
#sale-form .inventory-picker-field .primary-sale-category .field>label{gap:5px!important;font-size:11px;}
#sale-form .inventory-picker-field .primary-sale-category select{min-height:40px!important;height:40px!important;}
#sale-form .inventory-picker-field>label{margin:3px 0 0;color:#344b66;font-size:11px;font-weight:800;}
#sale-form .inventory-picker-field .inventory-picker-search-row{margin:0!important;}
#sale-form .inventory-picker-field .inventory-picker-search-row input.inventory-select-search{height:40px!important;min-height:40px!important;font-size:11px!important;border:1px solid #d3deea!important;background:#f9fbfd!important;}
#sale-form .inventory-picker-field>select{height:41px!important;min-height:41px!important;font-size:11px!important;background:#fff!important;}
#sale-form .inventory-picker-field .picker-result-count{margin:0 2px!important;font-size:9px!important;color:#73839a!important;}
#sale-form .inventory-picker-field .help{margin:0 2px!important;font-size:9px!important;line-height:1.7!important;color:#77869a!important;}
#sale-form .sale-primary-values{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;
  margin:5px 0 0!important;padding:11px 13px!important;
  border:1px solid #e0e8f1!important;border-radius:10px!important;background:#f7f9fc!important;
}
#sale-form .sale-primary-values .field{margin:0!important;}
#sale-form .sale-primary-values .field>label{
  display:grid!important;grid-template-columns:minmax(125px, .34fr) minmax(0,1fr)!important;
  align-items:center!important;gap:12px!important;font-size:10px!important;color:#435873!important;
}
#sale-form .sale-primary-values .field input{height:39px!important;min-height:39px!important;border:1px solid #ccd8e6!important;border-radius:8px!important;background:#fff!important;font-size:11px!important;}
#sale-form .sale-device-add-section{
  display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:7px 13px!important;
  margin:12px 0 0!important;padding:12px 2px 0!important;border:0!important;border-top:1px solid #e4eaf1!important;
  border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
#sale-form .sale-device-add-button{
  width:auto!important;min-width:190px!important;min-height:39px!important;padding:8px 15px!important;
  border:1px solid #315979!important;border-radius:9px!important;
  background:linear-gradient(110deg,#173957,#244f73)!important;color:#fff!important;
  font-size:11px!important;box-shadow:0 2px 6px rgba(23,57,87,.12)!important;
}
#sale-form .sale-device-add-section>small{font-size:9px!important;color:#74849a!important;line-height:1.7!important;padding:0!important;}
#sale-form #sale-device-rows{grid-column:1/-1;display:grid;gap:9px;min-width:0;}
#sale-form .device-row{
  display:block!important;position:relative!important;min-width:0!important;margin:0!important;padding:13px 14px!important;
  border:1px solid #d5e0ec!important;border-radius:11px!important;background:#fbfcfe!important;
  box-shadow:none!important;
}
#sale-form .device-row-main{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%;}
#sale-form .device-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:8px;border-bottom:1px solid #e7edf4;}
#sale-form .device-row-head>div{display:grid;gap:2px;}
#sale-form .device-row-head b{font-size:10px;color:#294863;font-weight:900;}
#sale-form .device-row-head small{font-size:9px;color:#8996a8;}
#sale-form .device-row-head .addon-remove{flex:0 0 29px;width:29px!important;height:29px!important;min-height:29px!important;padding:0!important;margin:0!important;border-radius:8px!important;font-size:17px!important;}
#sale-form .device-row .device-product{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;min-width:0;}
#sale-form .device-row .device-product>label{font-size:10px;color:#4b6079;margin:0;}
#sale-form .device-row .device-product select{height:39px!important;min-height:39px!important;font-size:11px!important;}
#sale-form .device-row .device-product .device-search-label{margin-top:2px;}
#sale-form .device-row .inventory-picker-search-row{margin:0!important;}
#sale-form .device-row .inventory-picker-search-row input.inventory-select-search{height:39px!important;min-height:39px!important;font-size:11px!important;}
#sale-form .device-row .picker-result-count,#sale-form .device-row .addon-stock-hint{font-size:9px!important;margin:0 2px!important;min-height:0!important;line-height:1.6!important;}
#sale-form .device-row-values{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;
  margin-top:3px!important;padding:10px 12px 0!important;border:0!important;border-top:1px solid #e7edf4!important;
  border-radius:0!important;background:transparent!important;
}
#sale-form .device-row-values .addon-quantity,#sale-form .device-row-values .addon-price{min-width:0;}
#sale-form .device-row-values .addon-quantity label,#sale-form .device-row-values .addon-price label{
  display:grid!important;grid-template-columns:minmax(125px,.34fr) minmax(0,1fr)!important;
  align-items:center!important;gap:12px!important;font-size:10px!important;color:#435873!important;
}
#sale-form .device-row-values input{height:39px!important;min-height:39px!important;border:1px solid #ccd8e6!important;border-radius:8px!important;font-size:11px!important;}
#sale-form .device-row-values .addon-price input{direction:ltr;text-align:right;}
:root[data-theme="dark"] #sale-form .inventory-picker-field{background:#17283d!important;border-color:#405a77!important;}
:root[data-theme="dark"] #sale-form .inventory-picker-field .primary-sale-category select,:root[data-theme="dark"] #sale-form .inventory-picker-field>select{background:#0f1d2f!important;color:#eef4fb!important;border-color:#4b6683!important;}
:root[data-theme="dark"] #sale-form .inventory-picker-field>label,:root[data-theme="dark"] #sale-form .sale-primary-values .field>label,:root[data-theme="dark"] #sale-form .device-row-values label{color:#dce7f4!important;}
:root[data-theme="dark"] #sale-form .sale-primary-values,:root[data-theme="dark"] #sale-form .device-row-values{background:#1b2d43!important;border-color:#405a77!important;}
:root[data-theme="dark"] #sale-form .device-row{background:#17283d!important;border-color:#405a77!important;}
:root[data-theme="dark"] #sale-form .device-row-head{border-color:#354b65!important;}
:root[data-theme="dark"] #sale-form .device-row-head b{color:#e4edf7!important;}
:root[data-theme="dark"] #sale-form .device-row-values{border-color:#354b65!important;}
@media(max-width:680px){
  #sale-form .inventory-picker-field{padding:12px!important;}
  #sale-form .sale-primary-values{padding:9px!important;}
  #sale-form .sale-primary-values .field>label,#sale-form .device-row-values .addon-quantity label,#sale-form .device-row-values .addon-price label{grid-template-columns:1fr!important;gap:4px!important;}
  #sale-form .sale-device-add-section{grid-template-columns:1fr!important;}
  #sale-form .sale-device-add-button{width:100%!important;}
  #sale-form .sale-device-add-section>small{grid-column:1;}
  #sale-form .device-row{padding:10px!important;}
}

/* v1.5.42 app60: stronger sales readability and split content warehouse/sales */
.content-module{display:grid;gap:18px;min-width:0;color:#183653}
.content-module .page-head{align-items:center;margin-bottom:2px;padding:18px 20px;background:linear-gradient(120deg,#fff 0%,#f2f6fb 100%);border:1.5px solid #c7d7e9;border-right:5px solid #173957;border-radius:16px;box-shadow:0 6px 18px rgba(20,48,78,.07)}
.content-module .page-head h1{font-size:25px!important;line-height:1.5;color:#102e4a;font-weight:900}
.content-module .page-head p{font-size:13px!important;line-height:1.9;color:#526b85;font-weight:600}
.content-module .page-title-icon{width:52px;height:52px;flex-basis:52px;background:linear-gradient(145deg,#e7f0fb,#d7e6f6);color:#173957;border:1px solid #b9cde4}
.content-module .page-head-actions .btn{min-height:42px;padding:10px 15px;font-size:13px;font-weight:800;border-width:1.5px}
.content-module .content-warehouse-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0;padding:11px;background:linear-gradient(120deg,#eaf1f9,#f6f9fd);border:1.5px solid #b7cbe1;border-radius:15px;box-shadow:0 4px 14px rgba(23,57,87,.07)}
.content-module .content-warehouse-tab{min-height:48px;padding:11px 20px;font-size:14px;font-weight:900;color:#173957;border:1.5px solid #9fb6d0;border-radius:11px;background:#fff;box-shadow:0 2px 5px rgba(23,57,87,.05)}
.content-module .content-warehouse-tab svg{width:18px;height:18px}
.content-module .content-warehouse-tab:hover{border-color:#315d86;background:#edf4fb;color:#102e4a}
.content-module .content-warehouse-tab.active{background:linear-gradient(120deg,#173957,#285579);border-color:#173957;color:#fff;box-shadow:0 5px 13px rgba(23,57,87,.2)}
.content-module .content-warehouse-stats{gap:14px;margin:0 0 17px}
.content-module .content-warehouse-stats>div{padding:17px 19px;border:1.5px solid #c0d1e4;border-top:3px solid #315d86;border-radius:14px;background:linear-gradient(145deg,#fff,#f1f6fb);box-shadow:0 5px 15px rgba(23,57,87,.06)}
.content-module .content-warehouse-stats small{font-size:13px;color:#435f7b;font-weight:800;margin-bottom:8px}
.content-module .content-warehouse-stats b{font-size:23px;color:#102f4c;font-weight:900}
.content-module .content-panel-head{padding:16px 18px;background:#eaf1f8;border:1.5px solid #c0d1e4;border-bottom:0;border-radius:13px 13px 0 0}
.content-module .section-title{font-size:17px!important;color:#123653;font-weight:900}
.content-module .section-subtitle{font-size:12px!important;color:#4f6882;font-weight:700;line-height:1.8}
.content-module .search-input{height:42px;min-width:230px;font-size:13px;color:#173957;border:1.5px solid #9fb6d0;background:#fff}
.content-module .panel{border:1.5px solid #bdcfe3;border-radius:0 0 14px 14px;box-shadow:0 5px 16px rgba(23,57,87,.06);overflow:hidden}
.content-module .panel table th{background:linear-gradient(180deg,#1d4262,#173957);color:#fff;font-size:13px;font-weight:900;padding:14px 13px;border-color:#42617f}
.content-module .panel table td{font-size:13px;color:#263f59;padding:14px 13px;border-color:#e1e9f2;font-weight:600}
.content-module .panel table tbody tr:nth-child(even){background:#f4f8fc}
.content-module .panel table tbody tr:hover{background:#eaf2fa}
.content-module .td-main{font-size:14px;color:#173957;font-weight:900}
.content-module .td-muted{font-size:11px;color:#5e7188}
.content-module .category-chip{font-size:12px;font-weight:800;background:#e5eef8;color:#234969;border:1px solid #c2d2e4;padding:5px 9px}
.content-module .btn{font-size:13px;font-weight:800;min-height:36px}
.content-module .btn-outline{border:1.5px solid #7895b5;color:#173957;background:#fff}
.content-module .btn-primary{background:linear-gradient(120deg,#173957,#285579);border-color:#173957;color:#fff}
.content-module .empty-state strong{font-size:14px;color:#294762}
.content-module .empty-state{color:#58728e}

/* Sales form: increase hierarchy, readability and contrast without changing fields */
#sale-form .form-section{border:1.5px solid #bfd0e3;border-radius:14px;background:linear-gradient(180deg,#fff 0%,#f7faff 100%);padding:17px;margin:14px 0}
#sale-form .form-section-head{padding-bottom:12px;margin-bottom:15px;border-bottom:1.5px solid #d4e0ed}
#sale-form .form-section-head strong{font-size:16px!important;color:#143957!important;font-weight:900!important}
#sale-form .form-section-head .step-number{width:29px;height:29px;font-size:14px;background:#dfeaf6;color:#173957;border:1px solid #b5c9df}
#sale-form .field>label,#sale-form .inventory-picker-field>label,#sale-form .device-row .device-product>label{font-size:13px!important;line-height:1.8;color:#244461!important;font-weight:900!important}
#sale-form .field input:not([type=hidden]),#sale-form .field select,#sale-form .field textarea{font-size:14px!important;min-height:43px;border:1.5px solid #afc3d9!important;color:#173957}
#sale-form .inventory-picker-field{padding:15px!important;border:1.5px solid #9fb6d0!important;border-radius:13px!important;background:linear-gradient(145deg,#f6f9fd,#edf3f9)!important}
#sale-form .inventory-picker-field .primary-sale-category .field>label{font-size:13px!important;color:#173957!important}
#sale-form .inventory-picker-field .primary-sale-category select,#sale-form .inventory-picker-field>select{height:45px!important;min-height:45px!important;font-size:13px!important;border:1.5px solid #8fa9c5!important;color:#173957!important}
#sale-form .inventory-picker-field .inventory-picker-search-row input.inventory-select-search{height:44px!important;min-height:44px!important;font-size:13px!important;border:0!important;color:#173957!important}
#sale-form .picker-result-count{font-size:12px!important;color:#385a7b!important;font-weight:800!important;line-height:1.8!important}
#sale-form .inventory-picker-field .help,#sale-form .device-row .addon-stock-hint{font-size:12px!important;color:#4d6782!important;line-height:1.9!important;font-weight:600}
#sale-form .sale-primary-values{gap:13px!important;padding:15px!important;border:1.5px solid #9fb6d0!important;background:linear-gradient(135deg,#edf4fb,#f8fbff)!important}
#sale-form .sale-primary-values .field>label{font-size:13px!important;color:#244461!important;font-weight:900!important}
#sale-form .sale-primary-values .field input{height:44px!important;min-height:44px!important;font-size:14px!important;border:1.5px solid #afc3d9!important}
#sale-form .sale-device-add-section{padding:14px!important;border:1.5px solid #7897b7!important;background:linear-gradient(135deg,#eaf2fa,#f5f9fd)!important}
#sale-form .sale-device-add-button{min-height:48px!important;font-size:14px!important;letter-spacing:0}
#sale-form .sale-device-add-section>small{font-size:12px!important;color:#405d7a!important;font-weight:700!important;line-height:1.9!important}
#sale-form .device-row{padding:15px!important;border:1.5px solid #91abc7!important;border-radius:13px!important;background:#fff!important;box-shadow:0 4px 12px rgba(23,57,87,.07)!important}
#sale-form .device-row-head{padding-bottom:10px!important;border-bottom:1.5px solid #d8e3ef!important}
#sale-form .device-row-head b{font-size:14px!important;color:#173957!important}
#sale-form .device-row-head small{font-size:12px!important;color:#526b84!important}
#sale-form .device-row .device-product>label{font-size:13px!important;color:#244461!important}
#sale-form .device-row .device-product select,#sale-form .device-row .inventory-picker-search-row input.inventory-select-search{height:43px!important;min-height:43px!important;font-size:13px!important;border:1.5px solid #afc3d9!important}
#sale-form .device-row .picker-result-count,#sale-form .device-row .addon-stock-hint{font-size:12px!important;color:#4d6782!important;line-height:1.8!important}
#sale-form .device-row-values{gap:13px!important;padding:14px!important;border:1.5px solid #a9bfd6!important;background:linear-gradient(135deg,#edf4fb,#f9fbfe)!important}
#sale-form .device-row-values .addon-quantity label,#sale-form .device-row-values .addon-price label{font-size:13px!important;color:#244461!important;font-weight:900!important}
#sale-form .device-row-values input{height:44px!important;min-height:44px!important;font-size:14px!important;border:1.5px solid #afc3d9!important}
#sale-form .sale-addons-section{border:1.5px solid #9eb5cf!important;background:linear-gradient(180deg,#f5f8fc,#edf3f9)!important;padding:15px!important}
#sale-form .sale-addons-head b{font-size:15px!important;color:#173957!important}
#sale-form .sale-addons-head small{font-size:12px!important;color:#4d6782!important;line-height:1.8}
#sale-form .sale-addons-head .btn{font-size:13px!important;min-height:40px}
@media(max-width:680px){.content-module .page-head{align-items:stretch;padding:14px}.content-module .page-head h1{font-size:21px!important}.content-module .content-warehouse-tabs{gap:7px;padding:8px}.content-module .content-warehouse-tab{flex:1;justify-content:center;padding:10px 12px;font-size:13px}.content-module .search-input{min-width:100%;width:100%}#sale-form .form-section{padding:12px}#sale-form .sale-primary-values,#sale-form .device-row-values{padding:11px!important}}

/* v1.5.43 app61: clearer sidebar hierarchy, action order and warehouse identity */
.nav-section-label{
 display:flex;align-items:center;gap:9px;
 margin:12px 5px 3px;padding:10px 9px 6px;
 border-top:1px solid rgba(218,229,242,.14);
 color:#b8c7d9;font-size:11px;font-weight:900;line-height:1.6;
 letter-spacing:0;white-space:nowrap;
}
.nav-section-label:first-child{margin-top:3px;border-top:0}
.nav-section-mark{width:7px;height:7px;flex:0 0 7px;border-radius:2px;background:#7cb9e9;box-shadow:0 0 0 3px rgba(94,160,213,.14)}
.nav-section-main-warehouse .nav-section-mark{background:#6fb6e8;box-shadow:0 0 0 3px rgba(93,166,217,.15)}
.nav-section-content-warehouse .nav-section-mark{background:#e4b45d;box-shadow:0 0 0 3px rgba(228,180,93,.16)}
.nav-section-content-sales .nav-section-mark{background:#e88b64;box-shadow:0 0 0 3px rgba(232,139,100,.15)}
.nav-section-other .nav-section-mark{background:#91a2b9;box-shadow:0 0 0 3px rgba(145,162,185,.13)}
.nav-item[data-page="sales"] .nav-icon{color:#ffc18f;background:rgba(221,105,57,.16);border:1px solid rgba(240,145,92,.18);border-radius:7px}
.nav-item[data-page="purchases"] .nav-icon{color:#8ed4b2;background:rgba(74,165,125,.14);border:1px solid rgba(104,197,151,.18);border-radius:7px}
.nav-item[data-page="accessory-purchases"] .nav-icon{color:#a9c9e6;background:rgba(87,142,190,.16);border:1px solid rgba(119,169,211,.18);border-radius:7px}
.nav-item[data-page="inventory"] .nav-icon{color:#8dc8f1;background:rgba(69,139,194,.2);border:1px solid rgba(105,171,221,.24);border-radius:8px}
.nav-item[data-page="content-warehouse"] .nav-icon{color:#f2ca76;background:rgba(194,145,53,.2);border:1px solid rgba(226,181,91,.28);border-radius:8px}
.nav-item[data-page="content-sales"] .nav-icon{color:#f1a17d;background:rgba(221,105,57,.17);border:1px solid rgba(240,145,92,.22);border-radius:8px}
.nav-item[data-page="price-list"] .nav-icon{color:#b5a5ed;background:rgba(137,113,206,.17);border:1px solid rgba(157,137,218,.2);border-radius:8px}
.nav-item[data-page="box-handovers"] .nav-icon{color:#e7c779;background:rgba(195,158,76,.15);border:1px solid rgba(226,193,111,.2);border-radius:8px}
.nav-item[data-page="sales"]>span:not(.nav-icon),
.nav-item[data-page="purchases"]>span:not(.nav-icon),
.nav-item[data-page="inventory"]>span:not(.nav-icon),
.nav-item[data-page="content-warehouse"]>span:not(.nav-icon),
.nav-item[data-page="content-sales"]>span:not(.nav-icon){font-weight:800}
.nav-section-label+.nav-item{margin-top:1px}
.nav-section-label:not(:first-child){position:relative}
:root[data-theme="light"] .nav-section-label{color:#d0dced}
@media(max-width:820px){.nav-section-label{font-size:12px;margin-top:10px;padding:10px 9px 6px}}


/* v1.5.44 — fixed automatic store seal in the dedicated invoice stamp box */
.print-root .signature-box.store-stamp-box{position:relative!important;overflow:hidden!important;isolation:isolate!important}
.print-root .signature-box.store-stamp-box .store-stamp-image{position:absolute!important;left:50%!important;top:43%!important;transform:translate(-50%,-50%)!important;width:31mm!important;height:10.5mm!important;max-width:76%!important;object-fit:contain!important;object-position:center!important;display:block!important;opacity:.84!important;z-index:1!important;pointer-events:none!important;user-select:none!important;-webkit-user-drag:none!important}
.print-root .signature-box.store-stamp-box>b{position:absolute!important;z-index:2!important}
@media screen{.invoice-preview-content .signature-box.store-stamp-box .store-stamp-image{print-color-adjust:exact}}
@media print{.print-root .signature-box.store-stamp-box .store-stamp-image{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;opacity:.9!important}}


/* v1.5.45 — reliable embedded store stamp for every sales/trade invoice */
.print-root.sales-invoice .invoice-signatures .signature-box.store-stamp-box{
  position:relative!important;display:flex!important;overflow:hidden!important;isolation:isolate!important;
  align-items:flex-end!important;justify-content:center!important;background:#fff!important;
}
.print-root.sales-invoice .invoice-signatures .signature-box.store-stamp-box>img.store-stamp-image{
  display:block!important;visibility:visible!important;opacity:1!important;position:absolute!important;
  left:50%!important;top:42%!important;right:auto!important;bottom:auto!important;
  transform:translate(-50%,-50%)!important;width:35mm!important;height:12mm!important;
  max-width:84%!important;max-height:78%!important;object-fit:contain!important;object-position:center!important;
  margin:0!important;padding:0!important;border:0!important;background:transparent!important;
  z-index:2!important;pointer-events:none!important;user-select:none!important;-webkit-user-drag:none!important;
  image-rendering:auto!important;mix-blend-mode:multiply!important;
}
.print-root.sales-invoice .invoice-signatures .signature-box.store-stamp-box>b{
  position:absolute!important;display:block!important;visibility:visible!important;z-index:3!important;
  right:2.5mm!important;bottom:1.2mm!important;margin:0!important;padding:0 1mm!important;
  background:#fff!important;color:#263750!important;
}
@media print{
  .print-root.sales-invoice .invoice-signatures .signature-box.store-stamp-box>img.store-stamp-image{
    -webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;opacity:1!important;
  }
}


/* v1.5.46 app64 — premium phone price-list cards */
.price-list-page{display:grid;gap:17px;min-width:0}
.price-list-page .page-head{margin-bottom:0}
.price-list-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.price-summary-card{display:flex;align-items:center;gap:13px;min-width:0;padding:16px 18px;border:1.5px solid #cbd8e7;border-radius:15px;background:linear-gradient(145deg,#fff 0%,#f2f6fb 100%);box-shadow:0 5px 16px rgba(22,49,78,.055)}
.price-summary-icon{width:43px;height:43px;flex:0 0 43px;display:grid;place-items:center;border-radius:13px;background:#e3edf8;color:#214c72;border:1px solid #c8d9ec}
.price-summary-card>div{display:grid;gap:3px;min-width:0}
.price-summary-card small{font-size:11px;color:#60748e;font-weight:800}
.price-summary-card b{font-size:22px;line-height:1.45;color:#173957;font-weight:900}
.price-summary-card b em{font-style:normal;font-size:11px;color:#71849b}
.price-summary-card .price-summary-foot{font-size:10px;color:#a36b26}
.price-summary-card.summary-stock .price-summary-icon{background:#e5f4ee;color:#21805a;border-color:#c6e6d8}
.price-summary-card.summary-alert .price-summary-icon{background:#fff3e5;color:#bc7728;border-color:#efd8b4}
.price-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 17px;border:1.5px solid #c4d4e6;border-right:4px solid #bd8a2d;border-radius:14px;background:linear-gradient(110deg,#f3f7fc 0%,#fff 70%);box-shadow:0 3px 12px rgba(20,47,76,.04)}
.price-list-toolbar h2{margin:0;color:#173957;font-size:17px;font-weight:900}
.price-list-toolbar p{margin:3px 0 0;color:#61758e;font-size:11px;line-height:1.8}
.price-search-wrap{position:relative;display:flex;align-items:center;gap:8px;min-width:min(360px,45%);height:43px;padding:0 12px;border:1.5px solid #b6c9df;border-radius:11px;background:#fff;color:#557493}
.price-search-wrap:focus-within{border-color:#315f88;box-shadow:0 0 0 3px rgba(49,95,136,.12)}
.price-search-wrap .search-input{min-width:0;width:100%;height:100%;padding:0;border:0;outline:0;box-shadow:none;background:transparent;color:#173957;font-size:12px}
.price-phone-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;min-width:0}
.price-phone-card{display:flex;flex-direction:column;gap:13px;min-width:0;padding:15px;border:1.5px solid #c3d2e3;border-radius:15px;background:linear-gradient(180deg,#fff 0%,#f8fafd 100%);box-shadow:0 5px 16px rgba(23,57,87,.055);transition:border-color .18s,box-shadow .18s,transform .18s}
.price-phone-card:hover{border-color:#7899ba;box-shadow:0 9px 22px rgba(23,57,87,.10);transform:translateY(-1px)}
.price-phone-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;padding-bottom:11px;border-bottom:1px solid #dce5ef}
.price-phone-identity{display:flex;align-items:center;gap:10px;min-width:0}
.price-phone-mark{width:39px;height:39px;flex:0 0 39px;display:grid;place-items:center;border:1px solid #cbdced;border-radius:11px;background:#eaf2fa;color:#285579}
.price-phone-title{min-width:0;display:grid;gap:3px}
.price-phone-title h3{margin:0;color:#173957;font-size:14px;font-weight:900;line-height:1.65;overflow-wrap:anywhere}
.price-phone-title small{color:#71839a;font-size:10px;direction:ltr;text-align:right;overflow-wrap:anywhere}
.price-phone-code{display:grid;gap:2px;flex:0 0 auto;padding:6px 8px;border:1px solid #d6e0ec;border-radius:9px;background:#f1f5fa;color:#667b94;font-size:9px;text-align:center}
.price-phone-code b{color:#244b6d;font-size:12px;direction:ltr}
.price-phone-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.price-phone-metric{display:grid;gap:4px;min-width:0;padding:9px 8px;border:1px solid #dce5ef;border-radius:10px;background:#f3f7fb;text-align:center}
.price-phone-metric small{font-size:9px;color:#6b7f97;font-weight:800;white-space:nowrap}
.price-phone-metric b{color:#203e5b;font-size:12px;font-weight:900;overflow-wrap:anywhere}
.price-phone-metric b span{font-size:9px;color:#71849a}
.price-phone-metric b.good{color:#20845e}.price-phone-metric b.low{color:#b36a21}.price-phone-metric b.empty{color:#c24a4a}
.price-phone-sale-area{display:grid;gap:7px;margin-top:auto;padding:11px;border:1.5px solid #b9cce0;border-radius:11px;background:linear-gradient(135deg,#edf4fb,#f8fbfe)}
.price-phone-sale-label{display:flex;justify-content:space-between;align-items:center;color:#214665;font-size:12px;font-weight:900}
.price-phone-sale-label small{color:#7a8ea6;font-size:9px}
.price-phone-sale-edit{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center}
.price-phone-sale-edit .price-list-input{height:39px;min-width:0;border:1.5px solid #aebfd4;border-radius:9px;background:#fff;color:#173957;font-size:12px;font-weight:900}
.price-phone-sale-edit .btn{min-height:39px;padding:0 10px;white-space:nowrap;font-size:10px}
.price-phone-sale-value{color:#173957;font-size:16px;font-weight:900;overflow-wrap:anywhere}
.price-phone-updated{color:#8493a6;font-size:9px}
.price-list-empty{grid-column:1/-1;display:grid;justify-items:center;gap:8px;padding:42px 15px;border:1.5px dashed #bacbdd;border-radius:15px;background:linear-gradient(135deg,#f5f8fc,#fff);color:#526c87;text-align:center}
.price-list-empty>span{color:#7192b4}.price-list-empty b{font-size:14px;color:#244766}.price-list-empty small{font-size:11px;color:#8191a4}
@media(max-width:1350px){.price-phone-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.price-list-summary{grid-template-columns:1fr}.price-list-toolbar{align-items:stretch;flex-direction:column}.price-search-wrap{width:100%;min-width:0}.price-phone-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.price-phone-grid{grid-template-columns:1fr}.price-phone-card{padding:12px}.price-list-toolbar h2{font-size:15px}.price-summary-card{padding:12px}}
:root[data-theme="dark"] .price-summary-card,:root[data-theme="dark"] .price-list-toolbar,:root[data-theme="dark"] .price-phone-card{background:linear-gradient(145deg,#18283d,#132238);border-color:#3d5876}
:root[data-theme="dark"] .price-list-toolbar h2,:root[data-theme="dark"] .price-phone-title h3,:root[data-theme="dark"] .price-summary-card b,:root[data-theme="dark"] .price-phone-sale-label,:root[data-theme="dark"] .price-phone-sale-value{color:#e7f0fa}
:root[data-theme="dark"] .price-phone-metric,:root[data-theme="dark"] .price-phone-sale-area{background:#1b3048;border-color:#496582}
:root[data-theme="dark"] .price-phone-metric b,:root[data-theme="dark"] .price-phone-code b{color:#dce8f5}


/* Accounting cash and bank receipt register */
.cash-receipts-page{display:grid;gap:16px}.cash-receipt-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cash-receipt-source-card{display:flex;align-items:center;gap:12px;min-width:0;padding:15px;border:1px solid var(--line);border-radius:15px;background:var(--surface,#fff);box-shadow:0 5px 18px #17233808}.cash-receipt-source-icon{width:42px;height:42px;flex:0 0 42px;border-radius:12px;display:grid;place-items:center;background:#eff3f9;color:#344b70}.cash-receipt-source-copy{display:grid;gap:3px;flex:1;min-width:0}.cash-receipt-source-copy b{font-size:13px;color:var(--text,#263246)}.cash-receipt-source-copy small{font-size:10px;line-height:1.8;color:var(--muted,#7b8798)}.cash-receipt-report-panel{background:var(--surface,#fff);border:1px solid var(--line);border-radius:16px;padding:16px}.cash-receipt-report-filter{padding:0 15px 14px;border-bottom:1px solid var(--line)}.cash-report-range{margin:14px 0 10px;font-size:12px;color:var(--muted,#718096)}.cash-report-range b{color:var(--text,#253246)}.cash-receipt-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0 18px}.cash-receipt-stat{display:grid;gap:5px;padding:14px;border:1px solid var(--line);border-radius:13px;background:var(--surface,#fff);min-width:0}.cash-receipt-stat small{font-size:10px;color:var(--muted,#758197)}.cash-receipt-stat b{font-size:16px;overflow-wrap:anywhere;color:var(--text,#243147)}.cash-receipt-stat span{font-size:10px;color:var(--muted,#758197)}.cash-receipt-stat.pos{border-color:#c8e7d9;background:#f3fbf7}.cash-receipt-stat.pos b{color:#18794e}.cash-receipt-report-panel .activity-section{margin-top:18px}.cash-receipt-report-panel .activity-section h4{margin:0 0 9px;font-size:13px;color:var(--text,#263246)}#cash-receipt-custom-wrap{grid-column:1/-1}#accounting-cash-receipt-form .form-note{margin-top:12px}@media(max-width:900px){.cash-receipt-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.cash-receipt-source-grid{grid-template-columns:1fr}.cash-receipt-source-card{flex-wrap:wrap}.cash-receipt-source-copy{min-width:calc(100% - 60px)}.cash-receipt-source-card .btn{margin-right:auto}.cash-receipt-stat-grid{grid-template-columns:1fr 1fr}.cash-receipt-report-panel{padding:10px}}

/* 1.5.48 — invoice-linked cash approval and split-payment rows */
.sale-cash-payment-section{border:1px solid var(--line);border-radius:15px;padding:14px;background:var(--surface,#fff);margin:14px 0}.sale-cash-payment-section .panel-head{margin-bottom:10px}.sale-cash-payment-total{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:12px;background:#eef5ff;color:#243b5a;margin:10px 0 14px}.sale-cash-payment-total span{font-size:12px}.sale-cash-payment-total b{font-size:16px}.sale-cash-payment-row{border:1px solid var(--line);border-radius:13px;padding:12px;margin:10px 0;background:var(--surface,#fff)}.sale-cash-payment-row-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;color:var(--text,#263246)}.sale-cash-payment-row .form-grid{margin:0}.sale-cash-payment-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:12px}.sale-cash-payment-sum{display:grid;gap:3px;text-align:left}.sale-cash-payment-sum small{font-size:10px;color:var(--muted,#758197)}.sale-cash-payment-sum b{font-size:15px;color:var(--text,#243147)}.cash-payment-match{font-size:11px}.cash-payment-match.match{color:#168453}.cash-payment-match.mismatch{color:#b45309}.cash-receipt-report-filter .form-grid{margin-bottom:10px}@media(max-width:620px){.sale-cash-payment-total,.sale-cash-payment-footer{align-items:stretch;flex-direction:column}.sale-cash-payment-sum{text-align:right}.sale-cash-payment-row{padding:9px}}

/* 1.5.48 — quick date presets for invoice-linked cash receipt reporting */
.cash-report-periods{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 14px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-soft,#f7f9fc)}
.cash-report-periods>span{font-size:12px;font-weight:700;color:var(--muted);margin-left:4px}
.cash-report-periods .btn{min-height:32px}


/* v1.5.49 — guided cash / transfer / POS receipt workflow */
.sale-cash-payment-row{padding:14px!important;border-radius:14px!important;background:var(--surface,#fff)!important}
.payment-step{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff);margin:8px 0 12px}
.payment-step-title{display:flex;align-items:center;gap:9px;margin:0 0 11px;color:var(--ink,#263246)}
.payment-step-title>span{display:inline-grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#e8f0f8;color:#294d70;font-size:11px;font-weight:900;flex:0 0 25px}
.payment-step-title>b{font-size:12px;font-weight:900}
.payment-stage-grid,.payment-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:14px 16px;min-width:0}
.payment-stage-grid>.field,.payment-detail-grid>.field{min-width:0;margin:0;align-self:stretch}
.payment-choice-block{padding:12px;border:1px dashed var(--line);border-radius:12px;background:var(--surface,#fff);margin:10px 0}
.payment-choice-block[hidden],.payment-amount-block[hidden]{display:none!important}
.payment-stage-hint{display:block;margin:8px 2px 0;color:var(--muted,#748399);font-size:10px;line-height:1.8}
.payment-followup-fields{min-width:0;margin:12px 0 0;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff)}
.payment-followup-fields legend{padding:0 7px;color:var(--ink,#29394f);font-size:12px;font-weight:900}
.payment-followup-fields:disabled{opacity:.5;background:var(--surface-soft,#f4f6f9)}
.payment-followup-fields:disabled legend{color:var(--muted,#8793a5)}
.payment-followup-fields .payment-detail-grid{margin:0}
.payment-followup-fields .field.full{grid-column:1/-1}
.payment-followup-fields .field textarea{min-height:84px}
.payment-amount-block{min-width:0}
.payment-amount-block .field{margin:0}
.payment-amount-block .help{display:block}
.payment-amount-block .field input{font-variant-numeric:tabular-nums}
:root[data-theme="dark"] .payment-step,:root[data-theme="dark"] .payment-choice-block,:root[data-theme="dark"] .payment-followup-fields{background:#15263a!important;border-color:#49627f!important;color:#e7eff9!important}
:root[data-theme="dark"] .payment-step-title,:root[data-theme="dark"] .payment-followup-fields legend{color:#edf4fc!important}
:root[data-theme="dark"] .payment-step-title>span{background:#29435e!important;color:#dcecff!important}
:root[data-theme="dark"] .payment-stage-hint{color:#b6c7da!important}
:root[data-theme="dark"] .payment-followup-fields:disabled{background:#1b2b3f!important;opacity:.62}
@media(max-width:680px){.payment-stage-grid,.payment-detail-grid{grid-template-columns:1fr;gap:12px}.payment-followup-fields .field.full{grid-column:1}}

/* v1.5.49 — normalize opened modal form rows across the application. */
.modal .form-grid{align-items:stretch!important;grid-auto-flow:row!important;grid-auto-rows:minmax(0,auto)!important}
.modal .form-grid>.field{display:flex!important;flex-direction:column!important;align-self:stretch!important;height:100%!important;min-height:0!important;margin:0!important}
.modal .form-grid>.field>label{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:7px!important;width:100%!important;min-width:0!important}
.modal .form-grid>.field:not(.date-field)>label>input:not([type=hidden]),.modal .form-grid>.field:not(.date-field)>label>select,.modal .form-grid>.field:not(.date-field)>label>textarea{margin-top:auto!important}
.modal .form-grid>.field.date-field>label{display:block!important;flex:0 0 auto!important;min-height:1.9em!important}
.modal .form-grid>.field.date-field .jalali-date-control{margin-top:7px!important}
.modal .form-grid>.field .help{margin-top:6px!important;min-height:0!important}
.modal .form-grid>.field.full{grid-column:1/-1!important}

/* v1.5.49 — clearly visible native checkbox replacement in light and dark themes. */
input[type="checkbox"]{appearance:none;-webkit-appearance:none;display:inline-grid!important;place-content:center;box-sizing:border-box;width:19px;height:19px;min-width:19px;min-height:19px;margin:0 2px;border:2px solid #64758d;border-radius:5px;background:#fff;color:#fff;vertical-align:middle;cursor:pointer;box-shadow:0 1px 2px rgba(10,25,45,.12);transition:background .12s,border-color .12s,box-shadow .12s}
input[type="checkbox"]::after{content:"✓";font-family:Arial,sans-serif;font-size:13px;line-height:1;font-weight:900;opacity:0;transform:scale(.6);transition:opacity .12s,transform .12s}
input[type="checkbox"]:checked{background:#176f5b;border-color:#176f5b;color:#fff}
input[type="checkbox"]:checked::after{opacity:1;transform:scale(1)}
input[type="checkbox"]:focus-visible{outline:3px solid rgba(41,125,190,.45);outline-offset:2px}
input[type="checkbox"]:disabled{cursor:not-allowed;opacity:.7;background:#e5eaf0;border-color:#8392a5}
:root[data-theme="dark"] input[type="checkbox"]{background:#14263b;border-color:#a8bdd4;color:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.18)}
:root[data-theme="dark"] input[type="checkbox"]:checked{background:#1d9878;border-color:#6cdbb7;color:#fff}
:root[data-theme="dark"] input[type="checkbox"]:disabled{background:#34465b;border-color:#71869f;opacity:.85}
:root[data-theme="dark"] input[type="checkbox"]:focus-visible{outline-color:#f0c878}

/* v1.5.49 follow-up — honor hidden conditional fields and boost dark workflow checkbox contrast. */
[hidden]{display:none!important}
:root[data-theme="dark"] .workflow-check-card input[type="checkbox"],
:root[data-theme="dark"] .workflow-special-card input[type="checkbox"]{
  background:#14263b!important;border-color:#c4d7e9!important;box-shadow:0 0 0 2px rgba(196,215,233,.12),0 1px 3px rgba(0,0,0,.35)!important;
}
:root[data-theme="dark"] .workflow-check-card input[type="checkbox"]:checked,
:root[data-theme="dark"] .workflow-special-card input[type="checkbox"]:checked{
  background:#e9c46a!important;border-color:#ffe5a6!important;box-shadow:0 0 0 2px rgba(233,196,106,.24),0 1px 3px rgba(0,0,0,.28)!important;
}
:root[data-theme="dark"] .workflow-check-card input[type="checkbox"]:checked::after,
:root[data-theme="dark"] .workflow-special-card input[type="checkbox"]:checked::after{color:#173653!important}
:root[data-theme="dark"] .workflow-check-card.is-exempt input[type="checkbox"]:disabled,
:root[data-theme="dark"] .workflow-special-card input[type="checkbox"]:disabled{background:#344b63!important;border-color:#a9bfd4!important;opacity:1!important}

/* v1.5.50 — final dark-mode contrast and component audit */
:root[data-theme="dark"]{
  --text:var(--ink);
  --surface-soft:#1a2a40;
  --surface-soft-2:#20334b;
  --muted-strong:#c9d5e4;
}

/* Dashboard: remove pale decorative circles and keep the zoom selector in-theme. */
:root[data-theme="dark"] .dashboard-stats .stat-card::after{
  background:rgba(88,119,153,.18)!important;
  opacity:.72!important;
}
:root[data-theme="dark"] .dashboard-stats .stat-icon{
  background:#263d58!important;
  color:#d7e9fc!important;
  border:1px solid #496783!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06)!important;
}
:root[data-theme="dark"] .app-zoom-control{
  background:#1a2b40!important;
  color:#e5eef8!important;
  border:1px solid #506984!important;
  box-shadow:0 2px 8px rgba(0,0,0,.18)!important;
}
:root[data-theme="dark"] .app-zoom-control select{
  background:#122238!important;
  color:#f1f6fc!important;
  border:1px solid #506984!important;
  border-radius:6px!important;
  outline:none!important;
}
:root[data-theme="dark"] .app-zoom-control select:focus-visible,
:root[data-theme="dark"] .app-zoom-control:focus-within{
  outline:2px solid #e9bf68!important;
  outline-offset:2px!important;
  box-shadow:0 0 0 3px rgba(233,191,104,.16)!important;
}
:root[data-theme="dark"] .app-zoom-control select option{background:#122238!important;color:#f1f6fc!important}

/* Empty dashboard charts now have an intentional empty state instead of a blank grid. */
.history-chart-empty{min-height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:22px;text-align:center;box-sizing:border-box}
.history-chart-empty-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#eaf1f9;color:#55789e}
.history-chart-empty b{font-size:12px;color:#415a76}
.history-chart-empty small{font-size:10px;line-height:1.9;color:#78889c}
:root[data-theme="dark"] .history-chart-scroll{background:#121f30!important;scrollbar-color:#506984 #121f30!important}
:root[data-theme="dark"] .history-chart-grid.is-empty{background:#16263a!important;border:1px dashed #3c5672!important;border-radius:10px!important}
:root[data-theme="dark"] .history-chart-empty-icon{background:#263d58!important;color:#b8d8f6!important;border:1px solid #466481!important}
:root[data-theme="dark"] .history-chart-empty b{color:#e7eff9!important}
:root[data-theme="dark"] .history-chart-empty small{color:#b7c7d9!important}

/* Accounting summary: make the remaining principal unmistakable. */
.balance-stat{position:relative;isolation:isolate}
.balance-stat small{font-weight:800}
:root[data-theme="dark"] .activity-stat.balance-stat{
  background:linear-gradient(145deg,#3b321f,#2e2a22)!important;
  border:1.5px solid #a9853d!important;
  box-shadow:inset 0 0 0 1px rgba(255,224,155,.07),0 5px 14px rgba(0,0,0,.16)!important;
}
:root[data-theme="dark"] .activity-stat.balance-stat small{color:#f4d891!important;font-weight:900!important}
:root[data-theme="dark"] .activity-stat.balance-stat b{color:#fff0bd!important;font-size:15px!important;font-weight:900!important;text-shadow:0 1px 0 rgba(0,0,0,.3)}
:root[data-theme="dark"] .cash-confirmation-final-step{margin:20px 0 16px!important;padding-top:14px!important;border-top:1px solid #405873!important}
:root[data-theme="dark"] .cash-confirmation-final-step .workflow-check-card{background:linear-gradient(120deg,#25384d,#1c2e43)!important;border:1.5px solid #6e87a2!important}
:root[data-theme="dark"] .cash-confirmation-final-step .workflow-check-copy b{color:#fff1c9!important}
:root[data-theme="dark"] .cash-confirmation-final-step .workflow-check-copy small{color:#d1dce9!important}
:root[data-theme="dark"] .cash-confirmation-final-step .workflow-check-tag{background:#4a3b20!important;color:#ffdf9a!important;border:1px solid #8d7138!important}

/* Accounting tabs and box-handover workflow. */
:root[data-theme="dark"] .accounting-tabs{background:#15253a!important;border-color:#405873!important}
:root[data-theme="dark"] .accounting-tab{color:#c8d5e5!important}
:root[data-theme="dark"] .accounting-tab:hover{background:#253b55!important;color:#f4f7fc!important}
:root[data-theme="dark"] .accounting-tab.active{background:#4a3028!important;color:#ffd0ad!important;box-shadow:inset 0 0 0 1px #a85c3d!important}
:root[data-theme="dark"] .box-handover-meta>span{background:#1d3047!important;color:#c5d2e1!important;border:1px solid #3d5876!important}
:root[data-theme="dark"] .box-handover-meta b{color:#f0f5fb!important}
:root[data-theme="dark"] .box-installment-row{background:#182a40!important;border-color:#405a77!important;color:#e5edf7!important}
:root[data-theme="dark"] .box-installment-row>div b{color:#eef4fb!important}
:root[data-theme="dark"] .box-installment-row>div small{color:#b9c8d9!important}
:root[data-theme="dark"] .box-retention-note{background:#392a24!important;border-color:#81543d!important;color:#f1d4c1!important}
:root[data-theme="dark"] .box-retention-icon{background:#593a2e!important;color:#ffd0ad!important}
:root[data-theme="dark"] .box-retention-note b{color:#ffbd91!important}
:root[data-theme="dark"] .box-retention-note small{color:#e0c4b3!important}
:root[data-theme="dark"] .admin-password-btn{background:#1b2d43!important;border-color:#506984!important;color:#f0f5fb!important}
:root[data-theme="dark"] .admin-password-btn:hover{background:#382b29!important;border-color:#d17a52!important;color:#ffd0b3!important}

/* Content warehouse/sales: these newer panels had light-only hard-coded colors. */
:root[data-theme="dark"] .content-module{color:#e8eff8!important}
:root[data-theme="dark"] .content-module .page-head{background:linear-gradient(120deg,#192b40,#142338)!important;border-color:#435d79!important;border-right-color:#7e9fbe!important}
:root[data-theme="dark"] .content-module .page-head h1{color:#f0f5fb!important}
:root[data-theme="dark"] .content-module .page-head p{color:#bdcadd!important}
:root[data-theme="dark"] .content-module .page-title-icon{background:linear-gradient(145deg,#263d58,#1d3048)!important;color:#c3e0ff!important;border-color:#4b6988!important}
:root[data-theme="dark"] .content-module .content-warehouse-tabs{background:linear-gradient(120deg,#17283d,#1b2c42)!important;border-color:#435e7b!important}
:root[data-theme="dark"] .content-module .content-warehouse-tab{background:#1b2d43!important;color:#dce8f5!important;border-color:#4b6683!important}
:root[data-theme="dark"] .content-module .content-warehouse-tab:hover{background:#263d58!important;color:#fff!important;border-color:#7898ba!important}
:root[data-theme="dark"] .content-module .content-warehouse-tab.active{background:linear-gradient(120deg,#315878,#244866)!important;color:#fff!important;border-color:#6a91b6!important}
:root[data-theme="dark"] .content-module .content-warehouse-stats>div{background:linear-gradient(145deg,#1c3048,#16263b)!important;border-color:#435d79!important}
:root[data-theme="dark"] .content-module .content-warehouse-stats small{color:#c3d1e1!important}
:root[data-theme="dark"] .content-module .content-warehouse-stats b{color:#f3f7fc!important}
:root[data-theme="dark"] .content-module .content-panel-head{background:#20354d!important;border-color:#455f7c!important}
:root[data-theme="dark"] .content-module .section-title{color:#f0f5fb!important}
:root[data-theme="dark"] .content-module .section-subtitle{color:#c1cede!important}
:root[data-theme="dark"] .content-module .search-input{background:#101d2e!important;color:#f1f6fc!important;border-color:#506984!important}
:root[data-theme="dark"] .content-module .panel{background:#152438!important;border-color:#435d79!important}
:root[data-theme="dark"] .content-module .panel table td{color:#e2ebf5!important;border-color:#344b65!important}
:root[data-theme="dark"] .content-module .panel table tbody tr:nth-child(even){background:#1b2d43!important}
:root[data-theme="dark"] .content-module .panel table tbody tr:hover{background:#2a425d!important}
:root[data-theme="dark"] .content-module .td-main{color:#f1f6fc!important}
:root[data-theme="dark"] .content-module .td-muted{color:#b5c5d8!important}
:root[data-theme="dark"] .content-module .category-chip{background:#233b55!important;color:#dcecff!important;border-color:#496783!important}
:root[data-theme="dark"] .content-module .btn-outline{background:#20354d!important;color:#ecf4fc!important;border-color:#5a7694!important}
:root[data-theme="dark"] .content-module .empty-state,:root[data-theme="dark"] .content-module .empty-state strong{color:#d9e5f2!important}
:root[data-theme="dark"] .content-warehouse-stats>div,:root[data-theme="dark"] .content-purchase-summary{background:linear-gradient(145deg,#1c3048,#16263b)!important;border-color:#435d79!important}
:root[data-theme="dark"] .content-warehouse-stats small,:root[data-theme="dark"] .content-purchase-summary small{color:#bdcadd!important}
:root[data-theme="dark"] .content-warehouse-stats b,:root[data-theme="dark"] .content-purchase-summary b,:root[data-theme="dark"] .content-purchase-summary strong{color:#f1f6fc!important}
:root[data-theme="dark"] .content-purchase-lines-head,:root[data-theme="dark"] .content-sale-lines-head{background:#20354d!important;border-color:#496581!important;border-right-color:#82a4c5!important;color:#edf4fb!important}
:root[data-theme="dark"] .content-purchase-lines-head small,:root[data-theme="dark"] .content-sale-lines-head small{color:#bfcede!important}
:root[data-theme="dark"] .content-purchase-line,:root[data-theme="dark"] .content-sale-line{background:#17283d!important;border-color:#435d79!important}
:root[data-theme="dark"] .content-line-head{color:#edf4fb!important}
:root[data-theme="dark"] .content-line-price,:root[data-theme="dark"] .content-price-preview{background:#20354d!important;color:#edf4fb!important;border-color:#526d8a!important}

/* Cash-receipt dashboard and reporting widgets. */
:root[data-theme="dark"] .cash-receipt-source-card,:root[data-theme="dark"] .cash-receipt-report-panel{background:#17283d!important;border-color:#435d79!important;color:#e6eef8!important}
:root[data-theme="dark"] .cash-receipt-source-icon{background:#29435d!important;color:#c6e3ff!important}
:root[data-theme="dark"] .cash-receipt-source-copy b,:root[data-theme="dark"] .cash-receipt-report-panel .activity-section h4{color:#f0f5fb!important}
:root[data-theme="dark"] .cash-receipt-source-copy small,:root[data-theme="dark"] .cash-receipt-stat small,:root[data-theme="dark"] .cash-receipt-stat span{color:#bac9da!important}
:root[data-theme="dark"] .cash-report-range{color:#bac9da!important}
:root[data-theme="dark"] .cash-report-range b,:root[data-theme="dark"] .cash-receipt-stat b{color:#f0f5fb!important}
:root[data-theme="dark"] .cash-receipt-stat{background:#1d3047!important;border-color:#405a77!important}
:root[data-theme="dark"] .cash-receipt-stat.pos{background:#173b32!important;border-color:#36775d!important}
:root[data-theme="dark"] .cash-receipt-stat.pos b{color:#a9efd0!important}
:root[data-theme="dark"] .cash-report-periods{background:#1b2d43!important;border-color:#425d7a!important}
:root[data-theme="dark"] .cash-report-periods>span{color:#c7d5e4!important}
:root[data-theme="dark"] .cash-receipt-report-filter{border-bottom-color:#405873!important}
:root[data-theme="dark"] .sale-cash-payment-section,:root[data-theme="dark"] .sale-cash-payment-row{background:#16273b!important;border-color:#465f7b!important;color:#e8eff8!important}
:root[data-theme="dark"] .sale-cash-payment-total{background:linear-gradient(120deg,#213e5a,#1a3048)!important;color:#edf5fc!important;border:1px solid #4a6887!important}
:root[data-theme="dark"] .sale-cash-payment-total span,:root[data-theme="dark"] .sale-cash-payment-total b{color:#f1f6fc!important}
:root[data-theme="dark"] .sale-cash-payment-row-head{color:#f0f5fb!important}
:root[data-theme="dark"] .sale-cash-payment-sum b{color:#f1f6fc!important}
:root[data-theme="dark"] .cash-payment-match.match{color:#80e1b5!important}
:root[data-theme="dark"] .cash-payment-match.mismatch{color:#ffd17b!important}

/* Price list cards, trades and wholesale purchase forms. */
:root[data-theme="dark"] .price-summary-card,:root[data-theme="dark"] .price-list-toolbar,:root[data-theme="dark"] .price-phone-card{background:linear-gradient(145deg,#1b2d43,#142338)!important;border-color:#435d79!important;color:#ecf3fb!important}
:root[data-theme="dark"] .price-summary-icon,:root[data-theme="dark"] .price-phone-mark{background:#28415d!important;color:#c4e1ff!important;border-color:#4a6684!important}
:root[data-theme="dark"] .price-summary-card small,:root[data-theme="dark"] .price-phone-title small,:root[data-theme="dark"] .price-phone-updated,:root[data-theme="dark"] .price-list-toolbar p{color:#bdcadd!important}
:root[data-theme="dark"] .price-summary-card b,:root[data-theme="dark"] .price-summary-card b em,:root[data-theme="dark"] .price-list-toolbar h2,:root[data-theme="dark"] .price-phone-title h3,:root[data-theme="dark"] .price-phone-sale-value{color:#f0f5fb!important}
:root[data-theme="dark"] .price-phone-code{background:#21364e!important;border-color:#435d79!important;color:#c6d5e5!important}
:root[data-theme="dark"] .price-phone-metric{background:#1c3048!important;border-color:#435d79!important}
:root[data-theme="dark"] .price-phone-metric small,:root[data-theme="dark"] .price-phone-metric b span{color:#c0cede!important}
:root[data-theme="dark"] .price-phone-metric b{color:#edf4fc!important}
:root[data-theme="dark"] .price-phone-metric b.good{color:#83e0b2!important}
:root[data-theme="dark"] .price-phone-metric b.low{color:#ffd17b!important}
:root[data-theme="dark"] .price-phone-metric b.empty{color:#ffaaaa!important}
:root[data-theme="dark"] .price-phone-sale-area{background:#1d334c!important;border-color:#496783!important}
:root[data-theme="dark"] .price-phone-sale-label,:root[data-theme="dark"] .price-phone-sale-label small{color:#e2edf8!important}
:root[data-theme="dark"] .price-phone-sale-edit .price-list-input{background:#101d2e!important;color:#f1f6fc!important;border-color:#526d8a!important}
:root[data-theme="dark"] .price-list-empty{background:#17283d!important;border-color:#526d8a!important;color:#d9e5f2!important}
:root[data-theme="dark"] .price-list-empty b,:root[data-theme="dark"] .price-list-empty small{color:#d9e5f2!important}
:root[data-theme="dark"] .trade-info-banner,:root[data-theme="dark"] .trade-difference-card{background:#1b3047!important;border-color:#45617e!important;color:#e8f0f9!important}
:root[data-theme="dark"] .trade-difference-card small,:root[data-theme="dark"] .trade-difference-card span{color:#c5d2e1!important}
:root[data-theme="dark"] .trade-difference-card strong{color:#9de1bd!important}
:root[data-theme="dark"] .trade-difference-plus{color:#8de6ba!important}
:root[data-theme="dark"] .trade-difference-minus{color:#ffaaa2!important}
:root[data-theme="dark"] .trade-test-toggle{background:#3b301f!important;border-color:#9a7835!important}
:root[data-theme="dark"] .trade-test-toggle b{color:#ffe2a2!important}
:root[data-theme="dark"] .trade-test-toggle small{color:#e3d0a6!important}
:root[data-theme="dark"] .trade-test-status.pending{background:#3d321d!important;border-color:#98783b!important;color:#ffe2a1!important}
:root[data-theme="dark"] .trade-test-status.approved{background:#173b31!important;border-color:#36775d!important;color:#a8efd0!important}
:root[data-theme="dark"] .trade-test-status.rejected{background:#44282e!important;border-color:#8b4c55!important;color:#ffbfc3!important}
:root[data-theme="dark"] .wholesale-intro,:root[data-theme="dark"] .wholesale-purchase-line,:root[data-theme="dark"] .wholesale-line-total{background:#192c42!important;border-color:#435d79!important;color:#e7eff9!important}
:root[data-theme="dark"] .wholesale-intro b,:root[data-theme="dark"] .wholesale-line-total b{color:#f1f6fc!important}
:root[data-theme="dark"] .wholesale-line-top,:root[data-theme="dark"] .wholesale-line-number{color:#dae6f3!important}
:root[data-theme="dark"] .wholesale-add-line{background:#203851!important;border-color:#4d6a87!important;color:#e6f0fb!important}
:root[data-theme="dark"] .wholesale-purchase-summary{background:linear-gradient(120deg,#1c354e,#192b40)!important;border-color:#496783!important}

/* Form text, badges, checkboxes and focus states across all modules. */
:root[data-theme="dark"] .form-section-head strong,:root[data-theme="dark"] .field label,:root[data-theme="dark"] .stack-form label,:root[data-theme="dark"] .form-label,:root[data-theme="dark"] legend{color:#e8f0f9!important}
:root[data-theme="dark"] .field .help,:root[data-theme="dark"] .help,:root[data-theme="dark"] .muted,:root[data-theme="dark"] .form-hint{color:#b4c4d7!important}
:root[data-theme="dark"] input[type="checkbox"],:root[data-theme="dark"] input[type="radio"]{
  accent-color:#e9c46a!important;
}
:root[data-theme="dark"] input[type="checkbox"]:not(:checked){background:#122238!important;border:2px solid #c0d2e4!important;box-shadow:0 0 0 2px rgba(192,210,228,.12)!important}
:root[data-theme="dark"] input[type="checkbox"]:checked{background:#e9c46a!important;border-color:#ffe5a6!important;color:#173653!important;box-shadow:0 0 0 2px rgba(233,196,106,.2)!important}
:root[data-theme="dark"] input[type="checkbox"]:checked::after{color:#173653!important}
:root[data-theme="dark"] input[type="checkbox"]:disabled{background:#40536a!important;border-color:#90a5bd!important;opacity:1!important}
:root[data-theme="dark"] input[type="checkbox"]:focus-visible,:root[data-theme="dark"] input[type="radio"]:focus-visible{outline:3px solid #f0c878!important;outline-offset:3px!important}
:root[data-theme="dark"] .workflow-check-card,:root[data-theme="dark"] .workflow-special-card{color:#edf4fb!important}
:root[data-theme="dark"] .workflow-check-copy b,:root[data-theme="dark"] .workflow-special-card b{color:#f4f7fc!important}
:root[data-theme="dark"] .workflow-check-copy small,:root[data-theme="dark"] .workflow-special-card small{color:#c5d2e1!important}
:root[data-theme="dark"] .cash-confirmation-final-step .workflow-check-copy b{color:#fff1c9!important}

/* Keep the actual invoice/print documents white in both themes. */
@media screen{
 :root[data-theme="dark"] .invoice-preview-content .print-root,
 :root[data-theme="dark"] .invoice-preview-content .invoice-paper,
 :root[data-theme="dark"] .print-root .invoice-paper{background:#fff!important;color:#172033!important}
}

/* v1.5.50 follow-up audit: price-list search shell also follows dark mode. */
:root[data-theme="dark"] .price-search-wrap{
  background:#101d2e!important;
  color:#bed4ea!important;
  border-color:#506984!important;
}
:root[data-theme="dark"] .price-search-wrap:focus-within{
  background:#122238!important;
  border-color:#83b5e5!important;
  box-shadow:0 0 0 3px rgba(131,181,229,.16)!important;
}
:root[data-theme="dark"] .price-search-wrap .search-input{
  background:transparent!important;
  color:#f1f6fc!important;
  border-color:transparent!important;
}
:root[data-theme="dark"] .price-search-wrap .search-input::placeholder{color:#91a8c1!important;opacity:1!important}

/* Digital Center 1.5.51 — emergency offline mode */
.offline-mode-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 22px 0;padding:14px 16px;border:1px solid #c18a35;border-right:5px solid #d49a3a;border-radius:14px;background:#fff7e8;color:#4f3514;box-shadow:0 4px 16px rgba(40,30,10,.08)}
.offline-mode-banner-copy{display:flex;flex-direction:column;gap:5px;min-width:0}
.offline-mode-banner-copy strong{display:flex;align-items:center;gap:8px;font-weight:900}
.offline-mode-banner-copy span{font-size:13px;line-height:1.6}
.offline-mode-banner-copy small{font-size:12px;line-height:1.6;color:#775d34}
.offline-mode-banner-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.offline-export-note{font-size:12px;color:#775d34}
.offline-intro{margin:12px 0 18px;line-height:1.9}
.offline-device-create{margin-bottom:18px}
.offline-device-create .panel-body{padding:18px}
.offline-device-create .form-grid{display:grid;grid-template-columns:minmax(240px,1fr) auto;align-items:end;gap:14px}
.offline-device-create .field-actions .btn{min-height:43px}
.offline-mode-banner .btn{white-space:nowrap}
@media(max-width:760px){.offline-mode-banner{align-items:stretch;flex-direction:column;margin:10px 12px 0}.offline-mode-banner-actions{justify-content:flex-start}.offline-device-create .form-grid{grid-template-columns:1fr}}
:root[data-theme="dark"] .offline-mode-banner{background:#3c2d18!important;border-color:#c59143!important;color:#fff0cf!important;box-shadow:0 5px 18px rgba(0,0,0,.24)!important}
:root[data-theme="dark"] .offline-mode-banner-copy small,:root[data-theme="dark"] .offline-export-note{color:#e3c99a!important}
:root[data-theme="dark"] .offline-mode-banner-copy span{color:#f5e6c8!important}
:root[data-theme="dark"] .offline-intro{background:#1b2b3f!important;color:#e8f0fa!important;border-color:#405a76!important}
:root[data-theme="dark"] .offline-device-create{background:#142236!important;border-color:#344b65!important}
:root[data-theme="dark"] .offline-device-create .panel-head{background:#192b40!important;color:#edf4fc!important}
:root[data-theme="dark"] .offline-device-create input{background:#0e1a2a!important;color:#edf4fc!important;border-color:#49627f!important}


/* v1.5.52 — wide, aligned transaction modals across sales, purchases and trade. */
.modal.wide{width:min(1480px,calc(100vw - 52px))!important;max-width:1480px!important;max-height:calc(100vh - 34px)!important}
.modal.wide .modal-head{padding:20px 28px!important}
.modal.wide .modal-body{padding:26px 30px!important}
.modal.wide .form-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch!important;column-gap:22px!important;row-gap:17px!important}
.modal.wide .form-grid>.field{min-width:0!important;width:100%!important}
.modal.wide .form-grid .field.full,.modal.wide .form-grid .field.span-2{grid-column:1/-1!important}
.modal.wide .form-section{padding:18px 20px!important;border-radius:14px!important}
.modal.wide .form-section-head{margin-bottom:18px!important}
.modal.wide .field input:not([type=hidden]),.modal.wide .field select,.modal.wide .field textarea{min-height:48px!important;height:48px!important;font-size:13px!important}
.modal.wide .field textarea{height:92px!important;min-height:92px!important}
.modal.wide .form-actions{display:flex;gap:12px;flex-wrap:wrap}
@media(max-width:1120px){.modal.wide{width:min(980px,calc(100vw - 34px))!important}.modal.wide .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:700px){.modal.wide{width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px)!important}.modal.wide .modal-head,.modal.wide .modal-body{padding:15px!important}.modal.wide .form-grid{grid-template-columns:1fr!important;gap:13px!important}.modal.wide .form-section{padding:13px!important}}
