@import url('/order-calendar.css');
:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#18333d;background:#f2f6f7;font-size:15px;line-height:1.5;font-synthesis:none;--navy:#193848;--teal:#0d716b;--muted:#5a7079;--border:#d5e0e4;--red:#a03131;--amber:#885b12}
.progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:16px 0}
.progress-tile{display:grid;gap:5px;background:#eff8f6;border:1px solid #b6d8d1;border-left:4px solid #0d716b;border-radius:10px;padding:15px;min-width:0}
.progress-tile.payment{background:#eef4fc;border-color:#c5d4e7;border-left-color:#315e94}
.progress-tile>strong{font-size:1.5rem;line-height:1.3}.progress-tile>small{color:var(--muted);overflow-wrap:anywhere}
.progress-tile progress{width:100%;height:9px;accent-color:#0d716b}.progress-tile.payment progress{accent-color:#315e94}
@media(max-width:600px){.progress-grid{grid-template-columns:1fr}.progress-tile{padding:12px}}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}a{color:var(--teal)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #61bbb5;outline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:clamp(1.65rem,3vw,2.25rem);line-height:1.2;letter-spacing:-.035em}h2{font-size:1.25rem;line-height:1.3;letter-spacing:-.02em}h3{font-size:1rem}small,.muted{color:var(--muted)}small{font-size:.8rem}strong{font-weight:750}hr{border:0;border-top:1px solid var(--border);margin:20px 0}.hidden,[hidden]{display:none!important}.boot{max-width:460px;margin:15vh auto;padding:28px}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--teal);color:white;font-weight:850;flex:none}.brand{display:flex;gap:11px;align-items:center}.brand-copy strong{display:block;line-height:1.2}.brand-copy small{display:block;font-size:.72rem;color:#94b2be;margin-top:4px}.app-shell{min-height:100dvh;display:grid;grid-template-columns:220px minmax(0,1fr)}.sidebar{background:var(--navy);color:white;padding:28px 20px;display:flex;flex-direction:column;gap:32px;position:sticky;top:0;height:100dvh}.sidebar nav{display:grid;gap:8px}.nav-link{padding:12px 14px;border:1px solid transparent;border-radius:9px;background:transparent;color:#c1d3db;text-align:left;font-weight:650;display:flex;gap:12px;align-items:center}.nav-link:hover{background:#234856;color:white}.nav-link.active{background:#e8f5f3;color:#0c5b56;border-color:#e8f5f3}.nav-number{opacity:.6;font-size:.75rem}.side-foot{margin-top:auto;padding-top:20px;border-top:1px solid #36535f;color:#b1c6ce;font-size:.78rem}.side-foot p+p{margin-top:10px}.main{min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 32px;background:white;border-bottom:1px solid var(--border)}.topbar .eyebrow{margin:0}.account{display:flex;align-items:center;gap:12px;min-width:0;font-size:.85rem}.account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}.private-badge{font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;border:1px solid #c7dbd9;padding:4px 8px;border-radius:6px;color:#37635f;background:#f2f9f8;white-space:nowrap}.content{max-width:1440px;padding:32px;margin:0 auto}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:24px}.page-heading p{margin-top:9px;max-width:760px;color:var(--muted)}.eyebrow{font-size:.72rem;text-transform:uppercase;font-weight:800;letter-spacing:.12em;color:var(--teal);margin-bottom:8px}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 16px;border-radius:8px;border:1px solid #bdced4;color:var(--navy);background:white;text-decoration:none;font-size:.88rem;font-weight:750;line-height:1.2;white-space:normal}.button:hover{background:#f0f6f7}.button.primary{background:var(--teal);border-color:var(--teal);color:white}.button.primary:hover{background:#095b56}.button.danger{color:var(--red);background:#fffafa;border-color:#e3c3c3}.button.small{min-height:34px;padding:7px 11px;font-size:.8rem}.button.ghost{background:transparent;border-color:transparent}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.actions.end{justify-content:flex-end}.stack{display:grid;gap:20px}.panel{background:white;border:1px solid var(--border);border-radius:13px;overflow:hidden;box-shadow:0 2px 4px #19384803}.panel-head{padding:20px 22px;background:#f8fbfc;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.panel-head p{margin-top:4px;font-size:.85rem;color:var(--muted)}.panel-head.teal{background:#eaf5f3;border-top:4px solid var(--teal)}.panel-body{padding:22px}.panel-body+.panel-body{border-top:1px solid var(--border)}.section-label{display:flex;gap:10px;align-items:center;margin-bottom:15px}.section-number{display:grid;place-items:center;border-radius:6px;background:#eaf2f5;color:#456270;width:26px;height:26px;font-size:.73rem;font-weight:800;flex:none}.notice{padding:13px 16px;border-radius:8px;border:1px solid #bad7d2;background:#edf8f3;color:#205b4a;margin-bottom:20px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.notice.error{background:#fff3f2;border-color:#edcbc8;color:#852d29}.notice.warning,.explanation.warning{background:#fff8e9;border-color:#eadbb4;color:#73531e}.notice button{border:none;background:none;color:inherit;font-size:1.1rem;padding:0 4px}.explanation{border:1px solid var(--border);border-radius:8px;padding:12px 15px;background:#f5f9fa;color:#4f6874;font-size:.84rem}.explanation strong{color:inherit}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.kpi{background:white;border:1px solid var(--border);border-radius:11px;padding:19px;min-width:0;border-top:3px solid #456b80}.kpi.primary{background:#eaf6f3;border-color:#bfdbd4;border-top-color:var(--teal)}.kpi.actual{border-top-color:#b6842c}.kpi .metric-label{font-size:.74rem;color:#4c6774;font-weight:750;display:block}.kpi .metric-value{display:block;font-size:clamp(1.4rem,2.1vw,1.9rem);font-weight:800;letter-spacing:-.035em;margin:7px 0 5px;overflow-wrap:anywhere;line-height:1.2}.kpi small{display:block;font-size:.74rem}.negative{color:var(--red)!important}.positive{color:#176e52!important}.neutral{color:#354f60}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.metric{min-width:0;padding:12px;border:1px solid #e0e8eb;border-radius:8px;background:#fbfcfd}.metric-label{display:block;font-size:.73rem;color:var(--muted);font-weight:650}.metric-value{display:block;margin-top:4px;line-height:1.25;font-size:1.08rem;font-weight:800;overflow-wrap:anywhere}.metric small{display:block;margin-top:4px;font-size:.71rem}.toolbar{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:18px;flex-wrap:wrap}.toolbar .field{max-width:260px;min-width:180px}.toolbar .filters{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field label,.field-label{font-size:.77rem;font-weight:750;color:#3e5a68}.field input,.field select,.field textarea{width:100%;min-width:0;min-height:43px;border:1px solid #bdced4;border-radius:7px;padding:9px 11px;background:white;color:#18333d}.field textarea{min-height:82px;resize:vertical}.field input[readonly]{background:#f0f5f7;border-style:dashed;font-weight:700;color:#426272}.field small{font-size:.72rem;line-height:1.4}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid .wide{grid-column:1/-1}.product-picker{display:grid;grid-template-columns:1fr 1.6fr 1fr 1fr .65fr;gap:13px;align-items:start}.product-picker .picker-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.form-footer{border-top:1px solid var(--border);padding-top:18px;margin-top:20px;display:flex;align-items:center;justify-content:space-between;gap:16px}.orders-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.order-card{background:white;border:1px solid #cbdce1;border-radius:11px;overflow:hidden;border-top:4px solid var(--teal)}.order-card.completed{border-top-color:#587184}.order-card.cancelled{border-top-color:#999;background:#fafafa}.order-card-head{padding:18px 19px;background:#f5faf9;border-bottom:1px solid #dce8e6;display:flex;gap:12px;justify-content:space-between;align-items:flex-start}.order-card-head h3{font-size:1.12rem;overflow-wrap:anywhere}.order-card-head p{font-size:.77rem;color:var(--muted);margin-top:4px}.order-card-body{padding:17px 19px}.order-card-body .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.order-footer{border-top:1px solid var(--border);padding:14px 19px;display:flex;justify-content:space-between;align-items:center;gap:12px}.status{display:inline-block;font-size:.66rem;line-height:1.3;padding:6px 8px;border-radius:6px;text-transform:uppercase;font-weight:800;letter-spacing:.04em;border:1px solid #b6d6d1;background:#e5f4f0;color:#126359;white-space:nowrap}.status.completed{border-color:#c7d7e2;background:#edf3f8;color:#405c72}.status.cancelled{border-color:#d8d8d8;background:#f1f1f1;color:#606969}.status.provisional{border-color:#ead7b0;background:#fff7e8;color:#835c1d}.order-progress{margin-top:14px;display:flex;align-items:center;gap:10px;font-size:.73rem;color:var(--muted)}progress{appearance:none;width:100%;height:7px;border:0;border-radius:5px;background:#e8eef0;overflow:hidden}progress::-webkit-progress-bar{background:#e8eef0}progress::-webkit-progress-value{background:#30988a}progress::-moz-progress-bar{background:#30988a}.order-progress progress{max-width:160px}.store-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.store-card{border:1px solid var(--border);border-radius:9px;padding:17px;background:#fbfdfe}.store-card h3{margin-bottom:13px}.store-card .metrics{grid-template-columns:1fr 1fr;gap:8px}.store-card .metric{background:white;padding:10px}.store-card .metric-value{font-size:.95rem}.meta-row{display:flex;flex-wrap:wrap;gap:8px 18px;color:var(--muted);font-size:.82rem}.micro-list{display:grid;gap:18px}.micro-card{border:1px solid #bfcfd7;border-radius:10px;background:white;overflow:hidden}.micro-head{padding:17px 19px;background:#edf3f7;border-bottom:1px solid #cbd9e1;display:flex;gap:16px;justify-content:space-between;align-items:flex-start}.micro-head h3{font-size:1.08rem}.micro-head .eyebrow{font-size:.65rem;margin-bottom:4px;color:#4d7284}.micro-body{padding:18px}.micro-foot{padding:13px 18px;background:#f9fbfc;border-top:1px solid var(--border);display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}.micro-card.completed .micro-head{background:#eff4f2}.micro-card.completed{border-color:#c2d7cd}.ledger{display:grid;gap:0}.ledger-entry{padding:14px 0;border-bottom:1px solid #e2e9ec;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.ledger-entry:last-child{border-bottom:0}.ledger-entry strong{display:block;font-size:1rem}.ledger-entry p{font-size:.8rem;color:#526f7b;margin-top:3px;overflow-wrap:anywhere}.ledger-entry.voided{opacity:.58}.ledger-entry.voided strong{text-decoration:line-through}.ledger-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:5px}.chip{font-size:.68rem;color:#4e6873;background:#eff4f6;border:1px solid #dbe5e9;padding:2px 6px;border-radius:4px}.shared-panel{border-color:#dfca9e}.shared-panel .panel-head{background:#fff8e9;border-bottom-color:#e5d7b8}.shared-panel .section-number{background:#f1e3c7;color:#835c1d}.details-section{margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}summary{cursor:pointer;color:#375e70;font-size:.82rem;font-weight:750;padding:5px 0}.empty{padding:35px 20px;text-align:center;color:var(--muted);border:1px dashed #bcced5;border-radius:9px;background:#fafcfd}.empty h3{color:#355365;margin-bottom:7px}.empty .button{margin-top:16px}.draft-lines{display:grid;gap:9px;margin-top:18px}.draft-line{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid #cfdee4;background:white;border-radius:8px;padding:13px 15px}.draft-line p{font-size:.8rem;color:var(--muted);margin-top:4px}.draft-preview{display:flex;flex-wrap:wrap;gap:20px}.draft-preview strong{display:block;font-size:1.1rem}.draft-preview small{display:block}.check-row{display:flex;align-items:flex-start;gap:10px;font-size:.88rem;padding:12px 0}.check-row input{width:18px;height:18px;flex:none;margin-top:2px;accent-color:var(--teal)}.check-row small{display:block;margin-top:3px}.dialog{border:1px solid #b9cdd4;border-radius:13px;padding:0;max-width:640px;width:calc(100% - 32px);max-height:90dvh;background:white;color:#18333d;box-shadow:0 20px 70px #18333d38}.dialog::backdrop{background:#15313e91;backdrop-filter:blur(2px)}.dialog-head{padding:20px 22px;display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid var(--border);background:#f2f8f8}.dialog-head h2{font-size:1.2rem}.dialog-body{padding:22px}.dialog .form-footer{margin-top:20px}.login{min-height:100dvh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#edf6f4,#eff3f8)}.login-card{width:100%;max-width:440px;background:white;border:1px solid #ccdddf;border-radius:16px;padding:32px;box-shadow:0 12px 45px #214f5810}.login-card .brand{margin-bottom:30px}.login-card .brand-copy small{color:#567681}.login-card h1{font-size:1.8rem;margin-bottom:10px}.login-card .form-grid{grid-template-columns:1fr;margin-top:25px}.login-card .button{width:100%;margin-top:18px}.login-note{margin-top:22px;font-size:.77rem;color:#6b7e87}.loading{padding:40px;text-align:center;color:#5f7884}.loading::before{content:"";display:block;margin:0 auto 15px;width:26px;height:26px;border:3px solid #c7dcd9;border-top-color:var(--teal);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.catalog-table{width:100%;border-collapse:collapse}.catalog-table th{background:#f3f7f9;text-align:left;font-size:.69rem;text-transform:uppercase;letter-spacing:.04em;color:#5d7480;padding:12px 15px}.catalog-table td{padding:15px;border-top:1px solid #e0e8eb;vertical-align:middle;font-size:.85rem}.catalog-table td p{font-size:.73rem;color:var(--muted);margin-top:4px}.catalog-table .estimate-form{display:flex;align-items:center;gap:8px}.catalog-table .estimate-form input{min-width:90px;max-width:130px;width:100%;min-height:39px;padding:8px 10px;border:1px solid #bdced4;border-radius:6px}.table-scroll{overflow-x:auto}.audit-entry{border-bottom:1px solid var(--border);padding:13px 0;font-size:.82rem}.audit-entry p{margin-top:3px;color:var(--muted)}.audit-entry pre{max-height:200px;overflow:auto;background:#f2f6f8;padding:12px;border-radius:7px;font-size:.72rem;white-space:pre-wrap;overflow-wrap:anywhere}.busy-note{color:var(--teal);font-size:.8rem}.target-note{margin-top:12px;font-size:.8rem;padding:8px 10px;border-radius:6px;background:#f1f6f8;color:#4b6571}.breadcrumb{margin-bottom:18px}.breadcrumb button{padding-left:0}.row-gap{display:grid;gap:12px}.summary-note{margin-bottom:22px}.no-wrap{white-space:nowrap}
@media(min-width:1500px){.content{padding:38px}.topbar{padding:18px 38px}}
@media(max-width:1100px){.app-shell{grid-template-columns:190px minmax(0,1fr)}.sidebar{padding:24px 15px}.content{padding:25px}.topbar{padding:16px 25px}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.store-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.product-picker .article-field{grid-column:auto}.orders-grid{grid-template-columns:1fr}}
@media(max-width:760px){.app-shell{display:block}.sidebar{height:auto;position:static;padding:16px;gap:16px}.sidebar .brand-mark{width:33px;height:33px}.sidebar .brand-copy small{display:none}.sidebar nav{display:flex;gap:6px;overflow:auto}.nav-link{padding:9px 12px;font-size:.8rem;flex:none;white-space:nowrap}.nav-number,.side-foot{display:none}.topbar{padding:11px 16px}.topbar>.eyebrow{font-size:.65rem}.account{gap:8px;font-size:.76rem}.account-name{max-width:100px}.private-badge{display:none}.content{padding:22px 16px}.page-heading{gap:16px;flex-direction:column;margin-bottom:21px}.page-heading .button{width:100%}.page-heading p{font-size:.86rem}.panel-head{padding:16px;gap:12px;flex-wrap:wrap}.panel-body{padding:16px}.kpis{gap:10px;margin-bottom:17px}.kpi{padding:14px}.kpi .metric-value{font-size:1.38rem}.kpi .metric-label{font-size:.7rem}.kpi small{font-size:.69rem}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.metric{padding:10px}.metric-value{font-size:.98rem}.store-grid{grid-template-columns:1fr}.form-grid{gap:13px}.form-grid .mobile-wide{grid-column:1/-1}.product-picker{grid-template-columns:1fr 1fr}.product-picker .field:nth-child(1),.product-picker .article-field{grid-column:1/-1}.product-picker .picker-actions{align-items:stretch;flex-direction:column}.toolbar{gap:10px}.toolbar .filters{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px}.toolbar .field{min-width:0;max-width:none}.micro-head{padding:15px;gap:10px}.micro-head h3{font-size:1rem}.micro-body{padding:14px}.micro-foot{padding:13px 14px;align-items:flex-start;flex-direction:column}.micro-foot>.actions{width:100%}.micro-foot>.actions .button{flex:1}.ledger-entry{gap:10px;flex-wrap:wrap}.ledger-entry .actions{margin-left:auto}.form-footer{align-items:stretch;flex-direction:column}.form-footer .actions{width:100%}.form-footer .actions .button{flex:1}.dialog{width:calc(100% - 20px);max-height:94dvh}.dialog-head,.dialog-body{padding:17px}.dialog .form-grid{grid-template-columns:1fr}.dialog .form-grid .wide{grid-column:auto}.order-card-head,.order-card-body,.order-footer{padding:15px}.order-footer{flex-wrap:wrap}.draft-line{padding:12px;gap:10px}.draft-preview{gap:14px}.draft-preview strong{font-size:.95rem}.catalog-table,.catalog-table tbody,.catalog-table tr,.catalog-table td{display:block;width:100%}.catalog-table thead{display:none}.catalog-table tr{padding:14px 16px;border-bottom:1px solid #cddde3}.catalog-table td{padding:7px 0;border:0}.catalog-table td[data-label]::before{content:attr(data-label);display:block;font-size:.7rem;font-weight:750;color:#5a7480;margin-bottom:5px}.catalog-table .estimate-form input{max-width:none}.catalog-table .estimate-form .button{min-height:39px}.login-card{padding:25px}.target-note{font-size:.75rem}.explanation{font-size:.78rem}}
@media(max-width:360px){.content{padding:18px 12px}.topbar{padding:10px 12px}.topbar>.eyebrow{display:none}.account{margin-left:auto}.kpi{padding:12px}.kpi .metric-value{font-size:1.18rem}.form-grid{grid-template-columns:1fr}.toolbar .filters{grid-template-columns:1fr}.product-picker{grid-template-columns:1fr}.product-picker .field{grid-column:1/-1}.status{font-size:.61rem}.metrics .metric-value{font-size:.9rem}.button{font-size:.81rem;padding:10px 12px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}
.plan-alerts{display:grid;gap:7px;margin-top:13px}.plan-alert{border:1px solid #e6cd9b;border-left:3px solid #ba8124;background:#fff7e6;border-radius:6px;padding:8px 10px;color:#795217;font-size:.76rem;font-weight:700;line-height:1.4}
.sheet-view-toggle{margin-bottom:16px}
.sheet-tools{display:flex;align-items:end;gap:14px;flex-wrap:wrap;padding:18px;background:#f7fafb;border-bottom:1px solid var(--border)}
.sheet-tools .field{min-width:160px;flex:1}.sheet-search{flex:2;min-width:260px}.sheet-search label{display:block;font-size:.77rem;font-weight:750;margin-bottom:6px}.sheet-search input{flex:1;min-width:100px;min-height:43px;border:1px solid #bdced4;border-radius:7px;padding:9px 11px}
.sheet-guidance{padding:14px 18px;display:grid;gap:5px;font-size:.8rem;color:#4f6874}.sheet-guidance strong{color:var(--navy)}
.sheet-scroll{position:relative;max-height:72vh;overflow:auto;border-block:1px solid #b8cdd5;isolation:isolate;overscroll-behavior-x:contain;container-type:inline-size}
.order-sheet{width:100%;min-width:1580px;border-collapse:separate;border-spacing:0;font-size:.82rem;table-layout:fixed}
.order-sheet caption{text-align:left;padding:10px 14px;background:#eef5f5;font-weight:700;color:#355965}
.order-sheet thead th{position:sticky;top:0;z-index:3;background:#274b59;color:white;text-align:left;padding:13px 12px;border-right:1px solid #456775;font-size:.76rem}
.order-sheet thead th:nth-child(1){width:240px}.order-sheet thead th:nth-child(2){width:160px}.order-sheet thead th:nth-child(3),.order-sheet thead th:nth-child(4),.order-sheet thead th:nth-child(5){width:140px}.order-sheet thead th:nth-child(6){width:160px}.order-sheet thead th:nth-child(7){width:160px}.order-sheet thead th:nth-child(8){width:240px}.order-sheet thead th:nth-child(9){width:180px}
.order-sheet td,.order-sheet tbody th{padding:15px 12px;border-right:1px solid #d0dde3;border-bottom:1px solid #c5d7df;vertical-align:top;text-align:left;background:white;overflow-wrap:anywhere}
.order-sheet tbody tr:nth-child(odd)>td,.order-sheet tbody tr:nth-child(odd)>th.sheet-article{background:#f8fbfd}
.order-sheet .sheet-article{position:sticky;left:0;z-index:1;box-shadow:3px 0 3px #19384812}.order-sheet thead .sheet-article{z-index:4}
.order-sheet .sheet-article>strong,.order-sheet small{display:block}.order-sheet small{font-weight:400;color:#56707d;line-height:1.4;margin-top:5px}.order-sheet thead small{color:#d7e6eb}
.order-sheet .sheet-number{padding-left:0;padding-right:5px;color:#12655d;font-weight:800}.order-sheet td .button{margin-top:8px}.order-sheet td .actions{gap:4px}
.order-sheet .sheet-major th{background:#e2f0ee;border-top:5px solid #97bcb7;border-bottom:2px solid #97bcb7;padding:15px;font-weight:600}
.sheet-major-heading{display:flex;gap:14px;justify-content:space-between;align-items:start;position:sticky;left:15px;width:calc(100cqw - 30px)}.sheet-major-heading p{font-size:.76rem;margin-top:7px;color:#345d63}.sheet-major-heading .status{margin-left:8px}.sheet-major-heading>.actions{max-width:700px;justify-content:flex-end}
.sheet-money{display:block;font-variant-numeric:tabular-nums;white-space:nowrap}.sheet-loss .sheet-money{color:var(--red)}
.order-sheet .payment-badge{margin-left:0}.order-sheet select{display:block;width:100%;min-height:38px;padding:6px;border:1px solid #b4c8d1;border-radius:5px;background:white;color:#244551;margin-top:9px}
.order-sheet .sheet-stale{color:#982e29;font-weight:700}.order-sheet .sheet-dirty{color:#805a15;font-weight:700}.sheet-entry-actions{display:grid;gap:4px}.sheet-lock{color:#627883}
.sheet-footnote{padding:14px 18px;font-size:.76rem;color:#56707d;background:#f7fafb}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){.sheet-tools{padding:14px;gap:10px}.sheet-search{min-width:0;flex-basis:100%}.sheet-tools .field{min-width:120px}.sheet-scroll{max-height:70vh}.order-sheet .sheet-article{position:static;box-shadow:none}.order-sheet thead .sheet-article{position:sticky;left:auto}.sheet-guidance,.sheet-footnote{padding:12px 14px}.sheet-major-heading{flex-direction:column;max-width:800px}}
.payment-strip{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:16px;padding:14px;border:1px solid #c5d6e8;border-left:4px solid #52759b;border-radius:8px;background:#f3f7fc}.payment-strip>div{min-width:0}.payment-strip strong{font-size:.84rem}.payment-strip p{font-size:.78rem;color:#526a7a;overflow-wrap:anywhere;margin-top:7px}.payment-badge{display:inline-block;margin-left:10px;padding:4px 9px;border-radius:16px;font-size:.74rem;font-weight:750;background:#fff0d9;color:#805613;border:1px solid #e8c58d}.payment-badge.partial{background:#e8effa;color:#385e8c;border-color:#b8cee8}.payment-badge.received{background:#e4f5ee;color:#226a53;border-color:#acd9c8}.status.deleted{background:#f2e8e8;color:#7c4444;border-color:#d5b9b9}.order-card.deleted{border-left-color:#947070}.order-card.deleted .order-card-head{background:#f6eded}@media(max-width:760px){.payment-strip{align-items:flex-start;flex-direction:column}.payment-strip .button{width:100%}.payment-badge{margin-left:6px}}

/* Keep everyday entry on the order sheet; secondary controls expand in place. */
.workspace-summary,.entry-options{border:1px solid var(--border,#dce4e1);border-radius:10px;padding:10px 12px;margin:8px 0;background:var(--surface,#fff)}
.workspace-summary>summary,.entry-options>summary{cursor:pointer;font-weight:650;color:var(--ink,#173b34)}
.workspace-summary[open]>summary,.entry-options[open]>summary{margin-bottom:12px}
.entry-options .button{margin:4px 3px 4px 0}
.workspace-summary .metrics{margin-top:12px}
.sheet-guidance>span{display:none}
.sheet-guidance{padding:10px 16px}
.sheet-view-toggle{margin-bottom:12px}
@media(min-width:1000px){.sidebar{width:180px}.app-shell{grid-template-columns:180px minmax(0,1fr)}}

.sheet-inline-entry{display:grid;gap:5px;min-width:160px;max-width:230px;font-weight:400}
.sheet-inline-entry label{font-size:.72rem;color:var(--muted)}
.sheet-inline-entry input{width:100%;min-width:0;padding:7px 9px;border:1px solid var(--border);border-radius:5px;background:#fff}
.sheet-inline-entry summary{font-size:.75rem;cursor:pointer}
.sheet-inline-entry details input{margin:4px 0 7px}
.sheet-inline-entry .actions{margin-top:5px}
.sheet-major .entry-options{text-align:left;white-space:normal}

.order-sheet{min-width:960px}
.order-sheet thead th:nth-child(n){width:20%}
.order-sheet .sheet-inline-entry{min-width:0;max-width:none}
.order-sheet .sheet-inline-entry input{min-width:0!important;max-width:100%}
.order-sheet td>details{margin-top:12px;font-size:.78rem}
.order-sheet td>details>summary{cursor:pointer}
@media(max-width:760px){
 .sheet-scroll{max-height:none;overflow:visible;container-type:normal}
 .order-sheet,.order-sheet tbody,.order-sheet tr,.order-sheet td,.order-sheet tbody th{display:block;min-width:0;width:100%}
 .order-sheet thead{display:none}.order-sheet caption{display:block}
 .order-sheet td[data-label]::before{content:attr(data-label);display:block;font-weight:750;margin-bottom:9px;color:var(--teal)}
 .order-sheet .sheet-article{position:static}.sheet-major-heading{position:static;width:auto}
 .order-sheet tr[data-sheet-row]{border-bottom:5px solid #97bcb7}
 .order-sheet td,.order-sheet tbody th{border-right:0;padding:14px 16px}
 .sheet-inline-entry input{min-height:42px;font-size:16px}
 .sheet-major-heading>.actions{justify-content:flex-start}
}

/* New-order composer: separated metadata, editable batches and final review. */
.order-composer{max-width:1440px;margin:0 auto}.composer-section{margin-bottom:28px;border:1px solid #c4d6dc;box-shadow:0 3px 12px #173b3410}
.composer-section>.panel-head{padding:22px 26px;background:#eaf0f5;border-bottom:1px solid #c4d6dc;align-items:center}
.composer-section>.panel-head h2{margin:4px 0 7px}.composer-section>.panel-body{padding:26px}
.composer-articles>.panel-head{background:#dcefeb}.composer-review>.panel-head{background:#e8edf8}
.composer-add{background:#f7fafb;border-bottom:2px solid #d1e1e4}.composer-add .form-footer{margin-top:20px;padding-top:18px}
.draft-badge{background:#fff4d9;border:1px solid #e3cb91;padding:9px 14px;border-radius:8px;font-size:.82rem;white-space:nowrap}
.draft-table-scroll{overflow:auto}.draft-sheet{width:100%;min-width:920px;border-collapse:collapse;text-align:left;font-size:.86rem}
.draft-sheet caption{padding:16px 24px;text-align:left;font-weight:650;background:#f2f7f6;color:#365e60}
.draft-sheet thead{background:#294b59;color:#fff}.draft-sheet th,.draft-sheet td{padding:20px 16px;border-bottom:1px solid #cfdee2;vertical-align:top}
.draft-sheet tbody tr:nth-child(even){background:#f4f8fa}.draft-sheet small{display:block;margin-top:7px;font-weight:400}
.draft-sheet input{width:100%;min-width:85px;max-width:170px;border:1px solid #8eafb9;border-radius:6px;padding:11px;background:white;font:inherit}
.draft-sheet input:invalid:not(:focus){border-color:#b96645;background:#fff9f2}.draft-sheet td:nth-child(4){min-width:170px}
.composer-totals{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;margin-bottom:26px}.composer-totals .metric{padding:18px;background:#f3f7fa;border:1px solid #d5e0e4;border-radius:8px}
.composer-save{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:24px 0;border-top:1px solid #c8d8df}.composer-save p{max-width:650px;color:var(--muted);font-size:.84rem}.composer-save .button{min-width:220px;padding:14px 20px}
@media(max-width:1100px){.composer-totals{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.composer-section{margin-bottom:24px}.composer-section>.panel-head,.composer-section>.panel-body{padding:20px 16px}.composer-totals{grid-template-columns:1fr 1fr;gap:12px}.composer-save{flex-direction:column;align-items:stretch;gap:16px}.draft-sheet,.draft-sheet tbody,.draft-sheet tr,.draft-sheet th,.draft-sheet td{display:block;min-width:0;width:100%}.draft-sheet thead{display:none}.draft-sheet caption{display:block}.draft-sheet td,.draft-sheet th{padding:12px 16px;border:0}.draft-sheet tr{padding:8px 0 16px;border-bottom:3px solid #bfd5d5}.draft-sheet td[data-label]::before{content:attr(data-label);display:block;font-weight:650;margin-bottom:8px;color:#42606b}.draft-sheet input{max-width:none;font-size:16px;min-height:44px}.draft-sheet td:nth-child(4){min-width:0}.draft-badge{align-self:flex-start}}

.picker-defaults{grid-column:1/-1;border-top:1px solid #d4e0e4;padding-top:16px}.picker-defaults>summary{cursor:pointer;color:#4b6872;font-size:.84rem}.picker-defaults[open]>.form-grid{margin-top:18px}.composer-add .product-picker{grid-template-columns:1fr 2fr 1fr}.composer-add .product-picker .article-field{grid-column:auto}@media(max-width:760px){.composer-add .product-picker{grid-template-columns:1fr}.composer-add .product-picker .field{grid-column:1}}

.draft-sheet input[readonly]{background:#edf1f3;color:#60727b;border-color:#d1dce1;cursor:not-allowed}.order-composer #reason{min-height:82px}.order-composer [for="reason"]{margin-top:18px}

/* Major cards lead into a single order's entry sheet. */
.cards-toolbar{margin:16px 0 22px}.compact-order{overflow:hidden}.order-card-link{display:block;width:100%;height:100%;text-align:left;border:0;padding:0;background:#fff;color:inherit;font:inherit;cursor:pointer}.order-card-link:hover{background:#f5faf9}.order-card-link:focus-visible{outline:3px solid #2c807a;outline-offset:-3px}.compact-order h2{font-size:1.2rem;margin:4px 0 10px}.compact-order .order-card-head{align-items:flex-start;gap:16px;background:#edf5f4}.compact-order .order-card-head p{line-height:1.6}.compact-order .metrics{grid-template-columns:1fr 1fr;margin-top:16px}.card-count{margin:0 0 12px}.card-articles{list-style:none;padding:0;margin:0}.card-articles li{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid #e0e8eb;font-size:.84rem}.card-articles small{display:block;margin-top:4px;color:#617680}.card-articles strong{white-space:nowrap;font-size:.78rem}.card-progress{display:flex;justify-content:space-between;gap:16px;margin:18px 0 12px;font-size:.83rem}.compact-order .order-footer{font-weight:700;color:#27615e;background:#f4f8f8}.order-details{margin-top:24px}.order-details>summary{padding:20px}.order-details[open]{padding:0 20px 20px}.order-details .breadcrumb{display:none}@media(max-width:760px){.order-details[open]{padding:0 10px 16px}.card-progress{flex-wrap:wrap}}

.compact-order .order-card-link{display:flex;flex-direction:column;align-items:stretch}.compact-order .order-card-body{flex:1}.compact-order .order-footer{width:100%}

.inline-entry-toolbar{justify-content:space-between;margin:0 0 18px}.inline-batch-input{width:100%;min-height:42px;padding:10px;border:1px solid #8eafb9;border-radius:6px;font:inherit;background:#fff}.order-sheet td>label{display:block;font-size:.73rem;font-weight:650;margin:12px 0 6px}.order-composer>.sheet-panel{margin-bottom:28px}

.production-sheet{margin-bottom:24px}.production-sheet .draft-sheet{min-width:850px}.payment-extra{display:grid;grid-template-columns:1fr 1fr 180px;gap:14px;align-items:center;padding:12px 0;border-bottom:1px solid #d5e1e4}.workspace-summary>.panel-body{padding:20px}.production-sheet h2{margin:0}.production-sheet .panel-head p{margin-bottom:0}@media(max-width:760px){.production-sheet .draft-sheet{min-width:0}.payment-extra{grid-template-columns:1fr}.production-sheet .panel-body{flex-direction:column;align-items:stretch}}

.sheet-save-bar{position:sticky;top:0;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f3f8f7;border:1px solid #c7dcd8;border-radius:8px;padding:12px 16px;margin-bottom:18px;box-shadow:0 3px 12px #23434c12}.sheet-first>.workspace-summary{margin:16px 0}.sheet-first>.production-sheet{margin-bottom:16px}@media(max-width:760px){.sheet-save-bar{padding:10px;gap:8px}.sheet-save-bar>strong{font-size:.75rem}.sheet-save-bar .actions{gap:4px}.sheet-save-bar .button{font-size:.75rem;padding:10px 8px}}

.minor-history{margin-top:14px;font-weight:400;font-size:.78rem}.minor-history summary{cursor:pointer;color:#27635f;font-weight:650}.minor-history-body{min-width:210px;padding:12px;background:#f3f8f7;border:1px solid #d1dfdc;border-radius:6px;margin-top:8px}.minor-history-body p{border-bottom:1px solid #d6e1df;padding:8px 0;line-height:1.5}.minor-history-body h4{margin:16px 0 4px}.minor-history-body small{display:block;white-space:normal}

.card-archive-action{padding:8px 18px;border-top:1px solid #d5e2df;background:#f8faf9;text-align:right}.compact-order .order-card-link{height:auto;flex:1}.compact-order{display:flex;flex-direction:column}

.shared-entry-row{display:grid;grid-template-columns:1fr 2fr 1fr 1fr auto;gap:12px;align-items:end;margin:16px 0}.shared-entry-row label{font-size:.78rem;font-weight:600}@media(max-width:760px){.shared-entry-row{grid-template-columns:1fr 1fr}}

.ledger-entry-fields{display:grid;gap:8px;padding:12px;margin:10px 0;border:1px solid #c5d9d5;border-radius:7px;background:#f3f8f7}.ledger-entry-fields label{font-size:.74rem;font-weight:600}.ledger-entry-fields input{max-width:none!important}.production-sheet .draft-sheet td{min-width:150px}

.order-tabs{display:flex;gap:8px;border-bottom:1px solid #ccdcd9;padding-bottom:12px;margin-bottom:24px}.order-tabs .button{min-width:90px}.order-tools{margin-top:24px}.side-foot{display:none}.order-tools .panel-body{display:flex;gap:16px;flex-wrap:wrap}

/* Compact order entry and cards. */
.order-composer .composer-section{margin-bottom:18px}.order-composer .composer-section>.panel-head{padding:14px 18px}.order-composer .composer-section>.panel-body{padding:16px 18px}.order-composer .composer-section>.panel-head .eyebrow,.order-composer .composer-section>.panel-head p:not(.eyebrow){display:none}.order-composer .form-grid{gap:12px}.order-composer #notes{min-height:48px;height:48px;margin-top:8px}.order-composer .composer-add .product-picker{gap:12px}.order-composer .form-footer{margin-top:12px;padding-top:12px}.order-composer .draft-sheet th,.order-composer .draft-sheet td{padding:12px}.order-composer .draft-sheet input{padding:8px}.order-composer .composer-add .form-footer small{display:none}.order-composer .field small{font-size:.7rem}.compact-order .order-card-head,.compact-order .order-card-body{padding:16px}.compact-order .card-articles li{padding:8px 0}.compact-order .card-progress{margin:12px 0 8px}.compact-order .order-footer{padding:12px 16px}.compact-order .metrics{gap:8px;margin-top:12px}.compact-order .metric{padding:10px}.card-archive-action{padding:6px 12px}

.order-composer>.page-heading{margin-bottom:16px}.order-composer>.page-heading p{display:none}.order-composer>.page-heading h1{font-size:1.65rem}.order-composer .composer-articles .empty{padding:12px;background:transparent;border:0}.order-composer .empty-review{display:none}

.article-field>input[type=search]{width:100%;min-height:42px;padding:10px;border:1px solid #bdced4;border-radius:7px;font:inherit}.article-results{max-height:180px;overflow:auto;border:1px solid #cadcd7;border-radius:6px;margin-top:6px;background:#fff}.article-results .button{display:block;text-align:left;width:100%;border-radius:0;border-bottom:1px solid #edf2f0}.article-results .button:hover,.article-results .button:focus{background:#e4f2ee}.article-results p{padding:10px;margin:0;font-size:.8rem}

/* Entry preparation and compact, visible order bookkeeping. */
.shared-costs-top{margin-bottom:18px}.shared-costs-top .panel-body{display:flex;flex-wrap:wrap;gap:12px;align-items:start}.shared-costs-top .panel-body>small{flex-basis:100%}.ledger-entry-fields{padding:12px!important;gap:8px!important;margin:10px 0;min-width:210px}.ledger-entry-fields label{font-size:.8rem}.ledger-entry-fields input{min-height:38px;padding:8px 10px}.prepared-entry{background:#fff7df;border-color:#dfc479}.prepared-entry small,.prepared-entry .draft-badge{display:block;margin:6px 0}.saved-entry{padding:8px 0;border-bottom:1px solid var(--line,#d8e4e7)}.saved-entry small{display:block}.saved-badge{font-size:.7rem;color:#17786d}.card-financials{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0;font-size:.8rem}.card-financials strong{display:block}.card-visual{display:grid;gap:5px;font-size:.8rem}.card-visual progress{width:100%;height:9px;accent-color:#117d76}.production-sheet th:first-child{min-width:190px}.production-sheet td{vertical-align:top}.production-sheet td>strong{display:block;margin-bottom:6px}.sheet-save-bar{z-index:5}.composer-add>form> .field{display:inline-block;width:min(300px,100%);margin:8px 12px 4px 0}@media(max-width:640px){.card-financials{grid-template-columns:1fr 1fr}.shared-costs-top .ledger-entry-fields{width:100%}.ledger-entry-fields{min-width:0}.production-sheet td>strong{margin-top:4px}}

.shared-costs-top .ledger-entry-fields:not(.prepared-entry){grid-template-columns:repeat(4,minmax(120px,1fr));width:100%}.shared-costs-top .ledger-entry-fields label{min-width:0}@media(max-width:760px){.shared-costs-top .ledger-entry-fields:not(.prepared-entry){grid-template-columns:1fr 1fr}.page-heading>.actions{flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.page-heading>.actions .button{width:auto}}

/* Compact visual bookkeeping: clear budgets, tabular shared costs, per-article save. */
.shared-costs-top .panel-body{display:block}.shared-table-scroll{overflow-x:auto;width:100%;margin-bottom:12px}.shared-cost-table{width:100%;border-collapse:collapse;font-size:.84rem}.shared-cost-table th{background:#e7f1f0;text-align:left;color:#285555;font-size:.75rem;padding:10px 12px}.shared-cost-table td{padding:10px 12px;border-bottom:1px solid #dce7e9;vertical-align:middle}.shared-cost-table input{width:100%;min-width:100px;padding:8px;min-height:38px}.shared-cost-table td:last-child{min-width:200px}.shared-cost-table td:last-child .button{display:inline-flex;margin:4px 0}.shared-cost-table .draft-badge{display:inline-block;margin-right:4px;font-size:.7rem}.shared-prepared{background:#fff8e4}.shared-cost-table tfoot{background:#f3f8f8}.shared-cost-table tfoot td,.shared-cost-table tfoot th{border-top:2px solid #bfd5d7}.material-budget-tile{background:#e3f3ef;border:1px solid #9dcfc1;border-left:4px solid #168675;border-radius:8px;padding:12px;margin:12px 0;min-width:180px}.material-budget-tile>span{display:block;text-transform:uppercase;font-size:.65rem;letter-spacing:.08em;font-weight:800;color:#28655c}.material-budget-tile>strong{display:block!important;font-size:1.15rem;color:#125d52;margin:5px 0}.material-budget-tile small{display:block}.material-budget-tile progress,.row-progress{display:block;width:100%;height:8px;margin:8px 0;accent-color:#258e7d}.row-progress.payment{accent-color:#4b78a9}.row-actions{min-width:145px!important}.row-actions>.button{display:block;margin:0 0 12px}.production-sheet .issued-total{color:#75502a}.production-sheet .ledger-entry-fields:not(.prepared-entry){grid-template-columns:1fr 1fr;min-width:240px}.production-sheet .ledger-entry-fields:not(.prepared-entry) .button{margin-top:2px}.production-sheet .ledger-entry-fields input{width:100%;min-width:0}.production-sheet .ledger-entry-fields label{min-width:0}.row-progress{min-width:110px}.order-card .metrics{border-bottom:1px solid #d4e2e4;padding-bottom:12px}.card-visual{background:#f0f7f6;padding:12px;border-radius:8px}.card-financials strong{font-size:.95rem;color:#204a50}.composer-add .form-footer{display:flex;gap:8px;justify-content:flex-start}.composer-add .form-footer small{flex-basis:100%}.composer-add .form-footer .button{flex:none}.material-budget-tile .negative{color:#a12c35}
@media(max-width:760px){.shared-cost-table thead{display:none}.shared-cost-table,.shared-cost-table tbody,.shared-cost-table tr,.shared-cost-table td{display:block}.shared-cost-table tr{padding:8px 0;border-bottom:2px solid #d5e2e4}.shared-cost-table td{border:0;padding:6px 8px}.shared-cost-table td:before{content:attr(data-label);display:block;font-size:.7rem;color:#527079;margin-bottom:3px;font-weight:700}.shared-cost-table tfoot{display:block}.shared-cost-table tfoot tr{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.shared-cost-table tfoot th{background:none;border:0}.material-budget-tile{max-width:none}.row-actions>.button{display:inline-flex;margin-right:8px}.production-sheet .ledger-entry-fields:not(.prepared-entry){min-width:0;grid-template-columns:1fr 1fr}.composer-add .form-footer{flex-wrap:wrap}}
/* Clear draft states, one home action, and dated factory output. */
.workspace-location{display:flex;align-items:center;gap:14px;min-width:0}.home-button{border:1px solid #9bbdb7;background:#edf6f3;color:#195e54;white-space:nowrap}.draft-micro-label{display:block;width:fit-content;padding:5px 8px;margin:8px 0;background:#fff4d5;border:1px solid #dfc675;border-radius:5px;font-size:.72rem;font-weight:700;color:#73551b}.calendar-overview{grid-template-columns:repeat(4,minmax(0,1fr))}.calendar-overview .factory-month-total{background:#e4f3ed;border-color:#a6cdbf}.factory-month-total strong{color:#17674e}.calendar-key-production{color:#17674e}.calendar-key-production:before{background:#298469}.calendar-count-production{color:#165e49;background:#dff3e9;border-radius:4px;padding:2px 5px;font-weight:800}.calendar-event-production{background:#e1f3e9;border-left:3px solid #278965;color:#185940}.calendar-event-production .calendar-production-article{font-size:.65rem;white-space:normal;overflow-wrap:anywhere;color:#275a47}.calendar-type-production{background:#ddf3e7;color:#176147}.factory-day-production{margin:16px 0;border:1px solid #b9d7cc;border-radius:8px;overflow:hidden}.factory-day-heading{background:#e7f4ed;padding:12px 14px;display:flex;gap:12px;align-items:center;justify-content:space-between}.factory-day-heading h4{margin:0;font-size:.85rem}.factory-day-heading>strong{font-size:1.2rem;color:#146348}.factory-production-scroll{overflow-x:auto}.factory-production-table{width:100%;border-collapse:collapse;font-size:.85rem}.factory-production-table th{background:#f2f8f5;text-align:left;font-size:.72rem;color:#45645a;padding:9px 12px}.factory-production-table td{padding:10px 12px;border-top:1px solid #dce8e2;vertical-align:top}.factory-production-table small{display:block;font-size:.72rem;margin-top:4px;color:#547066}.calendar-cell-events .calendar-event-production{min-height:60px}
@media(max-width:760px){.workspace-location{gap:6px;flex-wrap:wrap}.workspace-location .eyebrow{display:none}.home-button{font-size:.75rem;padding:8px 9px}.calendar-overview{grid-template-columns:1fr 1fr}.calendar-event-production .calendar-production-article{display:none}.calendar-count-production{font-size:.65rem}.factory-production-table td,.factory-production-table th{padding:8px}.factory-day-heading{padding:10px}.factory-day-heading h4{font-size:.78rem}.topbar{gap:8px}}
.factory-extra{margin:12px 0;border:1px solid #d5e3dd;border-radius:7px;padding:10px 12px}.factory-extra>summary{font-size:.8rem;color:#3f6555;font-weight:700;cursor:pointer}.factory-extra[open]>summary{margin-bottom:10px}
.calendar-key-production{font-weight:750;display:flex;align-items:center;gap:7px}.calendar-key-production::before{content:"";display:inline-block;width:10px;height:10px;border-radius:3px;background:#298469;border:1px solid #176147}.calendar-day-counts{display:flex;gap:3px;margin-left:auto}.calendar-day-counts>.calendar-count-order,.calendar-day-counts>.calendar-count-payment{display:none}.calendar-count-production{font-size:.65rem;line-height:1.3}@media(max-width:760px){.calendar-day-counts{display:grid;margin-left:0}.calendar-day-counts>.calendar-count-order,.calendar-day-counts>.calendar-count-payment{display:block}.calendar-count-production{font-size:inherit}}

/* Article-first order review: compact rows, explicit financial labels. */
.major-table-wrap{border:1px solid #c8dce1;border-radius:12px;overflow:auto;background:white}.major-order-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:.88rem}.major-order-table th{background:#284c59;color:white;text-align:left;padding:14px 12px}.major-order-table td{vertical-align:top;padding:18px 12px;border-bottom:1px solid #d5e2e5}.major-order-table th:first-child{width:27%}.major-order-table th:nth-child(2){width:16%}.major-order-table th:nth-child(3){width:18%}.major-order-table th:nth-child(4){width:12%}.major-order-table th:nth-child(5){width:16%}.major-order-table th:last-child{width:11%}.major-order-table td>small{display:block;margin:7px 0;color:#526e7a}.major-order-table td>.status{display:table;margin:8px 0}.major-order-table progress{width:100%;height:9px;margin-top:10px;accent-color:#14857b}.major-article-list{list-style:none;margin:0;padding:0}.major-article-list li{display:flex;gap:10px;justify-content:space-between;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid #dce7e9}.major-article-list li:last-child{border:0;margin-bottom:0;padding-bottom:0}.major-article-list strong{font-size:1.04rem;line-height:1.4;display:block;color:#173e49}.major-article-list small{display:block;margin-top:5px;color:#526e7a}.major-article-list b{white-space:nowrap}.budget-balance{padding:9px;margin:10px 0;border-radius:6px;background:#eef8f3}.budget-balance small,.budget-balance strong{display:block}.budget-balance.negative{background:#fff0ee}.table-order-actions{display:grid;gap:12px}.table-order-actions .button{white-space:normal;padding:9px}.order-bottom-nav{display:flex;align-items:center;gap:16px;margin:20px 0}.order-bottom-nav span{color:#526e7a;font-size:.88rem}
.calendar-event-order{background:#edf3ff;border-color:#5078c1;color:#264f91}.calendar-count-order,.calendar-type-order{background:#edf3ff;color:#264f91}.calendar-event-kind{font-size:.68rem!important;font-weight:700;text-transform:uppercase;letter-spacing:.025em}.calendar-event-production{background:#e1f5e9;border-color:#258e59;color:#155e3d}
@media(max-width:850px){.major-order-table{table-layout:auto}.major-order-table thead{display:none}.major-order-table,.major-order-table tbody,.major-order-table tr,.major-order-table td{display:block}.major-order-table tr{border-bottom:3px solid #b9d3d7;display:grid;grid-template-columns:1fr 1fr}.major-order-table td{min-width:0;padding:12px}.major-order-table td:before{content:attr(data-label);display:block;font-size:.75rem;font-weight:700;color:#526e7a;margin-bottom:9px}.major-order-table td:first-child{grid-column:1/-1;background:#f0f8f7}.major-order-table td:last-child{grid-column:1/-1}.table-order-actions{display:flex;justify-content:space-between}.order-bottom-nav{flex-wrap:wrap}}
.calendar-key-order::before{background:#5078c1;border-color:#264f91}

/* Each PO has an explicit header, aligned article rows and one authoritative total. */
.article-grid{table-layout:fixed}.article-grid th:nth-child(1){width:26%}.article-grid th:nth-child(2){width:8%}.article-grid th:nth-child(3),.article-grid th:nth-child(4){width:17%}.article-grid th:nth-child(5){width:13%}.article-grid th:nth-child(6){width:19%}.article-grid td,.article-grid .major-article-row th,.article-grid .major-total-row th{padding:13px 12px;text-align:left;border-bottom:1px solid #d5e2e5;vertical-align:top}.article-grid .major-article-row th{background:white;color:#173e49}.article-grid .major-article-row th>strong{font-size:1rem}.article-grid small{display:block;font-weight:400;font-size:.75rem;margin:6px 0;color:#526e7a}.article-grid .major-group-heading th{padding:14px 16px;background:#dfefef;color:#173e49;border-top:10px solid #edf3f5;border-bottom:2px solid #89b3b6;width:auto}.major-group-bar{display:flex;justify-content:space-between;align-items:center;gap:16px}.major-po{font-size:1.2rem;margin-right:15px}.major-group-bar .status{margin-right:12px}.article-grid .major-total-row{background:#edf6f4;border-bottom:3px solid #89b3b6}.article-grid .major-total-row th{background:#edf6f4;color:#173e49}.article-grid .budget-balance{padding:6px;margin:7px 0}.article-grid .budget-balance b{display:block;margin-top:3px}.calendar-cell-events{max-height:none;overflow:visible}.calendar-event{height:auto;max-height:none;white-space:normal}.calendar-production-article{white-space:normal;overflow:visible;text-overflow:clip}
@media(max-width:850px){.article-grid tbody{display:block}.article-grid tr{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid #c8dce1}.article-grid td:last-child{grid-column:auto}.article-grid .major-group-heading{display:block}.article-grid .major-group-heading th{display:block;width:auto}.major-group-bar{align-items:start;flex-direction:column}.major-group-bar .actions{width:100%;justify-content:space-between}.article-grid .major-article-row th,.article-grid .major-total-row th{grid-column:1/-1;width:auto!important}.article-grid td{width:auto!important}.article-grid .major-total-row{border-bottom:4px solid #89b3b6}.article-grid .major-article-row th:before{content:attr(data-label);font-size:.7rem;display:block;margin-bottom:7px;color:#526e7a}.article-grid td:first-child{grid-column:auto}}
@media(max-width:640px){.calendar-month-panel{overflow-x:auto}.order-calendar-table{min-width:980px}.order-calendar-table .calendar-cell-events{display:block}.order-calendar-table .calendar-day-button{min-height:35px;flex-direction:row;justify-content:space-between}.order-calendar-table .calendar-day-counts{width:auto}.order-calendar-table .calendar-cell{padding:5px}.calendar-event{font-size:.7rem}.calendar-event-kind{font-size:.62rem!important}}
.calendar-event>span,.calendar-event small{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.calendar-event-production .calendar-production-article{display:block}

.order-list-filters{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin:16px 0 20px}.order-list-filters .field{flex:1;min-width:135px}.order-list-filters .field:nth-child(2){flex:1.5}.order-list-filters input,.order-list-filters select{min-height:40px;padding:8px 10px}.order-list-filters .button{min-height:40px}.article-entry-toggle{margin-top:9px;font-size:.72rem;text-align:left}.inline-article-editor>td{padding:16px!important;background:#eff7f7;border-left:4px solid #17756e}.inline-editor-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.inline-article-editor .draft-sheet{table-layout:auto}.inline-article-editor .draft-sheet th,.inline-article-editor .draft-sheet td{width:auto}.inline-article-editor .draft-sheet th{background:#284c59;color:white}.inline-article-editor tbody th{background:white!important;color:#173e49!important}.edit-order-help{font-size:.85rem;max-width:820px;padding:10px 12px;background:#eef6f4;border-left:3px solid #5b9f95}.inline-article-editor .panel-head{padding:12px}.inline-article-editor .production-sheet .panel-head>label,.inline-article-editor .production-sheet .panel-head>button{display:none}.inline-article-editor .material-budget-tile{display:none}
@media(max-width:850px){.article-grid .inline-article-editor{display:block}.article-grid .inline-article-editor>td{display:block;width:auto!important}.article-grid .inline-article-editor>td:before{display:none}.order-list-filters .field{flex-basis:40%}.inline-editor-heading{gap:12px}.article-grid .inline-article-editor .draft-sheet tr{display:block}.article-grid .inline-article-editor .draft-sheet td,.article-grid .inline-article-editor .draft-sheet th{display:block;width:auto!important}}

/* Major totals stay visible; article rows start collapsed. */
.order-view-controls{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:12px 0 18px}.order-view-controls small{font-size:.78rem;color:#526e7a}.order-view-controls .check-row{margin-left:auto}.article-grid .major-summary-row>th,.article-grid .major-summary-row>td{background:#e3f0f1;border-top:14px solid #f0f5f6;border-bottom:2px solid #72a6aa;padding:15px 12px;vertical-align:top;color:#173e49;text-align:left}.article-grid .major-order-group:nth-of-type(even) .major-summary-row>th,.article-grid .major-order-group:nth-of-type(even) .major-summary-row>td{background:#edf3f8}.article-grid .major-summary-row>th{width:auto}.major-summary-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.major-po-toggle{font-size:1.05rem!important;font-weight:800;padding:4px 0!important;color:#125d60}.major-summary-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.major-summary-actions .button{padding:7px 8px;font-size:.67rem}.major-article-preview{color:#294f59!important;line-height:1.5}.article-grid .major-summary-row .budget-balance{background:#fff;border:1px solid #cadfdb}.article-grid .major-article-row{background:#fff}.article-grid .major-article-row th{padding-left:25px;border-left:4px solid #a6c8c6}
@media(max-width:850px){.article-grid .major-summary-row>th{grid-column:1/-1}.article-grid .major-summary-row>td{border-top:0}.article-grid .major-summary-row{border:2px solid #8bb1b4;margin-top:12px}.article-grid .major-summary-row>th{border-top:0}.order-view-controls .check-row{margin-left:0}.article-grid .major-summary-row>td:last-child{grid-column:auto}.article-grid .major-summary-row>th:before{display:none}}
/* Column-aligned editing; no nested tables or whole-row replacement. */
.article-grid th:nth-child(1){width:20%}.article-grid th:nth-child(2){width:6%}.article-grid th:nth-child(3){width:12%}.article-grid th:nth-child(4){width:22%}.article-grid th:nth-child(5){width:14%}.article-grid th:nth-child(6){width:17%}.article-grid th:nth-child(7){width:9%}.major-summary-row{cursor:pointer}.major-summary-row:hover>td,.major-summary-row:hover>th{filter:brightness(.97)}.major-summary-row:focus-visible{outline:3px solid #178d83;outline-offset:-3px}.major-summary-actions{display:grid;gap:9px;margin:0}.major-summary-actions .button{width:100%;white-space:normal;min-height:36px;font-size:.72rem}.order-actions-cell,.micro-actions-cell{vertical-align:top}.cell-entry-workspace{margin-top:14px;border-top:1px solid #c4dbd8;padding-top:10px}.cell-entry-workspace .saved-entry{padding:8px 0}.cell-entry-workspace .ledger-entry-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;padding:10px;margin:10px 0;background:#f2f8f6;border:1px solid #bcd8d1;border-radius:7px}.cell-entry-workspace .ledger-entry-fields label{display:block;font-size:.75rem;color:#264d58}.cell-entry-workspace input{width:100%;min-width:0;min-height:36px;padding:7px 8px;font-size:.83rem;margin-top:4px}.cell-entry-workspace .button{white-space:normal;font-size:.74rem;padding:8px;min-height:34px}.saved-entry-edit{border-left:3px solid #d8a341!important}.saved-entry-edit>strong{font-size:.78rem}.saved-entry .saved-badge{margin-right:8px}.micro-actions-cell .button{width:100%;white-space:normal}.cell-entry-workspace .saved-entries{max-width:100%}
@media(min-width:1600px){.cell-entry-workspace .ledger-entry-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.cell-entry-workspace .ledger-entry-fields>strong,.cell-entry-workspace .ledger-entry-fields>small{grid-column:1/-1}}
@media(max-width:850px){.article-grid .major-summary-row>td.order-actions-cell,.article-grid .major-article-row>td.micro-actions-cell{grid-column:1/-1}.major-summary-actions{display:flex;flex-wrap:wrap}.major-summary-actions .button{width:auto;flex:1}.article-grid .major-article-row>td,.article-grid .major-summary-row>td{width:auto!important}.cell-entry-workspace .ledger-entry-fields{grid-template-columns:minmax(0,1fr)}}
.article-grid th:nth-child(1){width:20%}.article-grid th:nth-child(2){width:7%}.article-grid th:nth-child(3){width:14%}.article-grid th:nth-child(4){width:20%}.article-grid th:nth-child(5){width:13%}.article-grid th:nth-child(6){width:15%}.article-grid th:nth-child(7){width:11%}.article-grid [data-label="Ordered"]>strong{white-space:nowrap}
.article-grid th:nth-child(1){width:18%}.article-grid th:nth-child(2){width:7%}.article-grid th:nth-child(3){width:12%}.article-grid th:nth-child(4){width:24%}.article-grid th:nth-child(5){width:14%}.article-grid th:nth-child(6){width:14%}.article-grid th:nth-child(7){width:11%}
@media(min-width:1100px){.article-grid [data-label="Expenses"] .ledger-entry-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.article-grid [data-label="Expenses"] .ledger-entry-fields>strong,.article-grid [data-label="Expenses"] .ledger-entry-fields>small{grid-column:1/-1}.article-grid .cell-entry-workspace input[type="date"]{font-size:.72rem;padding:5px 4px}}
@media(max-width:850px){.article-grid .major-summary-row>th,.article-grid .major-article-row>th{width:auto!important;min-width:0;grid-column:1/-1}.article-grid .major-summary-row>td,.article-grid .major-article-row>td{min-width:0}.article-grid .major-summary-row .major-po-toggle{white-space:nowrap}}

.production-plan-section{margin-top:13px;border-top:1px dashed #abb9da;padding-top:10px}.production-plan-section>summary{cursor:pointer;font-size:.78rem;font-weight:700;color:#514e94}.production-plan-section[open]{background:#f5f4fc;padding:10px;border-radius:6px}.plan-match-note{display:block;font-size:.7rem;color:#666484;padding:8px 10px;line-height:1.5}.calendar-event-plan{background:#f0edff;color:#51408b;border-color:#a99ad6;border-left:3px dashed #7861b3}.calendar-event-plan:hover{background:#e7e0fa}.calendar-key-plan{color:#51408b;font-weight:700;display:flex;align-items:center;gap:7px}.calendar-key-plan:before{content:"";width:10px;height:10px;background:#b3a5df;border:1px dashed #7861b3;border-radius:3px}.calendar-type-plan{background:#eee8fc;color:#51408b}.factory-day-plan{border-color:#c9bde9}.factory-day-plan .factory-day-heading{background:#eee9fa}.factory-day-plan .factory-day-heading strong{color:#51408b}.factory-day-plan .factory-production-table{min-width:540px}.plan-status-on-time{color:#16714d;font-weight:700}.plan-status-overdue,.plan-status-completed-late{color:#9a4329;font-weight:700}.plan-progress{font-size:.65rem!important}
.calendar-count-plan{background:#ece5fa;color:#51408b;border-radius:4px;padding:2px 5px;font-weight:700}.calendar-day-counts{flex-wrap:wrap}.calendar-event-plan .plan-state-on-time{color:#16714d;font-weight:700}.calendar-event-plan .plan-state-overdue,.calendar-event-plan .plan-state-completed-late{color:#9a4329;font-weight:700}
.plan-entry-status{display:inline-block;font-size:.7rem;color:#625882;margin-right:7px}.plan-entry-status.plan-state-on-time{color:#16714d;font-weight:700}.plan-entry-status.plan-state-overdue,.plan-entry-status.plan-state-completed-late{color:#9a4329;font-weight:700}

.draft-plan-dates{grid-column:1/-1;margin:12px 0;padding:12px;border:1px solid #cfc5e5;border-radius:7px;background:#f7f5fc}.draft-plan-dates>strong{font-size:.88rem;color:#51408b;display:block;margin-bottom:10px}.draft-plan-date-row{display:flex;gap:12px;align-items:end;margin-bottom:10px}.draft-plan-date-row .field{flex:1;min-width:0}.draft-plan-dates small{font-size:.75rem;color:#655e7c}.draft-plan-dates input{min-height:40px;padding:8px 10px}.draft-plan-preview{color:#51408b!important;margin-top:7px!important}.draft-plan-dates .actions{flex-wrap:wrap}@media(max-width:640px){.draft-plan-date-row{flex-wrap:wrap}.draft-plan-date-row .field{flex-basis:40%}}

.visible-plan-summary{margin-top:12px;padding:9px 10px;border:1px solid #d6cdeb;border-radius:6px;background:#f7f4fc;color:#51408b;font-size:.75rem;line-height:1.5}.plan-summary-heading{display:block;font-weight:700;margin-bottom:5px}.visible-plan-row+.visible-plan-row{border-top:1px solid #ded6ed;margin-top:6px;padding-top:6px}.visible-plan-row>span{display:block}.visible-plan-row .plan-article{margin:0 0 2px;color:#51408b;font-weight:600}.plan-summary-status{font-size:.7rem}.plan-summary-status.plan-state-on-time{color:#16714d;font-weight:700}.plan-summary-status.plan-state-overdue,.plan-summary-status.plan-state-completed-late,.plan-summary-status.plan-state-completed-short{color:#9a4329;font-weight:700}.plan-summary-empty{color:#6d7780;font-size:.72rem}

.calendar-article-focus{display:flex!important;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:3px 8px;font-size:.8rem;line-height:1.35}.calendar-article-focus strong{font-weight:750;flex:1;min-width:80px}.calendar-article-quantity{font-size:.9rem;white-space:nowrap}.calendar-event .calendar-article-status{font-size:.65rem;margin:3px 0 6px;font-weight:500}.calendar-event .calendar-event-reference{font-size:.6rem;font-weight:500;opacity:.8;margin-top:5px}.calendar-article-focus~.calendar-article-focus{border-top:1px solid #cabfe0;margin-top:7px;padding-top:7px}.calendar-event-production .calendar-article-focus~.calendar-article-focus{border-color:#b8d8ca}

.recovery-status{font-size:.75rem;color:#49656c;margin:0 0 12px;min-height:20px}.major-order-table td,.major-order-table th{padding-top:12px;padding-bottom:12px}.major-order-table small{margin-top:5px}.major-summary-row .visible-plan-summary{padding:7px 8px}.sheet-save-bar{position:sticky;top:0;z-index:8;background:#f5fbfa;border:1px solid #bfd6d3;box-shadow:0 2px 6px #193c4212}.ledger-entry-fields{padding:12px;gap:9px}.saved-entry{padding:8px 0}.sheet-first>.panel.panel-body .composer-totals{gap:8px}.order-composer .composer-add{padding:16px}.order-composer .form-grid{gap:12px}.composer-add input{min-height:40px}.composer-add .field{margin-bottom:8px}.production-plan-section{margin-top:8px}.visible-plan-summary .plan-article{font-size:.75rem}.minor-history-body h4{margin-top:14px}@media(max-width:640px){.sheet-save-bar{top:0;gap:8px;padding:10px}.sheet-save-bar .actions{gap:6px}.sheet-save-bar .button{padding:9px 12px}.major-order-table .major-summary-row>td,.major-order-table .major-article-row>td{padding:10px}.major-order-table .visible-plan-summary{font-size:.72rem;margin-top:7px}.major-order-table .visible-plan-row+.visible-plan-row{margin-top:4px;padding-top:4px}.order-composer .composer-add{padding:12px}.composer-add .form-grid{gap:8px}.composer-section .panel-head{padding:14px}.saved-entry small{margin-top:3px}}

.order-collapsed .major-summary-row td[data-label="Budget"]>small,.order-collapsed .major-summary-row td[data-label="Expenses"]>small:not(.budget-balance){display:none}.major-order-table .visible-plan-row .plan-article{margin-top:0}.saved-entry>strong{font-size:.8rem}

.manual-editor{margin-bottom:20px}.manual-editor .form-grid{gap:12px}.manual-editor .panel-body{padding:18px}.manual-editor input,.manual-editor select{min-height:42px}.manual-catalog-table th strong{font-size:.9rem}.manual-catalog-table td{vertical-align:middle}.manual-catalog-table small{display:block;margin-top:5px}.manual-catalog-table .draft-sheet{min-width:760px}@media(max-width:640px){.manual-editor .panel-body{padding:12px}.manual-catalog-table .draft-sheet{min-width:0}.manual-catalog-table table,.manual-catalog-table tbody,.manual-catalog-table tr{display:block}.manual-catalog-table thead{display:none}.manual-catalog-table tr{padding:8px 12px;border-bottom:2px solid #bfd3d7}.manual-catalog-table th,.manual-catalog-table td{display:block;width:auto!important;padding:6px 0}.manual-catalog-table td:before{content:attr(data-label);display:inline-block;min-width:130px;font-size:.7rem;color:#607781;margin-right:8px}.manual-editor .form-grid{grid-template-columns:1fr}}

.manual-sheet{grid-column:1/-1;margin:12px 0;border:2px solid #8bbab5}.manual-sheet .panel-head{padding:12px 16px}.manual-sheet .panel-body{padding:14px}.manual-sheet .actions{margin-top:12px}.manual-entry-sheet{min-width:780px}.manual-entry-sheet input{width:100%;min-width:100px;padding:9px}.manual-entry-sheet td{padding:8px}.manual-sheet .draft-table-scroll{margin:10px 0}@media(max-width:640px){.manual-entry-sheet{min-width:0}.manual-entry-sheet thead{display:none}.manual-entry-sheet,.manual-entry-sheet tbody,.manual-entry-sheet tr,.manual-entry-sheet td{display:block}.manual-entry-sheet tr{padding:10px;border-bottom:2px solid #a8c6c3}.manual-entry-sheet td::before{content:attr(data-label);display:block;font-size:.75rem;font-weight:700;margin-bottom:4px}.manual-entry-sheet td{border:0;padding:5px}.manual-entry-sheet input{min-width:0}.manual-sheet .actions{flex-wrap:wrap}}

.article-results[hidden]{display:none}

/* Compact order entry: keep the article sheet close to the save controls. */
.compact-sheet-heading{margin-bottom:14px}.compact-sheet-heading h1{font-size:1.65rem;margin:0 0 5px}.compact-sheet-heading p{margin:4px 0}.sheet-save-bar{padding:10px 14px;margin-bottom:12px;gap:10px}.sheet-save-bar>div:first-child{min-width:0}.sheet-save-bar strong{font-size:.85rem}.sheet-save-bar small{display:block;font-size:.72rem;color:#526e73;margin-top:3px}.sheet-save-bar .button{min-height:36px;padding:8px 12px}.shared-costs-top{margin-bottom:12px}.shared-costs-top .panel-head{padding:12px 14px;gap:10px;align-items:center}.shared-costs-top .panel-head h2{font-size:1rem;margin:0}.shared-costs-top .panel-head p{font-size:.75rem;margin:4px 0 0}.shared-costs-top .panel-body{padding:8px 14px 12px}.shared-costs-top .shared-empty-note{font-size:.75rem;color:#60777d;margin:0;padding:0 14px 10px}.shared-costs-top.shared-empty .panel-head{border-bottom:0}.shared-costs-top .shared-table-scroll{margin:0 0 6px}.shared-cost-table th,.shared-cost-table td{padding:7px 9px}.shared-costs-top .panel-body>small{font-size:.72rem}.production-sheet>.panel-head{padding:14px}.production-sheet>.panel-head h2{font-size:1.1rem}.production-sheet>.panel-head p{font-size:.77rem;margin:5px 0 0}
@media(max-width:640px){.compact-sheet-heading{gap:8px}.compact-sheet-heading .actions{gap:6px}.compact-sheet-heading .button{padding:7px 10px;min-height:34px}.sheet-save-bar{padding:9px 10px;flex-wrap:wrap}.sheet-save-bar>div:first-child{flex:1 1 100%}.sheet-save-bar .actions{margin-left:auto}.shared-costs-top .panel-head{padding:10px 12px;flex-direction:row;align-items:center}.shared-costs-top .panel-head>div{flex:1;min-width:0}.shared-costs-top .panel-head>.button{white-space:nowrap;min-height:34px;padding:7px 10px}.shared-costs-top .panel-head p{line-height:1.4}.shared-costs-top .shared-empty-note{padding:0 12px 9px}.production-sheet>.panel-head{padding:12px}.shared-costs-top .panel-body{padding:6px 10px 10px}}
@media(max-width:760px){.shared-costs-top .shared-cost-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:2px 10px;padding:6px 0}.shared-costs-top .shared-cost-table td{min-width:0;padding:4px 0}.shared-costs-top .shared-cost-table td:before{margin-bottom:2px}.shared-costs-top .shared-cost-table tbody td:last-child{grid-column:1/-1;min-width:0}.shared-costs-top .shared-cost-table input{min-width:0;min-height:34px;padding:6px 8px}.shared-costs-top .shared-cost-table tfoot tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:7px 0}.shared-costs-top .shared-cost-table tfoot th,.shared-costs-top .shared-cost-table tfoot td{padding:3px 8px;border:0;min-width:0}.shared-costs-top .shared-cost-table tfoot td:before{display:none}.shared-costs-top .shared-cost-table tfoot td:last-child{grid-column:1/-1;font-size:.7rem;color:#60777d}.shared-costs-top .shared-cost-table td .saved-badge{font-size:.7rem}}

/* Mobile: compact date picker with the complete selected-day agenda below. */
.calendar-mobile-hint{display:none}
@media(max-width:640px){
 .button,.button.small,.sheet-save-bar .button,.compact-sheet-heading .button,.shared-costs-top .panel-head>.button,.nav-link{min-height:44px;min-width:44px;padding:8px 10px}
 input,select,textarea,.shared-costs-top .shared-cost-table input{min-height:44px;font-size:16px}
 .content{padding:12px}.stack{gap:12px}.panel-body,.panel-head{padding:12px}.form-grid{gap:10px}.field{gap:4px}.page-heading{margin-bottom:14px;gap:10px}
 .production-sheet td,.production-sheet th{padding:8px 10px}.production-sheet small{margin-top:3px}
 .sheet-save-bar{gap:6px;padding:8px 10px}.sheet-save-bar small{font-size:.68rem}.composer-totals{gap:6px}.composer-totals .metric{padding:9px}
 .calendar-mobile-hint{display:block;font-size:.78rem;margin:8px 0;color:#456771}
 .calendar-month-panel{overflow:hidden}.order-calendar .order-calendar-table{min-width:0;width:100%;table-layout:fixed}
 .order-calendar-table .calendar-cell{padding:1px;height:auto}.order-calendar-table .calendar-cell-events{display:none}
 .order-calendar-table .calendar-day-button{flex-direction:column;justify-content:flex-start;min-height:64px;padding:3px 0;gap:2px}
 .order-calendar-table .calendar-day-counts{width:100%;font-size:.5rem;gap:1px}.calendar-day-counts>span{padding:1px 0}.calendar-today-label{display:none}
 .calendar-navigation{grid-template-columns:44px minmax(0,1fr) 44px auto}.calendar-navigation .calendar-nav-button{min-height:44px}
 .calendar-agenda{margin-top:12px}.calendar-agenda-list{padding:8px;gap:10px}.calendar-agenda-heading{padding:12px}
 .order-calendar .factory-production-table{min-width:0;width:100%}.factory-production-table thead{display:none}
 .factory-production-table,.factory-production-table tbody{display:block}.factory-production-table tr{display:grid;grid-template-columns:1fr 1fr;padding:8px;border-bottom:1px solid #d3e0e5;gap:4px 8px}
 .factory-production-table td{display:block;padding:3px 0;border:0;min-width:0}.factory-production-table td:first-child{grid-column:1/-1}.factory-production-table td[data-label]:before{content:attr(data-label);display:block;font-size:.68rem;color:#526e73;margin-bottom:2px}
 .factory-production-scroll{overflow:visible}.calendar-plan-heading,.calendar-plan-footer{padding:10px}.calendar-overview{margin-bottom:8px}
}
@media(max-width:640px){
 .major-summary-actions .button,.cell-entry-workspace .button,.ledger-entry-fields .button,.notice .button{min-height:44px;min-width:44px}
 .ledger-entry-fields,.cell-entry-workspace .ledger-entry-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:10px!important;gap:8px!important}
 .ledger-entry-fields>strong,.ledger-entry-fields>small{grid-column:1/-1}
 .ledger-entry-fields label{min-width:0}.ledger-entry-fields input,.cell-entry-workspace input{width:100%;min-width:0;min-height:44px;font-size:16px;padding:7px}
 .production-sheet .saved-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:6px 0}
 .production-sheet .saved-entry>small{grid-column:1}.production-sheet .saved-entry>.button{grid-column:2;grid-row:1/4;align-self:center}.production-sheet .saved-entry>.saved-badge{grid-column:1}
}
@media(max-width:900px){
 .button,.button.small,.sheet-save-bar .button,.compact-sheet-heading .button,.shared-costs-top .panel-head>.button,.nav-link,.major-summary-actions .button,.cell-entry-workspace .button,.ledger-entry-fields .button,.notice .button{min-height:44px;min-width:44px}
 .calendar-mobile-hint{display:block;font-size:.78rem;margin:8px 0;color:#456771}
 .calendar-month-panel{overflow:hidden}.order-calendar .order-calendar-table{min-width:0;width:100%;table-layout:fixed}
 .order-calendar-table .calendar-cell{padding:1px;height:auto}.order-calendar-table .calendar-cell-events{display:none}
 .order-calendar-table .calendar-day-button{flex-direction:column;justify-content:flex-start;min-height:64px;padding:3px 0;gap:2px}
 .order-calendar-table .calendar-day-counts{display:grid;width:100%;font-size:.5rem;gap:1px}.calendar-today-label{display:none}
 .order-calendar .factory-production-table{min-width:0;width:100%}.factory-production-table thead{display:none}
 .factory-production-table,.factory-production-table tbody{display:block}.factory-production-table tr{display:grid;grid-template-columns:1fr 1fr;padding:8px;border-bottom:1px solid #d3e0e5;gap:4px 8px}
 .factory-production-table td{display:block;padding:3px 0;border:0;min-width:0}.factory-production-table td:first-child{grid-column:1/-1}.factory-production-table td[data-label]:before{content:attr(data-label);display:block;font-size:.68rem;color:#526e73;margin-bottom:2px}
 .factory-production-scroll{overflow:visible}
}
