:root{--ink:#203a36;--muted:#7c8b86;--green:#216c55;--green-dark:#174e3f;--line:#e6ece7;--bg:#f5f7f4;--orange:#af7433;--red:#b34f44;--soft:#eaf3ed;--white:#fff}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font:14px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button,select{cursor:pointer}button{transition:background .15s,transform .15s}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible{outline:3px solid #87ad98;outline-offset:3px}a{color:inherit;text-decoration:none}.shell{display:flex;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:224px;background:#fcfdfb;border-right:1px solid var(--line);padding:30px 18px 16px;display:flex;flex-direction:column;z-index:3}.brand{display:flex;gap:12px;align-items:center;padding:0 6px;font-weight:650;letter-spacing:.3px;font-size:16px}.brand small{display:block;font-size:8px;letter-spacing:1.5px;color:#7d9187;margin-top:3px}.brand-mark{display:grid;place-items:center;background:var(--green);color:#fff;border-radius:12px;width:42px;height:45px;font-family:serif;font-size:26px}.workspace-label{font-size:10px;letter-spacing:1px;color:#92a196;margin:44px 14px 12px;display:flex;justify-content:space-between}.workspace-label span{font-size:9px;letter-spacing:0}.nav-item{border:0;background:none;display:flex;align-items:center;width:100%;gap:12px;text-align:left;padding:12px 14px;margin:4px 0;border-radius:7px;color:#667c71;font-size:13px}.nav-item.active{background:#e9f1e9;color:var(--green-dark);font-weight:600}.nav-icon{font-size:18px;width:23px;height:23px;display:grid;place-items:center}.nav-count{margin-left:auto;background:#dce9dd;color:#487252;border-radius:5px;padding:0 6px;font-size:10px}.nav-section{margin:27px 14px 10px;font-size:10px;color:#99a69b;letter-spacing:1px}.side-note{margin-top:auto;padding:35px 12px 20px;color:#4e6b5c;font-size:11px}.side-note p{color:#9aa69b;font-size:10px;line-height:1.8;margin-bottom:0}.live-dot{display:inline-block;width:6px;height:6px;background:#4d9c6e;border-radius:50%;margin-right:6px}.side-bottom{font-size:10px;border-top:1px solid var(--line);padding:17px 9px 0;color:#9aa69b;display:flex;justify-content:space-between}.main-shell{margin-left:224px;width:calc(100% - 224px)}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);padding:0 38px;display:flex;align-items:center;justify-content:space-between}.crumb{font-size:12px;color:#88968e}.crumb span{margin:0 12px;color:#bbc7bc}.crumb b{font-weight:500;color:#4b6659}.top-actions{display:flex;align-items:center;gap:12px}.local-badge{font-size:10px;border:1px solid var(--line);border-radius:20px;padding:3px 10px;color:#718574}.role-label{font-size:11px;color:#94a093;margin-left:10px}.top-actions select{border:0;color:#486451;background:transparent;font-size:12px;padding:4px}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#edf0e4;color:#72835a;font-size:11px}main{max-width:1600px;margin:auto;padding:23px 38px 12px}.notice{display:flex;align-items:center;background:#f0f2e8;border:1px solid #e5e8d9;border-radius:6px;color:#8b886c;padding:8px 12px;gap:10px;margin-bottom:30px}.notice>span{background:#dfdfc6;width:19px;height:19px;display:grid;place-items:center;font-size:10px;border-radius:4px;flex-shrink:0}.notice p{font-size:11px;margin:0}.text-button{border:0;background:none;color:var(--green);font-size:12px;padding:4px;white-space:nowrap}.notice .text-button{margin-left:auto;color:#8a8867;font-size:10px}.page-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;gap:12px}.eyebrow{font-size:9px;letter-spacing:2px;color:#98a195;font-weight:600}.page-head h1{font-size:25px;font-weight:600;letter-spacing:1px;margin:3px 0 5px}.page-head p{font-size:12px;color:#8d9a8e;margin:0}.head-actions{display:flex;gap:10px;align-items:center}.button{display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:middle;line-height:20px;gap:7px;background:white;border:1px solid #dfe7de;border-radius:6px;padding:9px 14px;color:#657d6d;font-size:12px;white-space:nowrap}.button:hover{background:#f0f5ef}.button.primary{background:var(--green);border-color:var(--green);color:#fff;box-shadow:0 3px 8px #216c5510}.button.primary:hover{background:var(--green-dark)}.button.danger{color:var(--red)}input,select,textarea{border:1px solid #dfe7df;border-radius:5px;padding:8px 10px;background:#fff;color:#405d4e;outline:none;max-width:100%}input:focus,select:focus,textarea:focus{border-color:#79a68b;box-shadow:0 0 0 2px #edf4ef}input[type=date]{font-size:12px}input[type=checkbox]{accent-color:var(--green);width:16px;height:16px}.period{padding:14px 18px;display:flex;gap:10px;align-items:center;background:white;border:1px solid var(--line);border-radius:8px;margin-bottom:20px;font-size:12px}.period .dim{margin-left:auto;font-size:11px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}.metric{border:1px solid var(--line);background:white;border-radius:8px;padding:20px 21px;position:relative;overflow:hidden}.metric:first-child{background:#edf3eb;border-color:#dce7dc}.metric-label{font-size:12px;color:#7a8d7d;display:flex;justify-content:space-between;gap:10px}.metric-symbol{color:#99af9a;font-size:15px}.metric-value{font-size:29px;line-height:1.4;letter-spacing:-.6px;margin:13px 0 7px;font-variant-numeric:tabular-nums;font-weight:550}.metric-value small{font-size:12px;letter-spacing:0;margin-left:5px;color:#8da18d}.metric-foot{font-size:10px;color:#98a393}.metric-foot strong{font-weight:500;color:#638769}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:20px;margin-bottom:24px}.panel{border:1px solid var(--line);background:#fff;border-radius:8px;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:19px 21px;gap:10px}.panel-head h2{font-size:14px;font-weight:600;margin:0}.panel-head p{font-size:10px;color:#98a392;margin:3px 0 0}.panel-head small{font-size:10px;color:#a3ad9d}.flow{display:flex;padding:12px 22px 25px;gap:8px;align-items:center}.flow-step{flex:1;text-align:center;min-width:0}.flow-step .flow-n{display:grid;place-items:center;background:#f0f5ee;color:#6a8b69;border-radius:9px;width:35px;height:35px;margin:0 auto 9px;font-size:14px}.flow-step b{display:block;font-size:11px;font-weight:500}.flow-step small{font-size:9px;color:#9da895}.flow-arrow{font-size:13px;color:#c5d2bf;margin-bottom:25px}.flow-note{background:#f7f9f4;border-top:1px solid #edf1e9;padding:10px 20px;font-size:10px;color:#8a9981}.todo-list{padding:0 18px 12px}.todo{display:flex;align-items:center;gap:11px;padding:10px 0;border-top:1px solid #f0f3ec;font-size:11px;width:100%;border-left:0;border-right:0;border-bottom:0;background:white;color:#657b61;text-align:left}.todo:first-child{border-top:0}.todo .todo-icon{width:29px;height:29px;background:#f4f1e7;border-radius:6px;display:grid;place-items:center;color:#a18d58}.todo p{margin:0;flex:1}.todo small{display:block;font-size:9px;color:#a2aa97}.todo b{font-size:16px;font-weight:500;color:#8f8c58}.table-toolbar{display:flex;gap:15px;align-items:center;border-bottom:1px solid var(--line);padding:0 20px;min-height:52px;flex-wrap:wrap}.tab{align-self:stretch;border:0;background:none;border-bottom:2px solid transparent;padding:14px 0;color:#8a9b85;font-size:11px}.tab.active{border-bottom-color:var(--green);color:var(--green);font-weight:600}.tab span{font-size:9px;border-radius:4px;padding:1px 5px;background:#eff3eb;margin-left:4px}.search{margin-left:auto;display:flex;align-items:center;gap:7px;color:#a3ad98}.search input{border:0;font-size:11px;width:160px;padding:6px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left;white-space:nowrap}th{background:#fafbf8;color:#95a28b;font-size:10px;font-weight:500;padding:12px 20px;border-bottom:1px solid #edf1e9}td{font-size:11px;padding:16px 20px;border-bottom:1px solid #edf1e9;color:#6c8064}tr:last-child td{border-bottom:0}td .customer-name{color:#38533e;font-weight:550;display:block;font-size:12px}td small{display:block;font-size:9px;color:#a1ad98;margin-top:2px}.mono{font-variant-numeric:tabular-nums;letter-spacing:.3px}.amount{font-weight:600;color:#3b5d43}.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;font-size:10px;border-radius:4px;background:#eff3eb;color:#809174}.badge:before{content:'';height:4px;width:4px;border-radius:50%;background:currentColor}.badge.green{background:#eaf3e9;color:#54875b}.badge.orange{background:#fbf2e1;color:#ae8746}.badge.red{background:#faeeea;color:#b37464}.badge.blue{background:#edf2f4;color:#6d8a96}.table-end{padding:13px 20px;display:flex;justify-content:space-between;border-top:1px solid var(--line);font-size:10px;color:#a0ad96}.subtle-card{padding:20px 22px;border:1px solid var(--line);background:#fff;border-radius:8px;margin-bottom:20px}.subtle-card h3{font-size:14px;margin:0 0 8px}.subtle-card p{font-size:12px;color:#8d9c84;margin:0}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:20px}.dim{color:#97a38e}.empty{padding:40px;text-align:center;color:#99a58e;font-size:12px}.future{padding:32px;border:1px dashed #d3ddcc;border-radius:9px;margin-top:20px;background:#f9fbf6}.future h3{font-size:18px;margin:0 0 10px}.future p{max-width:650px;color:#8a9c7e;font-size:12px}.stage-list{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:25px}.stage-list>div{background:#fff;border-radius:7px;padding:20px;border:1px solid var(--line)}.stage-list small{font-size:10px;color:#9faf90}.stage-list h4{margin:8px 0;color:#5a7850;font-size:13px}footer{display:flex;justify-content:space-between;padding:23px 0 8px;font-size:9px;color:#abb5a3;gap:16px}#overlay{position:fixed;inset:0;z-index:10;background:#193d3266;backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:24px}#overlay[hidden]{display:none}#dialog{background:#fafcf9;border-radius:12px;box-shadow:0 20px 80px #102f3230;width:1060px;max-width:100%;max-height:93vh;overflow:auto;outline:none}.dialog-head{padding:22px 26px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;background:#fff;position:sticky;top:0;z-index:2}.dialog-head h2{font-size:19px;margin:3px 0 0;font-weight:600}.icon-button{background:none;border:0;font-size:25px;color:#9aa791;padding:0 8px}.dialog-content{padding:23px 26px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.field{display:flex;flex-direction:column;gap:6px;font-size:11px;color:#809476}.field input,.field select,.field textarea{width:100%;font-size:12px}.field.wide{grid-column:1 / -1}.field small{font-size:10px;color:#a4ae9b}.line-card{background:white;border:1px solid var(--line);border-radius:8px;padding:18px;margin-top:15px}.line-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:13px}.line-head select{font-size:13px;font-weight:550;width:200px}.line-data{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.weight-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}.weight-box{background:#f7faf5;border:1px solid #e9efe4;padding:12px;border-radius:6px}.weight-title{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#64815c;margin-bottom:8px}.weight-title strong{font-weight:600}.weight-labels,.weight-row{display:grid;grid-template-columns:1fr .8fr .9fr 26px;gap:7px;align-items:center}.weight-labels{font-size:9px;color:#9aa88e;margin-bottom:4px}.weight-row{margin:5px 0}.weight-row input{min-width:0;width:100%;padding:6px;font-size:11px}.weight-row button{padding:0;font-size:18px}.weight-summary{font-size:10px;color:#8da080;margin-top:10px}.diff-note{font-size:11px;color:#9a895d;background:#faf5e9;padding:9px 12px;border-radius:5px;margin-top:12px}.line-standard{font-size:11px;color:#93a285;margin-top:12px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;padding:17px 26px;background:#fff;border-top:1px solid var(--line);position:sticky;bottom:0;z-index:2}.dialog-error{background:#faeeea;color:#b36855;font-size:12px;padding:10px 14px;border:1px solid #f0dcd3;border-radius:6px;margin-bottom:16px}.dialog-error[hidden]{display:none}.callout{font-size:11px;color:#819578;background:#edf4e9;border-radius:6px;padding:12px 15px;margin-bottom:17px}.callout.warning{background:#f8f2e4;color:#998452}.section-heading{font-size:13px;margin:22px 0 10px}.settle-row{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:15px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line);font-size:12px}.settle-row input{width:100%}.receipt-summary{background:#eaf3e8;padding:17px 20px;border-radius:7px;display:flex;justify-content:space-between;margin-bottom:20px}.receipt-summary strong{font-size:22px}.receipt-summary small{display:block;font-size:10px;color:#8fa184}.check-line{display:flex;gap:10px;align-items:flex-start;font-size:12px;color:#6a805f;margin-top:20px}.check-line input{flex-shrink:0}.detail-meta{display:flex;gap:20px;flex-wrap:wrap;font-size:11px;color:#8fa080;margin:12px 0}.detail-meta b{color:#5b7750;font-weight:500}.log-list{padding:0 22px 20px}.log{display:flex;gap:14px;padding:13px 0;border-top:1px solid var(--line);font-size:11px}.log small{display:block;color:#a1b094;font-size:10px}.log .log-dot{width:8px;height:8px;border-radius:50%;background:#b2c7a3;margin-top:7px}.log b{font-weight:500}.dialog-content ul{color:#7a9070;font-size:12px;padding-left:20px}.dialog-content li{margin:10px 0}#toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#244e3d;color:#fff;padding:13px 24px;border-radius:8px;z-index:30;box-shadow:0 5px 25px #15382e22;font-size:12px;max-width:90vw}body.modal-open{overflow:hidden}.client-stats{display:flex;gap:20px;color:#91a180;font-size:10px;margin-top:8px}.toolbar-select{font-size:11px;padding:5px 8px}.help-text{color:#91a180;font-size:11px;line-height:1.9}.radio-label{display:flex;align-items:center;gap:7px;font-size:12px}.radio-label input{accent-color:var(--green)}.radio-group{display:flex;gap:22px;margin-bottom:18px}.table-action{display:flex;align-items:center;gap:8px}.tag-count{color:#809c70;font-size:10px}.back-link{font-size:11px;color:#6d895f}.statement-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.statement-head h3{margin:0;font-size:16px}.nowrap{white-space:nowrap}
@media(min-width:1500px){main{padding:28px 50px}.topbar{padding:0 50px}.dashboard-grid{grid-template-columns:minmax(0,1fr) 340px}.metric{padding:23px 25px}.metric-value{font-size:33px}td{padding-top:19px;padding-bottom:19px}}
@media(max-width:1150px){.sidebar{width:190px;padding-left:12px;padding-right:12px}.brand{font-size:14px;gap:8px}.main-shell{margin-left:190px;width:calc(100% - 190px)}main{padding:20px 24px}.topbar{padding:0 24px}.metrics{gap:10px}.metric{padding:16px}.metric-value{font-size:24px}.dashboard-grid{grid-template-columns:minmax(0,1fr) 240px}.flow{padding-left:14px;padding-right:14px}.flow-step b{font-size:10px}.notice p{font-size:10px}.notice .text-button{display:none}}
@media(max-width:850px){.sidebar{width:66px;padding:22px 8px}.brand{padding:0;justify-content:center}.brand>span:last-child,.workspace-label,.nav-item>span:not(.nav-icon),.nav-section,.side-note,.side-bottom{display:none}.brand-mark{width:36px;height:38px;font-size:23px}.nav-item{justify-content:center;padding:10px 0;margin-top:12px}.nav-item.active{border-radius:7px}.main-shell{margin-left:66px;width:calc(100% - 66px)}.topbar{height:64px;padding:0 20px}.role-label,.local-badge{display:none}main{padding:18px 18px}.metrics{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}.dashboard-grid>.panel:last-child .todo-list{display:flex;gap:20px}.todo{border-top:0}.flow{padding:14px 20px 25px}.flow-step b{font-size:11px}.two-col{grid-template-columns:1fr}.page-head h1{font-size:22px}footer span{display:none}.stage-list{grid-template-columns:1fr}.notice{margin-bottom:22px}}
@media(max-width:600px){.crumb{font-size:10px}.top-actions{gap:5px}.avatar{display:none}.page-head{align-items:flex-start;flex-direction:column;gap:15px}.head-actions{width:100%;justify-content:space-between}.period{padding:10px;font-size:11px;flex-wrap:wrap}.period .dim{display:none}.notice p{font-size:9px}.metric{padding:15px}.metric-value{font-size:22px}.metric-label{font-size:10px}.metric-foot{font-size:9px}.dashboard-grid>.panel:last-child .todo-list{display:block}.flow{gap:3px;padding-left:10px;padding-right:10px}.flow-step b{font-size:9px}.flow-step small{font-size:8px}.flow-arrow{font-size:10px}.flow-note{font-size:9px;padding:10px}.table-toolbar{gap:12px;padding:0 12px}.search{width:100%;margin:0 0 7px}.tab{padding-top:12px;padding-bottom:10px}.search input{width:100%}td,th{padding-left:12px;padding-right:12px}.panel-head{padding:16px}#overlay{padding:7px}#dialog{max-height:98vh;border-radius:8px}.dialog-content{padding:18px 15px}.dialog-head{padding:16px}.dialog-head h2{font-size:17px}.form-grid{grid-template-columns:1fr 1fr}.field.wide{grid-column:1 / -1}.weight-columns{grid-template-columns:1fr}.line-card{padding:13px}.line-data{gap:8px}.field{font-size:10px}.field input{font-size:11px;padding:7px}.dialog-actions{padding:13px 15px;flex-wrap:wrap}.settle-row{grid-template-columns:1fr 1fr;font-size:11px}.settle-row>span:first-child{grid-column:1 / -1}.radio-group{flex-direction:column;gap:8px}.detail-meta{gap:9px}.receipt-summary strong{font-size:18px}.table-end{font-size:9px}footer{font-size:8px}}
/* Daily worksheets: keep every routine cell visible and editable. */
.sheet-filters{display:flex;align-items:flex-end;gap:16px;padding:15px 18px;background:#fff;border:1px solid var(--line);border-radius:8px;margin-bottom:18px;flex-wrap:wrap}.sheet-filters label{display:flex;flex-direction:column;gap:5px;font-size:10px;color:#8c9f81}.sheet-filters input,.sheet-filters select{font-size:12px;padding:7px 10px;min-height:35px}.sheet-filters input[type=date]{width:155px}#sheet-batch{width:170px}.sheet-search{margin-left:auto}.sheet-search input{width:190px}.sheet-error{border:1px solid #e9c8b9;background:#fff1e9;color:#b06a4d;padding:13px 17px;border-radius:6px;font-size:12px;margin-bottom:18px}.sheet-error[hidden]{display:none}.sheet-table-caption{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--line);gap:15px}.sheet-table-caption b{font-size:12px;font-weight:550}.sheet-table-caption>span{font-size:10px;color:#97a58a}.sheet-scroll{max-height:69vh;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b7c8ac #f4f7ef}.worksheet{border-collapse:separate;border-spacing:0;width:100%;font-variant-numeric:tabular-nums}.worksheet thead th{position:sticky;top:0;z-index:2;background:#f0f5ec;color:#6f8661;padding:11px 8px;font-size:11px;border-bottom:1px solid #d8e3d3;font-weight:500}.worksheet th small{display:block;font-size:9px;color:#9aab8c;margin-top:4px}.worksheet td{padding:8px;border-bottom:1px solid #e8eee3;vertical-align:top;font-size:12px}.worksheet td small{display:block;font-size:9px;line-height:1.5;color:#9ead92;margin-top:4px;font-weight:400}.worksheet tbody tr:hover>td{background:#f8fbf4}.worksheet tbody td:focus-within{background:#f1f7ec}.worksheet .grid-input{padding:7px 6px;border:1px solid #e0e9d8;border-radius:3px;color:#385f37;min-width:0;width:100%;font-size:13px;line-height:1.4;text-align:right;background:#fff;box-shadow:none;font-variant-numeric:tabular-nums;height:34px}.worksheet .grid-input:hover:not(:disabled){border-color:#abc59a}.worksheet .grid-input:focus{outline:2px solid #729963;outline-offset:-1px;background:#fffdf5}.worksheet .grid-input:disabled{color:#8e9c80;background:#f7f9f3;border-color:transparent;cursor:default;opacity:1}.worksheet .cell-changed:not(:disabled){background:#fffbea;border-color:#e5d9a5}.worksheet .freeze-client,.worksheet .freeze-product{position:sticky;left:0;z-index:1;background:#fff;border-right:1px solid #e1e9da;box-shadow:3px 0 5px #355c3306;text-align:left;min-width:165px;width:165px}.worksheet th.freeze-client,.worksheet th.freeze-product{z-index:3;background:#f0f5ec}.worksheet .freeze-client strong,.worksheet .freeze-product strong{font-size:12px;font-weight:550;color:#46643b}.worksheet.matrix{min-width:920px}.worksheet.matrix td:not(.freeze-client){min-width:90px}.worksheet.matrix td:last-child{min-width:105px}.worksheet.matrix tfoot th,.worksheet.matrix tfoot td{position:sticky;bottom:0;background:#eef4e8;border-top:1px solid #d8e4cc;border-bottom:0;font-size:12px;padding:12px 8px;z-index:2}.worksheet.matrix tfoot th.freeze-client{z-index:3}.worksheet.processing{min-width:990px}.worksheet.processing .freeze-product{min-width:165px;width:165px}.worksheet.processing td:nth-child(2){min-width:55px}.worksheet.processing td:nth-child(3){min-width:70px;width:70px}.worksheet.processing td[data-line-diff]{min-width:70px;text-align:right;padding-top:17px;color:#ac8551}.worksheet.processing td[data-line-amount]{min-width:100px;text-align:right;padding-top:15px}.worksheet.processing td[data-driver-net]{min-width:80px;text-align:right;padding-top:17px}.worksheet.processing.account{min-width:1170px}.worksheet.account td:has([data-field=price]){min-width:80px;width:80px}.worksheet.account td:has([data-field=agreed_net]){min-width:90px;width:90px}.worksheet .source-cell{min-width:220px;width:245px;border-left:1px solid #eff3e9}.worksheet .source-heading{text-align:center}.mini-labels,.weight-inline{display:grid;grid-template-columns:minmax(70px,1.2fr) minmax(45px,.7fr) minmax(52px,.8fr);gap:5px;position:relative}.mini-labels{font-size:9px;color:#a0ae92;margin-bottom:4px;text-align:right;padding-right:4px}.weight-inline+.weight-inline{margin-top:6px}.weight-inline .grid-input{font-size:12px;height:32px}.weight-cell-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:6px;gap:6px;min-height:17px}.weight-cell-bottom>span{font-size:10px;color:#8fa17e}.weight-cell-bottom>button{font-size:9px;border:0;color:#749562;background:none;padding:0;white-space:nowrap}.remove-inline{position:absolute;right:-7px;top:-7px;border:0;border-radius:50%;height:15px;width:15px;padding:0;background:#eedace;color:#a77257;font-size:12px;line-height:15px;z-index:1}.pack-note{text-align:center;color:#a4b095;vertical-align:middle!important;font-size:11px!important}.grid-select{font-size:11px;padding:7px 4px;min-width:91px;min-height:34px;background:#fafcf7}.grid-select:disabled{border-color:transparent;color:#94a38a;background:#f7f9f3;opacity:1;cursor:default}.sheet-groups{display:flex;flex-direction:column;gap:20px}.client-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;gap:20px;background:#fff;border-bottom:1px solid #e3eadc}.client-sheet-head h2{margin:0;font-size:15px;font-weight:600}.client-sheet-head>div>span{font-size:10px;color:#96a889;display:block;margin-top:4px}.client-sheet-total{text-align:right;flex-shrink:0}.client-sheet-total small{display:block;color:#9dac92;font-size:9px}.client-sheet-total strong{display:block;font-size:21px;font-weight:550;color:#427241}.client-sheet-actions{padding:12px 18px;display:flex;align-items:flex-end;gap:12px;border-top:1px solid #e6ecdf;background:#fbfcf8;flex-wrap:wrap}.client-reason{display:flex;flex-direction:column;gap:5px;flex:1;min-width:210px;font-size:10px;color:#8e9f81}.client-reason input{width:100%;font-size:11px;padding:7px 10px;background:white}.client-reason input:disabled{border-color:transparent;background:#f7f9f3;color:#97a68a}.client-sheet-actions .button{font-size:11px;padding:8px 12px}.client-review{margin:0;align-items:center;font-size:11px}.sheet-help{display:flex;gap:15px;justify-content:space-between;font-size:10px;color:#a3b095;margin-top:15px}.worksheet-panel .table-end{font-size:9px}.sheet-wide .sidebar{width:66px;padding:22px 8px}.sheet-wide .brand{padding:0;justify-content:center}.sheet-wide .brand>span:last-child,.sheet-wide .workspace-label,.sheet-wide .nav-item>span:not(.nav-icon),.sheet-wide .nav-section,.sheet-wide .side-note,.sheet-wide .side-bottom{display:none}.sheet-wide .nav-item{justify-content:center;padding:10px 0}.sheet-wide .main-shell{margin-left:66px;width:calc(100% - 66px)}.sheet-wide main{max-width:none;padding-left:18px;padding-right:18px}.sheet-wide .topbar{padding-left:20px;padding-right:20px}.sheet-help button{border:0;background:transparent;color:#698a56;font-size:11px}.wide-button{font-size:10px;border:0;background:#eef4e8;padding:4px 9px;border-radius:4px;color:#789166}.page-head:has(+.sheet-filters){align-items:flex-start}.page-head:has(+.sheet-filters) .head-actions{flex-wrap:wrap;justify-content:flex-end;max-width:55%}
@media(max-width:1100px){.sheet-filters{gap:12px}.sheet-search{margin-left:0}.sheet-help{flex-direction:column;gap:4px}.page-head:has(+.sheet-filters){flex-direction:column}.page-head:has(+.sheet-filters) .head-actions{max-width:none;justify-content:flex-start}.sheet-table-caption>span{display:none}.client-sheet-total strong{font-size:18px}}
@media(max-width:600px){.sheet-filters{padding:10px;gap:10px}.sheet-filters label{flex:1;min-width:125px}.sheet-filters input,.sheet-filters select,.sheet-search input,#sheet-batch{width:100%}.sheet-filters input[type=date]{width:100%}.worksheet .freeze-client,.worksheet .freeze-product,.worksheet.processing .freeze-product{min-width:130px;width:130px}.client-sheet-head{padding:13px}.client-sheet-head h2{font-size:13px}.client-sheet-total strong{font-size:16px}.client-sheet-head>div>span{font-size:9px}.client-sheet-actions{padding:12px}.sheet-scroll{max-height:65vh}.sheet-help{font-size:9px}.sheet-wide main{padding:18px 10px}.page-head:has(+.sheet-filters) .head-actions{gap:8px}.page-head:has(+.sheet-filters) .button{font-size:10px;padding:8px 10px}}
.client-settlement-notes{flex-basis:100%;font-size:11px;color:#8b9d7c;line-height:1.8}.client-settlement-notes p{margin:0 0 4px}.client-settlement-notes b{font-weight:500;color:#6f895f;margin-right:7px}
.sheet-scroll{overscroll-behavior:auto}
[hidden]{display:none!important}
.invalid-cell{border-color:#c86250!important;background:#fff1ed!important;outline:1px solid #c86250!important;outline-offset:0;box-shadow:0 0 0 2px #c8625012!important}.worksheet input[type=checkbox].invalid-cell{outline:2px solid #c86250!important;outline-offset:2px}.field-error{display:block;grid-column:1 / -1;font-size:10px!important;line-height:1.55;color:#b75040!important;white-space:normal;min-width:70px;max-width:240px;margin-top:5px}.weight-inline>.field-error{max-width:none;min-width:180px}.invalid-row>td{background:#fff5ef!important}.row-error-hint{display:block;border:0;background:#fff0e6;color:#b26443;font-size:10px;padding:5px 7px;white-space:normal;text-align:left;max-width:150px;margin-top:6px;line-height:1.5}.sheet-error>ol,.dialog-error>ol{padding-left:20px;margin:6px 0 0;max-height:185px;overflow:auto}.sheet-error li,.dialog-error li{margin:3px 0}.sheet-error li button,.dialog-error li button{border:0;background:none;text-align:left;color:#a64e39;padding:2px 0;font-size:11px;line-height:1.6}.sheet-error li button:hover,.dialog-error li button:hover{text-decoration:underline}.sheet-error>b,.dialog-error>b{font-size:12px;font-weight:600}.not-shipped-label{display:flex;gap:4px;align-items:center;color:#8f9d80;font-size:9px;margin-top:6px;white-space:nowrap}.not-shipped-label input{width:12px;height:12px;padding:0;margin:0;accent-color:#37754e}.not-shipped-label:has(input:checked){color:#417548}.not-shipped-label:has(input:disabled){color:#b5bdae}.not-shipped-label>.field-error{white-space:normal}.pricing-mode{display:flex;gap:8px;align-items:center;margin-left:auto}.worksheet.pricing-matrix{min-width:850px}.pricing-matrix .inherited-rule .grid-input:not(:focus):not(.cell-changed):not(.invalid-cell){color:#97a589;background:#f8faf5}.pricing-matrix td{min-width:110px}.pricing-matrix td>small{text-align:right}.worksheet.matrix .field-error{max-width:140px}.field:has(.invalid-cell){color:#ae5a47}#product-form .field-error{font-size:11px!important}#master-error{scroll-margin-top:20px}

.sheet-date-control{display:flex;align-items:flex-end;gap:8px}.sheet-date-shortcuts{display:flex;flex-direction:column;gap:3px;padding-bottom:2px}.sheet-date-shortcuts .text-button{white-space:nowrap;font-size:11px;padding:1px 4px}.sheet-date-shortcuts .selected{background:#e9f1e9;border-radius:4px;color:var(--green-dark);font-weight:600}.settlement-todos .table-wrap{overflow:auto}.settlement-todos td{white-space:nowrap}.settlement-todos .text-button{margin-right:12px}

.dispatch-trips input,.dispatch-trips select{width:100%;min-width:110px}.dispatch-trips td:first-child{min-width:180px}.dispatch-sequence{width:85px}.dispatch-load .panel-head p{max-width:600px}.dispatch-stop,.dispatch-pending{padding:12px 20px;border-top:1px solid var(--line);font-size:12px}.dispatch-stop h3{font-size:13px;color:var(--green-dark);margin:0 0 7px}.dispatch-stop p{margin:7px 0;display:flex;flex-wrap:wrap;gap:7px 15px}.dispatch-stop p strong{min-width:90px}.dispatch-stop p small{flex-basis:100%;color:var(--muted)}.dispatch-pending p{margin:5px 0}#dispatch-summary .dispatch-load{margin-top:18px}.dispatch-load .panel-head{flex-wrap:wrap;gap:12px}

.product-sort-table{min-width:1000px}.product-sort-table td:first-child{width:90px}.product-sort-table select{min-width:78px;padding:6px 8px}.product-sort-actions{display:flex;flex-wrap:wrap;gap:4px 10px;min-width:140px;max-width:190px}.product-sort-actions .text-button{white-space:nowrap;font-size:11px;padding:2px 0}
.date-range-controls{display:block;flex-basis:100%;width:100%;background:#fff;border:1px solid var(--line);border-radius:8px;padding:16px 18px}.range-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.range-caption{display:block;font-size:10px;color:var(--muted);margin-bottom:4px}.range-heading strong{font-size:16px;font-weight:600;letter-spacing:.2px}.range-heading small{display:inline-block;font-size:10px;color:var(--muted);margin-left:12px}.date-range-controls label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:var(--muted)}.range-heading label{min-width:140px}.range-shortcuts{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.range-chip{background:#f5f7f4;border:1px solid transparent;border-radius:5px;color:#5e7669;font-size:12px;padding:7px 12px;white-space:nowrap}.range-chip:hover{background:#eaf1e9}.range-chip.selected{background:var(--green);border-color:var(--green);color:#fff}.range-edit-chip{background:white;border-color:#dfe7de}.range-shortcut-divider{width:1px;height:22px;background:var(--line);margin:0 3px}.range-editor{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;background:#f7f9f5;border-radius:6px;padding:14px;margin-top:12px}.range-editor-label{font-size:11px;font-weight:600;color:#5c7766;align-self:center;margin-right:4px}.range-editor input[type=date]{width:156px;min-width:140px}.range-editor #range-year{width:110px}.range-editor #range-month{width:90px}.range-divider{align-self:center;color:var(--muted);font-size:12px;margin-top:18px}.range-rolling{display:flex;align-items:flex-end;gap:8px;margin:10px 0 0;padding:0 14px;border:0}.range-rolling #range-days{width:80px}.range-note{font-size:10px;color:var(--muted);margin:11px 0 0}.range-error{color:var(--red);font-size:12px;margin-top:10px}.bulk-actual-fill{display:flex;align-items:center;gap:6px;background:white;border:1px solid var(--line);border-radius:5px;padding:10px;font-size:12px;white-space:nowrap}
@media(max-width:800px){.range-heading{align-items:flex-start}.range-heading small{display:block;margin:3px 0 0}.range-shortcuts{gap:5px}.range-chip{padding:7px 9px}.range-rolling{margin:0;border:0;padding:0}.range-editor input[type=date]{min-width:0;width:145px}.range-editor-label{flex-basis:100%}}@media(max-width:520px){.range-heading{flex-wrap:wrap}.range-shortcut-divider{display:none}.range-heading strong{font-size:14px}}
.full-shipped-label{color:#47765a}.worksheet.order-matrix{width:max-content;min-width:100%;table-layout:fixed}.order-matrix col.client-col{width:180px}.order-matrix col.product-col{width:130px}.order-matrix col.progress-col{width:110px}.worksheet.order-matrix th:not(.freeze-client),.worksheet.order-matrix td:not(.freeze-client){width:130px;min-width:130px;max-width:180px}.worksheet.order-matrix .freeze-client{width:180px;min-width:180px}.worksheet.order-matrix th{font-size:13px;white-space:normal;overflow-wrap:anywhere}.worksheet.order-matrix .grid-input{font-size:15px;min-width:105px}.sheet-scroll{scrollbar-width:auto;scrollbar-gutter:stable}.main-shell{min-width:0}#content{min-width:0}

.trip-driver-picker{min-width:160px;max-height:115px;overflow-y:auto;display:flex;flex-direction:column;gap:5px}.trip-driver-picker label{display:flex;gap:5px;align-items:center;white-space:nowrap;font-size:12px}.trip-driver-picker input[type=checkbox]{width:14px;min-width:14px;height:14px;accent-color:var(--green)}

.daily-client-total td{background:#edf3ef;font-weight:600}.matrix-original td{background:#fafbf9}.matrix-original .freeze-client{padding-left:22px}
/* Keep all feature navigation reachable within the fixed sidebar. */
#nav{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin}.sidebar>.brand,.sidebar>.workspace-label,.sidebar>.side-note,.sidebar>.side-bottom{flex-shrink:0}

#customer-location-help{grid-column:1 / -1;margin:0}#customer-form>.help-text{margin:0 0 18px}
#customer-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:520px){#customer-form .form-grid{grid-template-columns:1fr}}

.range-edit-chip.selected{background:#eaf3ed;border-color:#a9c5b3;color:var(--green-dark)}
/* Daily demand, manual allocation, and prominent customer headings. */
.demand-cards{display:flex;flex-wrap:wrap;gap:12px;padding:14px 20px}.demand-cards>div{min-width:104px;flex:1;border:1px solid var(--line);border-radius:6px;padding:10px 12px;background:#f5f8f1}.demand-cards span{display:block;font-size:12px;color:#455442}.demand-cards strong{display:inline-block;font-size:25px;line-height:1.5;color:#244b36;margin-right:6px;font-variant-numeric:tabular-nums}.demand-cards small{font-size:12px}.order-demand{margin-bottom:18px}.warehouse-stock input{width:100%;min-width:80px;max-width:130px;font-size:15px}.warehouse-stock td,.warehouse-stock th{font-size:14px}.warehouse-stock .demand-number{font-size:21px;font-weight:750;color:#234d36}.shortage{color:#a13024!important;font-weight:700}.allocation-table{min-width:1200px}.allocation-table th,.allocation-table td{min-width:95px}.allocation-table .freeze-client{min-width:170px}.allocation-table input[data-allocation-customer]{min-width:180px}.allocation-demand{display:block;color:#314b39;font-size:14px;margin-bottom:4px}.allocated-reference{font-weight:700;color:#305b42!important}.client-sheet-head.prominent-client-head{background:#e2ecdf;border-left:6px solid #345e43;padding:16px 20px;border-bottom:2px solid #a2b59a}.prominent-client-head h2{font-size:24px;font-weight:800;color:#183e29;letter-spacing:.04em}.prominent-client-head span{font-size:13px;color:#3f5542}.fleet-in-dispatch{margin-top:26px;border-top:1px solid var(--line);padding-top:18px}.fleet-in-dispatch>summary{font-size:17px;font-weight:700;cursor:pointer;color:#264b34;padding:8px 0 16px}.fleet-in-dispatch .head-actions{justify-content:flex-start}.warehouse-stock .panel-head p{max-width:none}

.matrix-market-heading th{background:#e4eee2;color:#294c36;font-size:13px;font-weight:700;padding:9px 12px;text-align:left}.warehouse-stock th small{display:block;font-size:11px;color:#7c8b86}.warehouse-stock+.panel{margin-top:18px}

/* Only the header freezes; market section rows scroll with their customers. */
.worksheet tbody th{position:static;z-index:auto}.worksheet thead th{position:sticky;top:0;z-index:4}.worksheet thead th.freeze-client,.worksheet thead th.freeze-product{z-index:5}.worksheet .matrix-market-heading th{position:static;background:#e4eee2;color:#294c36;font-size:13px;font-weight:700;padding:9px 12px;text-align:left}.worksheet.allocation-table{width:max-content;min-width:100%;table-layout:fixed}.allocation-table col.client-col{width:180px}.allocation-table col.product-col{width:130px}.allocation-table col.progress-col{width:210px}.worksheet.allocation-table td:not(.freeze-client){min-width:130px}.allocation-table .freeze-client{min-width:180px;width:180px}.allocation-table .allocation-demand{font-size:11px;font-weight:500;color:#74876b}.allocation-table tfoot th,.allocation-table tfoot td{position:sticky;bottom:0;z-index:3;background:#eef4e8;border-top:1px solid #d8e4cc;padding:12px 8px}.allocation-table tfoot .freeze-client{z-index:4}.warehouse-allocation{margin-top:18px}.warehouse-stock-wrap{max-height:48vh;overflow:auto}.warehouse-stock-wrap thead th{position:sticky;top:0;z-index:2;background:#f0f5ec}
#leave-overlay{position:fixed;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;background:#193d3266;padding:24px}#leave-overlay[hidden]{display:none}.leave-dialog{width:520px;max-width:100%;background:white;border-radius:10px;padding:24px;box-shadow:0 20px 70px #193d3233}.leave-dialog h2{font-size:20px;margin:0 0 12px}.leave-dialog p{font-size:13px;color:#5b715f}.leave-dialog ul{font-size:13px;padding-left:20px;color:#35563d}.leave-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:20px}.leave-error{color:#a4382c;background:#fff1ed;font-size:13px;padding:10px;border-radius:5px}.leave-error[hidden]{display:none}

#save-status[data-state=error]{color:#ab362b}#save-status[data-state=dirty]{color:#99712c}#save-status[data-state=saved]{color:#346747}.warehouse-allocation .sheet-table-caption p{font-size:10px;color:#7e9073;white-space:normal;margin:0}.allocation-table .progress-col{width:210px}
/* Stock movements and return custody */
.return-strip{display:flex;flex-wrap:wrap;align-items:center;gap:10px 22px;padding:16px 22px;background:#f4f7ed;border-bottom:1px solid var(--line,#dde3d6)}
.return-strip small{flex-basis:100%;color:#59644f}.return-strip b{font-size:15px}.check-line{display:flex;align-items:flex-start;gap:9px;padding:10px 0;line-height:1.65}.check-line input{width:18px;height:18px;flex:none;margin-top:3px}.warehouse-stock{min-width:1450px}.warehouse-stock td input{min-width:80px}.warehouse-stock td input[data-field="loss_reason"]{display:block;margin-top:5px;font-size:12px}.form-grid .wide{grid-column:1/-1}.return-strip+ .table-wrap{border-top:0}
/* Workflow stages use the document scroll; complete order and stock matrices fit the page. */
.workflow-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:7px;background:#e9efe7;border-radius:9px}.workflow-tabs button{border:0;background:transparent;color:#677c5d;border-radius:6px;padding:10px 16px;font-size:13px;line-height:1.5}.workflow-tabs button.active{background:white;color:#255b3e;font-weight:650;box-shadow:0 1px 5px #213b2510}.expanded-table,.warehouse-tab-panel .table-wrap{max-height:none!important;height:auto!important;overflow:visible!important;scrollbar-gutter:auto;overscroll-behavior:auto}.panel:has(.expanded-table),.warehouse-tab-panel .panel{overflow:visible}.expanded-table table.worksheet,.expanded-table .warehouse-stock{width:100%;min-width:0;max-width:100%;table-layout:fixed}.expanded-table .order-matrix col.client-col,.expanded-table .allocation-table col.client-col{width:140px}.expanded-table .order-matrix col.product-col,.expanded-table .allocation-table col.product-col{width:auto}.expanded-table .order-matrix col.progress-col{width:110px}.expanded-table .allocation-table col.progress-col{width:110px}.expanded-table .worksheet th,.expanded-table .worksheet td,.expanded-table .worksheet td:not(.freeze-client),.expanded-table .worksheet th:not(.freeze-client),.expanded-table .worksheet .freeze-client{min-width:0;max-width:none;width:auto;overflow-wrap:anywhere;white-space:normal;padding:8px 5px}.expanded-table .worksheet .grid-input{min-width:0;width:100%;font-size:13px;padding:6px 3px}.expanded-table .worksheet .freeze-client{position:static}.expanded-table .worksheet thead th{position:sticky;top:0;z-index:4}.expanded-table .worksheet tfoot th,.expanded-table .worksheet tfoot td{position:static}.expanded-table .warehouse-stock th,.expanded-table .warehouse-stock td{min-width:0;padding:8px 5px;font-size:12px;white-space:normal;overflow-wrap:anywhere}.expanded-table .warehouse-stock td input{width:100%;min-width:0;font-size:13px;padding:6px 3px}.expanded-table .warehouse-stock th:first-child{width:90px}.warehouse-tab-panel .panel-head p{max-width:100%;line-height:1.8}.warehouse-tab-panel .panel+.panel{margin-top:18px}body[data-current-page="orders"] main,body[data-current-page="allocation"] main{max-width:none}.expanded-table .worksheet .matrix-market-heading th{position:static}.expanded-table .allocation-table td:last-child input{width:100%;min-width:0}.field[hidden]{display:none!important}.table-action{flex-wrap:wrap}
.warehouse-tab-panel table{table-layout:fixed;width:100%}.warehouse-tab-panel th,.warehouse-tab-panel td{overflow-wrap:anywhere;min-width:0}.warehouse-tab-panel .worksheet thead th{overflow-wrap:anywhere}.warehouse-tab-panel .panel-head{flex-wrap:wrap}
.expanded-table .worksheet thead th.freeze-client{position:sticky;top:0;left:auto;z-index:5}
.allocation-overview{position:sticky;top:0;z-index:7;background:#f5f7f4;padding:8px 0 12px;margin-bottom:12px;box-shadow:0 5px 10px #203a3610}.allocation-overview-title{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:8px;font-size:13px}.allocation-overview-title span{font-size:11px;color:#778571}.allocation-progress-cards{display:grid;gap:6px;grid-template-columns:repeat(9,minmax(0,1fr))}.allocation-progress-cards article{min-width:0;border:1px solid #dae4d3;background:white;border-radius:6px;padding:8px 6px;overflow-wrap:anywhere}.allocation-progress-cards b{display:block;font-size:12px;color:#385b35}.allocation-progress-cards small{display:block;font-size:10px;line-height:1.7;color:#73836b}.allocation-progress-cards strong{display:block;font-size:12px;color:#287447;margin:5px 0}.allocation-progress-cards article.shortage{border-color:#d99b80;background:#fff5ed}.allocation-progress-cards article.shortage strong{color:#b55235}.warehouse-allocation .allocation-demand{display:block}.warehouse-allocation [data-allocation-reduction]{color:#527846}.warehouse-tab-panel .warehouse-allocation .worksheet thead th{top:var(--allocation-overview-height,165px)}.order-demand .demand-cards p{font-size:11px;line-height:1.8;color:#74856b;margin:8px 0 0}.order-demand .demand-cards p.shortage{color:#b24c34;background:#fff1e8;padding:5px;border-radius:4px}.allocation-overview .shortage{color:#b24c34}
body[data-current-page="allocation"] .page-head{align-items:flex-start;flex-wrap:wrap}body[data-current-page="allocation"] .page-head>.head-actions{width:100%;justify-content:flex-end;max-width:none}.order-demand .demand-cards>div{min-width:145px}.allocation-overview-title{flex-wrap:wrap}

.order-inventory-list{padding:0 20px;overflow-x:auto}.order-inventory-list table{width:100%;border-collapse:collapse;min-width:760px;font-size:14px}.order-inventory-list thead th{background:#f0f5ee;color:#52634e;font-size:12px;font-weight:600;white-space:nowrap}.order-inventory-list th,.order-inventory-list td{padding:12px 14px;border-bottom:1px solid #e6ece2;text-align:left}.order-inventory-list tbody th{color:#254b35;font-size:15px;white-space:nowrap}.order-inventory-list th small{font-weight:400;color:#819078;margin-left:6px;font-size:12px}.order-inventory-list .inventory-number{text-align:right;font-variant-numeric:tabular-nums}.order-inventory-list thead th:nth-child(n+2):nth-child(-n+6){text-align:right}.order-inventory-list tbody tr:nth-child(even){background:#fafcf8}.order-inventory-list tbody tr:hover{background:#f1f6ed}.inventory-status{display:inline-block;font-size:12px;padding:5px 9px;border-radius:5px;line-height:1.5}.inventory-status.shortage{background:#fff0e8}.inventory-sufficient{background:#edf5e9;color:#3d6b35}.inventory-pending{color:#8c6a35}.inventory-status.inventory-pending{background:#faf4e7}.order-inventory-note{font-size:12px;color:#74816c;padding:12px 20px 16px;margin:0;line-height:1.7}

.order-demand + .worksheet-panel .sheet-table-caption{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.order-demand + .worksheet-panel .sheet-table-caption>.button{margin-left:auto;flex-shrink:0}

.dispatch-submit-panel{margin-top:22px;border:1px solid #d9b98b;border-left:4px solid #a97832;padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:24px;background:#fffcf6}.dispatch-submit-panel h2{font-size:17px;color:#765322;margin:0 0 8px}.dispatch-submit-panel p{font-size:13px;line-height:1.8;color:#6b685e;margin:0}.dispatch-submit-panel .dispatch-correction{margin-top:10px;color:#825d31}.dispatch-submit-button{background:#fff7e8;border-color:#b68a4e;color:#79521e;white-space:nowrap;flex-shrink:0}.dispatch-submit-button:hover{background:#f6e8cf}@media(max-width:760px){.dispatch-submit-panel{align-items:flex-start;flex-direction:column;gap:14px}}

/* ERP business navigation and module directory. */
.workspace-label{margin-top:24px;margin-bottom:8px}.erp-nav-group{margin-bottom:10px}.erp-nav-group .nav-section{font-size:11px;letter-spacing:.12em;font-weight:700;color:#819087;padding:10px 12px 5px;margin:0}.erp-nav-group .nav-item{margin-bottom:2px;padding-top:9px;padding-bottom:9px;font-size:13px}.erp-process{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#eaf2ec;border:1px solid #d6e5da;border-radius:8px;padding:18px 22px;margin-bottom:22px}.erp-process span{font-weight:650;color:#2a5a41}.erp-process i{font-style:normal;color:#8ba18f}.erp-module-groups{display:grid;gap:20px}.erp-module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;padding:0 20px 20px}.erp-module-card{position:relative;border:1px solid var(--line);border-radius:8px;background:#fff;text-align:left;padding:20px;color:var(--ink)}.erp-module-card:hover{background:#f5faf4;border-color:#a3bba8}.erp-module-card strong{display:block;font-size:16px;margin:8px 0}.erp-module-card p{font-size:13px;color:#7b897f;line-height:1.7;margin:0 0 18px}.erp-module-icon{color:#398061;font-size:22px}.erp-module-link{font-size:12px;color:#357453}.erp-access-status{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:22px}.erp-access-status>div{padding:20px;background:white;border:1px solid var(--line);border-radius:8px}.erp-access-status small{display:block;color:#7c8b80;margin-bottom:8px}.erp-access-status strong{font-size:16px}.erp-access-table{width:100%}.erp-access-table th,.erp-access-table td{padding:13px 20px}.erp-access-table td:nth-child(n+3),.erp-access-table thead th:nth-child(n+3){text-align:center}.erp-access-table tbody th{text-align:left;font-weight:500}.access-allowed{color:#2f7950}.erp-access-roadmap{padding:22px;margin-top:22px}.erp-access-roadmap h2{font-size:17px;margin:0 0 10px}.erp-access-roadmap p{color:#6e7e72;line-height:1.9}.sheet-wide .erp-nav-group{margin-bottom:0}@media(max-width:760px){.erp-access-status{grid-template-columns:1fr}.erp-process{gap:8px}.erp-module-grid{grid-template-columns:1fr}}

.review-summary{display:flex;gap:20px;flex-wrap:wrap;padding:14px 18px;background:#edf4ee;border-radius:6px;margin:14px 0}.review-summary b{display:block;color:#245b3d}.review-order{border:1px solid var(--line);border-radius:7px;padding:16px;margin:16px 0}.review-order h3{font-size:15px;margin:0 0 12px}.review-order h3 small{display:block;color:#82907f;font-size:11px;font-weight:400}.review-order>p,.review-returns p{font-size:12px;color:#63755f}.review-compare-table{min-width:800px;width:100%;font-size:12px}.review-compare-table td,.review-compare-table th{padding:10px;white-space:nowrap}.review-history{margin:14px;padding:14px 18px;background:#fff9ef;border-left:3px solid #b88c4b}.review-history h3{font-size:13px;margin:0 0 8px}.review-history>div{padding:8px 0;border-bottom:1px solid #eddfc8}.review-history span,.review-history small{display:block;font-size:11px;color:#8b7c63}.review-history p{font-size:12px;margin:4px 0}.review-returns{padding:16px;border:1px solid var(--line);border-radius:6px;margin:16px 0}.review-returns h3{font-size:14px}.review-returns small{color:#819079;font-size:11px}#dialog:has(#review-form),#dialog:has(#review-client-form){width:min(1100px,96vw);max-width:1100px}
#statement-image-preview section{margin:18px 0;padding:14px;background:#eef3ed;border-radius:8px}#statement-image-preview img{display:block;max-width:100%;height:auto;margin-top:14px;background:white;border:1px solid #dce5da}#dialog:has(#statement-image-preview){width:min(1000px,96vw);max-width:1000px}

.statement-parties{border:1px solid #dce3e8;border-radius:6px;margin:16px 0;padding:16px}.statement-parties .check-line{margin-top:14px}.statement-version-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:16px 0;border-bottom:1px solid var(--line)}.statement-version-controls label{display:flex;gap:8px;align-items:center}.statement-version-controls select{max-width:500px}
.statement-share-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.statement-share-panel textarea{display:block;width:100%;font-size:14px;line-height:1.8;resize:vertical;background:white;border:1px solid #d8e0e7;padding:12px}.statement-share-panel small{display:block;color:#748078;margin-top:8px}.statement-share-panel details{margin-top:10px;font-size:12px;color:#7f8a83}.statement-share-panel details p{overflow-wrap:anywhere}
/* Shared business table alignment: readable names, comparable numbers, clear controls. */
table [data-align="left"]{text-align:left!important}table [data-align="center"]{text-align:center!important}table [data-align="right"]{text-align:right!important;font-variant-numeric:tabular-nums}table [data-align="center"] .table-action{justify-content:center}table [data-align="center"] select{text-align:center}table [data-align="right"] input:not([type="checkbox"]):not([type="radio"]){text-align:right}#dialog:has(#statement-batch-form){width:min(1150px,96vw);max-width:1150px}.operator-users-panel{margin-bottom:22px}#statement-batch-list>p{color:#71806c;font-size:12px}.statement-parties select{min-height:42px}
[hidden]{display:none!important}
#auth-screen{min-height:100vh;display:grid;place-items:center;background:#f2f5f3;padding:24px}
.auth-card{width:min(460px,100%);background:white;padding:38px;border:1px solid #dce5df;border-radius:16px;box-shadow:0 12px 40px #153d2312}
.auth-card .brand-mark{margin-bottom:24px}.auth-card h1{font-size:24px;margin:0 0 12px}.auth-card p{line-height:1.7;color:#68786f}.auth-card .field{margin:18px 0}.auth-card input{min-height:44px}.auth-card .button{margin:8px 8px 16px 0}.auth-card small{color:#76867b;line-height:1.6}.auth-card .auth-error{color:#ad4432;min-height:20px}
.role-permissions-panel{padding:22px;margin:20px 0}.role-permissions-panel .head-actions{justify-content:flex-start}.permission-quick-actions{display:flex;gap:10px;margin:14px 0}.permission-module{padding:16px 0;border-bottom:1px solid #e1e8e3}.permission-module-title{font-weight:700;display:flex;gap:9px;align-items:center}.permission-module-actions{display:flex;gap:14px 24px;flex-wrap:wrap;padding:14px 0 0 26px}.permission-module-actions label{display:flex;gap:8px;align-items:center;line-height:1.6}.permission-module input{accent-color:#246d55;width:16px;height:16px}.permission-module small{color:#78877d}

/* Consistent alignment across all business tables and editable grids. */
body table th,body table td,body table th *,body table td *{text-align:center!important;vertical-align:middle}
body table [data-align="left"],body table [data-align="left"] *{text-align:left!important}
body table [data-align="right"],body table [data-align="right"] *{text-align:right!important}
body table td input,body table td select,body table th input{margin-inline:auto}
body table .table-action,body table .sheet-row-actions{justify-content:center}
.home-workflow{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;padding:20px}
.home-task{display:flex;flex-direction:column;gap:9px;text-align:left;background:#f7faf5;border:1px solid var(--line);border-radius:8px;padding:18px;color:var(--green);cursor:pointer}
.home-task:hover{background:#edf4e9;border-color:#8eaa7c}.home-task strong{font-size:16px}.home-task p{margin:0;line-height:1.7;color:#75866d;font-size:12px}.home-task small{color:#83977a}.receipt-summary{gap:15px;flex-wrap:wrap}

/* The weight editor grows with its rows; no nested or horizontal scroll. */
body[data-current-page="weighing"] main{max-width:none}
.client-sheet:has(.weight-expanded){overflow:visible}
.weight-expanded{overflow:visible!important;max-height:none!important;height:auto!important}
.weight-expanded table.worksheet.processing.weight{width:100%;min-width:0;max-width:100%;table-layout:fixed}
.weight-expanded table.worksheet.processing.weight th,.weight-expanded table.worksheet.processing.weight td{min-width:0;max-width:none;width:auto;white-space:normal;overflow-wrap:anywhere;padding:8px 5px}
.weight-expanded table.worksheet.processing.weight .freeze-product{position:static;width:16%;min-width:0}
.weight-expanded table.worksheet.processing.weight th:nth-child(2){width:7%}.weight-expanded table.worksheet.processing.weight th:nth-child(3){width:12%}
.weight-expanded table.worksheet.processing.weight .source-heading{width:23%}
.weight-expanded .weight-inline,.weight-expanded .mini-labels{grid-template-columns:minmax(0,1.2fr) minmax(0,.7fr) minmax(0,.8fr);gap:4px}
.weight-expanded .grid-input{width:100%;min-width:0;max-width:100%;padding:7px 2px;font-size:13px}
.weight-expanded .mini-labels{font-size:10px}.weight-expanded .not-shipped-label{white-space:normal;flex-wrap:wrap}
.weight-expanded .weight-cell-bottom{flex-wrap:wrap}.weight-expanded .pack-note label{display:block}
@media(max-width:700px){.weight-expanded table,.weight-expanded thead,.weight-expanded tbody,.weight-expanded tr,.weight-expanded th,.weight-expanded td{display:block}.weight-expanded thead{display:none}.weight-expanded table.worksheet.processing.weight td,.weight-expanded table.worksheet.processing.weight .freeze-product{width:100%}.weight-expanded td::before{content:attr(data-weight-label);display:block;font-size:11px;color:#6b8062;margin-bottom:5px}.weight-expanded tbody tr{border-bottom:2px solid #cbdac5;padding:8px}.weight-expanded .weight-inline .grid-input{height:38px;font-size:15px}}
.receivable-order-lines summary{cursor:pointer;color:#36714d}.receivable-order-lines table{margin:8px 0;font-size:12px}.document-type-note{font-size:12px;line-height:1.8;color:#647761;padding:14px 20px}

.resource-panel{margin-top:18px}.resource-panel .metrics{padding:18px;margin:0}.resource-bars{padding:16px 20px}.resource-bars>div{display:grid;grid-template-columns:minmax(100px,1fr) minmax(80px,2fr) 110px;align-items:center;gap:12px;padding:7px 0;font-size:12px}.resource-bars svg{width:100%;height:14px;border-radius:4px}.bar-track{fill:#edf2ee}.bar-fill{fill:#42745b}.bar-negative{fill:#b87552}.resource-bars b{text-align:right;font-variant-numeric:tabular-nums;font-weight:500}.resource-alerts{display:flex;gap:10px;flex-wrap:wrap;padding:18px}.resource-alerts button{padding:10px 14px;border:1px solid #e4ccb3;background:#fff8ee;border-radius:6px;color:#92612e}.resource-alerts span{color:#7b8d75;font-size:12px}.resource-panel td small{display:block;line-height:1.6;color:#849080;font-size:11px}.resource-panel .panel-head p{max-width:100%;line-height:1.8}.resource-panel+.two-col{margin-top:18px}.resource-panel table{font-size:12px}.resource-panel .badge{white-space:normal}@media(max-width:600px){.resource-bars>div{grid-template-columns:95px minmax(40px,1fr) 100px;gap:5px;font-size:11px}}
.resource-trend{padding:20px}.resource-trend>div{display:flex;justify-content:space-between;gap:15px;font-size:12px}.resource-trend svg{width:100%;height:180px}.trend-axis{stroke:#dae3dc;stroke-width:1}.trend-line{fill:none;stroke:#357754;stroke-width:2.5;stroke-linejoin:round}.resource-trend text{font-size:11px;fill:#7c8c7c}

/* Procurement editors share the centered business table style. */
.purchase-order-lines{min-width:0}.purchase-order-lines table{min-width:650px}.purchase-order-lines select{min-width:170px;max-width:235px}.purchase-order-lines input[type=number]{width:100px}.purchase-order-lines input[name=line_note]{width:120px}.purchase-order-lines #purchase-order-total{float:right;padding:12px 4px;color:var(--accent,#227665)}
#purchase-form input,#purchase-form select{max-width:100%}#purchase-form [name=receive_qty]{width:110px;text-align:center}
#dialog:has(#purchase-form),#dialog:has(.purchase-detail){width:min(1060px,96vw);max-width:1060px}
.purchase-fee-fields{border:1px solid var(--line);border-radius:6px;margin:10px 0;padding:14px}.purchase-fee-fields legend{font-weight:650;padding:0 8px}.purchase-order-lines select[name=warehouse_id]{min-width:110px;max-width:180px}

.note-presets{display:flex;flex-wrap:wrap;align-items:center;gap:5px 8px;margin:6px 0 2px;font-size:12px;line-height:1.5;text-align:left;white-space:normal;min-width:0}.note-preset-label{color:var(--muted);font-weight:400;flex-shrink:0}.note-preset-buttons{display:flex;flex-wrap:wrap;gap:5px}.note-preset-button{border:1px solid #dce7de;border-radius:5px;background:#f4f8f4;color:var(--green-dark);font-size:12px;font-weight:400;line-height:1.5;padding:3px 8px;text-align:left;white-space:normal}.note-preset-button:hover{background:#e6f0e8;border-color:#a8c3af}.note-preset-status{color:var(--muted);font-size:11px;font-weight:400}.note-preset-status:empty{display:none}td:has(.note-presets){min-width:190px}.note-presets[hidden]{display:none!important}

/* v0.27 · text navigation, original green palette retained. */
.erp-icon{display:inline-block;width:1.25em;height:1.25em;flex:none;vertical-align:-.18em;fill:currentColor}.sidebar{width:248px;padding:25px 16px 14px;background:#fcfdfb;overflow:hidden}.brand{padding:0 10px;gap:10px}.brand-mark{border-radius:13px;box-shadow:0 5px 15px #216c5518}.workspace-label{margin:28px 12px 12px;font-size:11px}.sidebar #nav{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d9e5dc transparent;flex:1;padding-bottom:15px}.nav-section{font-size:11px;margin:21px 13px 7px;letter-spacing:.6px;color:#81918a}.nav-item{position:relative;gap:11px;min-height:42px;padding:9px 13px;border-radius:9px;margin:3px 0;color:#61766c;font-size:13px}.nav-item:hover{background:#f0f5ef;color:var(--green)}.nav-item.active{background:#e7f1e9;color:var(--green-dark)}.nav-item.active:before{content:'';position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:3px;background:var(--green)}.nav-icon{font-size:18px;width:22px}.side-note{margin-top:0;padding:14px 12px 10px;border-top:1px solid var(--line)}.side-note p{margin:4px 0;font-size:10px}.side-bottom{padding-top:10px}.main-shell{margin-left:248px;width:calc(100% - 248px)}.topbar{height:72px;padding:0 30px;position:sticky;top:0;z-index:4;box-shadow:0 2px 8px #203a3603}.top-actions{gap:12px}.avatar{width:34px;height:34px;background:var(--soft);color:var(--green);font-size:13px;font-weight:600}.module-search-button{display:flex;align-items:center;gap:9px;background:#f7f9f6;border:1px solid var(--line);border-radius:8px;padding:7px 11px;color:#84938a;font-size:12px}.module-search-button kbd{font:10px/1.5 inherit;border-left:1px solid var(--line);padding-left:10px;color:#9ba79f}.workspace-shortcut{display:flex;align-items:center;gap:10px;border:0;width:100%;border-radius:8px;background:transparent;padding:9px 13px;font-size:13px;color:#607a6c}.workspace-shortcut .erp-icon{font-size:17px}.workspace-shortcut.active{background:var(--green);color:white;font-weight:600;box-shadow:0 4px 10px #216c5514}.workspace-shortcut+button{margin-top:5px}main{padding:24px 30px 16px;max-width:1680px}.workspace-welcome{display:flex;align-items:center;gap:18px;padding:25px 28px;border:1px solid #dce8de;border-radius:14px;background:linear-gradient(110deg,#eaf3ed,#f5f8f1);margin:0 0 25px}.welcome-mark{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:white;color:var(--green);box-shadow:0 5px 15px #216c5508;font-size:28px}.workspace-welcome h2{font-size:22px;font-weight:600;margin:3px 0 5px;letter-spacing:.5px}.workspace-welcome p{margin:0;color:#758a7c;font-size:12px}.workspace-scope{display:flex;align-items:center;gap:7px;margin-left:auto;border:1px solid #d8e6db;border-radius:20px;background:#ffffffa6;padding:6px 11px;font-size:11px;color:#64826e;white-space:nowrap}.page-head{margin-bottom:22px}.page-head h1{font-size:25px;letter-spacing:.5px}.page-head p{line-height:1.8;color:#7c8d82;max-width:880px}.eyebrow{letter-spacing:1.5px}.metrics{gap:16px}.metric{border-radius:11px;padding:19px 22px}.metric:first-child{background:#f0f5ed;border-color:#dce8db}.metric-label{font-size:12px;color:#6c8273}.metric-symbol{width:29px;height:29px;border-radius:8px;display:grid;place-items:center;background:#f0f5ef;color:#679378}.metric-value{margin-top:8px;font-weight:600}.metric-foot{font-size:11px;line-height:1.7}.panel{border-radius:11px;box-shadow:0 3px 12px #203a3602}.panel-head{padding:20px 22px}.panel-head h2{font-size:15px}.panel-head p{font-size:11px;color:#86958a}.panel+.panel{margin-top:20px}.button{border-radius:8px;min-height:38px;padding:8px 14px;font-size:12px}.button.primary{box-shadow:0 4px 10px #216c5514}.button:active{transform:translateY(1px)}.button:disabled{transform:none}.period,.sheet-filters{border-radius:10px}.period{min-height:56px}.home-workflow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:0 22px 22px}.home-task{position:relative;border:1px solid #e5ede5;border-radius:10px;background:#fbfdfa;padding:18px;text-align:left;color:var(--ink);transition:border-color .15s,box-shadow .15s}.home-task:hover{border-color:#a4c6ae;box-shadow:0 4px 14px #216c5508}.home-task small{display:flex;align-items:center;gap:7px;font-size:11px;color:#88a18c}.home-task small .erp-icon{font-size:21px;color:var(--green)}.home-task strong{display:block;margin-top:13px;font-size:15px}.home-task p{font-size:12px;line-height:1.7;color:#849486;min-height:35px}.home-task>span{font-size:12px;display:block;color:#7f9283}.home-task>span b{font-variant-numeric:tabular-nums;color:var(--green);font-size:16px}.home-task .erp-module-link{margin-top:14px;font-size:11px;color:var(--green)}.erp-module-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:11px;background:var(--soft);color:var(--green);font-size:21px}.erp-module-card{border-radius:10px;transition:border-color .15s,background .15s}.erp-module-card:hover{border-color:#b2cdb8;background:#fbfdfa}.erp-module-card strong{font-size:14px}.erp-module-card p{font-size:12px;color:#829486}.form-grid{gap:17px}.field{font-size:12px;color:#718973}.field input,.field select,.field textarea{font-size:13px;min-height:38px;border-radius:7px}.field textarea{line-height:1.7}th{font-size:11px;color:#849580;background:#f7faf5;padding:13px 16px}td{font-size:12px;padding:15px 16px;color:#617b65}td small{font-size:10px;color:#8fa18d}.table-wrap table th,.table-wrap table td{text-align:center}.table-action{justify-content:center}.badge{font-size:11px;border-radius:5px;padding:3px 8px}#dialog{border-radius:15px;background:#fcfdfa;box-shadow:0 25px 100px #173b3233}.dialog-head{padding:22px 26px}.dialog-head h2{font-size:20px}.module-search-results{display:grid;gap:7px;margin-top:20px}.module-search-result{display:flex;align-items:center;gap:14px;padding:13px 15px;text-align:left;background:white;border:1px solid var(--line);border-radius:9px;color:var(--green)}.module-search-result>span{flex:1}.module-search-result b{font-size:14px;color:var(--ink);display:block}.module-search-result small{font-size:11px;color:#899b8a}.module-search-result>.erp-icon{font-size:21px}.permission-data-scopes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.permission-data-scopes label{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:9px;background:white;padding:14px}.permission-data-scopes b{display:block;font-size:13px}.permission-data-scopes small{display:block;font-size:11px;color:#8b9c89}.permission-role-summary{padding:17px 20px;background:var(--soft);border-radius:10px;font-size:13px;color:var(--green-dark);margin-bottom:20px}.role-policy-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-bottom:22px}.role-policy-cards article{padding:19px;border:1px solid var(--line);border-radius:11px;background:white}.role-policy-cards h3{margin:8px 0;font-size:15px}.role-policy-cards p{font-size:12px;color:#839581;line-height:1.9;margin:0}.permission-group-heading{font-size:14px;margin:23px 0 12px;color:var(--green-dark);border-bottom:1px solid var(--line);padding-bottom:9px}.mobile-nav-toggle{display:none}.auth-card{border-radius:16px;box-shadow:0 12px 50px #203a3608}.auth-card h1{font-size:25px}.auth-card .brand-mark{margin-bottom:20px}
@media(max-width:1200px){.sidebar{width:220px}.main-shell{margin-left:220px;width:calc(100% - 220px)}main{padding:22px}.topbar{padding:0 22px}.module-search-button kbd{display:none}.home-workflow{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-scope{display:none}.role-policy-cards{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.sidebar{width:248px;transform:translateX(-100%);transition:transform .2s;z-index:7;box-shadow:8px 0 30px #173b3210}.main-shell{margin-left:0;width:100%}.mobile-nav-open .sidebar{transform:translateX(0)}.mobile-nav-toggle{display:inline-flex;color:var(--green);padding:6px}.topbar{padding:0 14px;gap:10px;height:64px}.crumb{flex:1;font-size:11px}.crumb>span,.crumb:first-letter{display:none}.top-actions{gap:6px}.module-search-button{padding:6px}.module-search-button>span,.local-badge,.top-actions .role-label{display:none}main{padding:18px 14px}.workspace-welcome{padding:18px;gap:12px;border-radius:11px}.welcome-mark{width:42px;height:42px;font-size:22px;border-radius:12px}.workspace-welcome h2{font-size:18px}.workspace-welcome p{font-size:11px}.workspace-welcome .eyebrow{font-size:9px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric{padding:15px}.metric-value{font-size:24px}.metric-label{font-size:11px}.metric-symbol{width:23px;height:23px}.home-workflow{grid-template-columns:1fr;padding:0 15px 15px;gap:10px}.home-task p{min-height:0}.home-task .erp-module-link{margin-top:10px}.panel-head{padding:17px}.page-head{align-items:flex-start}.page-head h1{font-size:22px}.head-actions{flex-wrap:wrap}.permission-data-scopes,.role-policy-cards{grid-template-columns:1fr}.erp-process{flex-wrap:wrap}.top-actions .avatar{display:none}.period{flex-wrap:wrap}.period .dim{margin-left:0}footer{flex-direction:column;gap:3px}.form-grid{grid-template-columns:1fr 1fr}}
@media print{.workspace-welcome,.workspace-shortcut,.module-search-button,.mobile-nav-toggle{display:none!important}}
/* Navigation groups need a stronger visual hierarchy than individual modules. */
.sidebar .nav-section{display:flex;align-items:center;gap:8px;margin:19px 0 8px;padding:8px 11px;color:#315d49;background:#edf3ec;border-left:3px solid #bbd3c0;border-radius:0 7px 7px 0;font-size:12px;font-weight:700;line-height:1.5;letter-spacing:.6px}.sidebar .nav-section .erp-icon{font-size:15px;color:#5c8669}.sidebar .erp-nav-group:has(.nav-item.active) .nav-section{color:var(--green-dark);background:#e3eee4;border-left-color:var(--green)}.sidebar .nav-item{margin-left:4px;width:calc(100% - 4px)}.sidebar .nav-item.active:before{left:-4px}

.workspace-welcome{padding-left:26px}.module-search-button{gap:8px}.module-search-result{gap:0}.sidebar .nav-section{font-size:13px;font-weight:700;color:#2d5946}.sidebar .nav-item{padding-left:15px}.mobile-nav-toggle{font-size:12px;min-width:42px;white-space:nowrap}.role-policy-cards h3{margin-top:0}
.daily-work-reminder{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 22px;border:1px solid #dce8df;background:#edf5ef;border-radius:11px;margin-bottom:21px}.daily-work-reminder>div>b{font-size:15px;color:var(--green-dark)}.daily-work-reminder p{font-size:11px;color:#819585;margin:5px 0 0}.daily-work-reminder.has-carry{border-color:#e8d6b6;background:#fcf7ed}.daily-work-reminder.has-carry>div>b{color:#986b30}.daily-reminder-counts{display:flex;gap:20px;flex:none}.daily-reminder-counts span{display:flex;flex-direction:column;font-size:11px;color:#869483}.daily-reminder-counts b{font-size:24px;color:var(--green);font-weight:600}.daily-reminder-counts .carry-count b{color:#b57c30}.home-task .workflow-status{display:inline-block;margin-left:auto;padding:2px 7px;font-size:10px;border-radius:5px;background:#eef2ec;color:#809178}.home-task .workflow-status.carry{color:#a5702e;background:#fbf0dd}.home-task .workflow-status.done{color:var(--green);background:#e8f2e8}.home-task .task-carry{color:#a67731;margin-top:5px}.home-task .task-carry b{color:#a67731}.carry-label{color:#b37e34;font-weight:600}.company-daily-alerts{margin-bottom:24px}.company-work-alert-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0 22px 22px}.company-work-alert{display:flex;flex-direction:column;text-align:left;gap:5px;padding:15px 17px;border-radius:9px;border:1px solid var(--line);background:#fbfdfa;color:var(--ink)}.company-work-alert strong{font-size:12px}.company-work-alert>b{font-size:24px;color:var(--green);margin:4px 0}.company-work-alert>b small{font-size:10px;font-weight:400;color:#91a08c}.company-work-alert span,.company-work-alert>small{font-size:11px;color:#8a9b87}.company-work-alert em{font-style:normal}.company-work-alert.has-carry{border-color:#e9d9bd;background:#fffcf6}.company-work-alert.has-carry em{color:#ac7733;font-weight:600}@media(max-width:1050px){.daily-work-reminder{align-items:flex-start;flex-direction:column}.company-work-alert-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.daily-work-reminder{padding:16px}.daily-reminder-counts{gap:25px}.company-work-alert-grid{padding:0 16px 16px;gap:8px}.company-work-alert{padding:13px}.home-task small{display:flex}}

/* Module icons only; group headings remain text. */
.sidebar .nav-icon{display:grid;width:21px;height:22px;place-items:center;font-size:18px;color:inherit;flex:none}.sidebar .nav-icon .erp-icon{width:19px;height:19px}.workspace-shortcut .erp-icon{width:19px;height:19px}.module-search-result>.erp-icon{margin-right:13px;width:22px;height:22px}.erp-module-icon .erp-icon{width:22px;height:22px}

/* Next workflow step uses blue; save/confirm actions retain their existing colors. */
.button.workflow-next,.text-button.workflow-next{display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:20px;background:#245bb2;border:1px solid #245bb2;color:#fff;border-radius:6px;padding:8px 14px;font-weight:600;white-space:normal}
.button.workflow-next:hover:not(:disabled),.text-button.workflow-next:hover:not(:disabled){background:#19478e;border-color:#19478e;color:#fff}
.workflow-next:focus-visible{outline:3px solid #8bb5f6;outline-offset:3px}
.button.workflow-next:disabled,.text-button.workflow-next:disabled{opacity:.5;cursor:not-allowed}

.button.print-action,.text-button.print-action{display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:20px;background:#a64b12;border:1px solid #a64b12;color:#fff;border-radius:6px;padding:8px 14px;font-weight:600;white-space:normal}
.button.print-action:hover:not(:disabled),.text-button.print-action:hover:not(:disabled){background:#82390c;border-color:#82390c;color:#fff}
.print-action:focus-visible{outline:3px solid #edb486;outline-offset:3px}
.button.print-action:disabled,.text-button.print-action:disabled{opacity:.5;cursor:not-allowed}

.factory-shortcuts{margin-bottom:18px;justify-content:flex-start}.factory-work{padding:20px}.factory-work p,.factory-rules{line-height:1.8}.factory-alert-row td{background:#fff4ed}.factory-attendance-form{min-width:1100px}.factory-attendance-form input[type=datetime-local]{min-width:180px}.factory-attendance-form input[type=number]{width:85px}.factory-output-form{min-width:1000px}.factory-output-form input[type=number]{width:100px}.factory-output-form .check-line{white-space:normal;min-width:150px}.factory-rules p{margin:4px 0}.factory-alert-note{background:#fff0e5;color:#8a3516;padding:10px;border-left:3px solid #ba5a22;margin:8px 0}.factory-readonly{color:var(--muted)}
/* Shared form language: all dialogs use the same labels, spacing, and controls. */
#dialog .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px;align-items:start}
#dialog .form-grid>.wide{grid-column:1/-1;min-width:0}
#dialog .field{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:13px;font-weight:600;line-height:1.5;color:#344e43}
#dialog input:not([type=checkbox]):not([type=radio]),#dialog select,#dialog textarea{font:inherit;font-size:14px;color:#263d33;background:#fff;border:1px solid #cddbd2;border-radius:7px;min-height:42px;padding:9px 11px;box-shadow:none;max-width:100%;min-width:0;box-sizing:border-box}
#dialog input:focus,#dialog select:focus,#dialog textarea:focus{outline:2px solid #74a68d;outline-offset:1px;border-color:#3c7a59}
#dialog input[type=checkbox],#dialog input[type=radio]{width:16px;height:16px;min-height:0;accent-color:#28634a;margin:0}
#dialog .check-line{display:flex;align-items:center;gap:9px;line-height:1.6;font-weight:400}
#dialog fieldset{border:1px solid #dce6de;border-radius:10px;padding:18px;background:#fafcf9;min-width:0;margin:0}
#dialog legend{font-size:14px;font-weight:700;color:#295d45;padding:0 7px}
#dialog .form-help{color:#65776c;font-size:13px;line-height:1.8;margin:0;background:#f0f5ef;border-radius:7px;padding:12px 15px}
#dialog .dialog-actions{gap:10px;padding-top:18px;border-top:1px solid #e3eae4;margin-top:22px}
#dialog textarea{resize:vertical;line-height:1.8}
.employee-groups{display:grid;grid-template-columns:minmax(0,1fr);gap:20px}.employee-groups>.employee-group{margin:0;min-width:0}.attendance-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.employee-group>header,.attendance-group>header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 22px;border-bottom:1px solid var(--line)}
.employee-group h2,.attendance-group h2{margin:0;font-size:17px}.employee-group header span,.attendance-group header p{font-size:12px;color:var(--muted);margin:6px 0 0}
.attendance-legend{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:16px 0}.attendance-legend>span:last-child{font-size:12px;color:var(--muted)}
.attendance-badge{display:inline-block;font-size:12px;font-weight:600;line-height:1.4;padding:4px 10px;border-radius:5px;white-space:nowrap}
.attendance-badge.status-full{background:#e3f2e8;color:#286044}.attendance-badge.status-half{background:#fff0c6;color:#8a610a}.attendance-badge.status-leave{background:#ede5fa;color:#70459a}.attendance-badge.status-absent{background:#fce0dc;color:#a3352c}.attendance-badge.status-rest{background:#edf0ee;color:#77817b}
.attendance-state{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border:1px solid #dbe6db;border-radius:8px;margin:16px 0;background:#f0f5ef}
.attendance-people{padding:16px;display:grid;gap:10px}.attendance-person{display:flex;gap:14px;align-items:center;border:1px solid #e2e9e3;border-radius:7px;padding:12px}.attendance-person small{color:var(--muted)}
.attendance-person.status-half,.attendance-editor-person.status-half{background:#fff8e7;border-color:#ead7a4}.attendance-person.status-leave,.attendance-editor-person.status-leave{background:#f5effc;border-color:#dac8ed}.attendance-person.status-absent,.attendance-editor-person.status-absent{background:#fff0ed;border-color:#ecc1b9}.attendance-person.status-rest,.attendance-editor-person.status-rest{background:#f1f3f1;border-color:#e0e4e1}
.attendance-editor-groups{display:grid;gap:20px}.attendance-editor-group{border:1px solid #dbe5dd;border-radius:10px;overflow:hidden}.attendance-editor-group>header{padding:16px 18px;background:#f0f5ef;display:flex;align-items:center;justify-content:space-between;gap:16px}.attendance-editor-group h3{margin:0;font-size:16px}.group-time-fields{display:flex;gap:15px}.group-time-fields .field{min-width:130px}.attendance-editor-people{padding:14px;display:grid;gap:10px}
.attendance-editor-person{display:grid;grid-template-columns:minmax(80px,.7fr) minmax(130px,1fr) minmax(90px,.8fr) minmax(150px,1.4fr);align-items:center;gap:14px;padding:13px;border:1px solid #e0e7df;border-radius:7px;background:#fff}
.factory-daily-systems,.factory-system-cards{display:grid;grid-template-columns:1fr 1fr;gap:20px}.factory-system{padding:22px}.factory-system h2{font-size:17px;margin:0 0 16px}.factory-system>div{display:flex;justify-content:space-between;margin:10px 0}.factory-system p{font-size:12px;color:var(--muted)}.system-issue-readonly{padding:12px;background:#e8f0e7;border-radius:7px;display:flex;justify-content:space-between;margin-bottom:15px}
.factory-slurry-form{min-width:820px}.factory-slurry-form input[type=number]{width:95px}.factory-slurry-form th,.factory-slurry-form td{padding:12px}.factory-slurry-form .check-line{max-width:190px}
.factory-workflow{padding:22px;margin-bottom:22px}.factory-workflow h2{margin:0 0 18px;font-size:18px}.factory-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.factory-step{text-align:left;background:#f9fbf8;border:1px solid #dce6dc;border-radius:9px;padding:17px;cursor:pointer;color:#2e4a3a}.factory-step>span{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#dfece0;font-weight:700;margin-bottom:12px}.factory-step strong{display:block;font-size:15px}.factory-step p{font-size:12px;line-height:1.8;color:#6c7e71;margin:9px 0}.factory-step small{color:#32664b}.factory-step:hover{border-color:#6d9a7e;background:#f1f7ef}
.parameter-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:20px}.parameter-card{border:1px solid #dce7dc;border-radius:9px;padding:17px 19px;background:#fbfcf9}.parameter-card h3{margin:0 0 12px;color:#2d6046;font-size:15px}.parameter-card>div{display:flex;gap:15px;justify-content:space-between;padding:8px 0;font-size:13px;line-height:1.7}.parameter-card b{white-space:nowrap;font-variant-numeric:tabular-nums}.parameter-fieldset{margin:0}.panel-explanation{padding:0 20px;color:#6c7e70;font-size:13px;line-height:1.8}.panel-toolbar{padding:0 20px 15px;display:flex;gap:16px;align-items:center}.panel-toolbar p{font-size:12px;color:var(--muted)}
.analysis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0}.analysis-chart{border:1px solid #dfe7dd;border-radius:9px;background:#fff;padding:20px;min-width:0}.analysis-chart h3,.soy-stacks h3{font-size:15px;margin:0 0 14px;color:#2f5d43}.analysis-chart>p{font-size:12px;line-height:1.7;color:var(--muted);margin:0 0 15px}.analysis-bars{display:grid;gap:12px}.analysis-bar-row{display:grid;grid-template-columns:minmax(95px,1fr) minmax(90px,2fr) auto;align-items:center;gap:12px;font-size:12px}.analysis-bar-row>span{overflow-wrap:anywhere}.analysis-bar-row svg{width:100%;height:18px}.analysis-bar-row b{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}.analysis-track{fill:#edf2eb}.analysis-fill{fill:#52876a}.resource-panel>.analysis-chart,.resource-panel>.analysis-grid{margin:0 20px 20px}
.soy-analysis{padding:0 20px 8px}.soy-stacks{background:#fafcf8;border:1px solid #e0e8dc;border-radius:9px;padding:20px}.soy-stack-row{display:grid;grid-template-columns:75px minmax(100px,1fr) 100px;align-items:center;gap:15px;margin:16px 0;font-size:13px}.soy-stack-row svg{width:100%;height:28px}.soy-stack-row b{text-align:right;white-space:nowrap}.protein-low{fill:#b5c99b}.protein-middle{fill:#5d9d79}.protein-high{fill:#246d50}.protein-unknown{fill:#cbd1cb}.chart-legend{display:flex;flex-wrap:wrap;gap:15px;font-size:12px;color:#637267}.chart-legend span{display:flex;align-items:center;gap:6px}.chart-legend span:before{content:'';width:10px;height:10px;border-radius:2px;background:#cbd1cb}.chart-legend .protein-low:before{background:#b5c99b}.chart-legend .protein-middle:before{background:#5d9d79}.chart-legend .protein-high:before{background:#246d50}.factory-weight-inline{padding:15px 18px;border:1px solid #e6c7a5;border-radius:8px;background:#fff6e9;margin:10px 0}.factory-weight-inline summary{font-weight:600;color:#8b5326;cursor:pointer}.finance-alert-settings{margin-bottom:18px}
@media(max-width:1000px){.factory-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.employee-groups,.attendance-groups,.analysis-grid{grid-template-columns:1fr}.attendance-editor-person{grid-template-columns:90px 1fr 1fr}.attendance-person-note{grid-column:2/-1}}
@media(max-width:650px){#dialog .form-grid,.factory-daily-systems,.factory-system-cards,.parameter-cards{grid-template-columns:1fr}.factory-steps{grid-template-columns:1fr}.attendance-editor-group>header{display:block}.group-time-fields{margin-top:12px}.attendance-editor-person{grid-template-columns:1fr 1fr}.attendance-editor-person>strong{grid-column:1/-1}.attendance-person-note{grid-column:1/-1}.soy-stack-row{grid-template-columns:60px 1fr 75px;gap:8px}.analysis-bar-row{grid-template-columns:90px 1fr auto}.parameter-card>div{flex-wrap:wrap}}

/* Keep production formulas readable alongside their numeric comparisons. */
.factory-report-table{table-layout:fixed;width:100%;min-width:850px}
.factory-report-table th,.factory-report-table td{white-space:normal;overflow-wrap:anywhere;line-height:1.8;padding:13px 14px;vertical-align:top}
.factory-method-table th:nth-child(1){width:15%}.factory-method-table th:nth-child(2){width:38%}.factory-method-table th:nth-child(3),.factory-method-table th:nth-child(4){width:13%}.factory-method-table th:nth-child(5){width:11%}.factory-method-table th:nth-child(6){width:10%}
.factory-yield-table th:nth-child(1){width:9%}.factory-yield-table th:nth-child(2){width:13%}.factory-yield-table th:nth-child(3){width:22%}.factory-yield-table th:nth-child(4){width:20%}.factory-yield-table th:nth-child(5){width:12%}.factory-yield-table th:nth-child(6){width:10%}.factory-yield-table th:nth-child(7){width:14%}
.notice.demo-notice>span{width:auto;min-width:36px;flex:none;white-space:nowrap}
/* Employee and attendance lists share summaries, quick filters, and table layout. */
.factory-list-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0 20px}
.factory-list-stats>div{padding:18px 20px;background:#fff;border:1px solid var(--line);border-radius:9px;display:flex;flex-direction:column;gap:5px}
.factory-list-stats span{font-size:12px;color:#718379}.factory-list-stats b{font-size:27px;line-height:1.4;font-variant-numeric:tabular-nums;color:var(--green-dark)}.factory-list-stats small{font-size:11px;color:var(--muted)}
.factory-list-tabs{display:flex;gap:9px;margin:0 0 16px}.factory-list-controls{margin:0;padding:18px 20px;border:0;border-bottom:1px solid var(--line);border-radius:0;flex-wrap:wrap;align-items:end}
.factory-list-controls>label{min-width:250px}.factory-list-controls>span,.factory-editor-search>span{font-size:12px;color:var(--muted);margin-left:auto}
.factory-quick-filter{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px 20px;border-bottom:1px solid #eef2ed}
.factory-quick-filter>span{font-size:12px;color:#7c8e80;min-width:42px}.factory-filter-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid #dce5db;background:#fff;color:#63776a;font-size:12px;border-radius:6px;padding:6px 11px}
.factory-filter-chip b{font-size:11px;color:inherit;background:#edf3ec;padding:0 5px;border-radius:4px;font-variant-numeric:tabular-nums}.factory-filter-chip.active{color:#fff;background:var(--green);border-color:var(--green)}.factory-filter-chip.active b{background:#ffffff26}
.factory-list-table{width:100%;min-width:800px;table-layout:fixed}.factory-list-table th,.factory-list-table td{padding:13px 16px;white-space:normal;overflow-wrap:anywhere;line-height:1.7;vertical-align:middle}.factory-list-table th:first-child{width:16%}.factory-list-table th:last-child{width:13%}
.factory-list-table tr.attendance-person,.attendance-editor-table tr.attendance-editor-person{display:table-row;padding:0;border:0;border-radius:0}
.factory-list-table tr.status-half>td{background:#fff8e7}.factory-list-table tr.status-leave>td{background:#f5effc}.factory-list-table tr.status-absent>td{background:#fff0ed}.factory-list-table tr.status-rest>td{background:#f3f5f3}.factory-list-table tr.status-unrecorded>td{background:#f8f9f5}
.attendance-badge.status-unrecorded{background:#f0f1df;color:#827a3c}
.attendance-editor-list{min-width:0}.attendance-editor-list h3{font-size:15px;color:#345c45;margin:22px 0 12px}.attendance-edit-summary{display:flex;align-items:center;gap:15px;flex-wrap:wrap;padding:13px 16px;background:#eef5ed;border:1px solid #dce8db;border-radius:7px;font-size:12px;color:#53705b}
.attendance-edit-summary strong{margin-left:auto}.factory-group-times{width:100%;min-width:520px}.factory-group-times th,.factory-group-times td{padding:10px 14px}.factory-group-times input[type=time]{width:145px}
.factory-editor-search{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:14px 0}.factory-editor-search>.field{min-width:230px}.attendance-editor-list .factory-quick-filter{padding:10px 0}.attendance-editor-table{min-width:650px;margin-top:12px}.attendance-editor-table th:first-child{width:16%}.attendance-editor-table th:nth-child(2){width:24%}.attendance-editor-table th:nth-child(3){width:18%}.attendance-editor-table th:last-child{width:42%}.attendance-editor-table input,.attendance-editor-table select{width:100%}
@media(max-width:800px){.factory-list-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.factory-list-controls>span,.factory-editor-search>span{margin-left:0;width:100%}.factory-list-table{min-width:760px}.factory-quick-filter{padding:12px 15px}.factory-list-controls{padding:15px}.attendance-edit-summary strong{margin-left:0}}
#dialog .factory-group-times input[type=time]{min-height:34px;height:34px;padding:5px 8px}
#dialog .factory-group-times th,#dialog .factory-group-times td{padding:6px 12px}
#dialog .attendance-editor-list h3{margin:14px 0 8px}#dialog .attendance-editor-list .factory-quick-filter{padding:7px 0}
#dialog .factory-editor-search{margin:10px 0}#dialog .attendance-editor-table th,#dialog .attendance-editor-table td{padding:8px 12px}
#dialog .factory-editor-search>.field{flex-direction:row;align-items:center;white-space:nowrap;gap:10px}
#dialog .factory-editor-search>.field input{width:220px}
/* Fit mobile browser chrome, safe areas, and the on-screen keyboard. */
@media(max-width:760px),(pointer:coarse){
 body{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
 .shell,#auth-screen{min-height:var(--erp-visible-height,100vh)}
 .topbar{top:env(safe-area-inset-top,0px)}
 main{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
 .sidebar{top:var(--erp-visible-top,0px);bottom:auto;height:var(--erp-visible-height,100vh);padding-top:calc(16px + env(safe-area-inset-top,0px));padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
 #overlay,#leave-overlay{top:var(--erp-visible-top,0px);bottom:auto;height:var(--erp-visible-height,100vh);padding:max(8px,env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))}
 #dialog{display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow:hidden;border-radius:10px}
 #dialog .dialog-head{position:static;flex:none;padding:14px 16px}
 #dialog .dialog-head h2{font-size:18px}
 #dialog-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
 #dialog .dialog-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:15px 16px}
 #dialog .dialog-actions{position:static;flex:none;flex-wrap:wrap;margin:0;padding:12px 14px;gap:8px}
 #dialog .dialog-actions .button{min-height:42px;white-space:normal}
 #leave-overlay>section,#leave-overlay>div{max-height:100%;overflow:auto;overscroll-behavior:contain}
 #toast{bottom:calc(var(--erp-covered-bottom,0px) + max(12px,env(safe-area-inset-bottom,0px)));max-width:calc(100vw - 32px);padding:11px 16px}
}
@supports(height:100dvh){@media(max-width:760px),(pointer:coarse){.shell,#auth-screen{min-height:var(--erp-visible-height,100dvh)}#overlay,#leave-overlay,.sidebar{height:var(--erp-visible-height,100dvh)}}}
@media(max-width:760px),(pointer:coarse){
 body input:not([type=checkbox]):not([type=radio]),body select,body textarea,#dialog input:not([type=checkbox]):not([type=radio]),#dialog select,#dialog textarea{font-size:16px}
 #dialog .factory-group-times input[type=time]{height:42px;min-height:42px}
}

/* Phone drawer must override the compact tablet and wide-sheet navigation. */
.mobile-nav-close,.mobile-nav-backdrop{display:none}
@media screen and (max-width:760px){
 .sidebar,body.sheet-wide .sidebar{width:min(300px,calc(100vw - 44px));padding-left:14px;padding-right:14px;box-sizing:border-box;z-index:31}
 .sidebar .brand{justify-content:flex-start;padding:0 10px;flex-shrink:0}
 .sidebar .brand>span:last-child,.sidebar .workspace-label,.sidebar .nav-item>span:not(.nav-icon),.sidebar .nav-section{display:block}
 .sidebar .nav-item{justify-content:flex-start;padding:11px 13px;margin-top:3px;min-height:44px}
 .sidebar .workspace-shortcut{min-height:44px;flex-shrink:0}
 .sidebar .workspace-label{margin-top:16px}
 .mobile-nav-close{display:block;align-self:flex-end;flex-shrink:0;margin-bottom:12px;min-height:40px}
 .mobile-nav-open{overflow:hidden}
 .mobile-nav-open .mobile-nav-backdrop{display:block;position:fixed;inset:0;border:0;background:#173b3266;z-index:30;padding:0}
 body.sheet-wide .main-shell{margin-left:0;width:100%}
 .erp-module-grid{min-width:0}.erp-module-card{min-width:0;overflow-wrap:anywhere}
}
@media print{.mobile-nav-close,.mobile-nav-backdrop{display:none!important}}

.monthly-attendance-table{min-width:1500px;border-collapse:collapse;width:100%}.monthly-attendance-table th,.monthly-attendance-table td{padding:9px 6px;white-space:nowrap;text-align:center;border:1px solid var(--line)}.monthly-attendance-table th:first-child{position:sticky;left:0;z-index:1;background:#f7faf5;min-width:115px}.monthly-attendance-table .status-half{background:#fff0cf;color:#805c13}.monthly-attendance-table .status-absent,.monthly-attendance-table .status-conflict{background:#fbe1dd;color:#a33327}.monthly-attendance-table .status-leave{background:#f0e5fa;color:#774495}.monthly-attendance-table .status-rest{background:#edf0f2;color:#60737b}.monthly-attendance-table .status-draft,.monthly-attendance-table .status-missing{background:#fff4dd;color:#895d16}#payroll-form input{min-width:100px;width:100%;padding:9px;border:1px solid var(--line);border-radius:6px}#payroll-form .table-wrap{margin:16px 0}

/* Desktop wide mode: keep all icon targets inside the compact rail. */
@media screen and (min-width:761px){
 .sheet-wide .sidebar{width:76px;padding:22px 10px 14px}
 .sheet-wide .main-shell{margin-left:76px;width:calc(100% - 76px)}
 .sheet-wide .sidebar .brand{padding:0;justify-content:center}
 .sheet-wide #workspace-shortcuts{margin:20px 0 12px;flex-shrink:0}
 .sheet-wide .workspace-shortcut{font-size:0;gap:0;padding:10px 0;justify-content:center;min-height:42px}
 .sheet-wide .workspace-shortcut .erp-icon{font-size:20px}
 .sheet-wide .sidebar #nav{padding:0 0 12px;overflow-x:hidden}
 .sheet-wide .sidebar .nav-item{width:100%;margin:3px 0;gap:0;padding:10px 0;justify-content:center;min-height:44px}
 .sheet-wide .sidebar .nav-icon{width:24px;flex-shrink:0;display:inline-flex;justify-content:center;align-items:center}
 .sheet-wide .sidebar .erp-nav-group{margin-bottom:8px}
 .sheet-wide .sidebar .nav-section{display:none}
 .sheet-wide .sidebar .nav-item.active:before{left:0}
}

.sidebar-toggle{display:none}
.navigation-flyout-button{display:flex;align-items:center;gap:12px;width:100%;min-height:46px;padding:11px 18px;border:1px solid #c9ddce;border-radius:9px;background:#f4faf5;color:var(--green-dark);font-size:14px;font-weight:600;text-align:left;white-space:nowrap;box-shadow:0 6px 24px #173b3226}
.navigation-flyout-button .erp-icon{width:22px;height:22px}
.navigation-flyout-button:hover{background:#e4f0e7}
#navigation-flyout{position:fixed;z-index:8;min-width:200px;max-width:calc(100vw - 90px);animation:nav-label-in .12s ease-out}
@keyframes nav-label-in{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:translateX(0)}}
@media screen and (min-width:761px){
 .sidebar-toggle{display:flex;align-items:center;justify-content:center;gap:7px;align-self:flex-end;flex-shrink:0;min-height:32px;margin:0 0 12px;padding:4px 10px;border:1px solid #d3e3d7;border-radius:7px;background:#eaf3ed;color:var(--green-dark);font-size:12px;cursor:pointer}
 .sidebar-toggle>span:first-child{font-size:22px;line-height:1}
 .sidebar-toggle:hover{background:#dcecdf}
 .sheet-wide .sidebar-toggle{width:100%;min-height:36px;padding:4px;margin-bottom:14px}
 .sheet-wide .sidebar-toggle-label{display:none}
}
@media screen and (max-width:760px){
 #mobile-nav-toggle{background:var(--green);border:1px solid var(--green);color:#fff;border-radius:8px;padding:8px 12px;min-height:40px;box-shadow:0 3px 8px #216c5524}
 #mobile-nav-toggle:active{background:var(--green-dark)}
 #navigation-flyout{display:none}
}
@media(prefers-reduced-motion:reduce){#navigation-flyout{animation:none}}
@media print{.sidebar-toggle,#navigation-flyout{display:none!important}}

/* Clear parent/child path and a single strong current-location marker. */
body:not(.sheet-wide) .sidebar .nav-section{background:transparent;border:0;padding:6px 0;margin:17px 0 5px;border-radius:0;color:#73867b;font-size:12px;letter-spacing:.4px}
body:not(.sheet-wide) .sidebar .erp-nav-group:has(.nav-item.active) .nav-section{background:transparent;color:var(--green-dark)}
body:not(.sheet-wide) .sidebar .erp-nav-group:has(.nav-item.active) .nav-section::after{content:'当前路径';display:inline-block;margin-left:8px;padding:1px 6px;border-radius:4px;background:#e4eee7;color:var(--green);font-size:10px;font-weight:500;letter-spacing:0}
body:not(.sheet-wide) .sidebar .nav-item{margin:0 0 0 10px;width:calc(100% - 10px);padding-left:17px;border-left:2px solid #dce6df;border-radius:0 8px 8px 0}
body:not(.sheet-wide) .sidebar .nav-item:before{content:'';position:absolute;left:0;top:50%;bottom:auto;width:9px;height:1px;border-radius:0;background:#dce6df}
body:not(.sheet-wide) .sidebar .nav-item.active{background:var(--green);border-left-color:var(--green-dark);color:#fff;font-weight:650;box-shadow:0 3px 9px #216c5514}
body:not(.sheet-wide) .sidebar .nav-item.active:before{background:#ffffff70}
.sidebar .nav-item.active .nav-count{background:#ffffff30;color:inherit}
.sheet-wide .sidebar .nav-item.active{background:var(--green);color:#fff;box-shadow:0 3px 9px #216c5520}
.navigation-flyout-button.active{background:var(--green);border-color:var(--green);color:#fff}
.crumb{display:flex;align-items:center;gap:9px;min-width:0;flex:1}
.crumb .crumb-root{color:#84958b;font-size:12px;white-space:nowrap}
.crumb .crumb-root-separator,.crumb .crumb-separator{color:#a3b3a8;font-weight:400}
#crumb{display:flex;align-items:center;gap:9px;min-width:0;font-size:12px;font-weight:500}
#crumb .crumb-group{color:#657e6e;white-space:nowrap}
#crumb .crumb-current{display:block;color:var(--green-dark);background:#e7f0e9;border:1px solid #d5e4d9;padding:5px 10px;border-radius:6px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media screen and (min-width:761px) and (max-width:850px){body:not(.sheet-wide) .sidebar .nav-section{display:none}body:not(.sheet-wide) .sidebar .nav-item{margin-left:0;width:100%;padding-left:0;border-left:0}body:not(.sheet-wide) .sidebar .nav-item:before{display:none}.sidebar-toggle-label{display:none}}
@media screen and (max-width:760px){#crumb{gap:4px;flex-wrap:wrap;font-size:10px}#crumb .crumb-current{padding:3px 6px;max-width:150px}#crumb .crumb-group{font-size:10px}.crumb{gap:0}body:not(.sheet-wide) .sidebar .nav-section{display:flex}}

.account-area{position:relative;flex-shrink:0}
.top-actions #avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid #c8ddce;border-radius:50%;background:#e3eee6;color:var(--green-dark);font-weight:700;cursor:pointer}
.top-actions #avatar:hover,.top-actions #avatar[aria-expanded=true]{background:var(--green);border-color:var(--green);color:#fff}
.account-menu{position:absolute;right:0;top:calc(100% + 10px);width:280px;max-width:calc(100vw - 28px);max-height:calc(100dvh - 88px);overflow-y:auto;padding:8px;background:#fff;border:1px solid #d7e4da;border-radius:12px;box-shadow:0 12px 35px #173b3226;z-index:12}
.account-identity{padding:12px;display:flex;flex-direction:column;gap:12px;min-width:0}
.account-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px}
.account-menu .account-heading .local-badge{display:inline-flex;flex-shrink:0;font-size:11px;line-height:1.5;color:var(--green-dark);background:var(--soft);padding:3px 8px;border:0;border-radius:5px;margin:0;white-space:nowrap}
.account-display-name{font-size:18px;font-weight:650;line-height:1.5;overflow-wrap:anywhere}
.account-detail-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;font-size:12px;line-height:1.7}
.account-detail-row>span{color:var(--muted);flex-shrink:0}
.account-menu #account-username,.account-menu #account-role-name{font-size:13px;font-weight:500;color:var(--ink);text-align:right;min-width:0;overflow-wrap:anywhere}
.account-menu .role-label{display:block;color:var(--muted);font-size:12px;font-weight:400;margin:0}
.account-menu #role{width:100%;font-size:13px;color:var(--green-dark);padding:6px 9px}
.account-menu #auth-actions{border-top:1px solid var(--line);margin-top:4px;padding-top:6px}
.account-menu #auth-actions .text-button{display:flex;align-items:center;width:100%;min-height:44px;padding:10px 12px;text-align:left;color:var(--ink);border-radius:7px;font-size:13px;line-height:20px}
.account-menu #auth-actions .text-button:hover{background:#edf4ee;color:var(--green-dark)}
.account-menu #auth-actions [data-auth-logout]{color:#aa4a3b}

.report-table-summary{padding:10px 2px 14px;font-size:13px;color:#506e5d;line-height:1.8}.sales-report-tabs{margin-top:0}body[data-current-page="sales-daily"] .resource-panel,body[data-current-page="sales-monthly"] .resource-panel,body[data-current-page="materials"] .resource-panel{margin-top:0}.report-table-summary+.resource-panel th{white-space:nowrap}

/* Receiving quantity and soybean quality are full-width sections, never squeezed into a table cell. */
.purchase-receipt-lines{display:grid;gap:18px;min-width:0}
.purchase-receipt-line{padding:18px 20px;border:1px solid var(--line);border-radius:8px;background:#fff;min-width:0}
.purchase-receipt-line>header{display:flex;justify-content:space-between;align-items:center;gap:24px}
.purchase-receipt-line h3{margin:0;font-size:16px;color:var(--ink)}
.purchase-receipt-line header p{margin:4px 0 0;font-size:12px;color:var(--muted)}
.purchase-receipt-line .receipt-quantity{width:240px;flex-shrink:0;font-size:12px;font-weight:600;color:var(--ink)}
.receipt-order-quantities{display:flex;align-items:center;flex-wrap:wrap;gap:6px 24px;margin:14px 0 0;padding:10px 0;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.receipt-order-quantities b{color:var(--ink);font-variant-numeric:tabular-nums;font-weight:600}
.factory-quality{min-width:0;margin:16px 0 0;padding:14px 16px 16px;border:1px solid #dce7e0;border-radius:7px;background:#f8fbf9}
.factory-quality legend{padding:0 7px;font-size:13px;font-weight:650;color:var(--green-dark)}
.quality-help{margin:0 0 14px;font-size:12px;line-height:1.7;color:#718478}
.quality-batch-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.quality-result-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.factory-quality .field{font-size:12px;color:#506c5d;min-width:0}
.factory-quality .field input{min-width:0;min-height:42px;font-size:14px;background:#fff}
@media(max-width:760px){.purchase-receipt-line{padding:15px}.purchase-receipt-line>header{display:grid;gap:14px}.purchase-receipt-line .receipt-quantity{width:100%}.receipt-order-quantities{gap:6px 14px}.factory-quality{padding:12px}.quality-batch-fields{grid-template-columns:1fr}.quality-result-fields{grid-template-columns:1fr;gap:12px}.factory-quality .field input{font-size:16px}}

.purchase-status-cell{white-space:nowrap!important;min-width:116px;width:1%;max-width:none!important}
.purchase-status-cell .badge{display:inline-flex;flex-wrap:nowrap;white-space:nowrap!important;word-break:keep-all;overflow-wrap:normal;max-width:none;line-height:1.5}
.purchase-status-cell .badge:before{flex-shrink:0}
.purchase-order-actions{flex-wrap:nowrap!important;width:max-content;gap:7px}
.text-button.purchase-action{border:1px solid #dce4df;border-radius:5px;padding:5px 10px;background:#f2f5f3;color:#607268;font-size:12px;line-height:1.6;white-space:nowrap}
.text-button.purchase-action:hover{filter:brightness(.96)}
.text-button.purchase-action-order,.text-button.purchase-action-supplier,.text-button.purchase-action-warehouse{color:#286b9b;background:#edf5fc;border-color:#c8dfee}
.text-button.purchase-action-confirm,.text-button.purchase-action-receipt{color:#216c55;background:#eaf5ee;border-color:#bfdcc9}
.text-button.purchase-action-payment,.text-button.purchase-action-charge-payment{color:#956014;background:#fff4de;border-color:#e8cb91}
.text-button.purchase-action-charge{color:#766098;background:#f4effa;border-color:#dcd0ec}
.text-button.purchase-action-close,.text-button.purchase-action-remove-line{color:#a64d43;background:#fbefed;border-color:#ebc9c4}
.crate-return-list{min-width:0}.crate-return-list table{white-space:normal}.crate-return-list th,.crate-return-list td{padding:12px 16px}.crate-return-list td:first-child{font-size:13px;white-space:nowrap}.crate-return-list input{width:170px;max-width:100%;min-height:42px;font-size:14px}.crate-return-list th:last-child{white-space:nowrap}
@media(max-width:760px){.crate-return-list th,.crate-return-list td{padding:10px 8px}.crate-return-list input{width:135px;font-size:16px}.crate-return-list td:first-child{white-space:normal}}
.button.crate-action-return{background:#e8f2fc;border-color:#a8cce9;color:#225d90;font-weight:600}.button.crate-action-return:hover{background:#d7e9fa}
.button.crate-action-receipt{background:#e5f3e9;border-color:#a6d2b6;color:#236341;font-weight:600}.button.crate-action-receipt:hover{background:#d5ebdd}
.button.crate-action-scrap{background:#fbece9;border-color:#e6b2a9;color:#a34134;font-weight:600}.button.crate-action-scrap:hover{background:#f6dcd6}
.crate-mismatch-row td{background:#fff8f6}.crate-mismatch-row .badge{white-space:nowrap}
.driver-mobile-list{display:none}
@media(max-width:760px){
 body[data-current-page="driver-work"] .driver-desktop-table{display:none}
 body[data-current-page="driver-work"] .driver-mobile-list{display:block;min-width:0;padding:0 15px 15px}
 .driver-mobile-order,.driver-mobile-return{padding:15px 0;border-bottom:1px solid var(--line);min-width:0}
 .driver-mobile-order:last-child,.driver-mobile-return:last-child{border-bottom:0;padding-bottom:0}
 .driver-mobile-order h3{margin:0;font-size:15px;line-height:1.6;overflow-wrap:anywhere}
 .driver-mobile-order>p,.driver-mobile-return>p{margin:4px 0 12px;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
 .driver-product-labels,.driver-product-line{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:center}
 .driver-product-labels{font-size:11px;color:var(--muted);padding:8px 0;border-bottom:1px solid var(--line)}
 .driver-product-line{padding:11px 0;font-size:13px;border-bottom:1px solid #f0f3ef;overflow-wrap:anywhere}
 .driver-product-line:last-child{border-bottom:0}.driver-product-line strong{font-weight:500}.driver-product-labels span:not(:first-child),.driver-product-line span,.driver-product-line b{text-align:right;font-variant-numeric:tabular-nums}
 .driver-mobile-return header,.driver-return-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.driver-mobile-return header{flex-wrap:wrap;font-size:13px}.driver-return-line{padding:7px 0;font-size:13px}.driver-mobile-return .badge{white-space:normal}.driver-review-note{background:#f3f7f2;padding:10px;border-radius:6px}
 body[data-current-page="driver-work"] .panel .head-actions{padding:0 15px 10px}
 body[data-current-page="driver-work"] .main-shell,body[data-current-page="driver-work"] #content,body[data-current-page="driver-work"] .panel{min-width:0;max-width:100%}
}
.driver-matrix-hint{margin:10px 15px;font-size:12px;color:var(--muted);line-height:1.8}
.driver-delivery-matrix{max-width:100%;min-width:0;isolation:isolate;-webkit-overflow-scrolling:touch}
.driver-delivery-matrix th,.driver-delivery-matrix td{min-width:86px;padding:12px 10px}
.driver-delivery-matrix th:first-child,.driver-delivery-matrix td:first-child{min-width:36px;width:36px}
.driver-delivery-matrix thead th:nth-child(2),.driver-delivery-matrix tbody td:nth-child(2),.driver-delivery-matrix .driver-total-label{position:sticky;left:0;z-index:2;background:#f3f8f3;width:125px;min-width:125px;max-width:145px;white-space:normal;overflow-wrap:anywhere;box-shadow:2px 0 3px #203a3610}
.driver-delivery-matrix thead th:last-child,.driver-delivery-matrix tbody td:last-child{position:sticky;right:0;z-index:2;background:#fafcf9;min-width:116px;max-width:150px;white-space:normal;box-shadow:-2px 0 3px #203a3610}
.driver-delivery-matrix .driver-weight-button{padding:6px 9px;color:#286b9b;background:#edf5fc;border-color:#c8dfee}
.driver-weight-product{margin:18px 0;padding:14px 0;border-bottom:1px solid var(--line)}.driver-weight-product h3{font-size:15px;margin:0 0 12px}.driver-weight-product input{width:100%;min-width:70px}.driver-weight-product td{padding:10px 7px}
@media(max-width:760px){.driver-delivery-matrix th,.driver-delivery-matrix td{font-size:12px}.driver-weight-product thead{display:none}.driver-weight-product table,.driver-weight-product tbody{display:block;width:100%;white-space:normal}.driver-weight-product tr{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.driver-weight-product td{display:block;padding:0;border:0;text-align:left!important;min-width:0}.driver-weight-product td:before{content:attr(data-label);display:block;font-size:12px;color:var(--muted);margin-bottom:5px}.driver-weight-product td:nth-child(4){grid-column:1/-1}.driver-weight-product input{font-size:16px;min-height:42px}}
.driver-mobile-market,.driver-mobile-weigh-actions{display:none}
@media(max-width:760px){
 .driver-delivery-matrix table{min-width:calc(125px + var(--driver-product-count)*86px)!important;width:100%}
 .driver-delivery-matrix thead th:first-child,.driver-delivery-matrix tbody td:first-child,.driver-delivery-matrix thead th:nth-child(3),.driver-delivery-matrix tbody td:nth-child(3),.driver-delivery-matrix thead th:last-child,.driver-delivery-matrix tbody td:last-child,.driver-matrix-totals>:first-child,.driver-matrix-totals>:nth-child(3),.driver-matrix-totals>:last-child{display:none}
 .driver-mobile-market{display:block;font-size:11px;margin-top:5px;font-weight:400;color:var(--muted)}
 .driver-mobile-weigh-actions{display:grid;padding:12px 15px;gap:12px;background:#f8fbf8;border-top:1px solid var(--line)}
 .driver-mobile-weigh-actions>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.driver-mobile-weigh-actions span{font-size:12px;overflow-wrap:anywhere}.driver-mobile-weigh-actions .button{flex-shrink:0;color:#286b9b;background:#edf5fc;border-color:#c8dfee}
}
.driver-delivery-matrix th small{display:block;font-size:10px;font-weight:400;color:var(--muted);margin-top:3px}

/* 洋帆登录入口 */
#auth-screen{background:#f3f2ec;padding:40px;min-height:100dvh;box-sizing:border-box;color:#233e36}
.auth-layout{width:min(1080px,100%);display:grid;grid-template-columns:1.12fr 1fr;min-height:650px;border:1px solid #dde3da;border-radius:24px;overflow:hidden;background:#fff;box-shadow:0 24px 80px #16392a12}
.auth-story{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;padding:46px;background:#173e34;color:#f6f4e8}
.auth-identity{display:flex;align-items:center;gap:14px;font-size:19px;font-weight:600;letter-spacing:2px}.auth-identity small{display:block;font-size:10px;letter-spacing:3px;color:#a9c4b4;margin-top:5px}.auth-emblem{display:grid;place-items:center;width:53px;height:53px;border:1px solid #b8c89f80;border-radius:50%;font-size:15px;letter-spacing:1px;color:#e5d8a6}
.auth-story-copy{position:relative;z-index:1;margin:78px 0 62px}.auth-eyebrow{font-size:11px;letter-spacing:2px;color:#80918a}.auth-story .auth-eyebrow{color:#b9cba8}.auth-story h1{font-size:36px;line-height:1.65;font-weight:500;letter-spacing:1px;margin:22px 0}.auth-story-copy p{font-size:13px;line-height:2;color:#bacdc0;margin:0}.auth-story-footer{margin-top:auto;display:flex;gap:18px;align-items:center;font-size:11px;letter-spacing:2px;color:#b6c9ba;z-index:1}.auth-story-footer i{width:3px;height:3px;border-radius:50%;background:#b9cba8}
.auth-orbit{position:absolute;width:390px;height:390px;right:-210px;bottom:-100px;border:1px solid #a8bc832b;border-radius:50%;z-index:-1}.auth-orbit:before,.auth-orbit:after{content:'';position:absolute;inset:35px;border:1px solid #a8bc832b;border-radius:50%}.auth-orbit:after{inset:72px}.auth-orbit span{position:absolute;width:40px;height:65px;border-radius:60% 40% 55% 45%;background:#b4c48b15;transform:rotate(35deg);left:40px;top:30px}.auth-orbit span:nth-child(2){left:100px;top:70px;transform:rotate(-25deg)}.auth-orbit span:nth-child(3){left:45px;top:120px}
.auth-card{width:auto;min-width:0;border:0;border-radius:0;box-shadow:none;padding:68px 50px 35px;display:flex;flex-direction:column;justify-content:center;background:#fff}.auth-card-heading h2{font-size:28px;letter-spacing:1px;margin:17px 0 10px;font-weight:600}.auth-card-heading p{font-size:13px;margin:0 0 24px;color:#7a8980}.auth-card .field{display:flex;flex-direction:column;gap:9px;font-size:13px;color:#3f554a;margin:18px 0}.auth-card input{width:100%;box-sizing:border-box;min-height:48px;background:#f9faf7;border:1px solid #dce3d9;border-radius:8px;padding:11px 13px;font-size:16px}.auth-card input:focus{outline:2px solid #39806544;outline-offset:2px;border-color:#398065;background:#fff}.auth-card .button{width:100%;min-height:48px;font-size:14px;margin:0 0 10px}.auth-card .button.primary{background:#245c47;color:#fff;border:1px solid #245c47}.auth-card .button.primary:hover{background:#1b4938}.auth-card .auth-error{font-size:12px;min-height:20px;margin:8px 0 14px;line-height:1.6}.auth-help{text-align:center;color:#839087;font-size:11px;line-height:1.9;margin-top:16px}.auth-session-note{border-top:1px solid #edf0e9;margin-top:32px;padding-top:19px;text-align:center;font-size:10px;line-height:1.8;color:#97a198}
@media(max-width:760px){#auth-screen{padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:center}.auth-layout{max-width:480px;grid-template-columns:1fr;min-height:0;border-radius:18px}.auth-story{padding:25px 26px 23px}.auth-identity{font-size:16px}.auth-emblem{width:43px;height:43px;font-size:13px}.auth-story-copy{margin:25px 0 0}.auth-story .auth-eyebrow,.auth-story-copy p,.auth-story-footer{display:none}.auth-story h1{font-size:23px;line-height:1.65;margin:0;font-weight:500}.auth-story h1 br:nth-of-type(2){display:none}.auth-orbit{width:280px;height:280px;right:-150px;bottom:-130px}.auth-card{padding:28px 26px 23px}.auth-card-heading .auth-eyebrow{font-size:10px;letter-spacing:1px}.auth-card-heading h2{font-size:24px;margin:12px 0 7px}.auth-card-heading p{margin-bottom:15px;font-size:12px}.auth-card .field{margin:15px 0}.auth-help{margin-top:8px}.auth-session-note{margin-top:21px;padding-top:15px;font-size:9px}}

/* Planning and attendance use compact tables, with actions beside the date. */
.attendance-mode-tabs{display:flex;gap:24px;border:0;border-bottom:1px solid var(--line);background:transparent;padding:0;margin:14px 0;border-radius:0}.attendance-mode-tabs button{min-height:40px;padding:8px 2px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#6b7f71;font-size:14px;touch-action:manipulation}.attendance-mode-tabs button.active{background:transparent;color:#245c47;border-bottom-color:#245c47;font-weight:600}.attendance-page-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.attendance-page-actions .button{min-height:38px;padding:8px 14px;font-size:13px;touch-action:manipulation}.attendance-summary-line{font-size:12px;line-height:1.9;color:#607765;margin:12px 0}.attendance-state{display:flex;align-items:center;gap:12px;flex-wrap:wrap;line-height:1.8;margin:12px 0;font-size:12px}.attendance-mobile-action{display:none}.attendance-editor-list .attendance-edit-summary{border:0;border-radius:0;background:transparent;padding:5px 0 12px;border-bottom:1px solid var(--line)}
@media(max-width:760px){.attendance-mode-tabs{gap:22px}.attendance-mode-tabs button{font-size:13px}.attendance-page-actions{gap:8px}.attendance-page-actions .button{min-height:38px}.attendance-day-list .factory-list-table{min-width:650px}.attendance-day-list .factory-list-table th:first-child,.attendance-day-list .factory-list-table td:first-child{position:sticky;left:0;background:#fff;z-index:1;min-width:85px}.attendance-day-list .factory-list-table td:first-child b{display:block;white-space:normal}.attendance-mobile-action{display:block;margin-top:6px}.attendance-mobile-action .button{min-height:34px;padding:6px 12px;font-size:12px}.attendance-day-list th:last-child,.attendance-day-list td:last-child{display:none}#dialog .attendance-editor-table{min-width:0;width:100%;table-layout:fixed}#dialog .attendance-editor-table th,#dialog .attendance-editor-table td{padding:9px 4px;white-space:normal;word-break:break-word}#dialog .attendance-editor-table th:first-child{width:20%}#dialog .attendance-editor-table th:nth-child(2){width:25%}#dialog .attendance-editor-table th:nth-child(3){width:24%}#dialog .attendance-editor-table th:last-child{width:31%}#dialog .attendance-editor-table input,#dialog .attendance-editor-table select{min-width:0;width:100%;min-height:36px;padding:6px 3px;box-sizing:border-box;font-size:16px}#dialog .factory-group-times{min-width:0;width:100%;table-layout:fixed}#dialog .factory-group-times th,#dialog .factory-group-times td{padding:9px 4px;white-space:normal;word-break:break-word}#dialog .factory-group-times th:first-child{width:20%}#dialog .factory-group-times th:nth-child(2),#dialog .factory-group-times th:nth-child(3){width:31%}#dialog .factory-group-times th:last-child{width:18%}#dialog .factory-group-times input[type=time]{width:100%;min-width:0;min-height:36px;padding:4px 0;box-sizing:border-box;font-size:13px}.attendance-editor-list .factory-editor-search>.field{min-width:0;flex:1}.attendance-editor-list .factory-filter-chip{min-height:34px}.dialog-actions:has([data-factory-confirm]){display:flex;gap:7px;flex-wrap:wrap}.dialog-actions:has([data-factory-confirm]) .button{min-height:38px;padding:8px 10px;font-size:12px;margin:0}.dialog-actions [data-factory-confirm]{flex:1}.attendance-editor-list .sheet-filters{padding:10px}.attendance-editor-list .sheet-filters label{min-width:0}}

/* Production tank counts fit the phone width; swipe directly without focusing a field. */
#factory-form[data-kind=daily] .production-slurry-scroll{min-width:0;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y pinch-zoom}
#factory-form[data-kind=daily] .factory-slurry-form{min-width:0;width:100%;table-layout:fixed}
#factory-form[data-kind=daily] .factory-slurry-form th,#factory-form[data-kind=daily] .factory-slurry-form td{white-space:normal;overflow-wrap:anywhere}
#factory-form[data-kind=daily] .factory-slurry-form input[type=number]{width:100%;min-width:0;box-sizing:border-box;touch-action:pan-x pan-y pinch-zoom}
@media(max-width:760px){#factory-form[data-kind=daily] .factory-slurry-form th,#factory-form[data-kind=daily] .factory-slurry-form td{padding:10px 7px}#factory-form[data-kind=daily] .factory-slurry-form th:first-child{width:32%}#factory-form[data-kind=daily] .factory-slurry-form input[type=number]{min-height:38px;padding:7px 6px;font-size:16px;appearance:textfield}#factory-form[data-kind=daily] .factory-slurry-form input::-webkit-inner-spin-button,#factory-form[data-kind=daily] .factory-slurry-form input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}}

.driver-weight-missing{display:block!important;margin-top:6px;color:#a02b20;font-size:12px;line-height:1.6;font-weight:600;white-space:normal;overflow-wrap:anywhere}.driver-weigh-customer{min-width:0}

.production-results{width:100%;min-width:740px;table-layout:auto}.production-results th,.production-results td{white-space:normal;vertical-align:top;line-height:1.7}.production-results td:last-child{min-width:170px;max-width:330px}.production-results details{margin-top:8px;font-size:12px}.production-results summary,.production-supporting>summary{cursor:pointer;color:#286b9b}.production-supporting>summary{padding:18px;border:1px solid var(--line);border-radius:8px;background:#f8fbf8;margin-bottom:16px}.production-supporting p{overflow-wrap:anywhere}

@media(max-width:760px){
 .production-results,.production-results tbody,.production-missing-table,.production-missing-table tbody{display:block;min-width:0;width:100%}
 .production-results thead,.production-missing-table thead{display:none}
 .production-results tr,.production-missing-table tr{display:grid;grid-template-columns:1fr 1fr;padding:14px;gap:12px;border-bottom:1px solid var(--line)}
 .production-results td,.production-missing-table td{display:block!important;text-align:left!important;padding:0!important;border:0;min-width:0!important;max-width:none!important;white-space:normal!important;overflow-wrap:anywhere}
 .production-results td:before,.production-missing-table td:before{content:attr(data-label);display:block;font-size:11px;color:var(--muted);font-weight:400;margin-bottom:3px}
 .production-results td:first-child,.production-results td:last-child,.production-missing-table td:nth-child(2){grid-column:1/-1}
 .production-missing-table td:first-child{order:0}.production-missing-table td:nth-child(2){order:1}.production-missing-table td:nth-child(3){order:2}.production-missing-table td:nth-child(4){order:3}
}

/* v0.38: shared daily workspace and evidence-based management analysis. */
.home-date-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 22px}.home-date-bar h1{font-size:24px;letter-spacing:.02em;margin:0 auto 0 0}.home-date-bar label{display:flex;gap:9px;align-items:center;color:#64766e;font-size:12px}.home-date-bar input{min-height:38px;border:1px solid var(--line);border-radius:7px;padding:6px 10px;background:white;color:var(--ink)}
.page-back{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:7px;background:transparent;color:#436e60;font-size:13px;padding:8px 10px;margin:-5px 0 14px -10px;cursor:pointer}.page-back:hover{background:#e9f1eb}.page-back span{font-size:19px;line-height:1}
.daily-work-reminder{background:white;border:1px solid #dce6df;padding:22px 24px;gap:28px}.daily-work-reminder.has-carry{background:white;border-color:#e4cda7}.home-reminder-message{display:grid;grid-template-columns:10px 1fr;gap:5px 9px;align-items:center;min-width:215px}.home-reminder-message b{font-size:15px;color:#344b43}.home-reminder-message small{grid-column:2;font-size:11px;color:#78847d;max-width:300px}.status-dot{width:8px;height:8px;border-radius:50%;background:#529478}.has-carry .status-dot{background:#bf8b42}.daily-reminder-counts{display:grid;grid-template-columns:repeat(3,minmax(98px,1fr));gap:12px;min-width:44%}.daily-reminder-counts button{display:flex;flex-direction:column;align-items:flex-start;gap:3px;border:0;border-left:1px solid #e5ebe6;background:transparent;padding:2px 20px;color:#53665d;cursor:pointer;min-width:0;border-radius:0}.daily-reminder-counts button:hover{background:#f4f8f4}.daily-reminder-counts b{font-size:30px;line-height:1.2;font-weight:650;color:#245a46}.daily-reminder-counts .carry-count b{color:#a36d27}.daily-reminder-counts small{font-size:10px;color:#849087}.daily-reminder-counts span{font-size:12px}
.home-workflow{display:block;list-style:none;padding:6px 24px 18px;margin:0}.flow-step{position:relative;margin:0;padding:0 0 10px}.flow-step:not(:last-child):before{content:'';position:absolute;left:27px;top:49px;height:calc(100% - 37px);width:2px;background:#d4e0d8}.flow-step:not(:last-child):after{content:'↓';position:absolute;left:22px;bottom:-3px;background:white;color:#8ca398;font-size:12px;z-index:1}.home-task{display:grid;grid-template-columns:36px minmax(170px,1fr) auto auto 16px;gap:16px;width:100%;align-items:center;background:#fff;color:var(--ink);border:1px solid #e1e8e2;border-radius:9px;padding:16px 18px;text-align:left;position:relative;cursor:pointer}.home-task:hover{background:#f8fbf8;border-color:#98b6a5}.home-task:focus-visible{outline:3px solid #427e69;outline-offset:4px;background:#f0f7f2}.flow-step.pending .home-task{border-left:3px solid #be8b43}.flow-step.done .home-task{background:#f7faf7}.home-task>.flow-step-number{display:grid;place-items:center;line-height:1;text-align:center;width:34px;height:34px;border-radius:50%;background:#edf2ee;color:#72867a;font-size:13px;font-weight:650}.pending .flow-step-number{background:#f8eedc;color:#9f702a}.done .flow-step-number{background:#dfede3;color:#367257}.flow-task-copy{display:flex;flex-direction:column;gap:3px}.home-task strong{font-size:14px;font-weight:650}.home-task .flow-task-copy small{font-size:12px;color:#78847d;line-height:1.6}.flow-task-counts{display:flex;gap:14px;flex-wrap:wrap;color:#728176;font-size:12px;justify-content:flex-end}.flow-task-counts em{font-style:normal;color:#a36c30}.workflow-status{border-radius:5px;padding:4px 10px;background:#edf1ee;color:#7b877f;font-size:12px;font-weight:600;white-space:nowrap}.workflow-status.pending{background:#f9eacb;color:#8b5b16}.workflow-status.done{background:#dfeee3;color:#256442}.flow-open{color:#88a094}.flow-legend{display:flex;gap:6px;align-items:center;font-size:11px;color:#7b887e;flex-wrap:wrap}.flow-legend i{width:6px;height:6px;border-radius:50%;display:inline-block;margin-left:7px}.dot-pending{background:#c0954e}.dot-done{background:#4b8a64}.dot-wait{background:#a8b1ab}
#content .table-wrap table tr>:first-child{padding-left:22px}#content .table-wrap table tr>:last-child{padding-right:22px}#content .table-wrap td .table-action{gap:10px;padding:2px 0;flex-wrap:wrap}#content .table-wrap td>.text-button{margin:2px 4px}.panel-head{gap:16px}.factory-workflow .factory-steps{gap:16px}.factory-step small{font-weight:650;color:#986627;background:#f8eedb;padding:5px 8px;border-radius:5px;display:inline-block}
.owner-section-nav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px}.owner-section-nav a{padding:7px 17px;background:#eaf0eb;border-radius:6px;color:#456c59;text-decoration:none;font-size:13px}.owner-section-nav a:hover{background:#dfeae2}.owner-section{scroll-margin-top:20px;margin:32px 0 44px}.owner-section-heading{margin-bottom:18px;border-left:3px solid #538070;padding-left:13px}.owner-section-heading h2{font-size:21px;line-height:1.4;margin:0 0 5px}.owner-section-heading p{font-size:12px;color:#78867e;max-width:1000px;margin:0}.owner-two-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}.owner-two-columns>.panel{min-width:0}.owner-section .metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.owner-section .metric{padding:18px}.owner-section .metric-value{font-size:25px}.owner-section .metric-foot{line-height:1.6;min-height:34px}.owner-chart .panel-head h3{margin:0;font-size:15px}.owner-chart .panel-head p{font-size:12px;color:#7d8980;margin:5px 0 0}.analysis-svg{padding:0 18px 10px;overflow-x:auto;max-width:100%;overscroll-behavior-x:contain}.analysis-svg svg{display:block;width:100%;height:auto;min-width:560px}.owner-two-columns .analysis-svg svg{min-width:480px}.chart-grid{stroke:#e8eeea;stroke-width:1}.chart-axis{fill:#7e8e84;font-size:12px}.chart-label{fill:#395247;font-size:13px}.chart-unit{fill:#7e8e84;font-size:12px}.chart-caption{padding:0 24px 12px;color:#7c8981;font-size:11px;margin:0}.analysis-svg g:focus{outline:none}.analysis-svg g:focus circle,.analysis-svg g:focus rect{stroke:#b77627;stroke-width:3px}.owner-attention td{background:#fcf4e7}.composition-legend{display:flex;flex-wrap:wrap;gap:10px 16px;padding:0 24px 18px;color:#6d8075;font-size:12px}.composition-legend span{display:flex;align-items:center;gap:6px}.composition-legend i{display:inline-block;width:9px;height:9px;border-radius:2px}.composition-legend .yield-old{background:white;border:1px solid #7e939d;border-radius:50%}.soy-composition{padding:0 24px 26px;display:grid;gap:22px}.composition-row{display:grid;grid-template-columns:74px 1fr;gap:15px;align-items:center}.composition-row strong{font-size:12px;font-weight:550}.composition-row small{display:block;color:#8a978e;font-weight:400;font-size:11px}.composition-track{height:28px;display:flex;background:#f1f4f1;border-radius:5px;overflow:hidden}.composition-track>span{display:flex;align-items:center;justify-content:center;color:#fff;font-size:10px;min-width:0;white-space:nowrap}.composition-track .composition-empty{color:#91a096;width:100%}.owner-work-details{border:1px solid #dce6df;background:#fff;border-radius:10px;margin-bottom:28px}.owner-work-details>summary{cursor:pointer;padding:16px 22px;color:#4d695b;font-size:13px}.owner-work-details>summary span{float:right;color:#a07840}.owner-work-details>.panel{border:0;border-top:1px solid #e5ebe6;border-radius:0;margin:0;box-shadow:none}.cost-basis{background:#f6f1e7;border:1px solid #eadfc8;border-radius:8px;padding:16px 20px;line-height:1.8;color:#897146;font-size:12px;margin:0 0 20px}
@media(min-width:761px){.sidebar-toggle{position:absolute;right:18px;top:27px;width:32px;height:32px;padding:5px;margin:0;background:transparent;border-color:transparent;border-radius:6px}.sidebar .brand{padding-right:28px}.sheet-wide .sidebar-toggle{position:static;align-self:center;width:34px;margin:0 0 14px}.sheet-wide .sidebar .brand{padding-right:0}}
@media(max-width:1100px){.owner-two-columns{grid-template-columns:1fr}.daily-work-reminder{gap:18px}.home-reminder-message{min-width:160px}.daily-reminder-counts{min-width:52%}.daily-reminder-counts button{padding:4px 14px}}
@media(max-width:760px){.home-date-bar{gap:9px;margin-bottom:16px}.home-date-bar h1{font-size:22px;width:100%;margin-bottom:6px}.daily-work-reminder{display:flex;flex-direction:column;align-items:stretch;padding:18px 16px;gap:18px}.daily-reminder-counts{min-width:0;width:100%;gap:0}.daily-reminder-counts button{padding:2px 12px}.daily-reminder-counts button:first-child{border-left:0;padding-left:0}.daily-reminder-counts b{font-size:28px}.daily-reminder-counts small{font-size:9px}.home-reminder-message{min-width:0}.home-reminder-message small{max-width:none}.home-workflow{padding:0 12px 12px}.home-task{grid-template-columns:30px minmax(0,1fr) auto;gap:8px 10px;padding:14px 12px}.home-task>.flow-step-number{width:28px;height:28px;grid-row:1/3}.home-task .flow-task-copy{min-width:0}.home-task strong{font-size:13px}.home-task .flow-task-copy small{font-size:11px}.flow-task-counts{grid-column:2/4;grid-row:2;justify-content:flex-start;gap:12px;font-size:11px}.workflow-status{grid-column:3;grid-row:1;padding:3px 6px;font-size:11px}.flow-open{display:none}.flow-step:not(:last-child):before{left:28px}.flow-step:not(:last-child):after{left:23px}.flow-legend{display:none}.daily-flow-panel .panel-head{padding:16px}.owner-section .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.owner-section .metric{padding:14px;min-width:0}.owner-section .metric-value{font-size:21px;overflow-wrap:anywhere}.owner-section .metric-value small{font-size:11px}.owner-section .metric-label{font-size:11px}.owner-section .metric-foot{font-size:10px}.owner-section-heading h2{font-size:19px}.owner-section{margin-top:26px}.analysis-svg{padding:0 10px 6px}.composition-row{grid-template-columns:64px 1fr;gap:9px}.soy-composition{padding:0 16px 22px}.composition-legend{padding-left:16px;padding-right:16px}.owner-section-nav{gap:6px}.owner-section-nav a{padding:6px 14px}.owner-work-details>summary{padding:14px;font-size:12px}.owner-work-details>summary span{float:none;margin-left:12px}#content .table-wrap table tr>:first-child{padding-left:16px}#content .table-wrap table tr>:last-child{padding-right:16px}.page-back{margin-left:-7px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.soy-tone-0{background:#356f68}.soy-tone-1{background:#d9a34b}.soy-tone-2{background:#628eb5}.soy-tone-3{background:#9b82ad}.soy-tone-4{background:#b5bec3}.composition-track svg{display:block;flex:1;min-width:0}.composition-track svg text{fill:white;font-size:10px;font-family:inherit}.owner-panel-actions{padding:4px 22px 14px}.owner-section{scroll-margin-top:90px}

/* v0.38.2: charts use the phone width; wide tables keep their context. */
.module-search-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:38px;height:38px;padding:8px;border:1px solid #dfe8e1;border-radius:8px;gap:0;color:#507669;background:#f8fbf8}.module-search-button svg{display:block;flex:none}.module-search-button:hover{background:#e9f1eb}.module-search-button:focus-visible{outline:2px solid #417d65;outline-offset:3px}
.chart-desktop{display:block}.chart-mobile{display:none}.mobile-rank,.mobile-yields{padding:0 18px 20px}.mobile-rank-row{margin:0 0 18px}.mobile-rank-label{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;font-size:12px;line-height:1.6;margin-bottom:7px}.mobile-rank-label>span,.mobile-rank-label>strong{min-width:0;overflow-wrap:anywhere;color:#3d594a;font-weight:550}.mobile-rank-label>b{flex-shrink:0;color:#325547;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}.mobile-rank svg{width:100%;display:block}.mobile-chart-scale{display:flex;justify-content:space-between;gap:12px;font-size:10px;color:#7e8e84;margin-top:8px}.mobile-chart-summary{display:flex;gap:10px;flex-wrap:wrap;padding:0 18px 14px;font-size:11px;color:#75857b}.mobile-chart-summary b{color:#325947;font-weight:600}.mobile-yield-row{padding:6px 0 12px;border-bottom:1px solid #edf1ee;margin-bottom:10px}.mobile-yield-row>p{font-size:11px;margin:0 0 2px;color:#7a8980}.mobile-yield-row svg{width:100%;height:auto;display:block}.mobile-trend-line{fill:none;stroke:#356f68;stroke-width:2}.mobile-waterfall-value{font-size:10px;fill:#395247}.mobile-cost-values{padding:0 18px 12px}.mobile-cost-values>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:7px 0;font-size:12px;color:#6c7e72;border-bottom:1px solid #edf1ee}.mobile-cost-values b{font-size:12px;color:#35584a;font-weight:550;font-variant-numeric:tabular-nums}.mobile-cost-values .mobile-cost-result{border-bottom:0;font-weight:600;color:#3e6c8f}.mobile-cost-values .mobile-cost-result b{color:#3e6c8f;font-weight:650}
@media screen and (max-width:760px){
 .module-search-button{width:36px;height:36px;padding:7px}.chart-desktop{display:none}.chart-mobile{display:block}
 .analysis-svg,.owner-two-columns .analysis-svg{overflow:visible;max-width:100%;padding:0 12px 8px;min-width:0}
 .analysis-svg svg,.owner-two-columns .analysis-svg svg{width:100%;height:auto;min-width:0;max-width:100%;display:block}
 .mobile-trend .chart-axis,.mobile-waterfall .chart-axis{font-size:11px}.mobile-trend .chart-unit,.mobile-waterfall .chart-unit{font-size:11px}
 .owner-chart{min-width:0;overflow:hidden}.owner-chart .panel-head{padding:16px}.owner-chart .panel-head h3{font-size:14px}.owner-chart .panel-head p{font-size:11px}.chart-caption{padding-left:18px;padding-right:18px;line-height:1.7}
 .analysis-chart,.soy-stacks{padding:16px;min-width:0;max-width:100%}.resource-panel>.analysis-chart,.resource-panel>.analysis-grid{margin-left:12px;margin-right:12px}
 .analysis-bar-row,.resource-bars>div{grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;min-width:0}.analysis-bar-row>svg,.resource-bars>div>svg{grid-column:1/-1;grid-row:2;min-width:0}.analysis-bar-row>b,.resource-bars>div>b{grid-column:2;grid-row:1;font-size:12px}.analysis-bar-row>span,.resource-bars>div>span{min-width:0;overflow-wrap:anywhere}.resource-bars{padding:14px 16px;min-width:0;max-width:100%}
 .soy-stack-row{grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;min-width:0}.soy-stack-row svg{grid-column:1/-1;grid-row:2;min-width:0}.soy-stack-row b{grid-column:2;grid-row:1;font-size:12px}.soy-analysis{padding:0 12px 8px}.chart-legend{gap:9px 12px;font-size:11px}
 .resource-trend{padding:14px 16px}.resource-trend>div{flex-wrap:wrap;font-size:11px}
 /* Restore legible column widths for editing matrices on phones only. */
 .expanded-table table.worksheet.matrix{width:max-content;min-width:100%;max-width:none;table-layout:fixed}
 .expanded-table .worksheet.matrix col.client-col{width:118px}.expanded-table .worksheet.matrix col.product-col{width:100px}.expanded-table .worksheet.matrix col.progress-col{width:115px}
 .expanded-table .worksheet.matrix th,.expanded-table .worksheet.matrix td,.expanded-table .worksheet.matrix td:not(.freeze-client),.expanded-table .worksheet.matrix th:not(.freeze-client){min-width:100px;width:100px;padding:10px 8px;white-space:normal;overflow-wrap:anywhere}
 .expanded-table .worksheet.matrix .freeze-client{min-width:118px;width:118px;max-width:128px}
 .expanded-table .worksheet.matrix .grid-input{font-size:16px;min-height:38px;padding:6px;min-width:0}
 .expanded-table .warehouse-stock{width:max-content;min-width:1100px;max-width:none;table-layout:fixed}.expanded-table .warehouse-stock th,.expanded-table .warehouse-stock td{min-width:96px;width:96px;padding:10px 8px}.expanded-table .warehouse-stock td input{font-size:16px;min-height:38px}
 .table-wrap>table.erp-table-medium{min-width:620px}.table-wrap>table.erp-table-large{min-width:820px}
 #content .table-wrap.mobile-scroll-table,#dialog-body .table-wrap.mobile-scroll-table{max-width:100%;width:100%;min-width:0;max-height:none!important;height:auto!important;overflow-x:auto!important;overflow-y:hidden!important;isolation:isolate;overscroll-behavior-x:contain;scrollbar-gutter:auto}
 .mobile-scroll-table:focus-visible{outline:2px solid #4e8a6a;outline-offset:-2px}
 #content .mobile-scroll-table.erp-table-contained .erp-sticky-head,#dialog-body .mobile-scroll-table.erp-table-contained .erp-sticky-head{position:sticky;top:var(--erp-header-offset,0px);z-index:5;background:#eef4ed;box-shadow:0 1px 0 #d9e4d9}
 #content .mobile-scroll-table.erp-horizontal .erp-sticky-key,#dialog-body .mobile-scroll-table.erp-horizontal .erp-sticky-key{position:sticky;left:0;z-index:3;background:#fff;min-width:112px;max-width:128px;width:118px;white-space:normal;overflow-wrap:anywhere;box-shadow:2px 0 0 #dfe8e0;padding-left:10px;padding-right:10px}
 #content .mobile-scroll-table.erp-horizontal .erp-sticky-head.erp-sticky-key,#dialog-body .mobile-scroll-table.erp-horizontal .erp-sticky-head.erp-sticky-key{z-index:7;background:#eef4ed}
 .mobile-scroll-table .erp-sticky-key input,.mobile-scroll-table .erp-sticky-key select{min-width:0!important;max-width:100%;width:100%}
 .mobile-scroll-table table{border-collapse:separate;border-spacing:0}
}
@media screen and (max-width:760px){.daily-reminder-counts{grid-template-columns:repeat(3,minmax(0,1fr))}.metric{min-width:0}.metric-value{font-size:clamp(18px,5.5vw,24px);overflow-wrap:anywhere}.resource-trend .chart-desktop{display:none}.resource-trend .chart-mobile{display:block}}

/* Normal vertical gestures belong to the page. Header scrolling is opt-in. */
.table-header-toggle{display:none}
@media screen and (max-width:760px){
 .table-header-toggle:not([hidden]){display:block;margin:4px 16px 10px;padding:8px 12px;border:1px solid #dce6df;border-radius:6px;font-size:12px}
 .table-header-toggle[aria-pressed="true"]{background:#eaf2ec;color:#345e49}
 #content .table-wrap.mobile-scroll-table.erp-table-contained,#dialog-body .table-wrap.mobile-scroll-table.erp-table-contained{max-height:min(68svh,580px)!important;overflow:auto!important}
}

/* A single quiet primary switcher; local filters stay beside their content. */
/* The header owns its account popover and must sit above page controls. */
.topbar{z-index:8}
:root{--page-switch-top:calc(72px + env(safe-area-inset-top,0px));--page-switch-height:54px}
#content>.page-switchbar{position:sticky;top:var(--page-switch-top);z-index:5;display:flex;align-items:stretch;flex-wrap:nowrap;gap:4px;min-width:0;max-width:100%;height:var(--page-switch-height);padding:4px;margin:14px 0 20px;background:#fff;border:1px solid #e2e9e3;border-radius:8px;box-shadow:0 4px 10px #203a3608;scroll-margin-top:calc(var(--page-switch-top) + 8px)}
#content>.page-switchbar>:is(button,a){display:flex;align-items:center;justify-content:center;gap:0;min-width:0;min-height:44px;height:44px;margin:0;padding:8px 18px;border:0;border-bottom:2px solid transparent;border-radius:5px;background:transparent;box-shadow:none;color:#6e8075;font-size:13px;line-height:1.4;font-weight:500;text-align:center;text-decoration:none;white-space:nowrap;touch-action:manipulation}
#content>.page-switchbar>:is(button,a):hover{background:#f2f6f2;color:#315e48}
#content>.page-switchbar>:is(button,a):is(.active,.primary){background:#eaf2ec;border-bottom-color:#3f795d;color:#275b42;font-weight:650}
#content>.page-switchbar>:is(button,a):focus-visible{outline:2px solid #417d65;outline-offset:-2px}
.switch-label-short{display:none}.switch-label-full{display:inline}
#content>.owner-section{scroll-margin-top:calc(var(--page-switch-top) + var(--page-switch-height) + 18px)}
#content .crate-page-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:0 20px 14px}
body[data-current-page="allocation"] .allocation-overview{position:static;box-shadow:none}
@media screen and (max-width:760px){
 :root{--page-switch-top:calc(64px + env(safe-area-inset-top,0px))}
 #content>.page-switchbar{display:grid;grid-template-columns:repeat(var(--switch-count),minmax(0,1fr));gap:0;margin:12px 0 16px;padding:4px 2px}
 #content>.page-switchbar>:is(button,a){padding:8px 2px;font-size:12px;letter-spacing:0}
 .page-switchbar .switch-label-full{display:none}.page-switchbar .switch-label-short{display:inline}
 #content .crate-page-actions{padding:0 14px 12px}
}
@media print{#content>.page-switchbar{position:static;box-shadow:none}}

/* Viewport headers reserve space for global and primary page navigation. */
#content{--page-table-top:var(--page-switch-top)}
#content:has(>.page-switchbar){--page-table-top:calc(var(--page-switch-top) + var(--page-switch-height))}
@media screen and (min-width:761px){
 #content .table-wrap .erp-page-head{position:sticky;top:calc(var(--page-table-top) + var(--erp-header-offset,0px));left:auto;right:auto;z-index:2;background:#f0f5ec;box-shadow:0 1px 0 #d8e3d3}
}

/* Sticky cells belong to their table, below page navigation and popovers. */
.table-wrap{isolation:isolate}
/* Daily work, route ordering, loading weights and concise allocation. */
.owner-trend-controls{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;padding:0 20px 14px}.owner-trend-controls .workflow-tabs{margin:0}.owner-trend-controls label{display:grid;gap:5px;font-size:12px;color:var(--muted)}.owner-trend-controls input{min-height:36px}.owner-aging-chart .rank-svg svg{max-height:none}.owner-aging-chart .mobile-rank-row{padding-top:12px;padding-bottom:12px}
.dispatch-order-control{display:flex;gap:8px;align-items:center}.dispatch-drag-handle{touch-action:none;cursor:grab;background:#edf3f5;border:1px solid #d3e0e5;border-radius:6px;color:#52727d;font-size:24px;line-height:1;padding:6px 10px}.dispatch-dragging{opacity:.5}.dispatch-drop-target{outline:2px solid #538777;outline-offset:-2px}.dispatch-trip-heading th{background:#eaf1f4;color:#375e71;font-weight:750}.dispatch-market-table .dispatch-sequence{width:66px}
.allocation-overview.panel{padding:0;position:static;box-shadow:none;background:white}.allocation-overview-title{padding:14px 20px;margin:0}.allocation-overview-list{width:100%;min-width:540px}.allocation-overview-list th,.allocation-overview-list td{padding:9px 16px;white-space:nowrap}.allocation-overview-list th:first-child{text-align:left}.allocation-overview-list td,.allocation-overview-list thead th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}.allocation-overview-list small{color:var(--muted);font-weight:400}.gap-negative{color:#b33832!important;background:#fff0ee;font-weight:750}.gap-positive{color:#946500!important;background:#fff5d5;font-weight:750}.gap-zero{color:#237347!important;background:#e9f6ee;font-weight:750}.warehouse-locked{display:inline-flex;align-items:center;min-height:38px;padding:8px 16px;background:#e9eef3;border:1px solid #cdd8e2;border-radius:8px;color:#53697c;font-weight:700}.warehouse-allocation thead th,.warehouse-allocation .freeze-client strong{font-weight:750}.allocation-entry{display:flex;align-items:center;gap:4px;white-space:nowrap;font-size:12px;color:#526451}.allocation-entry .grid-input{flex:1;min-width:0}.warehouse-allocation .allocation-demand{font-size:12px;font-weight:500;margin-bottom:6px}.warehouse-allocation .matrix-market-heading th{background:#e8eef6!important;color:#385878!important;border-top:1px solid #cdd9e8}.warehouse-allocation .allocation-lock{font-size:10px;color:#89949d}.warehouse-allocation .sheet-table-caption p{font-size:12px}
.client-order-references{display:flex;flex-wrap:wrap;gap:4px 18px;margin-top:5px}.client-order-references small{font-size:11px;color:#6e8077}.quantity-unit{white-space:nowrap!important;overflow-wrap:normal!important}.weight-load-summary{margin-bottom:18px}.weight-load-summary table{width:100%}.weight-load-summary td{font-variant-numeric:tabular-nums}.weight-expanded table.worksheet.processing.weight .freeze-product{width:13%}.weight-expanded table.worksheet.processing.weight th:nth-child(2){width:6%}.weight-expanded table.worksheet.processing.weight th:nth-child(3){width:10%}.weight-expanded table.worksheet.processing.weight .standard-heading{width:8%}.weight-expanded table.worksheet.processing.weight .factory-heading{width:9%}.weight-expanded table.worksheet.processing.weight .source-heading{width:20%}.weight-expanded .freeze-product small{font-size:10px}.weight-expanded .allocated-reference{font-size:10px}.weight-expanded .not-shipped-label{font-size:10px}.weight-expanded .pack-note label{font-size:11px}
@media(max-width:700px){.owner-trend-controls{padding:0 12px 14px;gap:10px}.owner-trend-controls label{flex:1}.owner-trend-controls .workflow-tabs{width:100%}.weight-expanded table.worksheet.processing.weight .freeze-product{width:100%}.allocation-overview-list th,.allocation-overview-list td{padding:8px 10px}.warehouse-locked{font-size:12px}.allocation-entry{flex-wrap:wrap}}
.weight-expanded .simple-weight-cell small{display:block;margin-top:5px;color:#71856c;font-size:11px}.weight-expanded .badge{white-space:nowrap;overflow-wrap:normal;word-break:keep-all;font-size:11px}.settlement-weight-details{margin-top:6px;min-width:190px}.settlement-weight-details summary{font-size:11px;color:var(--green);cursor:pointer}.settlement-weight-details[open]{padding:8px;background:#f4f8f2;border-radius:6px}.settlement-weight-details .mini-labels{margin-top:6px}.weight-expanded table.worksheet.processing.weight .source-heading{width:17%}.weight-expanded table.worksheet.processing.weight .freeze-product{width:15%}.weight-expanded table.worksheet.processing.weight .factory-heading{width:11%}.weight-expanded table.worksheet.processing.weight .standard-heading{width:10%}
@media(max-width:700px){.weight-expanded table.worksheet.processing.weight .freeze-product{width:100%}}
.weight-load-summary thead small,.allocation-overview-list thead small,.processing thead small{display:block;font-size:10px;font-weight:400;white-space:nowrap;color:#819078}.processing [data-standard-weight] small{display:block;font-size:11px;color:#819078;margin-top:4px}.weight-expanded table.worksheet.processing.weight th:nth-child(2){width:8%}.weight-expanded table.worksheet.processing.weight .freeze-product{width:13%}.weight-expanded table.worksheet.processing.weight .standard-heading{width:13%}.weight-expanded table.worksheet.processing.weight .source-heading{width:15%}.weight-expanded table.worksheet.processing.weight .factory-heading{width:11%}
@media(max-width:700px){.weight-expanded table.worksheet.processing.weight .freeze-product{width:100%}}
.processing [data-standard-weight] .standard-total{display:block;font-size:18px;font-weight:400;color:#2e5944;line-height:1.3;border:0}.processing [data-standard-weight] small{font-size:10px;margin-top:4px;color:#82917d}.weight-expanded table.worksheet.processing.weight .freeze-product{width:12%}.weight-expanded table.worksheet.processing.weight th:nth-child(2){width:6%}.weight-expanded table.worksheet.processing.weight th:nth-child(3){width:8%}.weight-expanded table.worksheet.processing.weight .standard-heading{width:11%}.weight-expanded table.worksheet.processing.weight .factory-heading{width:9%}.weight-expanded table.worksheet.processing.weight .source-heading{width:12%}.weight-expanded table.worksheet.processing.weight .tare-heading{width:5%}.weight-expanded table.worksheet.processing.weight .average-heading{width:8%}.weight-expanded table.worksheet.processing.weight .diff-heading{width:4%}.weight-expanded table.worksheet.processing.weight .status-heading{width:5%}.weight-expanded table.worksheet.processing.weight thead small{white-space:normal;overflow-wrap:normal}.processing [data-tare-cell] small{display:block;font-size:10px;color:#82917d}.processing [data-average-net]{font-variant-numeric:tabular-nums}.processing.account [data-field=settlement_tare]{width:70px}.weight-expanded .badge{padding:3px;font-size:10px}
@media(max-width:700px){.weight-expanded table.worksheet.processing.weight .freeze-product{width:100%}}

/* One horizontal rule per product row; no vertical column dividers. */
.client-sheet .worksheet.processing th,.client-sheet .worksheet.processing td{border-left:0!important;border-right:0!important}
.client-sheet .worksheet.processing tbody tr{border:0!important}
.client-sheet .worksheet.processing tbody td,.client-sheet .worksheet.processing tbody th{border-top:0!important;border-bottom:1px solid var(--line)!important}
.client-sheet .worksheet.processing [data-standard-weight] .standard-total{font-weight:400}
@media(max-width:700px){.client-sheet .weight-expanded .worksheet.processing tbody tr{border-bottom:1px solid var(--line)!important}.client-sheet .weight-expanded .worksheet.processing tbody td,.client-sheet .weight-expanded .worksheet.processing tbody th{border-bottom:0!important}}

.worksheet.processing .grid-input[data-field="actual_qty"][data-actual-changed="true"]{background:#fff1ce!important;border-color:#d6a33b!important;color:#8a5c11!important;box-shadow:0 0 0 1px #d6a33b33}

/* Shared emphasis for the header and first column across every application table. */
#content table thead th,#content table thead td{font-weight:700!important}
#content table tbody tr>:first-child{font-weight:700!important}
#content table tbody tr>:first-child>.customer-name,#content table tbody tr>:first-child>strong{font-weight:inherit!important}
#content table tbody tr>:first-child small{font-weight:400}
#content .worksheet.processing .grid-input[data-field="actual_qty"]{font-size:18px;font-weight:700;min-height:38px}
@media(max-width:700px){#content .weight-expanded td::before{font-weight:700}}

/* Customer-level weighing progress and save actions. */
.client-name-row{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.client-name-row h2{margin:0}.client-weight-controls,.client-weight-progress{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.client-progress-badge{display:inline-flex;align-items:center;padding:6px 11px;border-radius:6px;font-size:12px;font-weight:700;line-height:1.4;border:1px solid transparent}.client-progress-badge.pending{color:#875516;background:#fff0ce;border-color:#e9cd8d}.client-progress-badge.complete{color:#206644;background:#dcefe2;border-color:#a6cfb4}.client-progress-badge.attention,.client-progress-badge.unsaved{color:#a23a29;background:#ffebe4;border-color:#e9b9a9}.weight-expanded table.worksheet.processing.weight .diff-heading{width:9%}
.back-to-top{position:fixed;right:24px;bottom:calc(24px + env(safe-area-inset-bottom,0px) + var(--erp-covered-bottom,0px));z-index:25;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #bfd2c5;border-radius:50%;color:#28634b;background:#fff;box-shadow:0 4px 16px #203a3624;cursor:pointer}.back-to-top[hidden]{display:none}.back-to-top:hover{background:#e9f2ec;border-color:#73a188}.back-to-top:focus-visible{outline:2px solid #28634b;outline-offset:3px}body.modal-open .back-to-top{display:none}
@media(max-width:700px){.client-name-row{gap:10px}.client-weight-controls{width:100%;justify-content:space-between}.back-to-top{right:16px;bottom:calc(18px + env(safe-area-inset-bottom,0px) + var(--erp-covered-bottom,0px))}}

/* Average weights use each order's standard unit weight and the shared warning percentage. */
.client-sheet .worksheet.processing td.weight-average-alert{font-weight:700}.client-sheet .worksheet.processing td.weight-average-alert.low{color:#ac392f;background:#fff0ed}.client-sheet .worksheet.processing td.weight-average-alert.high{color:#926000;background:#fff3cd}
.parameter-description{max-width:480px;text-align:left!important;line-height:1.8}.system-parameter-groups .panel-head{padding-bottom:12px}.system-parameter-groups td,.system-parameter-groups th{white-space:normal}.parameter-entry-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:0 22px 22px}.parameter-entry-links article{padding:16px;border:1px solid var(--line);border-radius:8px}.parameter-entry-links p{font-size:12px;color:var(--muted);line-height:1.8}.parameter-form-item{min-width:0}.parameter-field-help{display:block;margin-top:6px;font-size:11px;color:var(--muted);line-height:1.7}
@media(max-width:700px){.parameter-entry-links{grid-template-columns:1fr;padding:0 14px 14px}.system-parameter-groups .table-wrap{overflow-x:auto}.system-parameter-groups table{min-width:620px}}

.parameter-history-table{min-width:780px}.parameter-pending{color:#91631c!important;white-space:nowrap}.system-parameter-groups .button{white-space:nowrap}.sidebar-toggle svg{flex-shrink:0}

/* Matching summaries for both grinding systems, with aligned metrics and units. */
.factory-beans-panel .panel-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:16px}.factory-beans-panel .panel-head h2{min-width:0;margin:0;line-height:1.6}.factory-beans-panel .panel-head .button{flex-shrink:0;white-space:nowrap}.factory-beans-panel .panel-explanation{margin:0 0 16px}
.factory-system-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:16px;margin:18px 0}.factory-beans-panel .factory-system-overview{margin:0;padding:0 20px 20px}.grinding-system-card{min-width:0;margin:0;padding:20px;border:1px solid #dce6df;border-radius:9px;background:#fbfdfa}.grinding-system-card h3{margin:0 0 14px;font-size:15px;font-weight:700;color:#345c47}.grinding-system-card dl{margin:0}.grinding-system-card dl>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:16px;padding:10px 0}.grinding-system-card dl>div+div{border-top:1px solid #e7eee8}.grinding-system-card dt{color:#7b8c80;font-size:12px}.grinding-system-card dd{display:flex;align-items:baseline;justify-content:flex-end;gap:7px;margin:0;white-space:nowrap;font-variant-numeric:tabular-nums}.grinding-value{font-size:24px;font-weight:600;line-height:1.3;color:#28563f}.grinding-unit{min-width:24px;text-align:left;color:#839285;font-size:11px}.grinding-missing{font-size:13px;color:#8a978d}
@media(max-width:650px){.factory-system-overview{grid-template-columns:1fr;gap:12px}.factory-beans-panel .panel-head{padding:16px;gap:12px}.factory-beans-panel .panel-head h2{font-size:14px}.factory-beans-panel .panel-explanation{padding:0 16px;font-size:12px}.factory-beans-panel .factory-system-overview{padding:0 16px 16px}.grinding-system-card{padding:16px}.grinding-system-card h3{font-size:14px}.grinding-value{font-size:22px}}

/* Cumulative bean entry: clear line sections, current values and a live change preview. */
.bean-correction-layout{display:grid;gap:18px}.bean-correction-meta{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:20px;padding-bottom:16px;border-bottom:1px solid var(--line)}.bean-date{display:grid;gap:5px}.bean-date>span{font-size:12px;color:#718973}.bean-date time{font-size:15px;color:#365b45;font-variant-numeric:tabular-nums}.bean-correction-hint{margin:0;color:#77877b;font-size:12px;line-height:1.8}.bean-correction-systems{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.bean-correction-system{min-width:0;margin:0;padding:16px 18px 12px;border:1px solid #d7e4da;border-radius:9px;background:#fafdf9}.bean-correction-system legend{padding:0 7px;font-size:15px;font-weight:700;color:#355f47}.bean-recorded{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 16px;color:#849084;font-size:12px}.bean-recorded b{font-weight:500;color:#5e7764;font-variant-numeric:tabular-nums}.bean-total-input{display:flex;align-items:center;gap:8px;border:1px solid #bccfc0;border-radius:7px;background:#fff;margin-top:7px;padding-right:14px}.bean-total-input:focus-within{border-color:#40856a;box-shadow:0 0 0 2px #40856a1a}.bean-total-input input{width:100%;min-width:0;min-height:52px;padding:9px 12px;border:0;border-radius:7px;background:transparent;font-size:24px;font-weight:600;color:#28563f;font-variant-numeric:tabular-nums;appearance:textfield;-moz-appearance:textfield}.bean-total-input input::-webkit-inner-spin-button,.bean-total-input input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bean-total-input input:focus{outline:none;box-shadow:none}.bean-total-input>span{flex-shrink:0;color:#819181;font-size:12px}.bean-change{min-height:20px;margin:9px 0 0;font-size:12px;color:#89958b;font-variant-numeric:tabular-nums}.bean-change[data-direction=increase]{color:#28734e}.bean-change[data-direction=decrease]{color:#9b6a22}.bean-change[data-direction=invalid]{color:#b44c3e}.bean-correction-note textarea{margin-top:4px;min-height:72px;resize:vertical}.bean-correction-note .note-presets{margin-top:8px}
@media(max-width:650px){.bean-correction-layout{gap:15px}.bean-correction-meta{gap:16px;padding-bottom:14px}.bean-correction-meta .field input{width:100%;min-width:0}.bean-correction-systems{grid-template-columns:1fr;gap:14px}.bean-correction-system{padding:12px 14px 10px}.bean-recorded{margin-bottom:12px}.bean-total-input input{min-height:48px;font-size:22px}}
#dialog #factory-form[data-kind="beans"] .bean-total-input input{border:0;background:transparent;box-shadow:none;outline:none;min-height:52px;padding:9px 12px;font-size:24px;font-weight:600;color:#28563f}
.bean-correction-meta{align-items:start}.bean-date time{display:flex;align-items:center;min-height:40px}
@media(max-width:650px){#dialog #factory-form[data-kind="beans"] .bean-total-input input{min-height:48px;font-size:22px}}

/* Clear save boundaries and persistent, actionable feedback. */
#compact-save-status{margin-left:auto;max-width:24ch;margin-right:8px;font-size:12px;line-height:1.5;color:#375d49;text-align:right}
#compact-save-status[data-state="dirty"]{color:#815314}
#compact-save-status[data-state="error"]{color:#a33930}
.work-status-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;margin:-6px 0 14px;border:1px solid #dce6de;border-radius:8px;background:#fff;color:#365744}
.work-status-bar>div{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;min-width:0}
.work-status-bar b{font-size:13px;font-weight:650;overflow-wrap:anywhere}
.work-status-bar span,.work-status-bar small{font-size:12px;line-height:1.7;color:#52695a;overflow-wrap:anywhere}
.work-status-bar[data-state="error"]{border-color:#c2786c;background:#fff6f3}
.work-status-bar[data-state="dirty"]{border-left:3px solid #ac7529}
.operation-feedback{padding:14px 16px;margin:0 0 16px;border:1px solid #ce9c8f;border-radius:8px;background:#fff6f2;color:#853d31;font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.operation-feedback[hidden]{display:none}
.feedback-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:8px}
.latest-record-check{margin-top:12px;padding-top:12px;border-top:1px solid #dfc0b4;color:#334f41;font-size:13px}
.latest-record-check p{margin:8px 0}.latest-record-check ul{padding-left:20px}.latest-record-check table{min-width:480px;background:#fff}
.read-state{padding:24px;margin:16px 0;border:1px solid #dce6de;border-radius:8px;background:white;color:#3f5c4b;font-size:14px}
.read-state p{margin:8px 0;color:#52695a}.read-state-error{border-color:#ce9c8f;background:#fff8f4}
.dialog-save-note{margin:18px 0 0;padding-top:12px;border-top:1px solid #dce6de;font-size:12px;color:#52695a}
#dialog .dialog-actions .button[aria-busy="true"]{min-width:104px}
.sheet-filters label,.field,.field small,.help-text,.panel-head p,.page-head p,.sheet-help{color:#52695a}
.sheet-filters label,.field,.field-error{font-size:12px}
#content .table-wrap table td{font-size:13px}
#content .table-wrap table th{font-size:12px;color:#3d5846}
#content :is(.worksheet,.receivable-orders,.factory-list-table) :is(td,th) small{font-size:12px;color:#536b59}
#content [data-align="right"]{font-variant-numeric:tabular-nums}
#content .sheet-help{font-size:12px;line-height:1.7}
.attendance-cell-detail{display:block;width:100%;min-width:30px;min-height:32px;padding:3px;border:0;border-radius:4px;background:transparent;color:inherit;font:inherit}
.attendance-cell-detail:hover,.attendance-cell-detail:focus-visible{background:#e5eee7;outline:2px solid #417d65;outline-offset:-2px}
.attendance-cell-note{padding:12px 16px;margin:0;background:#edf4ef;color:#365744;border-bottom:1px solid #dce6de;font-size:13px;overflow-wrap:anywhere}
@media screen and (max-width:760px){
 #compact-save-status{font-size:12px;max-width:7em;flex-shrink:0;margin-left:0}
 .work-status-bar{padding:12px;align-items:flex-start;flex-wrap:wrap}
 .work-status-bar b{font-size:14px}.work-status-bar span,.work-status-bar small{font-size:12px}
 #dialog{height:auto;max-height:100%}
 #dialog .dialog-actions .button,.head-actions .button,.driver-weight-button{min-height:44px}
 #dialog :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea),#content :is(.field input,.field select,.field textarea,.sheet-filters input,.sheet-filters select){font-size:16px;min-height:44px}
 .feedback-actions .button{min-height:44px}
 .read-state,.operation-feedback{padding:14px;font-size:14px}
 .attendance-cell-detail{min-width:38px;min-height:44px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
 button:active{transform:none}
}
.operation-feedback{scroll-margin-top:calc(var(--page-switch-top) + 72px)}
#dialog .operation-feedback{scroll-margin-top:12px}

/* Save labels and optional counts form one centered group, including when empty. */
.button>.button-label,.button>.button-count{display:block;margin:0;padding:0;font:inherit;line-height:inherit;color:inherit;text-align:center;white-space:nowrap}
.button>.button-count:empty{display:none}
.client-weight-controls>[data-sheet-action="save-weight-client"]{flex-shrink:0;white-space:nowrap;min-height:38px}
/* Keep each workflow count and its number together on the same line. */
.home-task>.flow-task-counts{display:flex;align-items:baseline;flex-wrap:nowrap;gap:12px;min-width:0;white-space:nowrap}
.home-task .flow-task-count{display:inline-flex;align-items:baseline;flex:0 0 auto;gap:4px;white-space:nowrap;word-break:keep-all;font-style:normal}
.home-task .flow-task-count b{font-size:14px;line-height:20px}
.daily-reminder-counts>button>span{display:block;white-space:nowrap}
@media screen and (min-width:761px) and (max-width:1100px){
 .home-task{grid-template-columns:36px minmax(0,1fr) auto 16px;gap:8px 12px}
 .home-task>.flow-step-number{grid-column:1;grid-row:1/3}
 .home-task>.flow-task-copy{grid-column:2;grid-row:1;min-width:0}
 .home-task>.flow-task-counts{grid-column:2/4;grid-row:2;justify-content:flex-start}
 .home-task>.workflow-status{grid-column:3;grid-row:1}
 .home-task>.flow-open{grid-column:4;grid-row:1/3}
}
@media screen and (max-width:760px){
 .client-weight-controls>[data-sheet-action="save-weight-client"]{min-height:44px}
 .text-button.workflow-next,.text-button.print-action{min-height:44px}
}
@media screen and (max-width:350px){.home-task>.flow-task-counts{gap:8px}}
/* Let action rows move below a long title instead of squeezing button labels. */
.page-head{flex-wrap:wrap;align-items:flex-start}
.page-head>div:first-child{min-width:0;flex:1 1 320px}
.page-head>.head-actions{flex:0 0 auto;max-width:100%}
.head-actions>.button{flex-shrink:0;max-width:100%}

@media screen and (max-width:760px){.home-task>.flow-open{display:none}}

/* Shared workflow status language, matching the weighing customer cards. */
.badge,.client-progress-badge,.workflow-status,.home-task .workflow-status{display:inline-flex;align-items:center;justify-content:center;gap:0;padding:6px 11px;border:1px solid #d4ddd6;border-radius:6px;font-size:12px;font-weight:700;line-height:1.4;white-space:nowrap;color:#64756a;background:#eef2ee}
.badge:before{display:none}
.badge.orange,.badge.blue,.client-progress-badge.pending,.workflow-status.pending,.home-task .workflow-status.pending,.home-task .workflow-status.carry{color:#875516;background:#fff0ce;border-color:#e9cd8d}
.badge.green,.client-progress-badge.complete,.workflow-status.done,.home-task .workflow-status.done{color:#206644;background:#dcefe2;border-color:#a6cfb4}
.badge.red,.client-progress-badge.attention,.client-progress-badge.unsaved,.workflow-status.attention{color:#a23a29;background:#ffebe4;border-color:#e9b9a9}
.badge[data-workflow-tone=pending],.workflow-status[data-workflow-tone=pending],.home-task .workflow-status[data-workflow-tone=pending]{color:#875516;background:#fff0ce;border-color:#e9cd8d}
.badge[data-workflow-tone=complete],.workflow-status[data-workflow-tone=complete],.home-task .workflow-status[data-workflow-tone=complete]{color:#206644;background:#dcefe2;border-color:#a6cfb4}
.badge[data-workflow-tone=attention],.workflow-status[data-workflow-tone=attention],.home-task .workflow-status[data-workflow-tone=attention]{color:#a23a29;background:#ffebe4;border-color:#e9b9a9}
.client-progress-badge.neutral,.badge[data-workflow-tone=neutral],.workflow-status[data-workflow-tone=neutral],.home-task .workflow-status[data-workflow-tone=neutral]{color:#64756a;background:#eef2ee;border-color:#d4ddd6}

/* Customer summaries stay visible; collapsing never unmounts editable fields. */
[data-customer-header]{cursor:pointer}
.production-analysis>summary{padding:14px 20px;cursor:pointer;font-size:14px;font-weight:600;color:var(--green-dark)}
.production-analysis>.analysis-grid{padding:0 20px 20px}
.customer-detail-toggle{display:flex;align-items:center;gap:10px;min-height:44px;max-width:100%;border:0;border-radius:6px;padding:4px 0;background:transparent;color:inherit;text-align:left;cursor:pointer}
.customer-detail-toggle:hover{background:#ffffff60}
.customer-detail-toggle>svg{flex-shrink:0;transition:transform 150ms ease}
.customer-detail-toggle[aria-expanded=true]>svg{transform:rotate(90deg)}
.customer-detail-toggle .customer-toggle-title{font-size:inherit;font-weight:inherit;color:inherit;min-width:0;overflow-wrap:anywhere}
.customer-detail-toggle .customer-detail-label{flex-shrink:0;font-size:12px;font-weight:400;letter-spacing:0;color:#536b5b;white-space:nowrap}
.customer-detail-toggle small{display:block;font-size:11px;font-weight:400;letter-spacing:0;color:var(--muted)}
.client-sheet-head>div:first-child{flex:1;min-width:0}
.client-header-actions{flex-shrink:0;margin-left:auto;display:flex;align-items:center;justify-content:flex-end}
.client-header-actions>.button{white-space:nowrap;flex-shrink:0}
.client-sheet-head .client-weight-controls{width:auto}
.client-sheet-head .client-weight-progress{gap:8px}
.customer-detail-body>.client-order-references{padding:12px 20px;border-bottom:1px solid var(--line);font-size:11px;color:var(--muted)}
.customer-disclosure:not(.customer-details-open)>.client-sheet-head{border-bottom:0}
.review-order>h3{margin:0;padding:12px 0}
.review-order .customer-detail-toggle{font-size:17px;font-weight:650}
.review-order>.customer-detail-body{padding-bottom:12px}
.page-head>.head-actions,.page-head:has(+.sheet-filters)>.head-actions{justify-content:flex-end;margin-left:auto}
.sheet-table-caption>.head-actions{margin-left:auto;justify-content:flex-end}
@media screen and (max-width:1100px){.page-head>div:first-child{flex-basis:auto}}
@media screen and (max-width:760px){
 .client-sheet-head{flex-wrap:wrap;gap:10px}
 .client-sheet-head>div:first-child{flex-basis:100%}
 .client-header-actions{width:100%;justify-content:flex-end}
 .client-header-actions>.button{min-height:44px}
 .customer-detail-toggle{flex-wrap:wrap;column-gap:8px;row-gap:2px}
 .customer-detail-toggle .customer-detail-label{font-size:11px}
 .client-sheet-total{margin-left:auto;text-align:right}
 .badge,.client-progress-badge,.workflow-status,.home-task .workflow-status{font-size:11px;padding:5px 8px}
}
@media(prefers-reduced-motion:reduce){.customer-detail-toggle>svg{transition:none}}
@media print{.customer-detail-body[hidden]{display:block!important}.customer-detail-label,.customer-detail-toggle>svg{display:none}.customer-detail-toggle{padding:0;min-height:0}}

.daily-special-supply{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}.daily-special-supply>summary{cursor:pointer;font-weight:600;color:var(--accent)}
#factory-form[data-kind=daily] .factory-slurry-form th:first-child{width:40%}

/* Parameter workspace and production editor share the business form vocabulary. */
.parameter-settings-page{min-width:0}.parameter-settings-tabs{margin-bottom:14px}.parameter-settings-tabs button{display:inline-flex;align-items:center;gap:8px}
.parameter-tab-count{font-size:11px;line-height:18px;padding:0 6px;border-radius:4px;background:var(--soft);color:var(--green)}
.parameter-tab-description{margin:0 0 18px;color:var(--muted);font-size:12px;line-height:1.8}
.parameter-settings-page .system-parameter-groups .resource-panel+.resource-panel{margin-top:18px}
.parameter-values-table{table-layout:fixed;min-width:700px}.parameter-values-table th:first-child{width:24%}.parameter-values-table th:nth-child(2){width:14%}.parameter-values-table th:nth-child(3){width:12%}.parameter-values-table th:nth-child(4){width:34%}.parameter-values-table th:last-child{width:16%}
.parameter-values-table tbody th{background:transparent;color:var(--ink);text-align:left!important;white-space:normal;line-height:1.8}.parameter-values-table td{vertical-align:middle;white-space:normal}.parameter-value{font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}.parameter-values-table td small{font-size:11px}
.production-config-overview{margin-bottom:20px}.production-config-overview>.panel-head{align-items:center}.production-config-overview>.panel-head p{font-size:12px;line-height:1.7;color:var(--muted)}
.production-directory-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;padding:0 22px 20px;margin:0}
.production-directory-summary>div{display:flex;flex-direction:column;gap:6px;min-width:0}.production-directory-summary>div>span{font-size:12px;color:var(--muted)}.production-directory-summary b{font-weight:600;font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}.production-directory-summary b small{margin-left:8px;font-size:11px;font-weight:400;color:var(--muted)}
.config-version-strip{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;border-top:1px solid var(--line);padding:11px 22px;background:#fafbf8;color:var(--muted);font-size:11px}.config-version-strip b{font-weight:500;color:var(--ink)}.config-version-strip .config-scheduled{color:var(--orange)}
#production-config-form{min-width:0}#production-config-form>.config-editor-fields{border:0;padding:0;margin:0;min-width:0}
.config-dialog-intro{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin:0 0 16px;color:var(--muted);font-size:12px}.config-dialog-intro>span{border:1px solid var(--line);border-radius:5px;padding:3px 9px;background:#fff;white-space:nowrap}.config-dialog-intro p{margin:0;line-height:1.8}
.config-editor-tabs{margin-bottom:18px}.config-editor-tabs button{display:inline-flex;gap:8px;align-items:center}.config-editor-tabs button>span{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.config-section{margin:0 0 20px;border:1px solid var(--line);border-radius:8px;background:#fff;overflow:hidden}.config-section[hidden]{display:none!important}
.config-section-head{padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line)}.config-section-head h3{margin:0;font-size:14px;font-weight:600;color:var(--ink)}.config-section-head p{margin:4px 0 0;font-size:12px;color:var(--muted);line-height:1.7}
.config-entity{margin:0;border-bottom:1px solid var(--line)}.config-entity:last-child{border-bottom:0}
.config-entity>summary{display:flex;align-items:center;gap:16px;padding:15px 18px;cursor:pointer;list-style:none}.config-entity>summary::-webkit-details-marker{display:none}.config-entity>summary:hover{background:var(--bg)}.config-entity>summary:focus-visible{outline:2px solid #79a68b;outline-offset:-2px}
.config-entity-title{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}.config-entity-title b{font-size:13px;font-weight:600;color:var(--ink);overflow-wrap:anywhere}.config-entity-title small{font-size:11px;font-weight:400;color:var(--muted);line-height:1.7;overflow-wrap:anywhere}.config-entity>summary>.badge{flex:none}.config-relation-count{font-size:11px;color:var(--muted);white-space:nowrap}.config-chevron{flex:none;color:var(--muted)}.config-entity[open]>summary>.config-chevron{transform:rotate(180deg)}
.config-entity-editor{padding:16px 18px 20px;border-top:1px solid var(--line);background:var(--bg)}.config-entity-id{margin:0 0 14px;font-size:11px;color:var(--muted);overflow-wrap:anywhere}
#production-config-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px}#production-config-form .field{min-width:0;line-height:1.7}#production-config-form input,#production-config-form select,#production-config-form textarea{min-width:0}
#production-config-form input[readonly]{background:#f0f3ee;color:#718078}.config-state-choice{display:inline-flex;gap:8px;align-items:center;min-height:40px;color:var(--ink);font-weight:400}
.config-choice-field{padding:0;border:0;margin:2px 0 0;min-width:0}.config-choice-field legend{padding:0;margin-bottom:8px;font-size:12px;color:var(--muted)}
.config-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.config-choices label{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:6px;font-size:12px;font-weight:400;line-height:1.7;color:var(--ink);min-width:0}.config-choices label:has(input:checked){border-color:#b4ccbd;background:var(--soft)}.config-choices label span{overflow-wrap:anywhere}.config-choices input[type=checkbox],.config-state input[type=checkbox]{width:16px!important;height:16px!important;padding:0!important;min-height:0!important;flex:none;margin:2px 0 0}
.config-parameter-note{margin:0;font-size:11px;color:var(--muted);line-height:1.8}.config-publish{border-top:1px solid var(--line);padding-top:18px}.config-publish-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 16px;margin-bottom:14px}.config-publish-heading h3{font-size:13px;font-weight:600;margin:0}.config-publish-heading p{margin:0;font-size:11px;color:var(--muted)}
#production-config-form .config-publish .form-grid{grid-template-columns:minmax(180px,1fr) minmax(0,2fr)}
@media(max-width:700px){.parameter-settings-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.parameter-settings-tabs button{justify-content:center;padding:9px 8px;min-height:42px}.parameter-settings-page .parameter-entry-links{padding:0 16px 16px}.production-directory-summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:0 16px 18px;gap:16px 20px}.config-version-strip{padding:11px 16px}.config-editor-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.config-editor-tabs button{justify-content:center;min-height:42px;padding:8px}.config-dialog-intro{font-size:11px}.config-section-head{padding:14px;align-items:flex-start}.config-section-head p{font-size:11px}.config-section-head>.button{padding:7px 10px;min-height:38px}.config-entity>summary{padding:14px;gap:10px}.config-entity-editor{padding:14px}.config-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#production-config-form .form-grid,#production-config-form .config-publish .form-grid{grid-template-columns:1fr;gap:14px}.config-choices label{padding:9px 10px;font-size:11px}.config-relation-count{font-size:10px}.config-publish-heading{display:block}.config-publish-heading p{margin-top:4px}}
@media(max-width:360px){.config-choices{grid-template-columns:1fr}.production-config-overview>.panel-head{gap:10px}.production-config-overview>.panel-head>.button{padding:8px 10px}}

.parameter-values-table td:nth-child(3){white-space:nowrap}

/* Internal chat, notifications, feedback and per-entry soybean registration. */
.notification-button{position:relative}
.notification-badge{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#b54f3d;color:#fff;font-size:10px;line-height:18px;text-align:center;font-weight:700;box-shadow:0 1px 4px #6f2f221f}
.notification-panel{position:fixed;top:62px;right:22px;z-index:6;width:380px;max-width:calc(100vw - 24px);max-height:min(70vh,620px);display:flex;flex-direction:column;background:#fff;border:1px solid #dce7de;border-radius:12px;box-shadow:0 18px 60px #173b3226;overflow:hidden}
.notification-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 17px;border-bottom:1px solid #edf2ec;background:#fbfdfa}
.notification-head b{display:block;font-size:14px;color:#294b38}.notification-head small{display:block;font-size:10px;color:#8b9b8f;margin-top:2px}
.notification-list{overflow-y:auto;padding:6px}
.notification-item{display:flex;gap:11px;width:100%;padding:11px 10px;border:0;border-radius:8px;background:transparent;text-align:left;color:#4f6557}
.notification-item:hover{background:#f3f8f2}.notification-item.read{opacity:.68}
.notification-kind{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e7f0e6;color:#47765a;font-size:11px;font-weight:700}
.notification-kind.feedback{background:#f7efdc;color:#9a7a3f}
.notification-copy{min-width:0;flex:1}.notification-copy b{display:block;font-size:12px;color:#2f4f3c}.notification-copy p{margin:3px 0 4px;font-size:11px;line-height:1.55;color:#77877c;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.notification-copy small{font-size:10px;color:#9baa9c}
.notification-foot{display:flex;justify-content:space-between;gap:10px;padding:10px 14px;border-top:1px solid #edf2ec;background:#fbfdfa}
.chat-shell{display:grid;grid-template-columns:290px minmax(0,1fr);min-height:min(72vh,680px);overflow:hidden}
.chat-thread-list{border-right:1px solid #e7eee7;background:#f9fbf7;display:flex;flex-direction:column;min-width:0}
.chat-list-head{display:flex;align-items:center;justify-content:space-between;padding:15px 16px 9px;font-size:11px;color:#819486}
.chat-list-head b{font-size:13px;color:#365642}.chat-list-head span{font-size:10px;color:#93a391}
.chat-thread{display:flex;align-items:center;gap:10px;width:100%;padding:11px 14px;border:0;border-left:3px solid transparent;background:transparent;text-align:left;color:#52695a}
.chat-thread:hover{background:#f0f6ee}.chat-thread.active{background:#eaf3e9;border-left-color:#34775a}
.chat-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#dcebdd;color:#2c6648;font-size:13px;font-weight:700}
.chat-thread.active .chat-avatar{background:#34775a;color:#fff}
.chat-thread-copy{min-width:0;flex:1}.chat-thread-copy b{display:block;font-size:12px;color:#294d39;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-thread-copy small{display:block;font-size:10px;color:#93a192;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-unread{flex:none;min-width:18px;height:18px;border-radius:9px;background:#2f7051;color:#fff;font-size:10px;line-height:18px;text-align:center;padding:0 5px}
.chat-conversation{display:flex;flex-direction:column;min-width:0;min-height:0;background:#fff}
.chat-conversation-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 19px;border-bottom:1px solid #e9efe8;background:#fcfdfa}
.chat-conversation-head h2{font-size:15px;margin:0;color:#2d513c}.chat-conversation-head p{margin:3px 0 0;font-size:10px;color:#8a9b8c;line-height:1.6}
.chat-online-note{font-size:10px;color:#9aa99b;white-space:nowrap}
.chat-messages{flex:1;overflow-y:auto;padding:18px;background:#fbfcf9;display:flex;flex-direction:column;gap:12px;min-height:240px;max-height:52vh}
.chat-empty{margin:auto;color:#95a496;font-size:12px}
.chat-message{max-width:78%;align-self:flex-start;background:#fff;border:1px solid #e6eee4;border-radius:10px;padding:9px 12px;box-shadow:0 1px 3px #203a3605}
.chat-message.mine{align-self:flex-end;background:#e9f3e8;border-color:#d3e5d2}
.chat-message-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:4px}
.chat-message-meta b{font-size:10px;color:#577a61}.chat-message.mine .chat-message-meta b{color:#2f6a49}
.chat-message-meta time{font-size:9px;color:#a2ada0}
.chat-message p{margin:0;font-size:13px;line-height:1.7;color:#3f5748;word-break:break-word}
.chat-compose{display:flex;align-items:flex-end;gap:10px;padding:12px 14px;border-top:1px solid #e9efe8;background:#fff}
.chat-compose textarea{flex:1;min-height:44px;max-height:140px;resize:vertical;font-size:13px;line-height:1.6}
.chat-compose .button{flex:none;min-height:44px}
.chat-member-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border:1px solid var(--line);border-radius:9px;padding:12px;max-height:240px;overflow:auto}
.chat-member-picker legend{padding:0 6px;font-size:11px;color:#718973}.chat-member-picker label{display:flex;align-items:center;gap:8px;font-size:12px;color:#4f6b58;border:1px solid #e5eee3;border-radius:7px;padding:8px 9px}
.chat-member-picker label small{display:block;font-size:9px;color:#93a192}
.feedback-form-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:17px;flex-wrap:wrap}
.feedback-form-actions span{font-size:11px;color:#8a9b8b}
.feedback-list-panel{padding-bottom:8px}
.feedback-filters{margin:0;padding:4px;gap:4px}.feedback-filters button{padding:7px 11px;font-size:11px}
.feedback-ticket{border-top:1px solid #edf2ea;padding:17px 20px}
.feedback-ticket header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.feedback-ticket header b{display:block;font-size:14px;color:#2e503c;margin:4px 0 3px}
.feedback-ticket header small{font-size:10px;color:#96a496}
.feedback-category{display:inline-block;font-size:10px;color:#728b6b;background:#eef4e9;border-radius:4px;padding:2px 7px}
.feedback-body{font-size:12px;line-height:1.85;color:#566d5a;margin:10px 0 0;white-space:normal;word-break:break-word}
.feedback-replies{margin:13px 0 0;padding:0 0 0 14px;border-left:2px solid #e3ebe0;display:grid;gap:10px}
.feedback-reply{background:#f8fbf6;border-radius:7px;padding:9px 12px}.feedback-reply.admin{background:#f2f8f0;border:1px solid #e0ebe0}
.feedback-reply>div{display:flex;align-items:center;gap:8px;font-size:10px;color:#8d9e8e}.feedback-reply b{font-size:11px;color:#3d644b}
.feedback-reply p{margin:5px 0 0;font-size:12px;line-height:1.75;color:#546b57}
.feedback-reply-form{display:flex;align-items:flex-end;gap:10px;margin-top:13px;flex-wrap:wrap}
.feedback-reply-form textarea{flex:1;min-width:220px;font-size:12px;min-height:40px}
.feedback-reply-actions{display:flex;align-items:center;gap:8px}.feedback-reply-actions select{font-size:11px;min-height:36px}
.feedback-ticket.status-closed{background:#fcfdfb}
.bean-registration-layout{display:grid;gap:16px}
.bean-registration-meta{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:18px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.bean-registration-hint{margin:0;color:#77877b;font-size:12px;line-height:1.8}
.bean-registration-row{min-width:0;margin:0;padding:14px 16px 12px;border:1px solid #d7e4da;border-radius:9px;background:#fafdf9}
.bean-registration-row legend{padding:0 7px;font-size:13px;font-weight:700;color:#355f47}
.bean-registration-fields{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:13px}
.bean-row-remove{align-self:end;margin-bottom:3px;white-space:nowrap;color:#9a6856}
.bean-add-row{margin-top:2px;background:#f2f7ef;border:1px dashed #b9cfb8;color:#3c6b4d}
.bean-registration-preview{display:flex;flex-wrap:wrap;gap:8px 18px;min-height:20px;font-size:12px;color:#7d8f7f}
.bean-registration-preview b{color:#2c6246;font-variant-numeric:tabular-nums}
.bean-registration-note textarea{margin-top:4px;min-height:64px;resize:vertical}
.bean-registration-voided{opacity:.66;background:#fbfaf7}
.bean-registration-voided td{color:#8d968c}
.bean-registration-summary .factory-system-overview{padding:16px 20px 2px}
.bean-change-record{font-size:12px;line-height:1.8;color:#4e6654;background:#f7faf4;border-radius:7px;padding:11px 13px}
.grinding-warehouses{display:flex;flex-wrap:wrap;gap:5px 14px;margin:10px 0 0;padding-top:9px;border-top:1px solid #e7eee8;font-size:11px;color:#7c8e81}
.grinding-warehouses b{font-weight:600;color:#3f6b50;font-variant-numeric:tabular-nums}
@media(max-width:760px){
 .notification-panel{top:58px;right:8px;left:8px;width:auto;max-height:72vh}
 .chat-shell{grid-template-columns:1fr;min-height:0}
 .chat-thread-list{border-right:0;border-bottom:1px solid #e7eee7;max-height:210px;overflow-y:auto}
 .chat-messages{min-height:260px;max-height:46vh;padding:13px}
 .chat-message{max-width:88%}
 .chat-conversation-head{padding:13px}.chat-online-note{display:none}
 .chat-compose{padding:9px;gap:7px}.chat-compose textarea{min-height:40px;font-size:12px}
 .feedback-ticket{padding:14px}.feedback-form-actions{align-items:stretch;flex-direction:column}
 .feedback-reply-form{align-items:stretch}.feedback-reply-actions{justify-content:space-between}
 .bean-registration-meta{grid-template-columns:1fr;gap:12px}
 .bean-registration-fields{grid-template-columns:1fr 1fr;gap:10px}
 .bean-registration-fields .field:nth-child(3),.bean-row-remove{grid-column:1 / -1}
 .bean-row-remove{justify-self:end;margin-top:0}
 .chat-member-picker{grid-template-columns:1fr}
}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* Give collaboration pages a calmer reading width instead of hugging the viewport edge. */
body[data-current-page="feedback"] #content{max-width:1080px;margin:0 auto}
body[data-current-page="feedback"] .feedback-ticket{padding:20px 22px}
body[data-current-page="feedback"] .feedback-form-panel .panel-head,
body[data-current-page="feedback"] .feedback-list-panel .panel-head{padding:20px 22px}
.notification-panel{top:82px;right:30px}
@media(max-width:760px){
 body[data-current-page="feedback"] main{padding-left:18px;padding-right:18px}
 body[data-current-page="feedback"] .feedback-ticket{padding:16px 15px}
 .notification-panel{top:72px;right:12px;left:12px}
}
/* The feedback form is a focused writing area, not a full-width grid. */
body[data-current-page="feedback"] .feedback-form-panel{max-width:900px;margin:0 auto 20px;padding-bottom:22px}
body[data-current-page="feedback"] #feedback-form{padding:2px 30px 0}
body[data-current-page="feedback"] #feedback-form .form-grid{gap:20px 24px}
body[data-current-page="feedback"] .feedback-form-actions{padding-top:4px}
@media(max-width:760px){
 body[data-current-page="feedback"] .feedback-form-panel{max-width:none;margin:0 0 16px;padding-bottom:16px}
 body[data-current-page="feedback"] #feedback-form{padding:2px 15px 0}
}
/* Keep the feedback heading, form and list on one calm column. */
body[data-current-page="feedback"] #content{max-width:980px}
body[data-current-page="feedback"] .feedback-form-panel{max-width:none}

/* Header action menu and readable numeric tables. */
.head-menu{position:relative;display:inline-block}
.head-menu>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#4f6b59;font-size:12px;font-weight:500}
.head-menu>summary::-webkit-details-marker{display:none}
.head-menu>summary:hover{background:#f4f8f2;border-color:#bfd2c1}
.head-menu[open]>summary{background:#eef5ec;border-color:#a9c5ad}
.head-menu-list{position:absolute;right:0;top:calc(100% + 6px);z-index:8;min-width:168px;padding:6px;background:#fff;border:1px solid #dce7de;border-radius:9px;box-shadow:0 10px 30px #173b3220}
.head-menu-list .text-button{display:block;width:100%;padding:9px 11px;border-radius:6px;text-align:left;font-size:12px;color:#3f5d49;white-space:nowrap}
.head-menu-list .text-button:hover{background:#f3f8f1}
.table-wrap td small,.table-wrap th small{font-size:11px;line-height:1.55}
@media(max-width:760px){
 .head-menu{display:block}
 .head-menu>summary{width:100%}
 .head-menu-list{left:0;right:auto;min-width:100%}
}
@media(max-width:760px){
 .sheet-filters .sheet-search{width:100%;margin:0;align-items:stretch}
 .sheet-filters .sheet-search input{width:100%}
}
@media(max-width:650px){
 .factory-step{padding:13px 14px;display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:10px;align-items:start}
 .factory-step>span{margin:0;width:26px;height:26px}
 .factory-step strong{font-size:14px;line-height:1.5}
 .factory-step p{grid-column:2;font-size:11px;line-height:1.65;margin:4px 0 7px}
 .factory-step small{grid-column:2;font-size:11px}
}
@media(max-width:760px){
 .sheet-filters .sheet-search{flex:1 0 100%;align-items:flex-start}
}
#process-source-hint[data-warning="1"]{color:#9a6a24;background:#fbf3e2;border-radius:6px;padding:8px 10px}
#process-source-hint:not([data-warning="1"]){color:#5f7666}

/* Reading width and table alignment requested by the factory team. */
#content{width:100%;max-width:1560px;margin-left:auto;margin-right:auto}
main{padding-left:44px;padding-right:44px}
@media(max-width:1100px){main{padding-left:28px;padding-right:28px}}
@media(max-width:760px){main{padding-left:18px;padding-right:18px}}
body table th,body table td,body table th *,body table td *,
body table [data-align],body table [data-align] *,
body table .freeze-client,body table .freeze-client *,
body table .freeze-product,body table .freeze-product *{text-align:center!important}
body table .worksheet .freeze-client,body table .worksheet .freeze-product,
body table .worksheet .freeze-client *,body table .worksheet .freeze-product *,
body table .table-wrap .freeze-client,body table .table-wrap .freeze-product{text-align:center!important}
body table td .table-action,body table td .table-actions{justify-content:center!important}
body table th,body table td,body table tbody th,body table thead th,
body table th *,body table td *{vertical-align:middle!important}
body table .pack-note{vertical-align:middle!important}
.process-output-card{display:flex;gap:22px;align-items:flex-end;justify-content:space-between;padding:15px 16px;margin:6px 0 12px;border:1px solid #dfe9d8;border-radius:8px;background:#f7faf3;flex-wrap:wrap}
.process-output-card>div:first-child{display:flex;flex-direction:column;gap:5px;min-width:170px}
.process-output-card>div:first-child span{font-size:10px;color:#8b9d7d}
.process-output-card>div:first-child strong{font-size:15px;color:#3d6238}
.process-output-fields{display:grid;grid-template-columns:minmax(130px,1fr) minmax(150px,1fr);gap:12px;flex:1;min-width:300px}
#processing-rules-form table select{min-width:170px;width:100%}
@media(max-width:600px){.process-output-card{gap:12px}.process-output-fields{grid-template-columns:1fr 1fr;min-width:0}}
.bean-soak-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:13px 15px;margin:0 0 14px;border:1px solid #dfe9d8;border-radius:8px;background:#f7faf3}
.bean-soak-fields .field{margin:0}
@media(max-width:600px){.bean-soak-fields{grid-template-columns:1fr}}
.factory-slurry-form .tank-number,.factory-slurry-form input.tank-number{font-size:14px;font-weight:600;line-height:1.4;text-align:center;font-variant-numeric:tabular-nums;color:#385f37}
.factory-slurry-form input.tank-number{width:100%;min-width:58px;height:34px;padding:5px 4px;border:1px solid #e0e9d8;border-radius:4px;background:#fff}
.factory-slurry-form .supply-system-cell{font-size:13px;font-weight:600;color:#497248;background:#f5f9f1;white-space:nowrap;vertical-align:middle}
.factory-slurry-form th{white-space:nowrap}

.site-registration{text-align:center;padding:14px 16px;color:#697568;font-size:12px;line-height:1.6}.site-registration a{color:inherit;text-decoration:none}.site-registration a:hover{text-decoration:underline}
