:root{--bg:#f5f6f4;--surface:#fff;--surface-soft:#f8f9f7;--line:#e2e5e1;--line-strong:#d4d8d2;--text:#27302b;--muted:#737c76;--accent:#52685c;--accent-soft:#e9efeb;--danger:#9a5f5a;--shadow:0 1px 3px rgba(32,45,37,.05)}
body{background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}.toolbar{background:rgba(255,255,255,.96);color:var(--text);border-bottom:1px solid var(--line);box-shadow:none;min-height:58px;padding:9px 16px}.brand{color:#344139}.toolbar .btn,.toolbar #lo{background:var(--surface);color:#536058;border:1px solid var(--line)}.toolbar #newO{background:var(--accent);color:#fff;border-color:var(--accent)}.tabs{background:var(--surface);border-color:var(--line);padding:0 16px;display:flex;flex-wrap:wrap}.tabs>button,.card-tab-wrap>button{color:#69736d;border-color:var(--line);font-weight:600}.tabs button.active{color:var(--accent);border-bottom-color:var(--accent)}.calc-nav{display:flex;align-items:center;padding:10px 14px;color:#52685c;text-decoration:none;font-weight:700;border-right:1px solid var(--line);white-space:nowrap}.calc-nav:hover{background:var(--surface-soft)}.workspace{gap:12px;padding:12px}.panel,.section,.right{border-color:var(--line);border-radius:10px;box-shadow:var(--shadow)}.head,.comments-section>summary,.audit-section>summary,.materials-head{background:var(--surface-soft);color:#536058;border-bottom:1px solid var(--line);padding:9px 12px}.form,.finance{background:var(--surface-soft)}.btn{background:var(--surface);border-color:var(--line-strong);color:#4e5b53}.green{background:var(--accent-soft);color:#405449}.form input,.form select,.righttop input,.righttop select,.product-edit input,.product-edit select,.mp-row input{border-color:var(--line-strong);border-radius:7px;color:var(--text)}.fin{border-color:var(--line);border-radius:8px}.fin b{color:#3f5047}.comments-body>label,.comments-body>textarea,.comments-body>div{border-color:var(--line)}th{background:#eef1ee;color:#566159}.selected{background:#e8efea!important}.materials-section,.finance{display:none}.calc-mode .materials-section,.calc-mode .finance{display:block}.calc-mode-toggle{background:var(--surface)!important;color:#56645b!important;border:1px solid var(--line)!important}.calc-mode-toggle.active{background:var(--accent-soft)!important;color:#405449!important}.panel>.head{background:#fff;border-bottom:0;padding:14px 16px 5px;font-size:18px}.order-meta>summary{margin:0 12px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);padding:10px 12px}.order-meta-body>.form{padding:12px 14px}.comments-section{margin-top:10px}#products{padding:10px;background:#f7f8f6}.product-edit{background:#fff;border:1px solid var(--line);border-radius:11px;margin:0 0 9px;padding:11px 12px}.product-edit .pe-main{display:grid;grid-template-columns:minmax(180px,1fr) 72px 96px 96px auto;gap:9px;align-items:end}.product-edit .pe-main>div>label{display:block;color:var(--muted);font-size:11px;margin:0 0 4px}.product-edit .pe-name input{font-size:16px;font-weight:650;background:#fff;border-color:transparent;border-bottom-color:var(--line);border-radius:0}.product-edit .pe-main>div:nth-child(2) input{font-size:16px;font-weight:650;text-align:center;background:var(--surface-soft)}.pe-delete{align-self:center;border:0;background:transparent;color:#a1a8a3;font-size:20px}.pe-params{margin-top:8px}.pe-params-summary{width:100%;text-align:left;background:var(--surface-soft);border:1px solid var(--line);border-radius:8px;padding:8px 10px;color:#526057}.pe-params-editor{margin-top:7px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft);padding:10px}.products-total{padding:9px 3px 2px;text-align:right;color:#566159;font-size:13px}.calc-mode .products-total{font-size:14px}
/* Worker mode: show production quantities/material/time but hide cost accounting */
#app:not(.calc-mode) .materials-section:first-of-type{display:block}#app:not(.calc-mode) .materials-section:first-of-type [data-cost],#app:not(.calc-mode) .materials-section:first-of-type .mp-cost,#app:not(.calc-mode) .materials-section:first-of-type .cost,#app:not(.calc-mode) .materials-section:first-of-type [class*="price"]{display:none!important}
@media(min-width:901px){.left{display:flex;flex-direction:column}.left>.panel{order:1}.left>.workflow-section{order:2}.left>.comments-section{order:4}.left>.section:not(.comments-section):not(.audit-section):not(.materials-section):not(.workflow-section){order:3}.left>.materials-section{order:5}.left>.audit-section{order:6}}
@media(max-width:900px){.toolbar{background:#fff}.tabs>button,.card-tab-wrap>button{background:#fff;border-color:var(--line);color:#657069}.calc-nav{flex:0 0 auto;padding:8px 11px;border:1px solid var(--line);border-radius:9px;font-size:12px;line-height:1;color:#526058}.workspace{padding:8px}.panel,.section{border-radius:9px}#products{padding:7px}.product-edit{padding:9px}.product-edit .pe-main{grid-template-columns:minmax(0,1fr) 52px 74px 74px 24px!important;gap:4px!important;align-items:end!important}.product-edit .pe-main>div{min-width:0!important}.product-edit .pe-main input{min-width:0!important;width:100%!important;font-size:13px!important;padding:7px 6px!important}.product-edit .pe-main label{font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.product-edit .pe-name input{font-size:14px!important;font-weight:650!important}.product-edit .pe-main>div:nth-child(2) input{font-size:14px!important}.product-edit .pe-delete{width:24px!important;min-width:24px!important;height:34px!important}.card-tab-wrap{width:auto;display:flex}.card-tab-wrap>button{flex:0 0 auto}.calc-mode-toggle{order:20;margin-top:6px}}
@media(max-width:430px){.product-edit{padding:8px 7px!important}.product-edit .pe-main{grid-template-columns:minmax(0,1fr) 48px 68px 68px 22px!important;gap:3px!important}.product-edit .pe-main input{font-size:12px!important;padding:7px 4px!important}.product-edit .pe-name input{font-size:13px!important}.product-edit .pe-main label{font-size:8px!important}.calc-nav{font-size:11px;padding:8px 9px}}
