:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#17212f;background:#f5f6f8;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}.shell{display:flex;min-height:100vh}.sidebar{width:226px;flex:0 0 226px;background:#fff;border-right:1px solid #e6e9ee;display:flex;flex-direction:column;padding:25px 14px 20px;position:sticky;top:0;height:100vh}.brand{display:flex;gap:10px;align-items:center;padding:0 13px 27px}.brand-mark{width:35px;height:35px;border-radius:10px;background:#193a70;color:#fff;display:grid;place-items:center;font-size:19px;font-weight:800}.brand strong{font-size:17px;display:block;letter-spacing:-.4px}.brand small{display:block;color:#8a95a5;font-size:11px;margin-top:1px}.sidebar nav{display:grid;gap:3px}.nav-item{border:0;background:transparent;text-align:left;border-radius:9px;padding:12px 14px;color:#536173;font-weight:600;display:flex;gap:11px;align-items:center;width:100%}.nav-item:hover{background:#f3f6fa}.nav-item.active{background:#eaf1fc;color:#205eb2}.nav-icon{font-size:18px;width:20px;text-align:center}.side-note{margin-top:auto;border-top:1px solid #edf0f4;padding:19px 11px 0;color:#5c6d7d;font-size:12px;line-height:1.5}.side-note small{color:#9aa5b2}.live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#2abb82;margin-right:6px}.main{min-width:0;flex:1}.topbar{height:66px;background:#fff;border-bottom:1px solid #e6e9ee;display:flex;align-items:center;justify-content:space-between;padding:0 34px;color:#697686;font-size:13px}.top-right{display:flex;align-items:center;gap:20px}.avatar{border:0;border-radius:50%;width:30px;height:30px;background:#e8eff9;color:#2a61ad;font-weight:800}.content{max-width:1700px;margin:auto;padding:30px 34px 60px}.headline{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:25px}.headline h1{font-size:28px;line-height:1.15;letter-spacing:-.8px;margin:0 0 7px}.muted{color:#8190a0}.headline p{margin:0;color:#8492a1}.btn{border:1px solid #d9e0e9;background:#fff;color:#354454;border-radius:8px;padding:9px 14px;font-weight:650;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px}.btn:hover{background:#f7faff}.btn.primary{border-color:#2768c0;background:#2768c0;color:#fff}.btn.primary:hover{background:#1a57a9}.btn.ghost{border-color:transparent;background:transparent;color:#2662b4}.btn.small{min-height:28px;padding:5px 9px;font-size:12px}.btn.danger{color:#ba4a4e}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.kpi{background:#fff;border:1px solid #e9edf2;border-radius:12px;padding:19px 20px;box-shadow:0 2px 9px #24395605}.kpi .label{color:#8290a0;font-size:12px;margin-bottom:13px}.kpi .value{font-size:24px;font-weight:750;letter-spacing:-.6px}.kpi .sub{font-size:11px;color:#9aa6b3;margin-top:8px}.kpi.blue .value{color:#2665b9}.kpi.green .value{color:#269373}.kpi.orange .value{color:#c4842c}.panel{background:#fff;border:1px solid #e5eaf0;border-radius:12px;box-shadow:0 2px 12px #26344d05;overflow:hidden}.panel-head{padding:18px 20px;border-bottom:1px solid #edf0f4;display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-head h2{margin:0;font-size:16px}.panel-head .hint{color:#9aa5b2;font-size:12px}.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:15px}.filters{display:flex;background:#fff;border:1px solid #e0e5ed;border-radius:9px;padding:3px;gap:2px}.filter{background:none;border:0;border-radius:6px;padding:8px 12px;color:#778596;font-size:12px;font-weight:650}.filter.active{background:#e9f1fc;color:#205eaf}.search{position:relative;flex:1;min-width:190px}.search input{width:100%;border:1px solid #e0e5ed;border-radius:9px;padding:10px 12px 10px 34px;background:#fff;outline:none}.search:before{content:'⌕';position:absolute;left:12px;top:5px;color:#8c9baa;font-size:22px}.search input:focus,input:focus,select:focus,textarea:focus{border-color:#76a7eb!important;outline:2px solid #dbeafa}.table-wrap{overflow:auto;max-height:calc(100vh - 340px);min-height:230px}table{border-collapse:collapse;width:100%;font-size:12px}th{text-align:left;background:#f8f9fb;color:#8290a0;font-weight:650;position:sticky;top:0;z-index:1;white-space:nowrap}th,td{padding:12px 14px;border-bottom:1px solid #edf0f3}td{color:#354455;vertical-align:middle}tbody tr:hover{background:#f8fbff}tbody tr.clickable{cursor:pointer}.strong{font-weight:650;color:#223142}.tiny{font-size:11px;color:#9aa6b2;margin-top:3px}.num{text-align:right;white-space:nowrap}.cell-customer{min-width:150px}.cell-description{min-width:210px;max-width:330px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pill{display:inline-block;padding:5px 9px;border-radius:6px;font-size:11px;font-weight:700;white-space:nowrap}.pill.working{background:#fff0d8;color:#b77715}.pill.ready{background:#dcf5e8;color:#25835f}.pill.new{background:#edf1f6;color:#627181}.pill.cancelled{background:#f2f1f2;color:#92969e}.badge{display:inline-block;padding:4px 7px;background:#f1f4f8;border-radius:5px;color:#687788;font-size:11px}.good{color:#238b69}.warn{color:#bb7d2a}.empty{padding:42px;text-align:center;color:#8b98a7}.empty strong{display:block;color:#3a4858;font-size:16px;margin-bottom:6px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field.wide{grid-column:1/-1}.field label{font-size:12px;color:#526274;font-weight:650}.field input,.field select,.field textarea{width:100%;border:1px solid #dce3eb;border-radius:8px;background:#fff;padding:10px 11px;min-height:39px;color:#243345;outline:none}.field textarea{min-height:84px;resize:vertical}.field .help{font-size:11px;color:#9aa6b2}.overlay{position:fixed;inset:0;z-index:20;display:flex;justify-content:flex-end}.overlay.hidden,.toast.hidden{display:none}.shade{position:absolute;inset:0;background:#15253676}.drawer{position:relative;background:#fff;width:min(650px,100%);height:100%;overflow:auto;box-shadow:-12px 0 34px #15253620}.drawer-header{position:sticky;top:0;background:#fff;border-bottom:1px solid #e9edf2;padding:20px 24px;display:flex;justify-content:space-between;align-items:center;z-index:2}.drawer-header h2{margin:0;font-size:20px}.drawer-body{padding:22px 24px 45px}.drawer-section{border-top:1px solid #edf0f4;margin-top:25px;padding-top:22px}.drawer-section h3{font-size:14px;margin:0 0 14px}.drawer-actions{display:flex;gap:9px;align-items:center;margin-top:24px;flex-wrap:wrap}.icon-btn{border:0;background:transparent;font-size:22px;color:#8090a0;width:30px;height:30px}.item-line{display:flex;gap:8px;align-items:center;margin-bottom:9px}.item-line select{flex:1}.item-line input{width:72px}.mini-line{display:flex;justify-content:space-between;border-bottom:1px solid #f0f2f4;padding:9px 0;gap:12px}.suggestions{border:1px solid #e4e9ef;border-radius:8px;margin-top:3px;max-height:150px;overflow:auto}.suggestions button{display:block;width:100%;border:0;background:#fff;text-align:left;padding:8px 10px;color:#394a5d}.suggestions button:hover{background:#eff5fd}.toast{position:fixed;bottom:24px;right:24px;z-index:40;background:#223a53;color:#fff;border-radius:9px;padding:12px 18px;box-shadow:0 8px 25px #16283e30}.toast.error{background:#ac4549}.mobile-menu{display:none}.stack{display:grid;gap:16px}.report-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.mobile-cards{display:none}.mobile-card{background:#fff;border:1px solid #e5eaf0;border-radius:10px;padding:14px;margin-bottom:9px}.mobile-card .row{display:flex;justify-content:space-between;gap:10px;margin:7px 0}.mobile-card .date{color:#97a4b2;font-size:11px}@media(max-width:1100px){.kpis{grid-template-columns:repeat(2,1fr)}.content{padding:24px}.topbar{padding:0 24px}}@media(max-width:750px){.sidebar{display:none;position:fixed;z-index:10;box-shadow:10px 0 20px #14253620}.sidebar.open{display:flex}.mobile-menu{display:block;border:0;background:transparent;font-size:22px;color:#536477;margin-right:12px}.topbar{justify-content:flex-start;height:56px;padding:0 15px}.top-right{margin-left:auto}.top-right #today{display:none}.content{padding:20px 14px}.headline h1{font-size:24px}.kpis{gap:9px}.kpi{padding:15px}.kpi .value{font-size:20px}.table-wrap{max-height:none}.orders-table{display:none}.mobile-cards{display:block}.toolbar{align-items:stretch}.filters{width:100%;overflow:auto}.filter{white-space:nowrap}.search{width:100%}.report-grid{grid-template-columns:1fr}}@media(max-width:480px){.form-grid{grid-template-columns:1fr}.field.wide{grid-column:1}.kpis{grid-template-columns:1fr 1fr}.kpi .label{font-size:11px}.kpi .value{font-size:17px}.headline{align-items:flex-start}.headline .btn{padding:8px 10px;font-size:12px}.drawer-header,.drawer-body{padding-left:17px;padding-right:17px}}
.product-picker{position:relative;flex:1;min-width:0}.item-search{width:100%;border:1px solid #dce3eb;border-radius:8px;padding:10px 11px;min-height:39px;outline:none}.product-suggestions{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:5;max-height:280px;overflow:auto;background:#fff;border:1px solid #dce3eb;border-radius:9px;box-shadow:0 12px 28px #1c304526}.product-suggestions[hidden]{display:none}.product-suggestions button{display:flex;justify-content:space-between;gap:9px;align-items:center;width:100%;border:0;background:#fff;text-align:left;padding:10px 12px;color:#263746}.product-suggestions button:hover,.product-suggestions button.active{background:#eaf2ff}.product-name{font-weight:650}.product-meta{color:#8b98a6;font-size:11px;white-space:nowrap}.no-product{padding:12px;color:#8b98a6;font-size:12px}
.overlay{justify-content:center;align-items:center;padding:16px}.drawer{width:min(920px,100%);height:min(860px,100%);border-radius:14px;box-shadow:0 20px 60px #15253638}.headline-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.expense-row{background:#e8f9fc}.expense-row:hover{background:#dcf3f8}.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:26px 0 12px}.section-title h2{font-size:18px;margin:0}.import-item{display:grid;grid-template-columns:minmax(0,1fr) 95px 34px;gap:10px;align-items:end;padding:10px 0;border-bottom:1px solid #edf0f4}.import-item .icon-btn{margin-bottom:4px}.import-item small{min-height:14px}.notice{background:#eaf3ff;border:1px solid #c7def8;border-radius:9px;padding:12px 14px;color:#28598c;margin-bottom:18px;line-height:1.5}@media(max-width:750px){.overlay{padding:0}.drawer{width:100%;height:100%;border-radius:0}.headline-actions{justify-content:flex-start}.import-item{grid-template-columns:minmax(0,1fr) 76px 30px;gap:6px}}
.locked .sidebar{display:none}.locked .main{min-height:100vh}.locked .content{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 66px)}.auth-card{width:min(430px,100%);background:#fff;border:1px solid #e4e9ef;border-radius:16px;padding:32px;box-shadow:0 16px 45px #1b2c4512}.auth-card .brand-mark{margin-bottom:20px}.auth-card h1{margin:0 0 8px;font-size:26px}.auth-card p{margin:0 0 24px;line-height:1.5}.auth-card .btn{width:100%}.voided-row{opacity:.62;background:#f4f4f5}.pill.voided{background:#e5e7eb;color:#616875}.debt-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;border-radius:10px;padding:16px;margin-bottom:20px;background:#f2f7fc;border:1px solid #dce8f5}.debt-summary div{display:grid;gap:7px}.debt-summary span{font-size:12px;color:#6e8094}.debt-summary strong{font-size:20px}.debt-summary.has-debt div:last-child strong{color:#b96e20}.debt-summary.paid div:last-child strong{color:#25835f}.catalog-overlay{position:fixed;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:16px}.catalog-overlay.hidden{display:none}.catalog-modal{position:relative;background:#fff;width:min(680px,100%);height:min(760px,100%);border-radius:14px;box-shadow:0 20px 60px #15253638;display:flex;flex-direction:column;overflow:hidden}.catalog-head{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid #e8edf2}.catalog-head h2{margin:0;font-size:20px}.catalog-tools{padding:15px 22px;border-bottom:1px solid #edf0f4}.catalog-tools input{width:100%;border:1px solid #dce3eb;border-radius:9px;padding:11px}.catalog-list{overflow:auto;padding:8px 14px}.catalog-item{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:13px 10px;border:0;border-bottom:1px solid #edf0f4;background:#fff;text-align:left;color:#263746}.catalog-item:hover{background:#eef5ff}.catalog-item strong{display:block;font-size:13px}.catalog-item small{display:block;color:#8795a3;margin-top:4px}.catalog-qty{white-space:nowrap;color:#3378bd;font-weight:700}@media(max-width:750px){.catalog-overlay{padding:0}.catalog-modal{width:100%;height:100%;border-radius:0}.debt-summary{grid-template-columns:1fr 1fr}.debt-summary div:last-child{grid-column:1/-1}}
.product-suggestions.above{top:auto;bottom:calc(100% + 4px)}
.np-settings{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:26px}.np-settings input,.lookup-line input{border:1px solid #dce3eb;border-radius:8px;padding:10px;min-width:0}.np-settings .stack{align-content:start}.lookup-line{display:flex;gap:8px}.lookup-line input{flex:1}.lookup-line .btn{flex:0 0 auto}@media(max-width:750px){.np-settings{grid-template-columns:1fr}.lookup-line{flex-wrap:wrap}}
.item-line .item-search{width:100%;min-width:0}.item-line .item-qty{width:72px;flex:0 0 72px}.item-line .product-picker{flex:1;min-width:0}.pill.shortage{background:#fce6e3;color:#ad3f3c}.client-actions{display:flex;gap:6px;flex-wrap:wrap;min-width:250px}.stock-alert{background:#fff3e3;border:1px solid #f2d6a9;border-radius:9px;padding:14px;margin-top:12px}.stock-alert strong{color:#9e611e}.stock-alert ul{margin:8px 0;padding-left:20px}@media(max-width:480px){.item-line{flex-wrap:wrap}.item-line .product-picker{flex:1 0 100%}.item-line .item-qty{margin-left:auto}}
[hidden]{display:none!important}.np-section{border:1px solid #e2e9f1;border-radius:10px;padding:17px;background:#fff}.np-section h3{margin:0 0 14px;font-size:15px}.np-section .field{margin-bottom:10px}.np-section .field label:has(input[type=checkbox]){display:flex;align-items:center;gap:8px}.np-section .field label input[type=checkbox]{width:auto;min-height:0}.np-section select{min-width:0}.np-section .lookup-line select{flex:1}

.expense-totals{display:flex;justify-content:flex-end;align-items:center;gap:22px;flex-wrap:wrap;margin-top:12px;padding:14px 18px;background:#fff;border:1px solid #dce9e9;border-radius:10px;color:#314b4d}.expense-totals strong{color:#147f82}.expense-totals .muted{font-size:12px}@media(max-width:750px){.expense-totals{justify-content:flex-start;gap:10px 18px}}
.collaboration{margin:14px 0;min-height:0}.presence-box{padding:8px 12px;border-top:1px solid #d7e3e5;color:#365865;font-size:12px}.presence-box strong{display:block;margin-bottom:7px}.presence-name{display:inline-flex;align-items:center;gap:5px;margin:0 8px 5px 0}.presence-name i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#20ad72}.chat-toggle{background:#edf8f7!important;color:#176a70!important}.chat-toggle b{margin-left:auto;background:#e4a32d;color:#fff;border-radius:12px;min-width:20px;padding:1px 5px;text-align:center}.chat-box{position:absolute;left:100%;top:160px;width:min(340px,calc(100vw - 240px));height:min(500px,calc(100vh - 180px));background:#fff;border:1px solid #c9dfe0;box-shadow:0 12px 35px #172d3430;border-radius:12px;z-index:20;display:flex;flex-direction:column;padding:12px}.chat-head{display:flex;justify-content:space-between;align-items:center;font-weight:700}.chat-list{flex:1;min-height:0;overflow:auto;margin:10px 0}.chat-message{border-bottom:1px solid #e8eff0;padding:8px 2px;overflow-wrap:anywhere}.chat-message.pinned{background:#fff8e6;border-radius:6px;padding:8px}.chat-message small{color:#8798a2}.chat-message p{margin:5px 0;white-space:pre-wrap}.chat-pin{float:right;border:0;background:transparent;color:#64808a}.chat-box form{display:grid;gap:7px}.chat-box textarea{width:100%;min-height:55px;resize:vertical}.chat-box form button{justify-self:end}.permission-user{border-top:1px solid #e5eded;padding:12px 0}.permission-user h3{margin:0 0 10px}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.permission-grid label{display:flex;align-items:center;gap:7px}.order-conflict{position:sticky;top:0;z-index:2;background:#fff2d8;border:1px solid #e7ae40;padding:12px}.order-finance-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}.order-finance-grid.existing-order{grid-template-columns:repeat(2,minmax(0,1fr))!important}@media(max-width:900px){.order-finance-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}@media(max-width:580px){.order-finance-grid,.order-finance-grid.existing-order,.permission-grid{grid-template-columns:1fr!important}.chat-box{position:fixed;left:8px;right:8px;top:auto;bottom:8px;width:auto;height:min(520px,80vh)}}
.sidebar{z-index:2}@media(max-width:750px){.sidebar{z-index:10}}
