:root{--ink:#19323b;--muted:#72848a;--navy:#18333c;--green:#237960;--green2:#e4f3eb;--orange:#e6a34a;--paper:#f5f7f4;--border:#e1e8e4;--white:#fff;--shadow:0 10px 30px rgba(28,55,53,.055);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}a{color:var(--green)}.loading{height:90vh;display:flex;gap:16px;align-items:center;justify-content:center;font-weight:650}.loader{width:25px;height:25px;border:3px solid #bbd5ca;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}#toast{position:fixed;top:22px;right:25px;z-index:30;background:#193b36;color:white;padding:14px 20px;border-radius:13px;box-shadow:0 12px 35px #0002;max-width:420px;opacity:0;pointer-events:none;transform:translateY(-10px);transition:.2s}#toast.show{opacity:1;transform:none}#toast.bad{background:#a93f36}.shell{display:grid;grid-template-columns:246px minmax(0,1fr);min-height:100vh}.sidebar{background:#152f37;color:#fff;padding:30px 16px;display:flex;flex-direction:column;gap:24px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;padding:3px 12px 22px;border-bottom:1px solid #ffffff20}.brand-mark{background:#3a9876;border-radius:15px;width:44px;height:44px;display:grid;place-items:center;font-size:25px}.brand strong{display:block;font-size:21px;letter-spacing:-.8px}.brand small{display:block;color:#9ebbb4;font-size:10px;letter-spacing:2px;text-transform:uppercase;margin-top:3px}.sidebar small.section{color:#83a39d;letter-spacing:1.4px;font-size:11px;margin:4px 15px 0}.nav{display:flex;flex-direction:column;gap:7px}.nav button{background:transparent;color:#c3d3d0;border:0;padding:12px 15px;display:flex;align-items:center;gap:12px;text-align:left;border-radius:12px;font-weight:600;width:100%}.nav button:hover{background:#ffffff13}.nav button.active{background:#27785f;color:white}.nav .glyph{font-size:18px;width:22px;text-align:center}.side-footer{margin-top:auto;padding:15px 12px 4px;border-top:1px solid #ffffff20;color:#a2bab6;font-size:12px;line-height:1.6}.side-footer button{background:none;border:none;color:#e5f4ef;padding:8px 0}.main{min-width:0;padding:32px clamp(18px,3.4vw,52px) 80px;max-width:1550px;width:100%;margin:0 auto}.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}.crumb{font-size:12px;letter-spacing:1.2px;text-transform:uppercase;color:#7f9990;font-weight:800}.topbar h1{font-size:clamp(26px,2.4vw,36px);margin:7px 0 0;letter-spacing:-1.2px}.top-right{display:flex;gap:10px;align-items:center}.avatar{width:41px;height:41px;display:grid;place-items:center;background:#e0efe9;border-radius:12px;color:#267a60;font-weight:800}.date-txt{font-size:13px;color:var(--muted)}.banner{background:#fff5e5;border:1px solid #f3ddb4;color:#805629;padding:13px 18px;border-radius:13px;margin-bottom:20px;font-size:13px}.banner strong{color:#754617}.btn{background:#fff;border:1px solid #d7e2dc;border-radius:10px;padding:11px 16px;color:var(--ink);font-weight:700;font-size:13px;display:inline-flex;gap:8px;align-items:center;justify-content:center;text-decoration:none;white-space:nowrap}.btn:hover{filter:brightness(.985);border-color:#a8c6b7}.btn.primary{background:#247c63;color:white;border-color:#247c63}.btn.dark{background:#173741;color:white;border-color:#173741}.btn.danger{background:#fff4f1;color:#a33a32;border-color:#f1d5d1}.btn.soft{background:#eaf3ee;color:#23785f;border-color:#d2e9dc}.btn.small{padding:7px 10px;font-size:12px}.btn:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #91cab2;outline-offset:2px}.grid-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:24px}.stat{background:white;border:1px solid var(--border);border-radius:17px;padding:20px 22px;box-shadow:var(--shadow);position:relative;overflow:hidden}.stat .tag{color:#778f89;font-size:12px;font-weight:750}.stat strong{display:block;font-size:29px;letter-spacing:-1px;margin:15px 0 6px}.stat small{color:#91a19e;font-size:12px}.stat .emoji{position:absolute;right:19px;top:18px;font-size:24px;opacity:.75}.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:27px 0 15px}.section-head h2{font-size:19px;letter-spacing:-.4px;margin:0}.section-head p{font-size:13px;color:var(--muted);margin:5px 0 0}.panel{background:var(--white);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);overflow:hidden;margin-bottom:19px}.panel.pad{padding:23px}.panel-head{padding:19px 22px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;gap:14px;align-items:center}.panel-head h3{font-size:16px;margin:0}.panel-head span{font-size:12px;color:var(--muted)}.table-wrap{overflow-x:auto}.data-table{width:100%;border-collapse:collapse;font-size:13px}.data-table th{text-align:left;font-size:11px;letter-spacing:.35px;color:#789087;background:#f7faf8;font-weight:850;white-space:nowrap}.data-table td,.data-table th{padding:13px 17px;border-bottom:1px solid #eaf0ec;vertical-align:middle}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#fcfdfb}.data-table .item-name{font-weight:750;color:#1a393e}.data-table .code{font-family:ui-monospace,SFMono-Regular,monospace;font-weight:750;color:#357966;font-size:12px}.muted{color:var(--muted)}.right{text-align:right!important}.num{font-variant-numeric:tabular-nums}.pill{font-size:11px;border-radius:999px;padding:5px 10px;font-weight:850;white-space:nowrap;display:inline-flex;align-items:center}.pill.green{color:#1c8056;background:#e0f4e8}.pill.red{color:#a84e48;background:#fbe8e4}.pill.orange{color:#9e6715;background:#fff0d6}.pill.gray{color:#678078;background:#edf2ef}.empty{padding:45px 20px;text-align:center;color:var(--muted)}.empty .big{font-size:32px;margin-bottom:10px}.empty strong{display:block;color:var(--ink);margin-bottom:5px}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.field{min-width:0}.field label{display:block;color:#5c746e;font-size:12px;font-weight:800;margin-bottom:8px}.field input,.field select,.field textarea,.search{background:#fff;border:1px solid #d9e4df;border-radius:9px;padding:11px 12px;width:100%;color:var(--ink);outline:none}.field textarea{min-height:76px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus,.search:focus{border-color:#3a9c77;box-shadow:0 0 0 3px #3a9c771a}.search{max-width:310px;font-size:13px}.field .hint{font-size:11px;color:#9caaa5;margin-top:6px}.field.wide{grid-column:span 2}.field.full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.qty-input{border:1px solid #dbe4dc;padding:10px 11px;text-align:right;width:113px;border-radius:9px;font-weight:800;color:#23765d;font-size:14px}.qty-input.over{border:2px solid #c34e42;background:#fff3ef;color:#b93d36}.order-foot{position:sticky;bottom:13px;background:#193b40;color:white;border-radius:15px;box-shadow:0 15px 32px #263b3340;display:flex;justify-content:space-between;align-items:center;gap:15px;padding:15px 20px;margin-top:18px;z-index:5}.order-foot small{display:block;color:#b6d4c8;font-size:11px}.order-foot strong{font-size:23px}.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:18px}.three-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.tabs{display:flex;gap:6px;border-bottom:1px solid #dce7df;margin-bottom:20px;overflow-x:auto}.tabs button{background:none;border:0;padding:13px 17px;font-weight:750;color:#7b918a;white-space:nowrap;border-bottom:3px solid transparent}.tabs button.active{color:#277c63;border-bottom-color:#277c63}.mini-banner{background:#f1f6f3;border:1px solid #deebe3;border-radius:11px;padding:14px 16px;font-size:13px;line-height:1.6;margin:12px 0}.flow-steps{display:flex;gap:13px;margin:18px 0 22px}.step{padding:14px 17px;background:#e8f3eb;border:1px solid #d5e7da;border-radius:12px;flex:1;font-size:13px}.step strong{display:block;margin:2px 0 5px}.step small{color:#648174}.supplier-card{background:white;border:1px solid var(--border);border-radius:16px;padding:19px;margin:15px 0;display:flex;justify-content:space-between;gap:18px;align-items:center}.supplier-card h3{font-size:16px;margin:0 0 7px}.supplier-card small{color:var(--muted)}.supplier-card .actions{display:flex;gap:8px;flex-wrap:wrap}.order-badge{font-size:12px;color:#618474;font-weight:800;letter-spacing:.5px}.back{background:none;border:0;padding:0;margin:0 0 12px;color:#558b77;font-size:13px;font-weight:750}.auth-bg{min-height:100vh;background:radial-gradient(ellipse at top left,#e0f1e6,#f4f6f0 58%);display:grid;place-items:center;padding:25px}.auth-box{background:white;border-radius:22px;width:min(100%,490px);padding:37px;border:1px solid #e4eae5;box-shadow:0 22px 80px #19453422}.auth-box .logo{font-size:29px;color:var(--green);font-weight:850;letter-spacing:-1.1px}.auth-box h1{font-size:27px;letter-spacing:-.7px;margin:26px 0 9px}.auth-box p{color:#758c84;line-height:1.6;font-size:14px}.auth-box .field{margin:14px 0}.inline-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.danger-text{color:#c2483d}.mobile-menu{display:none}.small-note{font-size:12px;color:#8ca098}.highlight{color:#23785f}.sort-arrows{display:inline-flex;gap:3px}.sort-arrows .btn{padding:5px 8px}.cards-list{display:flex;flex-direction:column;gap:10px}.item-card{background:#f8faf8;border:1px solid #e3eae5;border-radius:11px;padding:12px 14px}.item-card strong{display:block;font-size:13px}.item-card small{font-size:12px;color:var(--muted)}.footer-text{margin-top:30px;font-size:11px;color:#93a49e;text-align:right}@media(max-width:1100px){.grid-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:repeat(2,1fr)}.three-cols{grid-template-columns:1fr 1fr}}@media(max-width:810px){.shell{grid-template-columns:1fr}.sidebar{position:fixed;z-index:15;top:0;left:0;width:255px;transform:translateX(-105%);transition:transform .22s;box-shadow:8px 0 30px #0002}.shell.menu-open .sidebar{transform:none}.main{padding:20px 15px 65px}.mobile-menu{display:inline-flex}.topbar{margin-bottom:22px}.date-txt{display:none}.two-cols,.three-cols{grid-template-columns:1fr}.flow-steps{flex-direction:column}.supplier-card{flex-direction:column;align-items:stretch}.order-foot{bottom:8px}.panel-head{padding:14px}.data-table td,.data-table th{padding:11px 10px}.table-wrap{margin:0}}@media(max-width:520px){.grid-stats{gap:9px}.stat{padding:15px}.stat strong{font-size:23px}.stat .emoji{font-size:18px}.form-grid{grid-template-columns:1fr}.field.wide{grid-column:span 1}.auth-box{padding:25px}.order-foot .btn{padding:12px 10px}.topbar h1{font-size:27px}}

/* FFV sheet entry — uses the same underlying basket and PO allocation as standard entry. */
.sheet-view-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px;flex-wrap:wrap}.sheet-view-head h2{font-size:18px;margin:0 0 5px}.sheet-view-head p{font-size:12px;color:#76858b;margin:0}.sheet-view-head .inline-actions{display:flex;gap:8px;flex-wrap:wrap}.sheet-order-meta{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:12px;background:#fff;border:1px solid #dce5e0;padding:13px 16px;margin:0 0 14px;border-radius:10px}.sheet-order-meta .field label{margin-bottom:5px}.sheet-order-meta .field input{padding:9px 11px;border-radius:6px;font-size:13px}.sheet-paper{background:white;border:1px solid #aebcb3;box-shadow:0 7px 24px #192c2710;border-radius:2px;overflow:hidden}.sheet-header{display:flex;align-items:center;justify-content:space-between;padding:25px 24px 18px;gap:16px;flex-wrap:wrap}.sheet-document{display:flex;gap:15px;align-items:center}.sheet-document-customer{font-size:24px;font-weight:850;letter-spacing:-.4px;color:#263d3a}.sheet-document-name{background:#e7f0ea;color:#4b6559;font-size:10px;font-weight:800;letter-spacing:1px;padding:7px 10px;border-radius:3px}.sheet-date-box{display:flex;align-items:center;gap:12px;color:#1b302f;font-size:12px;font-weight:900;letter-spacing:1px}.sheet-date-box input{border:0;border-bottom:1px solid #9dafaa;border-radius:0;padding:7px 3px;background:transparent;font-size:14px;color:#243d41;font-weight:700}.sheet-grid-wrap{overflow-x:auto}.sheet-grid{width:100%;table-layout:fixed;border-collapse:collapse;color:#1c3034;font-family:Arial,'Segoe UI',sans-serif;font-size:12px}.sheet-grid th{background:#edf2ee;font-size:11px;white-space:normal;text-align:left;font-weight:800;border:1px solid #aebbb2;padding:10px 9px;letter-spacing:.25px}.sheet-grid th:first-child,.sheet-index{text-align:center}.sheet-grid td{height:36px;border:1px solid #b6c1b9;padding:0 9px;vertical-align:middle}.sheet-grid tbody tr:nth-child(even){background:#fbfcfb}.sheet-grid tbody tr:hover{background:#eef8f1}.sheet-grid .sheet-index{color:#60746d;font-size:12px}.sheet-grid .sheet-code{font-size:12px;font-weight:700;color:#31584d;white-space:nowrap}.sheet-grid .sheet-desc{font-weight:650;letter-spacing:.05px}.sheet-grid .sheet-uom{color:#5f6b66}.sheet-grid .sheet-editor-cell{padding:0;background:#f9fff9}.sheet-editor{display:flex;align-items:stretch;height:36px}.sheet-qty{width:100%;min-width:25px;background:transparent;border:1px solid transparent;border-radius:0;padding:4px 6px;color:#1a5e43;text-align:right;outline:none;font-weight:850;font-size:14px;font-variant-numeric:tabular-nums}.sheet-qty:focus{outline:2px solid #27926d;outline-offset:-2px;background:#f0fff0}.sheet-qty.over{background:#ffefea;color:#ad3232;outline:1px solid #ce413e}.sheet-unit{width:47px;min-width:39px;background:#f1f5f1;color:#4e6256;font-size:11px;font-weight:700;border:0;border-left:1px solid #d1dfd5;cursor:pointer;padding:0 1px}.sheet-grid tr.sheet-entered .sheet-editor-cell{background:#eefaf0}.sheet-grid tr.sheet-invalid .sheet-editor-cell{background:#fff0ea}.sheet-paper-bottom{padding:11px 18px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#657c6e;font-size:11px;background:#f6f8f6}.sheet-paper-bottom span:last-child{color:#1c714e;font-weight:800}.sheet-bottom-bar{position:sticky;bottom:14px;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:14px;margin:12px 0 0;background:#173b35;border-radius:12px;padding:15px 19px;box-shadow:0 9px 21px #122a2340;color:white}.sheet-summary{display:flex;align-items:center;gap:8px;font-size:14px}.sheet-summary .dot{width:8px;height:8px;background:#65deb0;border-radius:50%}.sheet-hint{font-size:11px;color:#c3ded1;margin-top:5px}.sheet-after-note{color:#788b80;font-size:12px;margin-top:12px;line-height:1.55}.sheet-bottom-bar .btn{flex-shrink:0}
@media(max-width:940px){.sheet-order-meta{grid-template-columns:1fr 1fr}.sheet-order-meta .field:last-child{grid-column:1/-1}.sheet-grid{min-width:650px}.sheet-view-head .inline-actions{gap:6px}}
@media(max-width:540px){.sheet-order-meta{grid-template-columns:1fr}.sheet-order-meta .field:last-child{grid-column:auto}.sheet-header{padding:15px 13px}.sheet-document-customer{font-size:20px}.sheet-date-box{width:100%}.sheet-bottom-bar{align-items:stretch;flex-direction:column}.sheet-bottom-bar .btn{width:100%;white-space:normal}.sheet-paper-bottom span:nth-child(2){display:none}}
@media print{.sidebar,.topbar,.banner,.sheet-view-head,.sheet-order-meta,.sheet-bottom-bar,.sheet-after-note,.footer-text,#toast{display:none!important}.shell{display:block}.main{padding:0;margin:0;max-width:none}.sheet-paper{border:0;box-shadow:none}.sheet-grid-wrap{overflow:visible}.sheet-grid{min-width:0;font-size:10px}.sheet-grid td{height:27px}.sheet-qty{font-size:11px}.sheet-unit{appearance:none!important;border:0;background:transparent}.sheet-paper-bottom{background:none}body{background:#fff}@page{size:A4 portrait;margin:10mm}}

/* Version 1.2 — distraction-free full-width Excel-style order entry. */
.only-order-shell{background:#fff;min-height:100vh}
.only-order-main{width:100%;max-width:none;margin:0;padding:12px 18px 34px;min-width:0}
.only-order-page{background:#fff;min-width:0}
.entry-toolbar{display:flex;align-items:end;justify-content:space-between;gap:20px;padding:0 0 12px;border-bottom:0}
.entry-toolbar h1{margin:0 0 7px;font-size:20px;letter-spacing:.3px;font-weight:800;white-space:nowrap;color:#26353a}
.entry-fields{display:grid;grid-template-columns:minmax(170px,1.15fr) minmax(154px,.78fr) minmax(160px,.95fr);gap:12px;max-width:800px;width:100%}
.entry-fields label{display:flex;flex-direction:column;gap:5px;font-size:10px;letter-spacing:.5px;color:#5b6970;font-weight:750}
.entry-fields input{height:35px;border:1px solid #b9c4cb;border-radius:3px;padding:5px 9px;background:white;color:#243b43;font-size:13px;letter-spacing:0;width:100%;outline:none}
.entry-fields input:focus{border-color:#277a65;box-shadow:0 0 0 2px #247b6130}
.only-order-page .sheet-grid-wrap{width:100%;border:1px solid #bfc7cc;overflow-x:auto}
.only-order-page .sheet-grid{font-size:12px;table-layout:fixed;min-width:605px}
.only-order-page .sheet-grid col.col-number{width:7%}
.only-order-page .sheet-grid col.col-code{width:16%}
.only-order-page .sheet-grid col.col-description{width:49%}
.only-order-page .sheet-grid col.col-unit{width:13%}
.only-order-page .sheet-grid col.col-qty{width:15%}
.only-order-page .sheet-grid th{background:#edf1f4;border:1px solid #c1c9ce;color:#283c47;padding:7px 10px;font-size:11px;letter-spacing:.1px}
.only-order-page .sheet-grid td{height:30px;border:1px solid #d1d6db;padding:0 9px}
.only-order-page .sheet-grid tbody tr:nth-child(even){background:#fafbfc}
.only-order-page .sheet-grid tbody tr:hover{background:#eaf5f1}
.only-order-page .sheet-grid .sheet-desc{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.only-order-page .sheet-grid .sheet-code{font-weight:600;color:#384e56}
.only-order-page .sheet-grid .sheet-index{color:#5e6d75}
.only-order-page .sheet-grid .sheet-editor-cell{padding:0;background:#fff}
.only-order-page .sheet-editor{height:30px}
.only-order-page .sheet-qty{color:#1e5e4a;border:0;font-size:13px;padding:3px 8px}
.only-order-page .sheet-unit{background:#f3f6f6;width:45px}
.only-order-page .sheet-grid tr.sheet-entered .sheet-editor-cell{background:#eef9f1}
.only-order-page .sheet-grid tr.sheet-invalid .sheet-editor-cell{background:#ffeae6}
.entry-bottom{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:13px 3px;background:#fff}
.entry-selected{display:flex;align-items:baseline;gap:13px;flex-wrap:wrap;font-size:12px;color:#34434d}
.entry-selected strong{font-size:13px}
.entry-selected span{color:#2c7660;font-weight:700}
.entry-selected small{color:#819097;font-size:11px}
.entry-buttons{display:flex;gap:8px;align-items:center;flex-shrink:0}
.entry-bottom .btn{border-radius:4px;padding:10px 18px;font-size:12px}
.entry-bottom .btn.primary{background:#247b61;border-color:#247b61}
.entry-warning{font-size:11px;background:#fff5e9;color:#8d5929;padding:8px 10px;margin-bottom:10px}
.entry-result-nav{display:flex;justify-content:flex-end;margin-bottom:13px}
.only-order-main:has(.entry-result-nav){max-width:1280px;margin:0 auto}
@media(max-width:830px){.entry-toolbar{align-items:stretch;flex-direction:column;gap:7px}.entry-toolbar h1{font-size:18px;margin:0}.entry-fields{max-width:none}}
@media(max-width:650px){.only-order-main{padding:10px 8px 22px}.entry-fields{grid-template-columns:1fr 1fr;gap:8px}.entry-fields label:first-child{grid-column:span 2}.entry-bottom{flex-direction:column;align-items:stretch;gap:9px}.entry-buttons{justify-content:flex-end}.entry-selected small{flex-basis:100%}.only-order-page .sheet-grid{min-width:560px}.only-order-page .sheet-grid th{padding:8px 5px}.entry-bottom .btn{flex:1}}
@media print{.only-order-main{padding:0}.entry-buttons,.entry-selected,.entry-warning,.entry-result-nav{display:none!important}.entry-fields input{border:0;border-bottom:1px solid #888}.only-order-page .sheet-grid-wrap{overflow:visible}.only-order-page .sheet-grid{min-width:0}.only-order-page .sheet-grid td{height:26px}}

/* Keep quantity inputs visible on phones; units are embedded in the editable QTY cells. */
.entry-selected small:empty{display:none}
@media(max-width:650px){
 .only-order-page .sheet-grid{min-width:0;width:100%;font-size:10.5px}
 .only-order-page .sheet-grid col.col-number{width:9%}
 .only-order-page .sheet-grid col.col-code{width:23%}
 .only-order-page .sheet-grid col.col-description{width:40%}
 .only-order-page .sheet-grid col.col-unit{display:none}
 .only-order-page .sheet-grid col.col-qty{width:28%}
 .only-order-page .sheet-grid th:nth-child(4),.only-order-page .sheet-grid td:nth-child(4){display:none}
 .only-order-page .sheet-grid td{padding:0 4px}
 .only-order-page .sheet-grid th{font-size:9px;line-height:1.15}
 .only-order-page .sheet-grid .sheet-code{font-size:10px}
 .only-order-page .sheet-grid .sheet-qty{font-size:12px;padding:2px 3px}
 .only-order-page .sheet-grid .sheet-unit{width:39px;min-width:35px;font-size:10px}
}
