@charset "UTF-8";
:root{--bg:#f5f7fb;--paper:#fff;--ink:#1f2c40;--muted:#738094;--line:#e6ebf2;--primary:#6253ce;--primary-light:#eeebfc;--green:#19775d;--green-light:#eaf7f1;--orange:#a36716;--orange-light:#fff5df;--red:#b44856;--red-light:#fff0f2;--shadow:0 14px 40px rgba(43,55,90,.06);--radius:20px;font-family:Tahoma,"Segoe UI",Arial,sans-serif;color:var(--ink);font-size:14px;line-height:1.8;color-scheme:light}
*{box-sizing:border-box}body{margin:0;background:var(--bg)}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.58}a{color:var(--primary);text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #b5a8f5;outline-offset:3px}input,select,textarea{min-width:0;width:100%;border:1px solid #dce3ed;border-radius:12px;background:#fff;color:var(--ink);padding:11px 13px;min-height:46px;transition:border-color .15s,box-shadow .15s}input:focus,select:focus,textarea:focus{border-color:#9c8dec;box-shadow:0 0 0 3px #eeebfc;outline:0}textarea{resize:vertical;min-height:95px}input[type=checkbox],input[type=radio]{width:20px;height:20px;min-height:20px;accent-color:var(--primary);flex-shrink:0}h1,h2,h3,h4,p{margin-top:0}h2{font-size:20px;line-height:1.7}h3{font-size:16px}h4{font-size:14px}small,.small{font-size:12px}.muted{color:var(--muted)}.ltr{direction:ltr;unicode-bidi:plaintext}.nowrap{white-space:nowrap}.full{width:100%}.hidden,[hidden]{display:none!important}.center{text-align:center}.danger-text{color:var(--red)}.skip-link{position:fixed;top:-100px;right:20px;padding:12px 20px;background:white;z-index:200}.skip-link:focus{top:10px}.icon{width:20px;height:20px;flex-shrink:0;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}.app-shell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100dvh;background:#fff;border-left:1px solid var(--line);padding:30px 20px 22px;display:flex;flex-direction:column;gap:25px;overflow-y:auto}.brand{display:flex;align-items:center;gap:12px;color:var(--ink)}.brand strong{display:block;font-size:20px;letter-spacing:-.5px}.brand small{display:block;color:var(--muted);font-size:10px;margin-top:2px}.brand-mark{width:44px;height:48px;border-radius:15px;display:grid;place-items:center;background:var(--primary);color:white;box-shadow:0 7px 16px #6253ce28;flex-shrink:0}.brand-mark svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.sidebar-label{font-size:10px;color:#919bab;margin:8px 10px -13px}.navigation{display:grid;gap:6px}.nav-link{display:flex;align-items:center;gap:11px;padding:12px 14px;color:#768294;font-size:12px;border-radius:13px;transition:.15s}.nav-link:hover{background:#f7f8fc;color:var(--primary)}.nav-link.active{color:var(--primary);background:var(--primary-light);font-weight:bold}.nav-link.active:after{content:"";width:5px;height:5px;border-radius:100%;background:var(--primary);margin-right:auto}.legacy-links{display:grid;gap:4px;border-top:1px solid var(--line);padding-top:17px}.legacy-links a{font-size:11px;color:var(--muted);padding:7px 12px}.sidebar-footer{margin-top:auto;display:flex;gap:8px;align-items:flex-start;font-size:10px;color:#91a094;line-height:1.9;border-top:1px solid var(--line);padding-top:20px}.status-dot{background:#6da68d;width:7px;height:7px;border-radius:50%;margin-top:7px;flex-shrink:0}.workspace{min-width:0;padding:0 38px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:117px;border-bottom:1px solid var(--line);margin-bottom:28px}.eyebrow{color:var(--muted);font-size:10px;letter-spacing:.2px}.topbar h1{font-size:22px;letter-spacing:-.6px;margin:3px 0 0}.topbar-actions{display:flex;gap:22px;align-items:center}.today{font-size:11px;color:var(--muted)}.user-chip{display:flex;gap:10px;align-items:center;font-size:11px}.avatar{width:35px;height:35px;border-radius:12px;background:#efe9e0;color:#886a44;display:grid;place-items:center;font-size:15px;font-weight:bold}.workspace-footer{padding:30px 0 22px;color:#98a2b1;font-size:10px;display:flex;gap:8px;justify-content:center}.mobile-navigation{display:none}.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:21px}.section-head h2,.section-head h3{margin:0}.section-head p{font-size:12px;margin:4px 0 0;color:var(--muted)}.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;min-height:43px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:12px;font-weight:bold;white-space:nowrap;transition:background .15s,transform .15s}.button:hover{background:#f4f5fa}.button.primary{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 5px 13px #6253ce17}.button.primary:hover{background:#5142bb}.button.soft{background:var(--primary-light);border-color:var(--primary-light);color:var(--primary)}.button.success{background:var(--green-light);border-color:#d7eee1;color:var(--green)}.button.danger{background:var(--red-light);border-color:#f8dce1;color:var(--red)}.button.ghost{background:transparent;border-color:transparent;color:var(--muted)}.button.small{padding:7px 10px;min-height:35px;font-size:11px;border-radius:9px}.button.large{min-height:50px}.button.icon-only{width:41px;padding:8px}.button .icon{width:18px;height:18px}.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:24px;margin-bottom:20px;min-width:0}.card.flush{padding:0;overflow:hidden}.card-head{display:flex;align-items:center;gap:10px;margin-bottom:20px}.card-head h3{margin:0}.card-head .icon{color:var(--primary)}.hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:26px;background:linear-gradient(112deg,#ebe8fb,#f2effe 46%,#fff);border:1px solid #e3dff6;min-height:177px}.hero:before{content:"";width:230px;height:230px;position:absolute;left:-30px;top:-40px;border:35px solid #ffffff73;border-radius:50%;pointer-events:none}.hero-content{position:relative}.hero h2{font-size:25px;letter-spacing:-.7px;margin-bottom:8px}.hero p{color:#817d96;font-size:12px;margin-bottom:20px;max-width:520px}.hero .hero-symbol{position:relative;color:#a69ad6;width:88px;height:88px;margin-left:35px;flex-shrink:0}.hero-symbol svg{width:100%;height:100%;stroke-width:1.1}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:24px}.stat-card{background:white;border:1px solid var(--line);border-radius:17px;padding:20px;display:flex;gap:14px;align-items:center;min-width:0}.stat-icon{display:grid;place-items:center;width:44px;height:44px;background:var(--primary-light);color:var(--primary);border-radius:13px;flex-shrink:0}.stat-card:nth-child(2) .stat-icon{background:var(--green-light);color:var(--green)}.stat-card:nth-child(3) .stat-icon{background:var(--orange-light);color:var(--orange)}.stat-card:nth-child(4) .stat-icon{background:#edf4fd;color:#5482bc}.stat-value{display:block;font-size:23px;line-height:1.5;font-weight:bold;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.stat-label{display:block;color:var(--muted);font-size:10px}.grid-two{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:20px}.grid-half{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.span-all{grid-column:1/-1}.field{display:flex;flex-direction:column;gap:7px;color:#57677b;font-size:11px;min-width:0}.field>span{display:block}.field .hint{font-size:10px;color:var(--muted);margin-top:-2px}.field.required>span:after{content:" *";color:var(--primary)}.check-field{display:flex;gap:10px;align-items:center;font-size:12px;color:#59687c;padding:7px 0}.search-box{position:relative;flex:1;min-width:190px}.search-box .icon{position:absolute;right:13px;top:14px;color:#929cad;width:18px;height:18px;pointer-events:none}.search-box input{padding-right:41px;background:#fff}.toolbar{display:flex;align-items:center;gap:12px;margin-bottom:20px;flex-wrap:wrap}.toolbar select{width:auto;min-width:140px}.tabs{display:flex;gap:7px;padding:5px;background:#eaf0f6;border-radius:13px;width:fit-content;max-width:100%;overflow-x:auto;margin-bottom:22px}.tab{white-space:nowrap;border:0;padding:9px 17px;border-radius:9px;color:#7c8797;background:transparent;font-size:11px}.tab.active{color:var(--primary);background:#fff;box-shadow:0 3px 8px #28345009}.table-scroll{overflow-x:auto;max-width:100%}table{width:100%;border-collapse:collapse;font-size:11px;text-align:right}thead th{background:#fafbfe;color:#8b95a5;font-size:10px;font-weight:normal;white-space:nowrap;padding:14px 18px;border-bottom:1px solid var(--line)}tbody td{padding:17px 18px;border-bottom:1px solid #eef1f6;vertical-align:middle}tbody tr:last-child td{border-bottom:0}tbody tr:hover td{background:#fcfcff}.cell-title{display:block;font-weight:bold;color:var(--ink);font-size:12px;margin-bottom:3px}.cell-sub{display:block;color:var(--muted);font-size:10px}.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:7px;font-size:10px;background:#f0f3f8;color:#7e8999;white-space:nowrap}.badge.green{color:var(--green);background:var(--green-light)}.badge.purple{color:var(--primary);background:var(--primary-light)}.badge.orange{color:var(--orange);background:var(--orange-light)}.badge.red{color:var(--red);background:var(--red-light)}.badge.blue{color:#477fab;background:#edf6fc}.pill{display:inline-block;padding:5px 11px;border:1px solid #e3def5;border-radius:99px;font-size:10px;color:var(--primary);background:#f7f5fe}.empty-state{padding:48px 20px;text-align:center}.empty-state .empty-icon{margin:auto auto 13px;width:61px;height:61px;display:grid;place-items:center;background:#f4f3fb;color:#aba1d8;border-radius:20px}.empty-state .icon{width:29px;height:29px}.empty-state h3{margin:0 0 6px}.empty-state p{font-size:11px;color:var(--muted);margin:0}.pagination{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.pagination .actions{gap:5px}.notice{padding:13px 16px;border-radius:12px;background:#edf4ff;border:1px solid #dce9fd;color:#527699;font-size:11px;line-height:2;margin-bottom:18px;overflow-wrap:anywhere}.notice.warning{background:var(--orange-light);border-color:#f5e5bd;color:var(--orange)}.notice.danger{background:var(--red-light);border-color:#f6dce0;color:var(--red)}.notice.success{background:var(--green-light);border-color:#d7eee3;color:var(--green)}.notice p:last-child{margin-bottom:0}.notice ul{margin:5px 0;padding-right:18px}.error-message{display:none}.error-message:not(:empty){display:block}.loading-box{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;min-height:220px;color:var(--muted);font-size:12px}.spinner{display:inline-block;width:27px;height:27px;border:3px solid #e6e2f4;border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.dialog{border:1px solid var(--line);border-radius:23px;width:min(740px,calc(100% - 30px));max-height:calc(100dvh - 44px);padding:0;background:white;color:var(--ink);box-shadow:0 25px 100px #26334b35;overflow:auto}.dialog::backdrop{background:#27324d55;backdrop-filter:blur(4px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 25px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:4}.dialog-head h2{font-size:18px;margin:0}.dialog-body{padding:25px}.dialog-foot{display:flex;justify-content:flex-end;gap:10px;padding:18px 25px;border-top:1px solid var(--line);background:#fcfcff;position:sticky;bottom:0;z-index:4}.dialog-wide{width:min(1020px,calc(100% - 30px))}.toasts{position:fixed;bottom:25px;left:25px;display:grid;gap:10px;max-width:min(430px,calc(100vw - 35px));z-index:150}.toast{background:#fff;padding:15px 19px;border:1px solid #d9e8df;border-right:4px solid var(--green);border-radius:12px;box-shadow:0 12px 40px #26334b1a;font-size:12px;animation:toast-in .2s ease}.toast.error{border-right-color:var(--red);border-color:#f0dce1}.toast.notice{margin:0}@keyframes toast-in{from{transform:translateY(10px);opacity:0}to{transform:none;opacity:1}}.wizard-steps{display:flex;align-items:center;gap:12px;counter-reset:steps;margin-bottom:24px}.wizard-step{display:flex;align-items:center;gap:9px;color:#9aa3b1;font-size:11px;white-space:nowrap}.wizard-step:before{content:counter(steps);counter-increment:steps;display:grid;place-items:center;border:1px solid #dce1ec;background:#fff;border-radius:50%;width:28px;height:28px;color:#9aa3b1}.wizard-step.active{color:var(--primary);font-weight:bold}.wizard-step.active:before{background:var(--primary);border-color:var(--primary);color:#fff}.wizard-line{height:1px;background:#dce1ec;flex:1}.editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}.editor-summary{position:sticky;top:20px;padding:20px}.summary-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;padding:10px 0;color:#778497}.summary-row strong{color:var(--ink);font-size:12px;direction:ltr;unicode-bidi:plaintext}.summary-row.total{border-top:1px dashed #dce3ee;margin-top:9px;padding-top:18px;color:var(--ink)}.summary-row.total strong{color:var(--primary);font-size:20px}.summary-row.discount strong{color:var(--green)}.summary-currency{text-align:left;font-size:10px;color:var(--muted)}.summary-hint{font-size:10px;color:#9b92b4;line-height:1.9;background:#f7f5fd;border-radius:10px;padding:10px;margin-top:17px}.summary-actions{display:grid;gap:10px;margin-top:20px}.document-meta{display:flex;flex-wrap:wrap;gap:12px 25px;font-size:11px;color:var(--muted);margin-bottom:16px}.document-meta strong{color:#536075}.product-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;max-height:390px;overflow-y:auto;padding:3px}.product-card{border:1px solid var(--line);border-radius:13px;padding:15px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;min-width:0}.product-card h4{margin:0 0 5px;font-size:12px;line-height:1.9;overflow-wrap:anywhere}.product-card p{margin:0;color:var(--muted);font-size:10px}.product-card .button{flex-shrink:0}.product-card.unavailable{background:#fafafa}.product-price{color:var(--primary);font-size:11px;font-weight:bold;display:block;margin-top:7px}.selected-items{display:grid;gap:12px;margin-bottom:18px}.item-row{border:1px solid var(--line);border-radius:14px;padding:17px;background:#fff}.item-row-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:15px}.item-row-head h4{margin:0;font-size:12px}.item-row-head .item-number{display:inline-grid;place-items:center;width:23px;height:23px;background:var(--primary-light);color:var(--primary);font-size:10px;border-radius:7px;margin-left:7px}.item-row-fields{display:grid;grid-template-columns:80px minmax(0,1fr) minmax(0,1.5fr);gap:12px;align-items:end}.item-row-total{font-size:12px;color:var(--primary);font-weight:bold;margin-top:13px;text-align:left}.item-row-subtitle{margin:4px 0 0;color:var(--muted);font-size:10px}.customer-results{display:grid;gap:8px;max-height:400px;overflow-y:auto}.customer-option{display:flex;align-items:center;gap:13px;width:100%;text-align:right;padding:14px;border:1px solid var(--line);background:#fff;border-radius:12px;color:var(--ink)}.customer-option:hover{border-color:#c4bbee;background:#fbfaff}.customer-option .avatar{background:#efedf9;color:#8d7cbc;font-size:13px}.customer-option .details{flex:1;min-width:0}.customer-option strong{display:block;font-size:12px}.customer-option small{color:var(--muted);display:block}.autocomplete-wrap{position:relative}.autocomplete{position:absolute;top:100%;right:0;left:0;z-index:8;background:#fff;border:1px solid var(--line);border-radius:12px;padding:6px;box-shadow:var(--shadow);max-height:250px;overflow-y:auto}.autocomplete .customer-option{border:0;border-radius:8px;padding:10px}.customer-card{display:flex;align-items:center;gap:18px;margin-bottom:18px}.customer-card .avatar{width:62px;height:62px;font-size:25px;border-radius:19px;background:var(--primary-light);color:var(--primary)}.customer-card h2{margin:0 0 5px;font-size:22px}.customer-contact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;border-top:1px solid var(--line);padding-top:20px}.customer-contact-grid dt{font-size:10px;color:var(--muted);margin-bottom:4px}.customer-contact-grid dd{margin:0;font-size:12px;overflow-wrap:anywhere}.timeline{display:grid;gap:0}.timeline-item{position:relative;padding:0 24px 22px 0;border-right:1px solid var(--line);margin-right:7px;font-size:11px}.timeline-item:last-child{border-right-color:transparent}.timeline-item:before{content:"";position:absolute;right:-5px;top:5px;width:9px;height:9px;border-radius:50%;background:#b6acd9;border:2px solid #fff;box-shadow:0 0 0 1px #e8e4f4}.timeline-item strong{display:block;margin-bottom:4px}.timeline-item small{display:block;color:var(--muted);font-size:10px}.lead-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.lead-card{border:1px solid var(--line);border-radius:16px;background:white;padding:19px;display:flex;flex-direction:column;gap:13px;min-width:0}.lead-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.table-number{background:#f3f0fc;color:var(--primary);border-radius:11px;padding:6px 11px;font-size:11px}.lead-card h3{margin:0;font-size:15px}.lead-card p{margin:0;color:var(--muted);font-size:11px;overflow-wrap:anywhere}.lead-details{display:grid;gap:6px;font-size:10px;color:#8994a4}.lead-card .actions{margin-top:auto;padding-top:14px;border-top:1px solid var(--line)}.lead-card .button{flex:1}.lead-card.working{border-top:3px solid #bba8ea}.lead-card.waiting{border-top:3px solid #eac778}.lead-card.done{border-top:3px solid #8fc0ac}.group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.group-card{border:1px solid var(--line);border-radius:14px;padding:18px;min-width:0}.group-card h3{font-size:13px;margin:0}.group-card p{color:var(--muted);font-size:10px;margin:8px 0 14px}.setting-row{display:grid;grid-template-columns:24px minmax(0,1fr) 74px 82px;gap:9px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:10px;margin-bottom:9px}.setting-row .row-order{font-size:11px;color:var(--muted);text-align:center}.setting-row input{padding:8px;min-height:38px}.setting-row .actions{gap:2px;justify-content:flex-end}.setting-row .button{min-height:32px;padding:4px;width:25px}.mini-bar{height:6px;background:#f0edf9;border-radius:5px;min-width:70px;margin-top:6px}.mini-bar span{display:block;background:#a99adb;border-radius:5px;height:100%;max-width:100%}.stats-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) auto;align-items:end;gap:14px}.login-page{min-height:100dvh;display:grid;place-items:center;padding:35px;background:radial-gradient(ellipse at 95% 0%,#eae6fa 0%,transparent 50%),var(--bg)}.login-layout{width:min(1120px,100%);min-height:620px;display:grid;grid-template-columns:1.1fr 1fr;border:1px solid white;border-radius:30px;overflow:hidden;box-shadow:0 35px 100px #37436a0c;background:white}.login-story{background:linear-gradient(140deg,#f1edff,#ebeaf4);padding:43px;display:flex;flex-direction:column;justify-content:space-between}.login-story-body{padding:50px 0}.login-story h1{font-size:38px;line-height:1.7;letter-spacing:-1.5px;margin:12px 0 18px;color:#4b426f}.login-story p{font-size:12px;line-height:2.2;color:#8a819d;max-width:380px}.login-flow{display:flex;align-items:center;gap:9px;margin-top:30px;font-size:9px;color:#857597;flex-wrap:wrap}.login-flow span{background:#ffffff70;border:1px solid #fff9;border-radius:9px;padding:6px 10px}.login-flow i{font-style:normal}.login-story>small{font-size:10px;color:#a39ab1}.login-form-wrap{display:grid;place-items:center;padding:45px}.login-form{width:100%;max-width:350px}.login-form h2{margin:17px 0 7px;font-size:23px}.login-form>p{font-size:11px;margin-bottom:28px}.login-form .field{margin-bottom:18px}.login-form .button{margin-top:9px}.login-form .login-hint{font-size:10px;line-height:2;text-align:center;color:#a4adba;margin-top:24px;margin-bottom:0}.divider{height:1px;background:var(--line);margin:20px 0}.review-customer{background:#fafbfe;border:1px solid var(--line);padding:18px;border-radius:13px;margin-bottom:20px}.review-customer h3{font-size:14px;margin:0 0 7px}.review-customer p{margin:0;font-size:11px;color:var(--muted)}.review-customer .actions{margin-top:12px}.inline-info{display:flex;gap:7px;align-items:center;color:var(--muted);font-size:10px;flex-wrap:wrap}.inline-info .icon{width:14px;height:14px}.sticky-actions{display:flex;justify-content:space-between;gap:12px;margin-top:20px}.suggestion-list{display:flex;gap:9px;flex-wrap:wrap}.suggestion{display:inline-flex;align-items:center;gap:7px;background:#f7f5fe;border:1px solid #e6e0f6;color:#8373ab;padding:8px 11px;border-radius:10px;font-size:10px;max-width:100%;text-align:right}.suggestion span{overflow-wrap:anywhere}.revision-link{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line);font-size:11px}.revision-link:last-child{border-bottom:0}.revision-link small{color:var(--muted);font-size:10px}.money{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:plaintext;display:inline-block}.screen-reader{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.mobile-only{display:none}
@media(min-width:1700px){.workspace{padding-left:max(45px,calc((100vw - 1660px)/2));padding-right:max(45px,calc((100vw - 1660px)/2))}}
@media(max-width:1250px){.app-shell{grid-template-columns:215px minmax(0,1fr)}.sidebar{padding:25px 15px}.workspace{padding:0 25px}.stats-grid{gap:10px}.stat-card{padding:16px;gap:10px}.stat-icon{width:35px;height:35px}.stat-value{font-size:20px}.editor-grid{grid-template-columns:minmax(0,1fr) 245px}.lead-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-results{grid-template-columns:1fr}.grid-two{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}}
@media(max-width:1000px){.app-shell{grid-template-columns:190px minmax(0,1fr)}.workspace{padding:0 20px}.sidebar{padding:25px 12px}.brand{gap:8px}.brand strong{font-size:18px}.brand small{font-size:8px}.brand-mark{width:37px;height:42px}.nav-link{font-size:11px;padding:11px;gap:9px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-grid{grid-template-columns:1fr}.editor-summary{position:static}.editor-summary .summary-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.editor-summary .summary-row.total{grid-column:1/-1}.grid-two{grid-template-columns:1fr}.hero .hero-symbol{width:65px;height:65px;margin-left:10px}.today{display:none}.customer-contact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.login-layout{min-height:560px}.login-story{padding:32px}.login-story h1{font-size:30px}.login-form-wrap{padding:30px}.product-results{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.app-shell{display:block}.sidebar{display:none}.workspace{padding:0 17px 90px}.topbar{min-height:92px;margin-bottom:20px;gap:12px}.topbar h1{font-size:20px}.topbar-actions{gap:8px}.user-chip{font-size:10px;gap:7px;max-width:135px}.user-chip #user-name{max-width:85px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.avatar{width:32px;height:32px;border-radius:11px}.eyebrow{font-size:9px}.mobile-navigation{position:fixed;display:flex;bottom:0;left:0;right:0;background:#ffffffed;border-top:1px solid var(--line);padding:8px 6px calc(8px + env(safe-area-inset-bottom));z-index:30;backdrop-filter:blur(12px);gap:2px;justify-content:space-around;overflow-x:auto;box-shadow:0 -5px 25px #26334b04}.mobile-navigation .nav-link{flex:1;min-width:54px;display:flex;flex-direction:column;gap:4px;font-size:8px;line-height:1.7;padding:7px 4px;border-radius:12px;white-space:nowrap}.mobile-navigation .nav-link .icon{width:20px;height:20px}.mobile-navigation .nav-link.active:after{display:none}.card{padding:19px;border-radius:17px;margin-bottom:17px}.hero{min-height:170px;padding:21px}.hero h2{font-size:21px;line-height:1.9}.hero p{font-size:11px}.hero .hero-symbol{display:none}.stats-grid{gap:11px;margin-bottom:20px}.stat-card{padding:16px 13px;border-radius:14px;gap:12px}.stat-icon{width:35px;height:39px}.stat-value{font-size:21px}.stat-label{font-size:9px}.section-head{align-items:flex-start;gap:10px;margin-bottom:16px}.section-head h2{font-size:18px}.section-head h3{font-size:15px}.section-head p{font-size:10px}.section-head>.actions{justify-content:flex-end}.section-head .button{padding:8px 11px;min-height:38px;font-size:10px}.toolbar{gap:9px;margin-bottom:15px}.toolbar .search-box{flex-basis:100%}.toolbar select{flex:1;min-width:0;font-size:11px;padding:10px}.button{min-height:44px;font-size:11px;padding:10px 13px}.button.small{min-height:39px}.grid-half{grid-template-columns:1fr;gap:0}.form-grid{gap:14px}.field{font-size:11px;gap:6px}input,select,textarea{font-size:16px;min-height:46px;padding:10px 12px}.field .hint{font-size:9px}.lead-grid{gap:12px}.lead-card{padding:15px}.lead-card h3{font-size:13px}.lead-card .actions{flex-direction:column;align-items:stretch;gap:7px}.lead-card .button{font-size:10px;min-height:38px}.lead-details{font-size:9px}.lead-card p{font-size:10px}.table-number{font-size:10px;padding:5px 8px}.badge{font-size:9px;padding:4px 7px}.group-grid{gap:11px}.group-card{padding:14px}.group-card .button{font-size:10px}.wizard-steps{gap:7px;margin-bottom:18px}.wizard-step{font-size:9px;gap:6px}.wizard-step:before{width:24px;height:24px}.dialog{width:calc(100% - 20px);max-height:calc(100dvh - 22px);border-radius:19px}.dialog-head{padding:17px}.dialog-head h2{font-size:16px}.dialog-body{padding:17px}.dialog-foot{padding:14px 17px}.dialog-foot .button{flex:1}.toasts{bottom:100px;left:17px;right:17px;max-width:none}.toast{font-size:11px}.product-results{gap:9px}.product-card{padding:12px;gap:8px}.product-card h4{font-size:11px}.product-card .button{width:33px;min-height:36px;padding:5px}.item-row{padding:14px}.item-row-fields{grid-template-columns:75px minmax(0,1fr);gap:10px}.item-row-fields .field:last-child{grid-column:1/-1}.item-row input{font-size:14px}.item-row-head h4{font-size:11px}.summary-row.total strong{font-size:22px}.editor-summary .summary-body{gap:0 13px}.summary-row{font-size:10px}.customer-contact-grid{gap:13px}.customer-contact-grid dd{font-size:11px}.customer-card h2{font-size:19px}.customer-card .avatar{width:50px;height:50px;border-radius:15px;font-size:20px}.customer-card{gap:12px}.tabs{width:100%;gap:3px;padding:4px;margin-bottom:17px}.tab{padding:8px 13px;font-size:10px;flex:1}.stats-filter{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.stats-filter>.button{grid-column:1/-1}.document-meta{gap:7px 15px;font-size:10px}.responsive-table thead{display:none}.responsive-table,.responsive-table tbody{display:block}.responsive-table tr{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:17px;border-bottom:1px solid var(--line)}.responsive-table tr:last-child{border-bottom:0}.responsive-table td{display:block;border:0;padding:0!important;min-width:0;overflow-wrap:anywhere}.responsive-table td:before{content:attr(data-label);display:block;font-size:9px;color:#98a2b1;margin-bottom:4px}.responsive-table td:first-child{grid-column:1/-1}.responsive-table td:last-child{grid-column:1/-1}.responsive-table td .actions{justify-content:flex-start}.responsive-table tr:hover td{background:transparent}.pagination{padding:14px;font-size:10px}.workspace-footer{font-size:9px;padding:24px 0 0}.login-page{padding:17px}.login-layout{grid-template-columns:1fr;width:min(480px,100%);border-radius:24px;min-height:0}.login-story{padding:26px;gap:20px}.login-story-body{padding:2px 0}.login-story h1{font-size:25px;line-height:1.8;margin:7px 0}.login-story h1 br{display:none}.login-story p{font-size:10px;margin-bottom:0}.login-story-body>.eyebrow,.login-flow,.login-story>small{display:none}.login-form-wrap{padding:30px 26px}.login-form h2{font-size:21px}.login-form>p{font-size:10px;margin-bottom:24px}.login-form .pill{display:none}.mobile-only{display:block}.desktop-only{display:none}.notice{font-size:10px}.setting-row{grid-template-columns:18px minmax(0,1fr) 59px 79px;gap:7px;padding:9px}.setting-row input{font-size:13px}.setting-row .cell-title{font-size:10px}.setting-row .cell-sub{font-size:9px}.setting-row .button{width:23px}.sticky-actions .button{flex:1}}
@media(max-width:420px){.workspace{padding-left:12px;padding-right:12px}.topbar h1{font-size:18px}.hero{padding:18px}.hero h2{font-size:19px}.hero .actions{gap:7px}.hero .button{padding:9px 11px;font-size:10px}.card{padding:16px}.card.flush{padding:0}.stat-card{padding:13px 10px;gap:9px}.stat-icon{width:30px;height:35px}.stat-icon .icon{width:18px;height:18px}.stat-value{font-size:20px}.stat-label{font-size:8px}.lead-grid,.group-grid,.product-results{grid-template-columns:1fr}.lead-card .actions{flex-direction:row}.form-grid,.form-grid.three{grid-template-columns:1fr}.wizard-step{font-size:8px}.wizard-step:before{width:22px;height:22px}.wizard-line{min-width:5px}.editor-summary .summary-body{grid-template-columns:1fr}.summary-row.total{grid-column:auto}.customer-contact-grid{grid-template-columns:1fr 1fr}.dialog-foot{flex-wrap:wrap}.dialog-foot .button{min-width:100px}.topbar-actions{max-width:110px}.user-chip #user-name{max-width:63px}.section-head{flex-wrap:wrap}.section-head>.actions{margin-right:auto}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media print{.sidebar,.topbar,.mobile-navigation,.workspace-footer,.actions,.toasts,.skip-link{display:none!important}.app-shell,.workspace{display:block;padding:0}body{background:#fff}.card{box-shadow:none;break-inside:avoid}}
.mobile-account{position:relative;flex-shrink:0}.mobile-account>summary{list-style:none;width:44px;height:44px;display:grid;place-items:center;cursor:pointer;color:var(--muted);border:1px solid var(--line);border-radius:12px;background:white}.mobile-account>summary::-webkit-details-marker{display:none}.mobile-account-panel{position:absolute;left:0;top:51px;z-index:50;width:220px;max-width:calc(100vw - 24px);background:white;border:1px solid var(--line);border-radius:15px;padding:10px;box-shadow:var(--shadow)}.mobile-account-panel>a{display:block;padding:12px;font-size:12px;color:var(--ink);border-radius:9px}.mobile-account-panel>a:hover{background:var(--primary-light)}.mobile-account-panel .button{width:100%;justify-content:flex-start}
@media(max-width:760px){
  body{font-size:14px}.topbar-actions{max-width:none}.user-chip #user-name{max-width:70px}.topbar{gap:8px}.topbar h1{font-size:18px}.mobile-account.mobile-only{display:block}.mobile-navigation .nav-link{min-height:58px;font-size:11px;min-width:72px;flex-shrink:0}.mobile-navigation{justify-content:flex-start}.workspace{padding-bottom:105px}.toasts{bottom:111px}
  input,select,textarea,.item-row input,.setting-row input,.toolbar select{font-size:16px;min-height:46px}.field,.check-field{font-size:13px}.field .hint,.small,small{font-size:11px}.button,.button.small,.section-head .button,.lead-card .button,.group-card .button{min-height:44px;font-size:12px}.button.icon-only,.product-card .button{width:44px;min-width:44px;min-height:44px}.button.ghost.icon-only{min-width:44px}.tabs .tab{min-height:44px;font-size:12px;display:inline-flex;align-items:center;justify-content:center}.wizard-step{min-height:44px;font-size:11px;white-space:normal;text-align:right;line-height:1.8}.wizard-step:before{flex-shrink:0}
  .product-card h4,.item-row-head h4,.cell-title,.group-card h3{font-size:13px}.product-card p,.group-card p,.product-price,.item-row-subtitle,.cell-sub,.lead-card p,.lead-details,.lead-card .badge,.summary-hint,.notice{font-size:12px}.section-head p,.hero p,.stat-label,.stat-card .stat-label{font-size:12px}.hero h2{font-size:22px}.stat-card{align-items:flex-start}.stat-icon{width:32px;min-width:32px}.stat-value{font-size:23px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-grid .stat-card{padding:14px 11px;gap:9px}.badge,.table-number,.summary-currency{font-size:11px}.summary-row{font-size:13px}.summary-row strong{font-size:14px}.summary-row.total strong{font-size:22px}.customer-contact-grid dt{font-size:11px}.customer-contact-grid dd{font-size:13px}.customer-option strong{font-size:13px}.customer-option small{font-size:12px}.timeline-item{font-size:13px}.timeline-item small{font-size:11px}.revision-link{font-size:12px}.document-meta{font-size:12px}.responsive-table td{font-size:13px}.responsive-table td:before{font-size:11px}.pagination{font-size:12px;gap:10px;flex-wrap:wrap}.pagination .button{min-width:52px}
  .setting-row{grid-template-columns:24px minmax(0,1fr) 78px;gap:9px;padding:12px}.setting-row .actions{grid-column:2/-1;justify-content:flex-end;gap:7px}.setting-row .button{width:44px;min-width:44px;min-height:44px;font-size:17px}.setting-row .cell-title{font-size:13px}.setting-row .cell-sub{font-size:11px}.item-row-fields{grid-template-columns:80px minmax(0,1fr)}.lead-card .actions{flex-wrap:wrap}.lead-card .button{flex-basis:calc(50% - 8px)}.suggestion{font-size:12px;min-height:44px;padding:10px 12px}.suggestion .icon{width:19px}.login-form .field,.login-form>p{font-size:13px}.login-story p{font-size:12px}.login-form .login-hint{font-size:11px}.login-form h2{font-size:23px}.mobile-account-panel .button{font-size:13px}
}
@media(max-width:420px){.topbar h1{font-size:17px}.user-chip #user-name{max-width:46px}.topbar-actions{gap:5px}.user-chip{gap:5px}.stat-card .stat-icon{display:none}.stats-grid .stat-card{padding:15px}.stat-card .stat-label{font-size:12px}.section-head>.actions{width:100%;justify-content:flex-start}.section-head>.actions .button{flex:1}.form-grid,.form-grid.three{grid-template-columns:1fr}.wizard-steps{gap:5px}.wizard-step{font-size:10px}.wizard-step:before{width:23px;height:23px}.wizard-line{min-width:3px}.customer-contact-grid{grid-template-columns:1fr}.dialog-foot .button{white-space:normal;line-height:1.8}.toolbar .button{flex-grow:1}}


/* 2026 light visual refinement */
:root{
  --bg:#f7f8fb;
  --paper:#ffffff;
  --ink:#26334a;
  --muted:#77849a;
  --line:#e3e8f0;
  --primary:#536bd7;
  --primary-light:#eef1ff;
  --green:#34775f;
  --green-light:#edf7f2;
  --orange:#9a6b28;
  --orange-light:#fff7e8;
  --red:#b34d5c;
  --red-light:#fff1f3;
  --shadow:0 10px 32px rgba(45,59,91,.055);
  --radius:18px;
  font-family:Vazirmatn,Tahoma,"Segoe UI",Arial,sans-serif;
}
html,body,button,input,select,textarea{font-family:Vazirmatn,Tahoma,"Segoe UI",Arial,sans-serif}
body{background:linear-gradient(180deg,#fafbfe 0,#f7f8fb 240px,#f7f8fb 100%)}
.sidebar{background:rgba(255,255,255,.96);padding:27px 18px 20px;box-shadow:-1px 0 0 rgba(32,49,79,.01)}
.brand strong{font-size:19px}.brand-mark{background:linear-gradient(145deg,#6479de,#5066ce);box-shadow:0 8px 22px rgba(83,107,215,.18)}
.navigation{gap:5px}.nav-link{border-radius:12px;padding:11px 13px}.nav-link.active{box-shadow:inset 0 0 0 1px #e2e7ff}
.workspace{padding:0 42px}.topbar{min-height:100px;margin-bottom:24px}.topbar h1{font-size:23px}.topbar-actions{gap:16px}
.card{border-color:#e5e9f0;box-shadow:var(--shadow);padding:22px}.card:hover{border-color:#dde3ec}
.section-head{margin-bottom:17px}.section-head p{display:none}.section-head h2,.section-head h3{letter-spacing:-.15px}
.button{border-color:#dfe5ed;border-radius:11px;box-shadow:none}.button.primary{background:linear-gradient(180deg,#5c73dd,#4f66d2);box-shadow:0 7px 18px rgba(83,107,215,.16)}.button.primary:hover{background:#485fc9}.button.soft{background:#f0f3ff;border-color:#e4e9ff}
input,select,textarea{border-color:#dfe5ed;background:#fff;border-radius:11px}.search-box input{background:#fff}.field>span{color:#65738a}
.hero{min-height:150px;background:linear-gradient(115deg,#f1f3ff,#f7f8ff 55%,#fff);border-color:#e6e9fa}.hero:before{opacity:.55}.hero h2{font-size:24px;margin-bottom:16px}.hero p{display:none}
.stat-card{border-color:#e5e9f0;box-shadow:0 6px 20px rgba(45,59,91,.035)}
.badge{border:1px solid transparent}.badge.purple{border-color:#e0e5ff}.badge.green{border-color:#dcefe5}.badge.orange{border-color:#f4e7c9}
.loading-box.compact{min-height:88px}.empty-state{padding:34px 20px}.empty-state p{display:none}.empty-icon{margin-bottom:10px}
.notice{border-radius:11px;line-height:1.85}.compact-notice{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:10px 13px}
.wizard-steps{background:#fff;border:1px solid #e5e9f0;border-radius:15px;padding:11px 14px;box-shadow:0 5px 18px rgba(45,59,91,.03)}.wizard-step.active{color:var(--primary);font-weight:700}.wizard-line{background:#e6eaf1}
.editor-grid{grid-template-columns:minmax(0,1fr) 270px;gap:18px}.editor-summary{border-color:#e0e5f1;top:14px}.editor-summary h3{margin-bottom:16px}
.summary-hint:empty{display:none}.summary-hint{margin-top:10px;padding:9px 10px;border-radius:9px;background:#f7f8fb;color:#6e7c91}

/* Product editor */
.product-entry-layout{display:grid;gap:18px}
.product-picker-card,.selected-products-card{margin-bottom:0}
.product-config-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px;padding:14px;background:#f8f9fc;border:1px solid #edf0f4;border-radius:14px}
.product-search-row{display:flex;align-items:center;gap:10px;margin:2px 0 14px}.product-search-row .search-box{min-width:0}
.product-results{grid-template-columns:1fr;gap:8px;max-height:430px;padding:2px 3px 2px 1px}
.product-card{min-height:72px;border-color:#e5e9ef;border-radius:13px;padding:11px 12px;background:#fff;transition:border-color .15s,box-shadow .15s,transform .15s}
.product-card:hover{border-color:#ccd5f2;box-shadow:0 6px 18px rgba(53,71,118,.06);transform:translateY(-1px)}
.product-card.unavailable{background:#fbfbfc;opacity:.72}
.product-card-main{min-width:0;display:flex;flex-direction:column;gap:3px}.product-card-main h4{margin:0;font-size:12px;line-height:1.75;overflow-wrap:anywhere}.product-sku{font-size:10px;color:#98a2b2;direction:ltr;unicode-bidi:plaintext;text-align:right}
.product-card-side{display:flex;align-items:center;gap:12px;flex-shrink:0}.product-card-price{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.product-card-price strong{font-size:13px;color:#3e57c6}.product-card-price small{color:#8b96a7}
.product-pager{margin-top:11px}.product-pager .actions{justify-content:flex-end}
.selected-items{gap:10px;margin-bottom:14px}
.item-row{border-color:#e3e8ef;border-radius:15px;padding:15px 16px;background:linear-gradient(180deg,#fff,#fdfdfe);box-shadow:0 4px 14px rgba(45,59,91,.025)}
.item-row-head{margin-bottom:13px;align-items:center}.item-title-wrap{display:flex;align-items:flex-start;gap:10px;min-width:0}.item-title-wrap .item-number{margin:1px 0 0;flex-shrink:0}.item-title-wrap h4{margin:0;font-size:12px;line-height:1.8}.item-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:3px;color:#748197;font-size:10px}.item-meta>span:first-child{font-weight:700;color:#53627a}
.product-line-fields{grid-template-columns:92px minmax(0,1fr) 135px;gap:11px;align-items:end}.description-field{min-width:0}.line-total-box{display:flex;flex-direction:column;justify-content:center;min-height:46px;padding:7px 11px;border:1px solid #e4e8f1;background:#f6f8ff;border-radius:11px}.line-total-box span{font-size:9px;color:#8792a4}.line-total-box strong{font-size:13px;color:#4059c8;direction:ltr;text-align:right;font-variant-numeric:tabular-nums}.line-actions{margin-top:11px}.item-row-total{display:none}
.suggestion-list{gap:7px}.suggestion{background:#f5f7ff;border-color:#e5e9fa;color:#6173b3;border-radius:9px}

/* Login stays bright and restrained */
.login-page{background:radial-gradient(circle at 88% 10%,#eef1ff 0,transparent 34%),#f7f8fb}
.login-layout{min-height:540px;border:1px solid #e8ebf1;border-radius:26px;box-shadow:0 30px 90px rgba(50,62,92,.09)}
.login-story{background:linear-gradient(145deg,#eef1ff,#f8f9ff);padding:42px}.login-story-body{padding:36px 0}.login-story h1{color:#344363;font-size:30px;line-height:1.7;letter-spacing:-.7px}
.login-form-wrap{padding:42px}.login-form h2{font-size:24px;margin-bottom:28px}

@media(min-width:1450px){.product-results{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-grid{grid-template-columns:minmax(0,1fr) 290px}}
@media(max-width:1050px){.workspace{padding:0 26px}.product-line-fields{grid-template-columns:82px minmax(0,1fr)}.line-total-box{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between}.editor-grid{grid-template-columns:1fr}.editor-summary{position:static}}
@media(max-width:760px){.workspace{padding-left:15px;padding-right:15px}.product-config-row{grid-template-columns:1fr;padding:11px}.product-card{align-items:flex-start}.product-card-side{gap:8px}.product-card-price{justify-content:flex-start}.product-line-fields{grid-template-columns:78px minmax(0,1fr)}.line-total-box{grid-column:1/-1}.selected-products-card,.product-picker-card{padding:17px}.login-story{padding:26px}.login-story h1{font-size:24px}.login-form-wrap{padding:29px 25px}}
@media(max-width:430px){.product-card{display:grid;grid-template-columns:minmax(0,1fr) auto}.product-card-side{align-items:flex-end;flex-direction:column}.product-card-price{display:grid;gap:2px}.product-line-fields{grid-template-columns:1fr}.line-total-box{grid-column:auto}.quantity-field{max-width:100%}.item-row{padding:13px}.item-title-wrap{gap:7px}.item-meta{gap:5px}}

/* Sales settings: compact XLSX catalogue sync */
.catalog-sync-card{padding:18px 20px;background:#fff;border-color:#e4e8ef}
.catalog-sync-card .section-head{margin-bottom:14px}
.catalog-sync-form{display:grid;grid-template-columns:minmax(240px,1fr) 150px auto;gap:10px;align-items:center}
.file-picker{position:relative;display:flex;align-items:center;min-height:46px;border:1px dashed #cfd7e4;border-radius:12px;background:#fafbfc;color:#667487;padding:7px 12px;overflow:hidden}
.file-picker input{position:absolute;inset:0;opacity:0;cursor:pointer}
.file-picker span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:760px){.catalog-sync-form{grid-template-columns:1fr}.catalog-sync-form select,.catalog-sync-form .button{width:100%}}

/* 2026-09 visual polish pass */
body:before,body:after{content:"";position:fixed;z-index:-1;border-radius:50%;pointer-events:none;filter:blur(4px)}
body:before{width:360px;height:360px;top:-150px;right:-120px;background:radial-gradient(circle,#eef2ff 0,rgba(238,242,255,0) 72%)}
body:after{width:320px;height:320px;left:-140px;bottom:-160px;background:radial-gradient(circle,#f8efe6 0,rgba(248,239,230,0) 72%)}
.app-shell{grid-template-columns:258px minmax(0,1fr)}
.sidebar{padding-top:24px;gap:22px;border-left-color:#e7ebf2;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(255,255,255,.94));backdrop-filter:blur(8px)}
.brand{padding:10px 12px;border:1px solid #eef1f6;border-radius:18px;background:linear-gradient(180deg,#fff,#fbfcff)}
.brand-mark{width:48px;height:52px;border-radius:17px}
.nav-link{position:relative;font-size:12px;font-weight:500}
.nav-link:hover{transform:translateX(-2px)}
.nav-link.active{background:linear-gradient(180deg,#f3f5ff,#eef2ff);border:1px solid #e1e7ff}
.legacy-links{gap:6px}.legacy-links a{border-radius:10px}.legacy-links a:hover{background:#f7f9fc}
.topbar{position:sticky;top:0;z-index:30;background:rgba(247,248,251,.82);backdrop-filter:blur(10px);padding:18px 0 16px;min-height:auto}
.workspace{padding:0 44px 30px}
.user-chip{padding:7px 10px;border-radius:15px;background:#fff;border:1px solid #e8ecf3;box-shadow:0 5px 16px rgba(45,59,91,.035)}
.avatar{border-radius:14px;background:#f4efe8;color:#8a6948}
.card,.stat-card,.group-card,.lead-card,.service-card{box-shadow:0 12px 34px rgba(47,61,93,.045)}
.card.flush{border-radius:20px}
.table-scroll{border-radius:18px}
.responsive-table thead th,table thead th{background:#f8faff;font-weight:700;color:#7f8ba0}
.responsive-table tbody tr,.products-table-card tbody tr{transition:background .15s,transform .15s}
.responsive-table tbody tr:hover td,.products-table-card tbody tr:hover td{background:#fbfcff}
.responsive-table tbody td,.products-table-card tbody td{padding-top:18px;padding-bottom:18px}
#products-filters.products-filter-card{background:#fff;border:1px solid #e5e9f0;border-radius:18px;padding:14px 16px;box-shadow:0 10px 28px rgba(47,61,93,.04)}
.products-count-badge{padding:8px 12px;font-size:11px;border-radius:999px;background:linear-gradient(180deg,#f4f6ff,#eef2ff)}
.products-table-card{overflow:hidden;border-color:#e4e8ef}
.catalog-sync-card{background:linear-gradient(180deg,#fff,#fcfcff);border-color:#e6eaf2}
.catalog-sync-form{grid-template-columns:minmax(300px,1fr) 160px auto}
.file-picker{border-style:solid;background:linear-gradient(180deg,#fbfcfe,#f7f9fc)}
.file-picker:hover{border-color:#bcc8df;background:#fff}
.tabs{padding:6px;background:#edf2f8;border:1px solid #e3e9f1;border-radius:15px}
.tab{padding:10px 18px;font-weight:600}.tab.active{border:1px solid #e4e9f6}

/* product entry page */
.product-entry-layout{grid-template-columns:minmax(0,1.08fr) minmax(340px,.92fr);align-items:start}
.product-picker-card,.selected-products-card{padding:22px;border-radius:22px;overflow:hidden;position:relative}
.product-picker-card:before,.selected-products-card:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,#5b73dd,#88a0ff);opacity:.9}
.product-picker-card .section-head,.selected-products-card .section-head{margin-bottom:15px}
.product-config-row{gap:14px;padding:16px;border-radius:16px;background:linear-gradient(180deg,#fbfcff,#f7f9fd);border:1px solid #e8edf5}
.product-search-row{margin:0 0 16px}.product-search-row .search-box input{min-height:50px;border-radius:14px;background:#fbfcff}
.product-results{display:grid;grid-template-columns:1fr;gap:12px;max-height:530px;overflow:auto;padding:4px 2px 4px 1px}
.product-results::-webkit-scrollbar{width:10px}.product-results::-webkit-scrollbar-thumb{background:#dbe2ef;border-radius:10px;border:2px solid #f6f8fb}
.product-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;padding:16px 16px 15px;border-radius:18px;border:1px solid #e6ebf3;background:linear-gradient(180deg,#fff,#fcfdff);box-shadow:0 8px 20px rgba(55,70,107,.035)}
.product-card:hover{border-color:#d4ddf8;box-shadow:0 14px 28px rgba(66,84,128,.08);transform:translateY(-2px)}
.product-card.unavailable{background:linear-gradient(180deg,#fbfbfc,#f7f8fb);opacity:1}.product-card.unavailable .product-card-main h4{color:#7d8799}.product-card.unavailable .product-add-button{opacity:.65}
.product-card-main h4{font-size:13px;line-height:1.9;margin:0 0 4px;color:#22314a}
.product-sku{display:inline-flex;width:fit-content;padding:3px 9px;border-radius:999px;background:#f4f6fa;color:#8190a6;font-size:10px}
.product-card-side{align-items:center;gap:14px}
.product-card-price{display:grid;gap:4px;text-align:left;justify-items:end}.product-card-price strong{font-size:15px;color:#3952c7}.product-card-price small{font-size:10px}
.product-card-price .badge{justify-self:end}
.product-add-button{min-width:92px;border-radius:12px;padding-inline:13px;background:linear-gradient(180deg,#f2f5ff,#e9eeff);border-color:#dfe6ff;color:#435dcf}
.product-add-button:hover{background:linear-gradient(180deg,#eaf0ff,#dfe7ff)}
.product-pager{margin-top:14px;padding-top:4px}.product-pager .actions{justify-content:space-between;align-items:center}
.selected-products-card{position:sticky;top:118px}
.selected-items{display:grid;gap:12px}
.item-row{padding:16px 16px 14px;border-radius:18px;border:1px solid #e6ebf3;background:linear-gradient(180deg,#fff,#fdfdff);box-shadow:0 8px 22px rgba(47,61,93,.03)}
.item-row-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:14px}
.item-number{display:grid;place-items:center;min-width:31px;height:31px;padding:0 8px;border-radius:11px;background:linear-gradient(180deg,#eff2ff,#e7edff);color:#4159c7;font-weight:700;font-size:11px}
.item-title-wrap{gap:12px}.item-title-wrap h4{font-size:13px;color:#22314a}
.item-meta{margin-top:5px;gap:8px}.item-meta>span:first-child{padding:2px 0}
.item-row .button.ghost.icon-only{border:1px solid #ebeef4;background:#fafbfd;color:#8f99aa;border-radius:12px}
.item-row .button.ghost.icon-only:hover{background:#fff4f5;color:#b34d5c;border-color:#f0d8dc}
.product-line-fields{grid-template-columns:96px minmax(0,1fr) 145px;gap:12px}
.line-total-box{min-height:52px;padding:10px 12px;border-radius:13px;background:linear-gradient(180deg,#f8faff,#f2f6ff);border-color:#dde5f5;box-shadow:inset 0 1px 0 #fff}
.line-total-box span{font-size:10px}.line-total-box strong{font-size:14px;color:#3650c5}
.line-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.suggestion-list{display:grid;gap:9px}.suggestion{display:flex;align-items:center;justify-content:space-between;padding:11px 13px;background:linear-gradient(180deg,#f6f8ff,#eef2ff);border:1px solid #e4eafc;color:#5569ba;border-radius:13px}
.suggestion:hover{background:#edf2ff}

/* dialogs, login, services */
.dialog{border:1px solid #e4e8ef;border-radius:24px;box-shadow:0 30px 90px rgba(40,52,82,.16)}
.notice{border:1px solid #e8ecf4;background:#f9fbfe}.notice.warning{background:#fff8eb;border-color:#f2e3bf}.notice.success{background:#eef8f3;border-color:#d8ebdf}.notice.danger{background:#fff3f5;border-color:#f2d8dd}
.login-page{background:radial-gradient(circle at 82% 8%,#edf2ff 0,transparent 32%),radial-gradient(circle at 12% 85%,#f8efe5 0,transparent 24%),#f7f8fb}
.login-layout{overflow:hidden;max-width:1040px;margin:40px auto;padding:0;background:#fff}
.login-story{position:relative;background:linear-gradient(160deg,#eef2ff,#fafbff)}
.login-story:after{content:"";position:absolute;left:-40px;bottom:-70px;width:210px;height:210px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.9),rgba(255,255,255,0) 68%)}
.login-form-wrap{background:linear-gradient(180deg,#fff,#fcfcff)}
.service-page{max-width:1300px;padding:28px 24px 36px}.service-grid{gap:18px}.service-card{border-radius:20px;background:linear-gradient(180deg,#fff,#fcfdff)}.service-card strong{display:inline-flex;padding:7px 12px;border-radius:12px;background:#f1f4ff;color:#4360d1}
.service-search{padding:14px 16px;border:1px solid #e6eaf1;border-radius:18px;background:#fff;box-shadow:0 10px 26px rgba(47,61,93,.04)}

@media(min-width:1320px){.product-results{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1180px){.product-entry-layout{grid-template-columns:1fr}.selected-products-card{position:static}.catalog-sync-form{grid-template-columns:1fr 160px auto}}
@media(max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{display:none}.workspace{padding:0 18px 24px}.topbar{padding-top:14px}.product-card{grid-template-columns:1fr}.product-card-side{justify-content:space-between}.product-add-button{min-width:0}.service-search{padding:12px}.login-layout{margin:18px}}
@media(max-width:760px){#products-filters.products-filter-card{padding:12px}.product-picker-card,.selected-products-card{padding:18px;border-radius:19px}.product-card{padding:14px 14px 13px}.product-card-price{justify-items:start;text-align:right}.product-line-fields{grid-template-columns:1fr}.line-total-box{grid-column:auto}.catalog-sync-form{grid-template-columns:1fr}.catalog-sync-form select,.catalog-sync-form .button{width:100%}}
@media(max-width:430px){.topbar{position:relative;background:transparent;backdrop-filter:none}.workspace{padding-inline:12px}.user-chip{padding:6px 8px}.product-card-side{display:grid;justify-items:start;width:100%}.product-add-button{width:100%}.item-row{padding:14px}.item-number{min-width:28px;height:28px}}

/* Revision page — deliberately calm and minimal */
.revision-page-head{margin-bottom:10px}.revision-page-head h2{font-size:18px;color:#4f5d72}
.revision-customer-strip{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(150px,.8fr) auto;gap:10px;align-items:center;padding:12px 14px;margin-bottom:10px;border:1px solid #e7ebf2;border-radius:15px;background:#fff;box-shadow:0 5px 18px rgba(47,61,93,.025)}
.revision-customer-strip>div{display:flex;align-items:center;gap:8px;min-width:0}.revision-customer-strip small{color:#8a95a7;font-size:10px}.revision-customer-strip strong{font-size:12px;color:#2b3950;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.revision-summary-bar{display:grid;grid-template-columns:130px minmax(220px,auto) 1fr;gap:10px;align-items:center;padding:10px 14px;margin-bottom:14px;border:1px solid #e3e8f1;border-radius:15px;background:linear-gradient(180deg,#fdfdff,#f8faff)}
.revision-summary-bar>div:first-child,.revision-total{display:flex;align-items:baseline;gap:7px}.revision-summary-bar span{font-size:10px;color:#8b96a7}.revision-summary-bar strong{font-size:14px;color:#34425a}.revision-total strong{font-size:18px;color:#4058c9}.revision-total small{font-size:10px;color:#8b96a7}.revision-status{font-size:10px;color:#a25d65;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.revision-editor-grid{display:block}.revision-editor-grid>.card,.revision-editor-grid .editor-summary{display:none}.revision-product-layout{display:grid!important;grid-template-columns:1fr!important;max-width:1080px;margin:0 auto;gap:14px}.revision-product-layout .selected-products-card{order:1;position:static}.revision-product-layout .product-picker-card{order:2}.revision-product-layout .selected-products-card,.revision-product-layout .product-picker-card{padding:18px 19px;border-radius:19px;box-shadow:0 7px 22px rgba(47,61,93,.035)}
.revision-product-layout .selected-products-card:before,.revision-product-layout .product-picker-card:before{height:3px;opacity:.6}
.revision-product-layout .product-config-row{grid-template-columns:repeat(2,minmax(0,180px));justify-content:start;padding:10px 12px;margin-bottom:10px}.revision-product-layout .product-config-row .field{gap:4px}.revision-product-layout .product-config-row input,.revision-product-layout .product-config-row select{min-height:40px;padding:8px 10px}
.revision-product-layout .product-search-row{margin-bottom:10px}.revision-product-layout .product-search-row input{min-height:44px}
.revision-product-layout .product-results{max-height:360px;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.revision-product-layout .product-card{padding:12px 13px;min-height:68px;border-radius:14px;box-shadow:none}.revision-product-layout .product-card:hover{transform:none;box-shadow:0 7px 16px rgba(53,71,118,.05)}
.revision-product-layout .product-card-main h4{font-size:12px}.revision-product-layout .product-card-price strong{font-size:13px}.revision-product-layout .product-add-button{min-width:78px;min-height:38px;padding:7px 10px}
.revision-product-layout .selected-items{gap:8px}.revision-product-layout .item-row{padding:12px 13px;border-radius:14px;box-shadow:none;background:#fff}.revision-product-layout .item-row-head{margin-bottom:9px}.revision-product-layout .item-number{min-width:27px;height:27px;border-radius:9px}.revision-product-layout .item-title-wrap h4{font-size:12px}.revision-product-layout .item-meta{margin-top:2px}.revision-product-layout .product-line-fields{grid-template-columns:80px minmax(0,1fr) 125px;gap:9px}.revision-product-layout .item-row input{min-height:40px;padding:8px 10px}.revision-product-layout .line-total-box{min-height:40px;padding:7px 10px;border-radius:10px}.revision-product-layout .line-total-box strong{font-size:12px}
.item-row.needs-replacement{border-color:#efd6da;background:#fffafb}
.revision-more{margin-top:12px;border-top:1px solid #edf0f5;padding-top:10px}.revision-more summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:9px 2px;color:#65738a;font-size:11px;font-weight:700}.revision-more summary::-webkit-details-marker{display:none}.revision-more summary:after{content:"+";font-size:18px;color:#8b96a7;font-weight:400}.revision-more[open] summary:after{content:"−"}.revision-more-body{padding:10px 2px 2px}.revision-more textarea{min-height:78px}
.revision-actions{max-width:1080px;margin:14px auto 0;padding:10px 0 2px;justify-content:flex-end}.revision-actions .button{min-width:130px}.revision-actions .button.ghost{min-width:auto}

@media(max-width:900px){.revision-product-layout{max-width:none}.revision-product-layout .product-results{grid-template-columns:1fr}.revision-customer-strip{grid-template-columns:1fr 1fr}.revision-customer-strip>a{grid-column:1/-1;width:fit-content}.revision-summary-bar{grid-template-columns:1fr 1.4fr}.revision-status{grid-column:1/-1}.revision-product-layout .product-line-fields{grid-template-columns:78px minmax(0,1fr) 115px}}
@media(max-width:760px){.revision-page-head{display:none}.revision-customer-strip{grid-template-columns:1fr;padding:10px 12px;border-radius:13px;margin-bottom:8px}.revision-customer-strip>div{justify-content:space-between}.revision-customer-strip>a{display:none}.revision-summary-bar{position:sticky;top:8px;z-index:22;grid-template-columns:1fr 1.5fr;padding:9px 11px;border-radius:13px;margin-bottom:10px;box-shadow:0 8px 24px rgba(47,61,93,.08);background:rgba(255,255,255,.95);backdrop-filter:blur(9px)}.revision-summary-bar>div:first-child,.revision-total{justify-content:space-between}.revision-summary-bar span{font-size:9px}.revision-summary-bar strong{font-size:13px}.revision-total strong{font-size:16px}.revision-status{display:none}.revision-product-layout{gap:10px}.revision-product-layout .selected-products-card,.revision-product-layout .product-picker-card{padding:14px;border-radius:16px;margin:0}.revision-product-layout .section-head{margin-bottom:10px}.revision-product-layout .section-head h3{font-size:14px}.revision-product-layout .product-config-row{grid-template-columns:1fr 1fr;padding:9px;gap:8px}.revision-product-layout .product-config-row .field>span{font-size:10px}.revision-product-layout .product-results{max-height:330px}.revision-product-layout .product-card{grid-template-columns:minmax(0,1fr) auto;padding:11px 12px;gap:9px}.revision-product-layout .product-card-side{display:flex;width:auto;gap:8px}.revision-product-layout .product-card-price{display:none}.revision-product-layout .product-add-button{width:42px;min-width:42px;height:40px;padding:0;font-size:0}.revision-product-layout .product-add-button .icon{margin:0}.revision-product-layout .selected-items{gap:7px}.revision-product-layout .item-row{padding:11px 11px 10px}.revision-product-layout .item-row-head{margin-bottom:8px}.revision-product-layout .item-meta>span:first-child{font-size:10px}.revision-product-layout .product-line-fields{grid-template-columns:72px minmax(0,1fr);gap:8px}.revision-product-layout .line-total-box{grid-column:1/-1;display:flex;flex-direction:row;align-items:center;justify-content:space-between;min-height:36px}.revision-more{margin-top:8px}.revision-more .form-grid{grid-template-columns:1fr}.revision-actions{position:sticky;bottom:72px;z-index:24;margin:10px -4px 0;padding:9px;background:rgba(255,255,255,.94);border:1px solid #e6eaf1;border-radius:14px;box-shadow:0 -4px 20px rgba(47,61,93,.07);backdrop-filter:blur(10px)}.revision-actions .button{flex:1;min-width:0}.revision-actions .button.ghost{flex:0 0 auto}.revision-actions .button.primary{min-height:46px}}
@media(max-width:430px){.revision-customer-strip{padding:9px 10px}.revision-summary-bar{top:4px}.revision-product-layout .product-config-row{grid-template-columns:1fr}.revision-product-layout .product-card-main h4{font-size:12px}.revision-product-layout .item-title-wrap{gap:8px}.revision-product-layout .item-number{display:none}.revision-product-layout .product-line-fields{grid-template-columns:1fr}.revision-product-layout .line-total-box{grid-column:auto}.revision-actions{bottom:68px}}

/* Final hierarchy + global polish */
.revision-product-layout .product-picker-card{order:1!important}
.revision-product-layout .selected-products-card{order:2!important;margin-top:8px}
.revision-product-layout .product-picker-card{background:linear-gradient(180deg,#f8faff 0,#ffffff 34%);border:1px solid #dfe6f7;box-shadow:0 12px 34px rgba(63,82,133,.055)}
.revision-product-layout .selected-products-card{background:#fff;border:1px solid #dfe4ec;box-shadow:0 14px 38px rgba(47,61,93,.06)}
.revision-product-layout .product-picker-card:before{height:5px;background:linear-gradient(90deg,#526bd8,#91a4f5);opacity:1}
.revision-product-layout .selected-products-card:before{height:5px;background:linear-gradient(90deg,#8995aa,#c9d0dc);opacity:1}
.revision-section-title{display:flex;align-items:center;gap:9px;margin:0}
.revision-step-number{display:inline-grid;place-items:center;width:29px;height:29px;border-radius:10px;background:#536bd7;color:#fff;font-size:12px;font-weight:800;box-shadow:0 5px 13px rgba(83,107,215,.18)}
.revision-product-layout .selected-products-card .revision-step-number{background:#77849a;box-shadow:none}
.revision-product-layout .product-picker-card .section-head{padding-bottom:13px;border-bottom:1px solid #edf1f7}
.revision-product-layout .selected-products-card .section-head{padding-bottom:13px;border-bottom:1px solid #edf0f4}
.revision-product-layout .product-picker-card .product-config-row{background:#fff;border-color:#e3e9f4}
.revision-product-layout .product-picker-card .product-search-row{margin-top:4px}
.revision-product-layout .selected-products-card{padding-top:20px}
.revision-product-layout .selected-items{padding-top:2px}
.revision-product-layout .selected-products-card:after{content:"";display:block;height:1px;background:linear-gradient(90deg,transparent,#e7ebf2,transparent);margin-top:14px}

/* Dashboard */
.hero{border-radius:24px;box-shadow:0 18px 46px rgba(64,79,123,.06)}
.hero-content{max-width:720px}.hero .actions{gap:10px}
.stat-card{position:relative;overflow:hidden;border-radius:20px;transition:transform .16s ease,box-shadow .16s ease}
.stat-card:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(47,61,93,.07)}
.stat-card:after{content:"";position:absolute;inset:auto 18px 0 18px;height:2px;border-radius:99px;background:#edf0f5}
.stat-value{letter-spacing:-.5px}.stat-label{font-weight:600;color:#8792a3}

/* Documents & tables */
.card.flush{overflow:hidden}
.responsive-table thead th{padding-top:15px;padding-bottom:15px;letter-spacing:-.1px}
.responsive-table tbody td{border-bottom-color:#eef1f5}
.responsive-table tbody tr:last-child td{border-bottom:0}
.responsive-table .cell-title{font-size:12.5px}
.responsive-table .money{color:#304bb9;font-size:12.5px}
.document-meta{display:flex;gap:9px;flex-wrap:wrap;padding:10px 0 16px}
.document-meta>span{background:#fff;border:1px solid #e7ebf2;border-radius:11px;padding:7px 10px;color:#77849a}
.review-customer{border:1px solid #e8ecf3;border-radius:16px;background:linear-gradient(180deg,#fbfcff,#fff);padding:15px 16px}

/* Customers */
.customer-card{border-radius:20px;border-color:#e5e9f0;box-shadow:0 10px 30px rgba(47,61,93,.04);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.customer-card:hover{transform:translateY(-2px);border-color:#d9e0ec;box-shadow:0 15px 34px rgba(47,61,93,.07)}
.customer-contact-grid{gap:10px}.customer-contact-grid>div{padding:10px 12px;border-radius:12px;background:#f8fafd;border:1px solid #edf0f4}
.customer-option{border-radius:14px;border-color:#e6eaf1;background:#fff}.customer-option:hover{background:#f9fbff;border-color:#dce4f5}

/* Leads / queues */
.lead-grid,.group-grid{gap:16px}
.lead-card,.group-card{border-radius:20px;border-color:#e5e9f0;background:linear-gradient(180deg,#fff,#fdfdff)}
.lead-card:hover,.group-card:hover{border-color:#dce2ec;box-shadow:0 14px 34px rgba(47,61,93,.06)}
.lead-card-head{padding-bottom:10px;border-bottom:1px solid #eef1f5;margin-bottom:11px}
.table-number{display:inline-grid;place-items:center;min-width:42px;height:34px;border-radius:11px;background:#eef2ff;color:#4e63c8;font-weight:800}
.lead-details{background:#f8f9fc;border-radius:12px;padding:10px 12px}

/* Stats */
.stats-filter{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;gap:12px;align-items:end;background:linear-gradient(180deg,#fff,#fbfcff)}
.mini-bar{height:5px;border-radius:99px;background:#edf0f5;overflow:hidden;margin-top:7px}.mini-bar span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#536bd7,#899cf1)}
.summary-row{border-bottom:1px solid #eef1f5;padding:10px 0}.summary-row:last-child{border-bottom:0}
.revision-link{border:1px solid #e9edf3;background:#fbfcfe;border-radius:13px;padding:10px 12px;margin-bottom:8px}

/* Settings */
.catalog-sync-card{border-radius:20px}.catalog-sync-card .section-head{padding-bottom:11px;border-bottom:1px solid #edf0f4}
.setting-row{border-radius:14px;transition:background .15s,border-color .15s}.setting-row:hover{background:#fbfcff;border-color:#e2e7ef}

/* Forms / dialogs */
.dialog-head{border-bottom:1px solid #edf0f4}.dialog-foot{border-top:1px solid #edf0f4;background:#fbfcfe}
.form-grid{column-gap:14px;row-gap:14px}.field>span{font-weight:650}
input,select,textarea{box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}

/* Mobile refinement */
@media(max-width:900px){
  .stats-filter{grid-template-columns:1fr 1fr}.stats-filter .button{grid-column:1/-1}
  .hero{border-radius:20px}.hero-symbol{display:none}
}
@media(max-width:760px){
  .revision-product-layout .selected-products-card{margin-top:12px}
  .revision-product-layout .product-picker-card,.revision-product-layout .selected-products-card{padding-top:16px}
  .revision-section-title{gap:7px}.revision-step-number{width:27px;height:27px;border-radius:9px}
  .revision-product-layout .product-picker-card .section-head,.revision-product-layout .selected-products-card .section-head{padding-bottom:10px}
  .stats-filter{grid-template-columns:1fr}.stats-filter .button{grid-column:auto}
  .document-meta{gap:6px}.document-meta>span{width:100%;display:flex;justify-content:space-between}
  .hero{min-height:auto;padding:19px}.hero h2{font-size:20px}.hero .actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.hero .actions .button{width:100%}
  .customer-contact-grid{grid-template-columns:1fr!important}
}
@media(max-width:430px){
  .revision-product-layout .product-picker-card,.revision-product-layout .selected-products-card{border-radius:15px}
  .revision-product-layout .selected-products-card{margin-top:10px}
  .hero .actions{grid-template-columns:1fr}
  .stats-grid{gap:10px}
}

/* Product rows: clearer table-like hierarchy + same picker in new/revision documents */
.modern-product-editor{display:grid!important;grid-template-columns:1fr!important;gap:18px!important;max-width:1120px;margin:0 auto}
.modern-product-editor .product-picker-card{order:1;position:static;background:linear-gradient(180deg,#f8faff 0,#fff 30%);border:1px solid #dfe6f7;box-shadow:0 12px 34px rgba(63,82,133,.055)}
.modern-product-editor .selected-products-card{order:2;position:static;background:#fff;border:1px solid #dfe4ec;box-shadow:0 14px 38px rgba(47,61,93,.055)}
.modern-product-editor .product-picker-card:before{height:5px;background:linear-gradient(90deg,#526bd8,#91a4f5);opacity:1}
.modern-product-editor .selected-products-card:before{height:5px;background:linear-gradient(90deg,#8995aa,#c9d0dc);opacity:1}
.modern-product-editor .product-picker-card .section-head,.modern-product-editor .selected-products-card .section-head{padding-bottom:13px;border-bottom:1px solid #edf1f6;margin-bottom:14px}
.modern-product-editor .product-config-row{grid-template-columns:repeat(2,minmax(0,180px));justify-content:start;padding:10px 12px;margin-bottom:10px;background:#fff;border-color:#e3e9f4}
.modern-product-editor .product-config-row .field{gap:4px}
.modern-product-editor .product-config-row input,.modern-product-editor .product-config-row select{min-height:40px;padding:8px 10px}
.modern-product-editor .product-search-row{margin-bottom:10px}
.modern-product-editor .product-search-row input{min-height:46px}
.modern-product-editor .product-results{max-height:380px;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.modern-product-editor .product-card{padding:12px 13px;min-height:68px;border-radius:14px;box-shadow:none}
.modern-product-editor .product-card:hover{transform:none;box-shadow:0 7px 16px rgba(53,71,118,.05)}
.modern-product-editor .product-card-main h4{font-size:12px}
.modern-product-editor .product-card-price strong{font-size:13px}
.modern-product-editor .product-add-button{min-width:78px;min-height:38px;padding:7px 10px}

.selected-items-table{display:block!important;margin:0;border:1px solid #e7ebf1;border-radius:15px;overflow:hidden;background:#fff}
.selected-table-head{display:grid;grid-template-columns:42px minmax(220px,1.5fr) 92px minmax(180px,1fr) 150px 48px;gap:0;align-items:center;min-height:42px;padding:0 10px;background:#f7f9fc;border-bottom:1px solid #e4e9f0;color:#7d899c;font-size:10px;font-weight:700}
.selected-table-head>span{padding:0 8px}
.item-table-row{display:grid!important;grid-template-columns:42px minmax(220px,1.5fr) 92px minmax(180px,1fr) 150px 48px;gap:0;align-items:center;padding:10px!important;margin:0!important;border:0!important;border-bottom:1px solid #edf0f4!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;min-height:78px}
.item-table-row:last-child{border-bottom:0!important}
.item-table-row:hover{background:#fbfcff!important}
.item-index{display:grid;place-items:center;width:28px;height:28px;margin:auto;border-radius:9px;background:#eef2ff;color:#4860c9;font-size:11px;font-weight:800}
.item-product-cell{min-width:0;padding:0 8px}
.item-product-cell h4{margin:0 0 4px;font-size:12.5px;line-height:1.75;color:#26344b;white-space:normal;overflow-wrap:anywhere}
.item-product-cell .item-meta{margin:0;gap:6px;font-size:10px}
.item-product-cell .item-meta>span:first-child{color:#6d7a90;font-weight:700}
.item-product-cell .line-actions{margin:6px 0 0;gap:5px}
.item-product-cell .line-actions .button{min-height:30px;padding:4px 8px;font-size:9px}
.item-table-row .field{gap:4px;padding:0 6px;margin:0}
.item-table-row .field>span,.table-total-cell>span{display:none}
.item-table-row input{min-height:38px!important;padding:7px 9px!important;border-radius:10px!important;background:#fbfcfe!important;font-size:12px!important}
.table-quantity-field input{text-align:center}
.table-description-field input{width:100%}
.table-total-cell{padding:0 8px;text-align:left;direction:ltr;white-space:nowrap}
.table-total-cell strong{font-size:12.5px;color:#344fc1;font-variant-numeric:tabular-nums}
.table-remove-cell{display:grid;place-items:center}
.table-remove-cell .button{width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;border:1px solid transparent!important;color:#9aa4b3!important}
.table-remove-cell .button:hover{background:#fff2f4!important;border-color:#f2dbe0!important;color:#b34d5c!important}
.item-table-row.needs-replacement{background:#fffafa!important}

@media(max-width:1050px){
  .selected-table-head{grid-template-columns:38px minmax(190px,1.4fr) 82px minmax(150px,1fr) 125px 44px}
  .item-table-row{grid-template-columns:38px minmax(190px,1.4fr) 82px minmax(150px,1fr) 125px 44px}
  .modern-product-editor .product-results{grid-template-columns:1fr}
}
@media(max-width:760px){
  .modern-product-editor{gap:12px}
  .modern-product-editor .product-picker-card,.modern-product-editor .selected-products-card{padding:14px;border-radius:16px}
  .modern-product-editor .product-config-row{grid-template-columns:1fr 1fr;padding:9px;gap:8px}
  .modern-product-editor .product-card{grid-template-columns:minmax(0,1fr) auto;padding:11px 12px;gap:9px}
  .modern-product-editor .product-card-side{display:flex;width:auto;gap:8px}
  .modern-product-editor .product-card-price{display:none}
  .modern-product-editor .product-add-button{width:42px;min-width:42px;height:40px;padding:0;font-size:0}
  .modern-product-editor .product-add-button .icon{margin:0}
  .selected-items-table{border-radius:13px}
  .selected-table-head{display:none}
  .item-table-row{grid-template-columns:32px minmax(0,1fr) 68px 40px!important;grid-template-areas:"index product total remove" "index desc desc desc";gap:7px 8px;padding:11px 9px!important;min-height:0}
  .item-index{grid-area:index;width:27px;height:27px;margin:1px auto 0}
  .item-product-cell{grid-area:product;padding:0}
  .item-product-cell h4{font-size:12px;margin-bottom:2px}
  .item-product-cell .item-meta{font-size:9px}
  .table-quantity-field{grid-area:total;padding:0!important;align-self:start}
  .table-quantity-field:before{content:"تعداد";display:block;color:#8a95a6;font-size:8px;margin-bottom:2px;text-align:center}
  .table-quantity-field input{min-height:34px!important;height:34px!important;padding:4px!important}
  .table-description-field{grid-area:desc;padding:0!important;margin-right:0!important}
  .table-description-field:before{content:"توضیحات";display:block;color:#8a95a6;font-size:8px;margin-bottom:3px}
  .table-description-field input{min-height:36px!important;height:36px!important}
  .table-total-cell{display:none}
  .table-remove-cell{grid-area:remove;align-self:start}
  .table-remove-cell .button{width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important}
}
@media(max-width:430px){
  .modern-product-editor .product-config-row{grid-template-columns:1fr}
  .item-table-row{grid-template-columns:28px minmax(0,1fr) 62px 36px!important;gap:6px}
  .item-index{width:25px;height:25px;font-size:10px}
  .item-product-cell h4{font-size:11.5px}
}

/* keep row total visible on small screens without adding another bulky card */
@media(max-width:760px){
  .item-table-row{grid-template-areas:"index product qty remove" "index desc desc desc" "index sum sum sum"}
  .table-quantity-field{grid-area:qty}
  .table-description-field{grid-area:desc}
  .table-total-cell{grid-area:sum;display:flex;align-items:center;justify-content:space-between;padding:3px 0 0!important;border-top:1px dashed #edf0f4;margin-top:1px;direction:rtl}
  .table-total-cell>span{display:block;font-size:8px;color:#8a95a6}
  .table-total-cell strong{font-size:11.5px;direction:ltr}
}

/* Mobile product rows: stronger visual separation without extra clutter */
@media(max-width:760px){
  .selected-items-table{
    border-color:#dfe5ee;
    background:#f3f6fa;
  }
  .selected-items-table .item-table-row{
    position:relative;
    border-bottom:1px solid #dce3ed!important;
    transition:none;
  }
  .selected-items-table .item-table-row:nth-child(even){
    background:#ffffff!important;
  }
  .selected-items-table .item-table-row:nth-child(odd){
    background:#f6f8fc!important;
  }
  .selected-items-table .item-table-row:nth-child(even):before,
  .selected-items-table .item-table-row:nth-child(odd):before{
    content:"";
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    width:3px;
    background:#e2e7f2;
  }
  .selected-items-table .item-table-row:nth-child(odd):before{
    background:#cfd8ee;
  }
  .selected-items-table .item-table-row:last-child{
    border-bottom:0!important;
  }
  .selected-items-table .item-product-cell h4{
    font-size:12.5px;
    font-weight:800;
    color:#223149;
  }
  .selected-items-table .item-product-cell .item-meta{
    color:#7d899b;
  }
  .selected-items-table .item-index{
    background:#e9eefb;
    color:#445bc4;
  }
  .selected-items-table .item-table-row:nth-child(odd) .item-index{
    background:#e2e8f7;
  }
  .selected-items-table .item-table-row input{
    background:rgba(255,255,255,.92)!important;
    border-color:#dce3ed!important;
    box-shadow:none!important;
  }
  .selected-items-table .table-total-cell{
    border-top-color:#dce2eb;
  }
}
@media(max-width:430px){
  .selected-items-table .item-table-row{
    padding:12px 8px!important;
  }
  .selected-items-table .item-product-cell h4{
    font-size:12px;
    line-height:1.7;
  }
}

/* Mobile selected products — compact two-row layout */
@media(max-width:760px){
  .selected-items-table{
    border:1px solid #dfe5ee;
    border-radius:14px;
    overflow:hidden;
    background:#f4f6fa;
  }
  .selected-items-table .item-table-row{
    grid-template-columns:24px minmax(0,1fr) 38px!important;
    grid-template-areas:
      "index product remove"
      "qty desc sum"!important;
    column-gap:8px!important;
    row-gap:8px!important;
    padding:11px 10px!important;
    border-bottom:1px solid #dbe2ec!important;
    min-height:0!important;
    align-items:center!important;
  }
  .selected-items-table .item-table-row:nth-child(odd){background:#f7f9fc!important}
  .selected-items-table .item-table-row:nth-child(even){background:#fff!important}
  .selected-items-table .item-table-row:before{display:none!important}

  .selected-items-table .item-index{
    grid-area:index;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#8090aa!important;
    font-size:10px!important;
    font-weight:800!important;
    align-self:start;
    line-height:1.8;
  }
  .selected-items-table .item-index:after{content:"."}

  .selected-items-table .item-product-cell{
    grid-area:product;
    padding:0!important;
    min-width:0;
  }
  .selected-items-table .item-product-cell h4{
    margin:0 0 2px!important;
    font-size:12.5px!important;
    line-height:1.65!important;
    font-weight:800!important;
    color:#24324a!important;
  }
  .selected-items-table .item-product-cell .item-meta{
    margin:0!important;
    min-height:0!important;
    font-size:9px!important;
    line-height:1.5!important;
    color:#8591a4!important;
  }
  .selected-items-table .item-product-cell .item-meta .badge.green{display:none!important}
  .selected-items-table .item-product-cell .line-actions{margin:5px 0 0!important}

  .selected-items-table .table-remove-cell{
    grid-area:remove;
    align-self:start;
    justify-self:end;
  }
  .selected-items-table .table-remove-cell .button{
    width:32px!important;
    min-width:32px!important;
    height:32px!important;
    min-height:32px!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.72)!important;
    border:1px solid #edf0f5!important;
  }

  .selected-items-table .table-quantity-field{
    grid-area:qty;
    padding:0!important;
    margin:0!important;
    min-width:0;
  }
  .selected-items-table .table-quantity-field:before{display:none!important}
  .selected-items-table .table-quantity-field input{
    width:58px!important;
    height:36px!important;
    min-height:36px!important;
    padding:5px 6px!important;
    margin:0!important;
    text-align:center!important;
    border-radius:10px!important;
    font-size:12px!important;
    background:#fff!important;
  }

  .selected-items-table .table-description-field{
    grid-area:desc;
    padding:0!important;
    margin:0!important;
    min-width:0;
  }
  .selected-items-table .table-description-field:before{display:none!important}
  .selected-items-table .table-description-field input{
    width:100%!important;
    height:36px!important;
    min-height:36px!important;
    padding:5px 9px!important;
    margin:0!important;
    border-radius:10px!important;
    font-size:11px!important;
    background:#fff!important;
  }

  .selected-items-table .table-total-cell{
    grid-area:sum;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    align-self:center!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    direction:ltr!important;
    min-width:0;
    white-space:nowrap;
  }
  .selected-items-table .table-total-cell>span{display:none!important}
  .selected-items-table .table-total-cell strong{
    font-size:10.5px!important;
    line-height:1.4!important;
    color:#3f59c8!important;
    font-weight:800!important;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:100%;
  }
}
@media(max-width:430px){
  .selected-items-table .item-table-row{
    grid-template-columns:20px minmax(0,1fr) 34px!important;
    column-gap:6px!important;
    row-gap:7px!important;
    padding:10px 8px!important;
  }
  .selected-items-table .item-product-cell h4{font-size:12px!important}
  .selected-items-table .table-quantity-field input{width:52px!important}
  .selected-items-table .table-description-field input{font-size:10.5px!important;padding-inline:8px!important}
  .selected-items-table .table-total-cell strong{font-size:10px!important}
}

/* 2026-09 mobile clarity fix: quantity + total more obvious */
@media(max-width:760px){
  .selected-items-table .item-product-cell .item-meta{
    gap:6px!important;
    align-items:center!important;
  }
  .selected-items-table .item-product-cell .item-meta > span:first-child{
    display:inline-flex!important;
    align-items:center!important;
    padding:3px 7px!important;
    border-radius:999px!important;
    background:#eef2ff!important;
    color:#455dc9!important;
    font-weight:800!important;
    font-size:9.5px!important;
    line-height:1.4!important;
  }
  .selected-items-table .table-quantity-field{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:3px!important;
  }
  .selected-items-table .table-quantity-field:before{
    display:block!important;
    content:"تعداد"!important;
    font-size:8px!important;
    line-height:1!important;
    color:#7f8ca1!important;
    margin:0 2px 0 0!important;
  }
  .selected-items-table .table-quantity-field input{
    width:60px!important;
    border-color:#cfd8e6!important;
    background:#fff!important;
    box-shadow:0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px rgba(255,255,255,.35)!important;
    font-weight:800!important;
    color:#24324a!important;
  }
  .selected-items-table .table-total-cell{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-end!important;
    justify-content:center!important;
    gap:2px!important;
    padding:4px 8px!important;
    min-height:36px!important;
    border-radius:10px!important;
    background:#eef2ff!important;
    border:1px solid #dde5fb!important;
  }
  .selected-items-table .table-total-cell>span{
    display:block!important;
    font-size:8px!important;
    line-height:1!important;
    color:#7e8baa!important;
    margin:0!important;
  }
  .selected-items-table .table-total-cell strong{
    font-size:11.5px!important;
    color:#3953c6!important;
    font-weight:900!important;
    max-width:92px!important;
  }
}
@media(max-width:430px){
  .selected-items-table .table-quantity-field input{width:54px!important}
  .selected-items-table .table-total-cell{padding:3px 6px!important}
  .selected-items-table .table-total-cell strong{font-size:11px!important;max-width:82px!important}
}

/* 2026-09 mobile product rows: boxed quantity + boxed total, stable across phones */
@media(max-width:760px){
  .selected-items-table .item-table-row{
    grid-template-columns:32px minmax(0,1fr) 34px !important;
    grid-template-areas:
      "remove product index"
      "qty desc sum" !important;
    row-gap:8px !important;
    column-gap:8px !important;
    align-items:start !important;
  }
  .selected-items-table .table-remove-cell{
    grid-area:remove !important;
    justify-self:start !important;
    align-self:start !important;
  }
  .selected-items-table .item-product-cell{
    grid-area:product !important;
  }
  .selected-items-table .item-index{
    grid-area:index !important;
    justify-self:end !important;
    align-self:start !important;
  }

  .selected-items-table .table-quantity-field,
  .selected-items-table .table-description-field,
  .selected-items-table .table-total-cell{
    min-width:0 !important;
    margin:0 !important;
  }

  .selected-items-table .table-quantity-field{
    grid-area:qty !important;
    width:72px !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:4px !important;
    padding:6px 7px !important;
    border:1px solid #d8dfeb !important;
    border-radius:12px !important;
    background:#fff !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.85) !important;
  }
  .selected-items-table .table-quantity-field:before{
    display:block !important;
    content:"تعداد" !important;
    margin:0 !important;
    color:#7d8aa0 !important;
    font-size:8px !important;
    line-height:1.2 !important;
    text-align:right !important;
  }
  .selected-items-table .table-quantity-field input{
    width:100% !important;
    height:30px !important;
    min-height:30px !important;
    padding:3px 4px !important;
    border:1px solid #ccd6e7 !important;
    border-radius:9px !important;
    background:#f9fbff !important;
    font-size:12px !important;
    font-weight:800 !important;
    color:#22324a !important;
    box-shadow:none !important;
  }

  .selected-items-table .table-description-field{
    grid-area:desc !important;
    align-self:stretch !important;
  }
  .selected-items-table .table-description-field input{
    height:44px !important;
    min-height:44px !important;
    padding:7px 10px !important;
    border:1px solid #d8dfeb !important;
    border-radius:12px !important;
    background:#fff !important;
    font-size:11px !important;
    color:#39485f !important;
  }

  .selected-items-table .table-total-cell{
    grid-area:sum !important;
    width:112px !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:center !important;
    gap:4px !important;
    padding:6px 8px !important;
    border:1px solid #d9e1f2 !important;
    border-radius:12px !important;
    background:linear-gradient(180deg,#f7f9ff,#eef2ff) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9) !important;
    direction:rtl !important;
    white-space:normal !important;
  }
  .selected-items-table .table-total-cell > span{
    display:block !important;
    font-size:8px !important;
    line-height:1.2 !important;
    color:#7c89a6 !important;
    margin:0 !important;
  }
  .selected-items-table .table-total-cell strong{
    display:block !important;
    max-width:none !important;
    width:100% !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
    direction:ltr !important;
    text-align:left !important;
    font-size:11px !important;
    line-height:1.35 !important;
    font-weight:900 !important;
    color:#3650c5 !important;
    letter-spacing:-.1px !important;
  }
}
@media(max-width:430px){
  .selected-items-table .item-table-row{
    grid-template-columns:30px minmax(0,1fr) 30px !important;
    column-gap:7px !important;
    row-gap:7px !important;
  }
  .selected-items-table .table-quantity-field{
    width:66px !important;
    padding:5px 6px !important;
  }
  .selected-items-table .table-total-cell{
    width:100px !important;
    padding:5px 7px !important;
  }
  .selected-items-table .table-total-cell strong{
    font-size:10.4px !important;
  }
  .selected-items-table .table-description-field input{
    font-size:10.5px !important;
  }
}

/* FINAL mobile fit: let quantity and total wrap into a full-width stable row */
@media(max-width:760px){
  .selected-items-table .item-table-row{
    grid-template-columns:32px minmax(0,1fr) 34px !important;
    grid-template-areas:
      "remove product index"
      "qty sum sum"
      "desc desc desc" !important;
    column-gap:8px !important;
    row-gap:9px !important;
    padding:12px 10px !important;
  }
  .selected-items-table .table-quantity-field{
    grid-area:qty !important;
    width:78px !important;
    min-width:78px !important;
    max-width:78px !important;
    justify-self:start !important;
  }
  .selected-items-table .table-total-cell{
    grid-area:sum !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    justify-self:stretch !important;
    align-items:flex-start !important;
    padding:6px 10px !important;
  }
  .selected-items-table .table-total-cell strong{
    width:auto !important;
    max-width:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
    direction:rtl !important;
    text-align:right !important;
    font-size:12px !important;
    line-height:1.55 !important;
    font-variant-numeric:tabular-nums !important;
  }
  .selected-items-table .table-description-field{
    grid-area:desc !important;
    width:100% !important;
  }
  .selected-items-table .table-description-field input{
    width:100% !important;
    min-width:0 !important;
  }
}
@media(max-width:430px){
  .selected-items-table .item-table-row{
    grid-template-columns:30px minmax(0,1fr) 30px !important;
    padding:11px 8px !important;
  }
  .selected-items-table .table-quantity-field{
    width:70px !important;
    min-width:70px !important;
    max-width:70px !important;
  }
  .selected-items-table .table-total-cell strong{
    font-size:11px !important;
  }
}
@media(max-width:360px){
  .selected-items-table .table-quantity-field{
    width:66px !important;
    min-width:66px !important;
    max-width:66px !important;
  }
  .selected-items-table .table-total-cell{
    padding-inline:8px !important;
  }
  .selected-items-table .table-total-cell strong{
    font-size:10.5px !important;
    letter-spacing:-.2px !important;
  }
}

/* 2026-09 definitive mobile row layout: separate controls container */
.item-edit-cells{display:contents}
@media(max-width:760px){
  .selected-items-table .item-table-row{
    grid-template-columns:32px minmax(0,1fr) 34px !important;
    grid-template-areas:
      "remove product index"
      "controls controls controls" !important;
    row-gap:9px !important;
    column-gap:8px !important;
  }
  .selected-items-table .item-edit-cells{
    grid-area:controls !important;
    display:grid !important;
    width:100% !important;
    grid-template-columns:124px 74px !important;
    grid-template-areas:
      "sum qty"
      "desc desc" !important;
    justify-content:space-between !important;
    align-items:start !important;
    gap:8px 12px !important;
    direction:ltr !important;
  }
  .selected-items-table .table-quantity-field{
    grid-area:qty !important;
    width:74px !important;
    min-width:74px !important;
    max-width:74px !important;
    padding:5px 6px !important;
    direction:rtl !important;
    justify-self:end !important;
  }
  .selected-items-table .table-quantity-field:before{
    text-align:right !important;
  }
  .selected-items-table .table-quantity-field input{
    width:100% !important;
    height:31px !important;
    min-height:31px !important;
  }
  .selected-items-table .table-total-cell{
    grid-area:sum !important;
    width:124px !important;
    min-width:124px !important;
    max-width:124px !important;
    min-height:54px !important;
    padding:6px 8px !important;
    direction:rtl !important;
    justify-self:start !important;
    align-items:flex-start !important;
    overflow:visible !important;
  }
  .selected-items-table .table-total-cell strong{
    width:100% !important;
    max-width:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
    direction:ltr !important;
    text-align:left !important;
    font-size:10.5px !important;
    letter-spacing:-.25px !important;
  }
  .selected-items-table .table-description-field{
    grid-area:desc !important;
    width:100% !important;
    direction:rtl !important;
  }
  .selected-items-table .table-description-field input{
    width:100% !important;
  }
}
@media(max-width:390px){
  .selected-items-table .item-edit-cells{
    grid-template-columns:116px 68px !important;
    gap:7px 10px !important;
  }
  .selected-items-table .table-total-cell{
    width:116px !important;
    min-width:116px !important;
    max-width:116px !important;
    padding-inline:7px !important;
  }
  .selected-items-table .table-total-cell strong{
    font-size:10px !important;
    letter-spacing:-.35px !important;
  }
  .selected-items-table .table-quantity-field{
    width:68px !important;
    min-width:68px !important;
    max-width:68px !important;
  }
}
@media(max-width:340px){
  .selected-items-table .item-edit-cells{
    grid-template-columns:108px 64px !important;
  }
  .selected-items-table .table-total-cell{
    width:108px !important;
    min-width:108px !important;
    max-width:108px !important;
  }
  .selected-items-table .table-total-cell strong{font-size:9.5px !important}
  .selected-items-table .table-quantity-field{
    width:64px !important;
    min-width:64px !important;
    max-width:64px !important;
  }
}

/* FINAL mobile minimal controls: one quantity box, plain total text */
@media(max-width:760px){
  .selected-items-table .item-table-row,
  .selected-items-table .item-table-row:nth-child(odd),
  .selected-items-table .item-table-row:nth-child(even){
    background:#fff!important;
  }

  .selected-items-table .item-edit-cells{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 58px!important;
    grid-template-areas:
      "sum qty"
      "desc desc"!important;
    gap:9px 12px!important;
    width:100%!important;
    align-items:center!important;
    direction:ltr!important;
  }

  /* quantity: exactly one simple square */
  .selected-items-table .table-quantity-field{
    grid-area:qty!important;
    width:58px!important;
    min-width:58px!important;
    max-width:58px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    display:block!important;
    direction:rtl!important;
    justify-self:end!important;
  }
  .selected-items-table .table-quantity-field:before,
  .selected-items-table .table-quantity-field>span{
    display:none!important;
  }
  .selected-items-table .table-quantity-field input{
    display:block!important;
    width:46px!important;
    height:40px!important;
    min-height:40px!important;
    margin:0 0 0 auto!important;
    padding:4px!important;
    border:1px solid #d8dfeb!important;
    border-radius:10px!important;
    background:#fff!important;
    box-shadow:none!important;
    color:#26354c!important;
    font-size:12px!important;
    font-weight:700!important;
    text-align:center!important;
  }

  /* total: plain text only, no pill / no box / no label */
  .selected-items-table .table-total-cell{
    grid-area:sum!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    min-height:40px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
    direction:ltr!important;
    white-space:nowrap!important;
  }
  .selected-items-table .table-total-cell>span{
    display:none!important;
  }
  .selected-items-table .table-total-cell strong{
    display:block!important;
    width:auto!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    color:#3e58c7!important;
    font-size:11.5px!important;
    line-height:1.4!important;
    font-weight:800!important;
    direction:ltr!important;
    text-align:left!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    letter-spacing:-.15px!important;
    font-variant-numeric:tabular-nums!important;
  }

  .selected-items-table .table-description-field{
    grid-area:desc!important;
    width:100%!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    background:transparent!important;
  }
  .selected-items-table .table-description-field input{
    width:100%!important;
    background:#fff!important;
  }
}

@media(max-width:390px){
  .selected-items-table .item-edit-cells{
    grid-template-columns:minmax(0,1fr) 52px!important;
    gap:8px 9px!important;
  }
  .selected-items-table .table-quantity-field{
    width:52px!important;
    min-width:52px!important;
    max-width:52px!important;
  }
  .selected-items-table .table-quantity-field input{
    width:44px!important;
    height:38px!important;
    min-height:38px!important;
  }
  .selected-items-table .table-total-cell strong{
    font-size:10.8px!important;
    letter-spacing:-.25px!important;
  }
}

@media(max-width:340px){
  .selected-items-table .item-edit-cells{
    grid-template-columns:minmax(0,1fr) 48px!important;
  }
  .selected-items-table .table-quantity-field{
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
  }
  .selected-items-table .table-quantity-field input{
    width:42px!important;
  }
  .selected-items-table .table-total-cell strong{
    font-size:10.2px!important;
    letter-spacing:-.3px!important;
  }
}

/* final mobile quantity label placement */
@media(max-width:760px){
  .selected-items-table .item-edit-cells{
    grid-template-columns:minmax(0,1fr) 94px!important;
    gap:9px 12px!important;
  }
  .selected-items-table .table-quantity-field{
    width:94px!important;
    min-width:94px!important;
    max-width:94px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:7px!important;
    direction:rtl!important;
  }
  .selected-items-table .table-quantity-field:before{display:none!important}
  .selected-items-table .table-quantity-field>span{
    display:block!important;
    flex:0 0 auto!important;
    margin:0!important;
    color:#77859a!important;
    font-size:9px!important;
    font-weight:500!important;
    line-height:1!important;
    white-space:nowrap!important;
    order:0!important;
  }
  .selected-items-table .table-quantity-field input{
    flex:0 0 46px!important;
    width:46px!important;
    margin:0!important;
    order:1!important;
  }
}
@media(max-width:390px){
  .selected-items-table .item-edit-cells{
    grid-template-columns:minmax(0,1fr) 90px!important;
  }
  .selected-items-table .table-quantity-field{
    width:90px!important;
    min-width:90px!important;
    max-width:90px!important;
    gap:5px!important;
  }
  .selected-items-table .table-quantity-field input{
    flex-basis:44px!important;
    width:44px!important;
  }
}
@media(max-width:340px){
  .selected-items-table .item-edit-cells{
    grid-template-columns:minmax(0,1fr) 86px!important;
  }
  .selected-items-table .table-quantity-field{
    width:86px!important;
    min-width:86px!important;
    max-width:86px!important;
  }
  .selected-items-table .table-quantity-field>span{font-size:8.5px!important}
  .selected-items-table .table-quantity-field input{
    flex-basis:42px!important;
    width:42px!important;
  }
}

/* Parallel recommendation levels */
.group-level-hint{margin:0 0 12px;padding:10px 12px;background:#f7f9ff;border-color:#e2e8fb;color:#607097;font-size:11px}
.sequence-setting-row{grid-template-columns:26px minmax(180px,1fr) 76px 76px auto!important;gap:9px!important;align-items:end!important}
.group-mini-field{display:flex;flex-direction:column;gap:4px;min-width:0;color:#7b8798;font-size:9px}
.group-mini-field>span{padding-right:2px}
.group-mini-field input{min-height:38px!important;height:38px!important;padding:6px 8px!important;text-align:center;border-radius:10px!important;background:#fbfcff!important}
.group-level-field input{background:#f2f5ff!important;border-color:#dbe3fb!important;color:#4159c7;font-weight:800}
.sequence-setting-row .actions{align-self:end}
@media(max-width:760px){
  .sequence-setting-row{grid-template-columns:24px minmax(0,1fr) 68px 68px!important;gap:7px!important;align-items:end!important}
  .sequence-setting-row .actions{grid-column:2/-1!important;justify-content:flex-end!important}
  .group-mini-field{font-size:10px}
  .group-mini-field input{font-size:14px!important;min-height:42px!important;height:42px!important}
  .group-level-hint{font-size:10px}
}
@media(max-width:430px){
  .sequence-setting-row{grid-template-columns:22px minmax(0,1fr) 62px 62px!important;gap:6px!important}
}

/* Sales calculations + review discount controls */
.sales-calculation-card{max-width:620px;padding:24px}
.sales-settings-form{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:12px;align-items:end}
.sales-settings-form .field{margin:0}
.discount-editor{margin-top:18px;padding:16px;border:1px solid #e5e9f0;border-radius:16px;background:#fafbfe}
.discount-fields{display:grid;grid-template-columns:180px minmax(220px,1fr);gap:12px;margin-top:10px}
.review-card .field[name="description"]{margin-top:16px}
@media(max-width:760px){
  .sales-settings-form{grid-template-columns:1fr}
  .sales-settings-form .button{width:100%}
  .discount-editor{padding:13px}
  .discount-fields{grid-template-columns:1fr 1fr;gap:9px}
  .discount-fields .field>span{font-size:10px}
}
@media(max-width:430px){
  .discount-fields{grid-template-columns:1fr}
}

/* Catalogue quick-send + finance conversion note */
.catalogue-product-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;max-height:320px;overflow:auto;padding:2px}
.catalogue-product-option{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #e4e8ef;border-radius:12px;background:#fff;cursor:pointer;min-width:0}
.catalogue-product-option:hover{border-color:#cfd8ea;background:#fbfcff}
.catalogue-product-option input{width:17px;height:17px;flex:0 0 auto}
.catalogue-product-option span{display:flex;flex-direction:column;min-width:0;gap:2px}
.catalogue-product-option strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.catalogue-product-option small{font-size:10px;color:#8b95a5;direction:ltr;text-align:right}
.catalogue-selection-hint{font-size:11px;color:#7b8798;padding:3px 1px 8px}
.catalogue-selected-list{display:flex;flex-wrap:wrap;gap:7px;margin:2px 0 8px}
.catalogue-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 7px 5px 5px;border:1px solid #dfe5f2;border-radius:999px;background:#f8faff;font-size:10.5px;color:#53617a}
.catalogue-chip .button.icon-only{width:24px!important;height:24px!important;min-height:24px!important;padding:4px!important;border-radius:50%!important}
.finance-note-card{margin:14px 0 18px;padding:14px 16px;border:1px solid #e2e7f0;border-radius:14px;background:#fbfcff}
.finance-note-card>strong{display:block;margin-bottom:7px;color:#34435d;font-size:12px}
.finance-note-card>div{white-space:pre-wrap;color:#5b687d;font-size:12px;line-height:1.9}
@media(max-width:760px){
  .catalogue-product-options{grid-template-columns:1fr;max-height:300px}
  .catalogue-product-option{padding:10px}
  .finance-note-card{margin:10px 0 14px;padding:12px 13px}
}

/* 2026-09 BI performance dashboard */
.bi-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:14px;padding:4px 2px 2px}.bi-hero h2{margin:1px 0 3px;font-size:25px;letter-spacing:-.55px}.bi-hero p{margin:0;color:#7b8799;font-size:11px}.bi-eyebrow{display:block;color:#6e7fbd;font-size:9px;font-weight:800;letter-spacing:1.8px;direction:ltr;text-align:right}
.bi-filter{margin-bottom:16px;padding:13px 14px;border-radius:16px;box-shadow:0 7px 20px rgba(45,59,91,.035)}.bi-filter .field{gap:4px}.bi-filter input{min-height:42px;padding-block:8px}.bi-filter .button{min-height:42px}
.bi-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:11px;margin-bottom:14px}.bi-kpi{min-width:0;display:flex;align-items:flex-start;gap:10px;padding:16px 14px;background:#fff;border:1px solid #e5e9f1;border-radius:17px;box-shadow:0 8px 24px rgba(45,59,91,.035)}.bi-kpi-icon{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:11px;background:#f1f4fb;color:#64728a}.bi-kpi-icon .icon{width:18px;height:18px}.bi-kpi-copy{min-width:0;display:grid;gap:1px}.bi-kpi-copy>span{color:#7e8999;font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bi-kpi-copy strong{display:block;color:#26344d;font-size:20px;line-height:1.45;font-weight:850;letter-spacing:-.45px;white-space:nowrap}.bi-kpi-copy small{color:#9aa3b1;font-size:8.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bi-kpi.primary .bi-kpi-icon{background:#eef1ff;color:#536bd7}.bi-kpi.success .bi-kpi-icon{background:#edf7f2;color:#34775f}.bi-kpi.purple .bi-kpi-icon{background:#f2efff;color:#7059c7}.bi-kpi.warm .bi-kpi-icon{background:#fff6e9;color:#9a6b28}
.bi-money-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:14px}.bi-money-card{margin:0;padding:18px 19px;overflow:hidden;position:relative}.bi-money-card:before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:#8290aa}.bi-money-card.proforma:before{background:#665bd0}.bi-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:15px}.bi-card-head h3{margin:0 0 2px;font-size:13px}.bi-card-head p{margin:0;color:#8b96a7;font-size:9.5px}.bi-card-head>span{display:inline-flex;align-items:center;min-height:27px;padding:4px 9px;border-radius:9px;background:#f5f7fb;color:#778397;font-size:9px;white-space:nowrap}.bi-money-row{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:10px 0;border-top:1px solid #eef1f5}.bi-money-row:first-of-type{border-top:0}.bi-money-row>div{display:flex;align-items:baseline;gap:7px;min-width:0}.bi-money-row strong{font-size:19px;letter-spacing:-.4px;color:#2c3951;direction:ltr}.bi-money-card.proforma .bi-money-row strong{color:#514ac1}.bi-money-row span{color:#7c889b;font-size:10px}.bi-money-row small{color:#929dad;font-size:9px;text-align:left}.bi-empty-mini{padding:18px 0;color:#9aa4b3;font-size:10px}
.bi-primary-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.75fr);gap:14px;margin-bottom:14px}.bi-primary-grid>.card,.bi-secondary-grid>.card,.bi-leader-grid>.card,.bi-products-card{margin:0}.bi-trend-card,.bi-funnel-card,.bi-state-card,.bi-queue-card,.bi-rank-card,.bi-products-card{padding:18px 19px}.bi-trend{min-height:245px}.bi-trend svg{display:block;width:100%;height:250px;overflow:visible}.bi-chart-grid{stroke:#edf0f5;stroke-width:1}.bi-axis-label{fill:#9ba5b5;font-family:Vazirmatn,Tahoma,sans-serif;font-size:9px}.bi-chart-line{fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}.bi-chart-dot{stroke:#fff;stroke-width:1.7}.bi-line-docs{stroke:#71809b;fill:#71809b}.bi-line-leads{stroke:#d29a52;fill:#d29a52}.bi-line-proforma{stroke:#5d62d7;fill:#5d62d7}.bi-chart-legend{display:flex;gap:15px;justify-content:flex-end;margin:-4px 0 5px;font-size:9px;color:#7d889a}.bi-chart-legend span:before{content:"";display:inline-block;width:8px;height:8px;border-radius:99px;margin-left:5px;vertical-align:-1px}.bi-chart-legend .docs:before{background:#71809b}.bi-chart-legend .leads:before{background:#d29a52}.bi-chart-legend .proforma:before{background:#5d62d7}
.bi-funnel{display:grid;gap:13px;padding-top:2px}.bi-funnel-row{display:grid;grid-template-columns:92px minmax(0,1fr);gap:4px 10px;align-items:center}.bi-funnel-label{display:flex;justify-content:space-between;gap:6px;align-items:center;font-size:10px;color:#657289}.bi-funnel-label strong{font-size:13px;color:#2e3c54}.bi-funnel-track{height:14px;border-radius:999px;background:#f0f2f6;overflow:hidden}.bi-funnel-track span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#8795b1,#5b6fd3);min-width:3px}.bi-funnel-row:nth-child(4) .bi-funnel-track span{background:linear-gradient(90deg,#7567d2,#554ec1)}.bi-funnel-row small{grid-column:2;color:#99a2b0;font-size:8.5px}
.bi-secondary-grid{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(0,1.2fr);gap:14px;margin-bottom:14px}.bi-donut-wrap{display:grid;grid-template-columns:150px minmax(0,1fr);align-items:center;gap:12px}.bi-donut{width:145px;height:145px;transform:rotate(-90deg)}.bi-donut-base,.bi-donut-progress{fill:none;stroke-width:13}.bi-donut-base{stroke:#edf0f5}.bi-donut-progress{stroke:#5d62d7;stroke-linecap:round;transition:stroke-dashoffset .3s ease}.bi-donut-number,.bi-donut-text{transform:rotate(90deg);transform-origin:60px 60px;fill:#26344c;font-family:Vazirmatn,Tahoma,sans-serif}.bi-donut-number{font-size:15px;font-weight:850}.bi-donut-text{font-size:7px;fill:#8d97a7}.bi-donut-legend{display:grid;gap:9px}.bi-donut-legend span{display:grid;grid-template-columns:10px 1fr auto;gap:7px;align-items:center;color:#69768a;font-size:10px}.bi-donut-legend i{width:8px;height:8px;border-radius:99px}.bi-donut-legend i.quote{background:#d7dce5}.bi-donut-legend i.proforma{background:#5d62d7}.bi-donut-legend strong{color:#2d3a52;font-size:12px}.bi-rate-strip{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.bi-rate-strip>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:10px;background:#f7f8fb;color:#7f8999;font-size:9px}.bi-rate-strip strong{color:#4e60c8;font-size:12px}
.bi-queue-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.bi-queue-grid>div{min-width:0;padding:18px 12px;border:1px solid #ebedf2;border-radius:14px;background:linear-gradient(180deg,#fbfcfe,#f8f9fc)}.bi-queue-grid span{display:block;color:#8792a3;font-size:9px;margin-bottom:4px}.bi-queue-grid strong{display:block;color:#2b3951;font-size:19px;line-height:1.5;overflow-wrap:anywhere}.bi-queue-grid>div:last-child strong{font-size:13px;padding-top:5px}
.bi-leader-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:14px}.bi-rank-card{min-width:0}.bi-rank-list{display:grid;gap:8px}.bi-rank-row{display:grid;grid-template-columns:25px minmax(0,1fr) auto;gap:9px;align-items:center;padding:6px 0}.bi-rank-no{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#f2f4f8;color:#7f8b9d;font-size:9px;font-weight:800}.bi-rank-row:first-child .bi-rank-no{background:#eeefff;color:#554fc1}.bi-rank-main{min-width:0}.bi-rank-main>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.bi-rank-main strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;color:#354159}.bi-rank-main span{font-size:8px;color:#929cab;white-space:nowrap}.bi-rank-bar{height:4px;border-radius:999px;background:#eef1f5;overflow:hidden;margin-top:4px}.bi-rank-bar span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#91a0be,#6677d4)}.bi-rank-row>b{font-size:12px;color:#4f5fc3;font-weight:800}
.bi-products-card{margin-bottom:14px}.bi-products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px}.bi-product-row{padding:10px 0;border-top:1px solid #eff1f5}.bi-product-row:nth-child(-n+2){border-top:0}.bi-product-title{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:7px}.bi-product-title strong{font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70%}.bi-product-title span{font-size:8.5px;color:#929cab;white-space:nowrap}.bi-product-bars{display:grid;gap:4px}.bi-product-bars>div{display:grid;grid-template-columns:52px minmax(0,1fr) 28px;gap:7px;align-items:center}.bi-product-bars span,.bi-product-bars em{font-style:normal;color:#8b95a5;font-size:8px}.bi-product-bars em{text-align:left}.bi-product-bars i{display:block;height:5px;background:#eef1f5;border-radius:999px;overflow:hidden}.bi-product-bars b{display:block;height:100%;border-radius:inherit}.bi-product-bars b.quote{background:#9ba6b8}.bi-product-bars b.proforma{background:#5d62d7}.bi-note{margin-top:14px;font-size:9px;color:#7c8797}
@media(max-width:1280px){.bi-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.bi-leader-grid{grid-template-columns:1fr 1fr}.bi-leader-grid>.bi-rank-card:last-child{grid-column:1/-1}.bi-queue-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){.bi-primary-grid,.bi-secondary-grid{grid-template-columns:1fr}.bi-leader-grid{grid-template-columns:1fr}.bi-leader-grid>.bi-rank-card:last-child{grid-column:auto}.bi-products{grid-template-columns:1fr}.bi-product-row:nth-child(2){border-top:1px solid #eff1f5}}
@media(max-width:760px){.bi-hero{align-items:flex-start}.bi-hero h2{font-size:20px}.bi-hero p{font-size:10px}.bi-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.bi-kpi{padding:12px 11px;gap:8px}.bi-kpi-icon{width:31px;height:31px;flex-basis:31px}.bi-kpi-copy strong{font-size:16px}.bi-money-grid{grid-template-columns:1fr}.bi-trend-card,.bi-funnel-card,.bi-state-card,.bi-queue-card,.bi-rank-card,.bi-products-card,.bi-money-card{padding:15px}.bi-trend{overflow-x:auto}.bi-trend svg{min-width:650px}.bi-donut-wrap{grid-template-columns:130px 1fr}.bi-donut{width:125px;height:125px}.bi-queue-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bi-rank-main>div:first-child{display:grid;gap:0}.bi-rank-main span{white-space:normal}.bi-products{grid-template-columns:1fr}}
@media(max-width:430px){.bi-hero{display:block}.bi-hero .actions{margin-top:9px}.bi-kpi-grid{grid-template-columns:1fr 1fr}.bi-kpi-icon{display:none}.bi-kpi{min-height:81px}.bi-kpi-copy>span{white-space:normal}.bi-kpi-copy small{white-space:normal}.bi-money-row{align-items:flex-start}.bi-money-row small{max-width:42%}.bi-donut-wrap{grid-template-columns:1fr;text-align:center}.bi-donut{margin:auto}.bi-donut-legend{max-width:220px;margin:auto;width:100%}.bi-rate-strip{grid-template-columns:1fr}.bi-queue-grid{grid-template-columns:1fr 1fr}.bi-queue-grid>div{padding:13px 10px}.bi-funnel-row{grid-template-columns:78px minmax(0,1fr)}.bi-product-title{display:grid;gap:1px}.bi-product-title strong{max-width:100%}}


/* Global IBEX 1405 reporting lock */
.bi-ibex-notice{margin:-2px 0 16px}.stats-filter.is-locked{opacity:.78;background:#fbfcff}.stats-filter.is-locked input{background:#f4f6fa;color:#64748b;cursor:not-allowed}.stats-filter.is-locked .button[disabled]{opacity:.55;cursor:not-allowed}

/* Price-role product list — calm, clearly segmented, easy to scan */
.price-products-list{
  display:grid;
  gap:8px;
  padding:12px;
  background:#f7f8fb;
}
.price-product-row{
  display:grid;
  grid-template-columns:minmax(260px,1.7fr) minmax(175px,.9fr) minmax(120px,.62fr) minmax(110px,.58fr) auto;
  align-items:center;
  gap:0;
  min-height:78px;
  background:#fff;
  border:1px solid #e5e9f0;
  border-radius:15px;
  box-shadow:0 3px 12px rgba(40,55,86,.025);
  overflow:hidden;
  transition:border-color .15s,box-shadow .15s,transform .15s;
}
.price-product-row:hover{
  border-color:#d9dfeb;
  box-shadow:0 8px 22px rgba(40,55,86,.055);
  transform:translateY(-1px);
}
.price-product-identity{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  min-width:0;
  padding:16px 18px;
}
.price-product-identity strong{
  font-size:13px;
  line-height:1.8;
  color:#26354c;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.price-product-identity small{
  color:#98a2b1;
  font-size:10px;
  direction:ltr;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.price-product-metric,
.price-product-state,
.price-product-actions{
  min-height:48px;
  padding:8px 16px;
  border-right:1px solid #edf0f4;
}
.price-product-metric{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
}
.price-product-metric>span{
  color:#9aa4b3;
  font-size:9px;
  line-height:1.4;
}
.price-product-base>div{
  display:flex;
  align-items:baseline;
  gap:6px;
  direction:ltr;
  justify-content:flex-end;
}
.price-product-base .money{
  color:#344461;
  font-size:13px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.price-product-base small{
  color:#9aa4b3;
  font-size:9px;
}
.price-product-discount strong{
  color:#4f5f7a;
  font-size:13px;
}
.price-product-state{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.price-product-state strong{
  font-size:10px;
  color:#667389;
  font-weight:700;
}
.price-state-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#70a78e;
  box-shadow:0 0 0 4px #edf7f2;
  flex:0 0 auto;
}
.price-product-row.is-warning .price-state-dot{
  background:#d49a58;
  box-shadow:0 0 0 4px #fbf3e9;
}
.price-product-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  padding-left:14px;
  padding-right:14px;
}
.price-product-actions .button{
  white-space:nowrap;
}

@media(max-width:1050px){
  .price-product-row{
    grid-template-columns:minmax(220px,1.5fr) minmax(155px,.9fr) 110px auto;
  }
  .price-product-state{display:none}
}

@media(max-width:760px){
  .price-products-list{padding:8px;gap:9px;background:#f7f8fb}
  .price-product-row{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "identity state"
      "price discount"
      "action action";
    min-height:0;
    border-radius:14px;
  }
  .price-product-identity{grid-area:identity;padding:13px 14px 10px}
  .price-product-identity strong{font-size:12px;white-space:normal}
  .price-product-state{
    grid-area:state;
    display:flex;
    border-right:0;
    min-height:0;
    padding:13px 14px 10px 10px;
    align-self:start;
  }
  .price-product-state strong{font-size:9px}
  .price-product-metric{
    min-height:54px;
    padding:10px 14px;
    border-top:1px solid #edf0f4;
  }
  .price-product-base{grid-area:price;border-right:0}
  .price-product-discount{grid-area:discount;border-right:1px solid #edf0f4;min-width:115px}
  .price-product-base>div{justify-content:flex-start}
  .price-product-actions{
    grid-area:action;
    min-height:0;
    border-right:0;
    border-top:1px solid #edf0f4;
    padding:9px 12px;
    justify-content:flex-end;
  }
  .price-product-actions .button{min-height:36px}
}

@media(max-width:390px){
  .price-product-row{
    grid-template-columns:minmax(0,1fr) 105px;
  }
  .price-product-identity{padding-right:12px}
  .price-product-state{padding-left:10px;padding-right:8px}
  .price-product-metric{padding:9px 11px}
  .price-product-base .money{font-size:11.5px}
}

/* FINAL — price-role product list, mobile-first visual separation */
@media(max-width:760px){
  .price-products-list{
    padding:0!important;
    gap:12px!important;
    background:transparent!important;
  }
  .price-product-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "identity state"
      "price discount"
      "action action"!important;
    background:#fff!important;
    border:1px solid #dde3ec!important;
    border-radius:18px!important;
    box-shadow:0 7px 20px rgba(37,52,82,.055)!important;
    overflow:hidden!important;
    transform:none!important;
  }
  .price-product-row:hover{
    transform:none!important;
    box-shadow:0 7px 20px rgba(37,52,82,.055)!important;
  }
  .price-product-identity{
    grid-area:identity!important;
    padding:15px 15px 13px!important;
    min-width:0!important;
  }
  .price-product-identity strong{
    font-size:13.5px!important;
    line-height:1.85!important;
    color:#223049!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  .price-product-identity small{
    margin-top:1px!important;
    font-size:9.5px!important;
    color:#9aa4b3!important;
  }
  .price-product-state{
    grid-area:state!important;
    align-self:start!important;
    display:flex!important;
    min-height:0!important;
    margin:12px 12px 0 8px!important;
    padding:6px 8px!important;
    gap:6px!important;
    border:0!important;
    border-radius:999px!important;
    background:#f3f7f5!important;
  }
  .price-product-row.is-warning .price-product-state{
    background:#fbf5ec!important;
  }
  .price-product-state strong{
    font-size:9px!important;
    line-height:1.2!important;
  }
  .price-state-dot{
    width:6px!important;
    height:6px!important;
    box-shadow:none!important;
  }
  .price-product-metric{
    min-height:66px!important;
    padding:11px 14px!important;
    border-top:1px solid #e9edf3!important;
    background:#fafbfd!important;
  }
  .price-product-metric>span{
    font-size:9px!important;
    color:#98a2b2!important;
    margin-bottom:3px!important;
  }
  .price-product-base{
    grid-area:price!important;
    border-right:0!important;
  }
  .price-product-discount{
    grid-area:discount!important;
    min-width:108px!important;
    border-right:1px solid #e9edf3!important;
  }
  .price-product-base>div{
    justify-content:flex-start!important;
  }
  .price-product-base .money{
    font-size:14px!important;
    color:#2f405f!important;
  }
  .price-product-base small{
    font-size:9px!important;
  }
  .price-product-discount strong{
    font-size:14px!important;
    color:#465672!important;
  }
  .price-product-actions{
    grid-area:action!important;
    min-height:0!important;
    padding:10px 12px 12px!important;
    border:0!important;
    border-top:1px solid #e9edf3!important;
    background:#fff!important;
  }
  .price-product-actions .button{
    width:100%!important;
    min-height:40px!important;
    border-radius:11px!important;
  }
}

@media(max-width:390px){
  .price-products-list{gap:10px!important}
  .price-product-row{
    grid-template-columns:minmax(0,1fr) auto!important;
    border-radius:16px!important;
  }
  .price-product-identity{padding:13px 12px 11px!important}
  .price-product-identity strong{font-size:12.5px!important}
  .price-product-state{margin:10px 9px 0 7px!important;padding:5px 7px!important}
  .price-product-metric{padding:10px 11px!important;min-height:61px!important}
  .price-product-discount{min-width:96px!important}
  .price-product-base .money,.price-product-discount strong{font-size:12.5px!important}
  .price-product-actions{padding:9px 10px 10px!important}
}

/* FINAL price-list metrics: before discount / exhibition discount / after discount */
.price-product-row{
  grid-template-columns:minmax(230px,1.45fr) minmax(160px,.82fr) minmax(105px,.52fr) minmax(170px,.86fr) minmax(105px,.52fr) auto;
}
.price-product-final>div{
  display:flex;
  align-items:baseline;
  gap:6px;
  direction:ltr;
  justify-content:flex-end;
}
.price-product-final .money{
  color:#334fc1;
  font-size:13.5px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.price-product-final small{
  color:#8f9aab;
  font-size:9px;
}

@media(max-width:1180px){
  .price-product-row{
    grid-template-columns:minmax(210px,1.35fr) minmax(145px,.78fr) 98px minmax(150px,.8fr) auto;
  }
  .price-product-state{display:none}
}

@media(max-width:760px){
  .price-product-row{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "identity state"
      "before before"
      "discount final"
      "action action"!important;
  }
  .price-product-base{
    grid-area:before!important;
    border-right:0!important;
    min-height:58px!important;
    background:#fbfcfe!important;
  }
  .price-product-discount{
    grid-area:discount!important;
    min-width:0!important;
    border-right:0!important;
    background:#fafbfd!important;
  }
  .price-product-final{
    grid-area:final!important;
    min-width:0!important;
    border-right:1px solid #e9edf3!important;
    background:#f7f9ff!important;
  }
  .price-product-final>div{
    justify-content:flex-start!important;
  }
  .price-product-final .money{
    font-size:14px!important;
    color:#334fc1!important;
  }
  .price-product-final small{font-size:9px!important}
  .price-product-base>div{justify-content:flex-start!important}
}

@media(max-width:390px){
  .price-product-base .money,
  .price-product-discount strong,
  .price-product-final .money{
    font-size:12.2px!important;
  }
  .price-product-discount,
  .price-product-final{
    padding:9px 10px!important;
  }
}


/* PWA install affordance */
.pwa-install-button[hidden],.pwa-login-install[hidden]{display:none!important}
.pwa-install-button{white-space:nowrap}
.pwa-ios-help{padding:6px 0 2px}
.pwa-ios-help strong{display:block;color:#223049;font-size:14px;margin-bottom:7px}
.pwa-ios-help p{margin:0;color:#6f7b8e;font-size:12px;line-height:2}
@media(max-width:760px){
  .pwa-install-button{min-height:36px;padding:7px 10px;font-size:10.5px}
}

/* Customer name autocomplete: keep suggestions attached to the name field only */
.customer-name-autocomplete{position:relative;min-width:0}
.customer-name-autocomplete>.field{width:100%}
.customer-name-autocomplete>.autocomplete{top:calc(100% + 5px);z-index:30;width:100%;max-height:270px;margin:0}
@media(max-width:760px){
  .customer-name-autocomplete>.autocomplete{max-height:220px;border-radius:11px;box-shadow:0 12px 30px rgba(36,44,70,.12)}
}


/* Final sales admin + compact BI sections */
.admin-document-tool{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,520px);gap:24px;align-items:end}
.admin-document-tool h3{margin:0 0 6px}.admin-document-tool p{margin:0;color:var(--muted);font-size:11px}
.admin-revert-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.admin-revert-form .field{margin:0}.admin-revert-form .button{min-height:44px}
.bi-section-title{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:22px 2px 10px;padding-bottom:8px;border-bottom:1px solid #e7eaf0}.bi-section-title>div{display:flex;align-items:baseline;gap:9px}.bi-section-title span{font-size:9px;font-weight:800;color:#6977cf;letter-spacing:.2px}.bi-section-title h3{margin:0;font-size:14px;color:#2f3d54}.bi-section-title small{font-size:8.5px;color:#98a1af}
.bi-sales-share-card{margin:0;padding:18px 19px}.bi-sales-share{display:grid;gap:7px}.bi-sales-share-row{display:grid;grid-template-columns:25px minmax(0,1fr) 48px;gap:9px;align-items:center;padding:5px 0}.bi-sales-share-main{min-width:0}.bi-sales-share-main>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.bi-sales-share-main strong{font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bi-sales-share-main span{font-size:8px;color:#929cab;white-space:nowrap}.bi-sales-share-track{height:5px;margin-top:5px;border-radius:999px;background:#eef1f5;overflow:hidden}.bi-sales-share-track i{display:block;height:100%;border-radius:inherit;background:#5d62d7}.bi-sales-share-row>b{font-size:10.5px;color:#514ac1;text-align:left}
@media(max-width:760px){.admin-document-tool{grid-template-columns:1fr}.admin-revert-form{grid-template-columns:1fr}.bi-section-title{align-items:flex-start}.bi-section-title>div{display:grid;gap:0}.bi-section-title small{text-align:left}.bi-sales-share-main>div:first-child{display:grid;gap:1px}.bi-sales-share-main span{white-space:normal}}

/* Unsold-product analysis: compact final block in performance dashboard. */
.bi-unsold-title{margin-top:24px}
.bi-unsold-card{margin:0;padding:18px 19px}
.bi-unsold-head{align-items:center;margin-bottom:12px}
.bi-unsold-filter{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bi-unsold-filter select{min-width:170px;max-width:220px;height:36px;padding:0 10px;border:1px solid #dfe4ec;border-radius:9px;background:#fff;color:#39475d;font:inherit;font-size:9.5px}
.bi-unsold-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.bi-unsold-item{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;border:1px solid #e8ebf1;border-radius:10px;background:#fbfcfe}
.bi-unsold-item>div:first-child{min-width:0;display:grid;gap:2px}
.bi-unsold-item strong{font-size:9.5px;color:#344159;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bi-unsold-item small{font-size:7.7px;color:#9aa3b2}
.bi-unsold-interest{flex:0 0 auto;text-align:left;display:grid;gap:1px}
.bi-unsold-interest span{font-size:7.8px;color:#8b95a5}
.bi-unsold-interest b{font-size:8.5px;color:#5d62d7;font-weight:700}
@media(max-width:1050px){.bi-unsold-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.bi-unsold-card{padding:15px}.bi-unsold-head{align-items:flex-start;gap:10px}.bi-unsold-filter{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto}.bi-unsold-filter select{min-width:0;max-width:none;width:100%}.bi-unsold-grid{grid-template-columns:1fr}.bi-unsold-item{padding:10px}.bi-unsold-item strong{font-size:10px}}

/* Independent product reporting groups */
.settings-tabs{overflow-x:auto;scrollbar-width:thin}
.settings-tabs .tab{white-space:nowrap;flex:0 0 auto}
.report-group-import-card{display:grid;gap:18px}
.report-group-import-copy h3{margin:0 0 7px;font-size:15px}
.report-group-import-copy p{margin:0;color:var(--muted);font-size:10.5px;line-height:2}
.report-group-import-form{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:10px;align-items:center}
.report-group-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.report-group-summary>div{display:grid;gap:2px;padding:11px 12px;border:1px solid #e8ebf1;border-radius:11px;background:#fafbfd}
.report-group-summary strong{font-size:17px;color:#39475d}
.report-group-summary span{font-size:8.5px;color:#929cab}
.report-group-chips{display:flex;flex-wrap:wrap;gap:7px}
.report-group-chips>span{display:inline-flex;align-items:center;gap:7px;padding:7px 9px;border:1px solid #e3e7ef;border-radius:9px;background:#fff}
.report-group-chips strong{font-size:9.5px;color:#39475d}
.report-group-chips small{font-size:8px;color:#8d98a8}
.bi-sales-products-head{margin-bottom:10px}
.bi-product-group-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
.bi-product-group-filters label{display:grid;gap:4px;min-width:0}
.bi-product-group-filters label>span{font-size:8px;color:#8d98a8}
.bi-product-group-filters select{width:100%;min-width:0;height:36px;padding:0 9px;border:1px solid #dfe4ec;border-radius:9px;background:#fff;color:#39475d;font:inherit;font-size:9.5px}
.bi-list-more{text-align:center;padding:7px 0 1px;color:#8e98a7;font-size:8px}
@media(max-width:760px){
  .report-group-import-form{grid-template-columns:1fr}
  .report-group-import-form .button{width:100%}
  .report-group-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bi-product-group-filters{grid-template-columns:1fr}
  .settings-tabs{justify-content:flex-start}
}

/* Admin-only customer identity audit report */
.identity-report-filter{margin-bottom:14px;padding:17px 18px}
.identity-report-filter .form-grid{align-items:end}
.identity-filter-action{display:flex;align-items:end;height:100%}
.identity-filter-action .button{width:100%;min-height:44px}
.identity-report-note{margin-top:10px;padding-top:10px;border-top:1px solid #edf0f4;color:var(--muted);font-size:9px;line-height:1.9}
.identity-report-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:12px}
.identity-report-summary>div{display:grid;gap:2px;padding:11px 12px;border:1px solid #e5e9f0;border-radius:11px;background:#fff}
.identity-report-summary strong{font-size:17px;color:#354159}
.identity-report-summary span{font-size:8.5px;color:#929cab}
.identity-report-list{display:grid;gap:12px}
.identity-report-card{margin:0;padding:17px 18px}
.identity-report-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:12px;border-bottom:1px solid #edf0f4}
.identity-report-head h3{margin:5px 0 2px;font-size:15px;color:#2f3d54}
.identity-report-head p{margin:0;color:#8490a2;font-size:9px;line-height:1.9}
.identity-document-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.identity-document-title a{font-weight:850;color:#5365c7;text-decoration:none;font-size:11px}
.identity-document-title span{font-size:8.5px;color:#99a3b1}
.identity-total{display:grid;text-align:left;flex:0 0 auto}
.identity-total strong{font-size:16px;color:#4f58bd;direction:ltr}
.identity-total span{font-size:8px;color:#9aa3b0}
.identity-match-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.identity-match-grid>section{min-width:0;border:1px solid #e8ebf1;border-radius:11px;background:#fbfcfe;padding:11px}
.identity-match-title{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:8px}
.identity-match-title>div{display:grid;gap:1px}
.identity-match-title span{font-size:9.5px;font-weight:800;color:#3c485d}
.identity-match-title small{font-size:7.7px;color:#99a2b0;line-height:1.8}
.identity-match-title>.badge{font-size:7.5px;flex:0 0 auto}
.identity-subblock{display:grid;gap:7px;margin-top:9px;padding-top:9px;border-top:1px solid #edf0f4}
.identity-subblock:first-of-type{margin-top:0;padding-top:0;border-top:0}
.identity-subhead{display:flex;align-items:center;justify-content:space-between;gap:8px}
.identity-subhead strong{font-size:8.5px;color:#596579}
.identity-subhead .badge{font-size:7px}
.identity-match-list{display:grid;gap:6px}
.identity-match-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,.65fr);gap:10px;padding:8px 9px;border:1px solid #ebedf2;border-radius:9px;background:#fff;color:inherit;text-decoration:none}
.identity-match-row>div{min-width:0;display:grid;gap:1px}
.identity-match-row>div:last-child{text-align:left}
.identity-match-row strong,.identity-match-row b{font-size:9px;color:#354159;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.identity-match-row span,.identity-match-row small{font-size:7.7px;color:#929cab;line-height:1.65}
.identity-doc-link:hover{border-color:#ced5ee;background:#fafbff}
.identity-empty{padding:11px 8px;text-align:center;color:#9ba5b4;font-size:8.5px;border:1px dashed #e0e4eb;border-radius:9px;background:#fff}
@media(max-width:900px){.identity-report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.identity-match-grid{grid-template-columns:1fr}}
@media(max-width:600px){.identity-report-card{padding:13px}.identity-report-head{display:grid}.identity-total{text-align:right}.identity-match-title{display:grid}.identity-match-title>.badge{justify-self:start}.identity-match-row{grid-template-columns:1fr}.identity-match-row>div:last-child{text-align:right}.identity-report-summary{grid-template-columns:1fr 1fr}.identity-report-summary strong{font-size:15px}}
