:root{font-family:system-ui,sans-serif;color:#202a23;background:#f3f5f3;--green:#294f39;--line:#dce4dd;--muted:#516158;--tint:#e7efe8}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;color:var(--green);background:#fff;border:1px solid var(--line);border-radius:8px;padding:.6rem .85rem;min-height:42px;font-weight:650}a{color:var(--green);overflow-wrap:anywhere}
button:hover{background:var(--tint)}.primary,.primary:hover{background:var(--green);color:#fff;border-color:var(--green)}.primary:hover{background:#356449}:focus-visible{outline:3px solid #527963;outline-offset:3px}
.wrap{max-width:860px;margin:auto;padding-inline:24px}.bar{background:white;border-bottom:1px solid var(--line)}.brand{height:64px;display:flex;align-items:center;gap:11px;font-size:.9rem;font-weight:650}.mark{display:grid;place-items:center;min-width:33px;height:33px;border-radius:9px;background:var(--green);color:white;letter-spacing:.06em;font-size:.75rem}.pilot{margin-left:auto;color:var(--green);background:var(--tint);padding:4px 10px;border-radius:100px}
.heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:34px 0 19px}h1{font-size:clamp(2rem,5vw,2.75rem);letter-spacing:-.06em;margin:0;line-height:1.07}h2{margin:0;font-size:1.15rem}p{margin:.4rem 0;color:var(--muted)}#count{margin-top:7px;font-size:.92rem}
.order,.finance{background:white;border:1px solid var(--line);border-radius:12px;margin-bottom:9px}.order[open]{border-color:#9eb3a2}.order>summary,.finance>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;padding:14px 17px;min-height:65px}.order summary::-webkit-details-marker,.finance summary::-webkit-details-marker{display:none}.order>summary::after{content:'';border:solid #55685a;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);margin:0 2px 4px 1px}.order[open]>summary::after{transform:rotate(225deg);margin-bottom:0}.customer{flex:1;min-width:0;font-weight:680}.sub{display:block;color:var(--muted);font-weight:450;font-size:.84rem;margin-top:3px}.status,.warn{font-size:.83rem;font-weight:650;border-radius:100px;padding:5px 9px;background:var(--tint);color:#244b34}.status.new{background:#edf0f2;color:#3e5058}.status.partial,.warn{background:#faf0dc;color:#6c4a10}.order-body{border-top:1px solid var(--line);padding:0 17px 15px}.meta{font-size:.85rem;color:var(--muted);padding-top:12px}.line{padding:12px 0;border-bottom:1px solid var(--line)}.data{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin-top:7px;gap:7px}.data div{font-size:.84rem;color:var(--muted)}.data strong{display:block;font-size:.92rem;color:#26352a}.data .unknown{color:#6c4a10}.controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}.controls label{display:grid;gap:4px;font-size:.85rem;color:var(--muted)}input{width:6rem;min-height:41px;border:1px solid #99aa9d;border-radius:7px;padding:5px 8px;color:#202a23}.line form button{align-self:end}.actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.contact{margin-top:13px}.contact summary{cursor:pointer;font-weight:650;color:var(--green);width:max-content}.contact dl{display:grid;grid-template-columns:max-content 1fr;gap:5px 10px;font-size:.9rem}.contact dd{margin:0}.finance{margin-top:23px}.finance summary{justify-content:space-between;font-weight:650;min-height:51px}.finance summary span{font-weight:450;color:var(--muted);font-size:.85rem}#finance{padding:0 17px 12px}.finance article{border-top:1px solid var(--line);padding:10px 0}.error{color:#8a321e}.notice{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);background:var(--green);color:#fff;border-radius:8px;padding:8px 12px;max-width:90vw;width:max-content}.notice:empty{display:none}footer{color:var(--muted);font-size:.83rem;padding:9px 0 24px}
dialog{width:min(92vw,620px);max-height:85vh;border:1px solid var(--line);border-radius:14px;padding:18px;color:#202a23}dialog::backdrop{background:#16251c77}.dialog-head,.switch{display:flex;align-items:center;gap:8px}.dialog-head{justify-content:space-between;margin-bottom:12px}.switch{flex-wrap:wrap}.switch button[aria-pressed=true]{background:var(--tint);border-color:#9eb3a2}#print{margin-left:auto}.pick-group{padding:12px 0;border-bottom:1px solid var(--line)}.pick-group ul{margin:4px 0 0;padding-left:18px}.pick-group li{padding:3px 0}
@media(max-width:525px){.wrap{padding-inline:13px}.heading{margin-top:24px}.order>summary,.finance>summary{padding-inline:12px;gap:8px}.order-body{padding-inline:12px}.status{white-space:nowrap;font-size:.75rem}.data{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:10px}.pilot{font-size:.8rem}}
@media print{body:has(dialog[open])>header,body:has(dialog[open])>main,.notice,.switch,#close{display:none}dialog[open]{position:static;max-height:none;width:100%;margin:0;border:0;padding:0}dialog::backdrop{display:none}.pick-group{break-inside:avoid}}
.connection{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 11px;color:var(--muted);font-size:.85rem}
.connection button{min-height:35px;padding:.25rem .55rem}.tally{font-size:.83rem;margin:.5rem 0 0}button:disabled{cursor:default;opacity:.55}
.view-tabs{display:flex;gap:8px;margin:0 0 12px}.view-tabs a{border-radius:16px;padding:6px 12px;text-decoration:none}.view-tabs [aria-current]{background:var(--tint);font-weight:650}.inquiry-form{display:grid;gap:10px}.inquiry-form label{display:grid;gap:4px;font-size:.9rem}.inquiry-form input,.inquiry-form textarea,.inquiry-form select{width:100%;padding:.55rem;border:1px solid var(--line);border-radius:7px;font:inherit}.inquiry-form textarea{resize:vertical;min-height:60px}.inquiry-form fieldset{border:1px solid var(--line);border-radius:8px;display:grid;gap:6px;margin:0 0 8px}.actions a{padding:8px 4px}
.line .data{grid-template-columns:repeat(2,minmax(0,1fr))}.line .data .sold-out{color:#a12d24}.actions{align-items:center}.actions span{font-size:.9rem;color:var(--muted)}
#orders .order>summary{padding:8px 13px;min-height:46px}#orders .order-body{padding:0 12px 9px}.packing-table{border-collapse:collapse;width:100%;font-size:.86rem}.packing-table th,.packing-table td{padding:4px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}.packing-table th{font-weight:550;color:var(--muted)}.packing-table td:not(:first-child){white-space:nowrap}.packing-table td:first-child{overflow-wrap:anywhere}.packing-table small{display:block;font-size:.72rem;color:var(--muted)}.packing-table .unknown{color:#6c4a10}.packing-table .sold-out{color:#a12d24}.packing-table input[type=checkbox]{width:20px;height:20px;min-height:0;accent-color:var(--green);cursor:pointer}.packing-table td:nth-child(4){text-align:center}.packing-options>summary{cursor:pointer;list-style:none;font-size:1.15rem;line-height:1;min-width:28px;padding:6px;text-align:center}.packing-options>summary::-webkit-details-marker{display:none}.packing-options[open]>.controls{position:absolute;right:12px;z-index:2;white-space:normal;background:white;border:1px solid var(--line);border-radius:8px;padding:10px;max-width:min(450px,85vw);box-shadow:0 4px 12px #16251c22}.order-body{position:relative}#orders .actions{margin-top:7px}#orders .contact{margin-top:8px}#orders .actions button{min-height:36px;padding:.35rem .65rem}@media(max-width:525px){.packing-table{font-size:.75rem}.packing-table th,.packing-table td{padding:3px 2px}.packing-table small{font-size:.65rem}.packing-options>summary{min-width:22px;padding:6px 2px}#orders .status{max-width:96px;white-space:normal;text-align:center}}


#order-filters { display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; margin:.6rem 0; }
#order-search { flex:1 1 13rem; min-width:0; }
.heading a.primary { text-decoration:none; padding:.5rem .75rem; border-radius:.6rem; }
#stage-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:14px 0}
.stage-0{--stage:#548ac8;--pale:#eaf1fb;--ink:#275782}.stage-1{--stage:#9361bc;--pale:#f3edf9;--ink:#69438a}.stage-2{--stage:#d4a222;--pale:#fff5d7;--ink:#705313}.stage-3{--stage:#2289a4;--pale:#e4f4f7;--ink:#236779}.stage-4{--stage:#23916c;--pale:#e5f5eb;--ink:#206047}
.stage-filter{border:0;border-top:3px solid var(--stage);border-radius:2px;background:white;padding:.35rem .1rem;display:grid;gap:2px;color:#28382f}.stage-filter strong{font-size:1.13rem}.stage-filter span{font-size:clamp(.68rem,2.5vw,.83rem)}.stage-filter[aria-pressed=true]{background:var(--pale);box-shadow:inset 0 -2px var(--stage)}
#orders .order>summary{display:grid;gap:6px;padding:10px 13px}.order>summary::after{display:none}.card-head,.card-dates{display:flex;align-items:center;gap:12px}.order-info{flex:1;min-width:0}.order-info .customer,.order-info .sub{display:block}.stage-badge{font-size:.75rem;padding:2px 8px;border-radius:6px;background:var(--pale);color:var(--ink);font-weight:650}.card-dates{flex-wrap:wrap;gap:3px 16px;color:var(--muted);font-size:.75rem}.card-dates b{font-weight:550}.order-source{margin-left:auto}.flow-track{display:grid;grid-template-columns:repeat(5,1fr);gap:3px}.flow-track i{height:3px;background:var(--stage,#e5e9e6);border-radius:3px}

.cancelled-line{background:#f5f6f6;color:#626968}.cancelled-edit label:first-child{color:#626968;text-decoration:line-through}

@media(max-width:600px){
 #orders .order-editor{display:grid;grid-template-columns:minmax(0,1fr);gap:.65rem}
 .order-editor label,.order-editor .edit-line{display:grid;gap:.35rem;min-width:0}
 .order-editor .edit-line{padding:.6rem 0;border-bottom:1px solid var(--line)}
 .order-editor :is(input,select,textarea,button){box-sizing:border-box;width:100%;max-width:100%;min-height:44px;font-size:1rem}
 .order-editor button[hidden]{display:none}
 #orders .actions label:has(input[type=checkbox]){display:inline-flex;align-items:center;min-height:44px;gap:.4rem}
}

/* Shared workspace surfaces */
:root{--green:#204d3e;--line:#d6ded9;--muted:#51655d;--tint:#e7f0ea;background:#f1f4f2;color:#152d23;font-family:Inter,"Helvetica Neue",Arial,sans-serif;font-synthesis:none;-webkit-font-smoothing:antialiased}
body{min-width:0}button,a,input,textarea,select{font:inherit}button,.heading a{transition:background-color .14s,box-shadow .14s,transform .14s}
button:active:not(:disabled),.heading a:active{transform:translateY(1px)}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #449778;outline-offset:3px}
.bar{background:linear-gradient(108deg,#112e26,#214a3d);color:#fff;box-shadow:0 1px 0 #0d241b,0 4px 14px #122e2110}.wrap{max-width:1090px;padding-inline:clamp(16px,4vw,44px)}
.brand{height:54px;letter-spacing:-.025em}.mark{background:#f0f5ef;color:#204638;border-radius:5px;box-shadow:inset 0 0 0 1px #fff8;font-size:.78rem;letter-spacing:-.04em}.brand-divider{height:19px;width:1px;background:#638275;margin-inline:4px}.brand-area{color:#d7e6dc;font-weight:450}
.heading{margin:30px 0 20px}.heading h1{letter-spacing:-.062em;font-size:clamp(2.25rem,5vw,3.2rem);font-weight:650}.heading a.primary,button.primary{background:linear-gradient(170deg,#31674e,#214936);border:1px solid #204733;box-shadow:inset 0 1px 0 #ffffff28,0 2px 4px #10332418;color:white}.heading a.primary{padding:.67rem 1rem;display:inline-flex;align-items:center;gap:.5rem;border-radius:8px;font-weight:650}
.view-tabs{border-bottom:1px solid #cbd5ce;gap:22px}.view-tabs a,.view-tabs button{background:none;border:0;border-bottom:2px solid transparent;display:inline-flex;align-items:center;min-height:43px;padding:.4rem 1px;margin-bottom:-1px;border-radius:0;font-size:.93rem;font-weight:550;color:#51635a}.view-tabs [aria-current]{border-color:#234c39;color:#163d2b;background:none}
#stage-filters{gap:8px;margin:16px 0}.stage-filter{position:relative;overflow:hidden;text-align:left;padding:10px 13px 9px;border:1px solid var(--line);border-radius:8px;box-shadow:0 2px 3px #17322605}.stage-filter:before{content:'';position:absolute;inset:0 0 auto;height:3px;background:var(--stage)}.stage-filter strong{font-size:1.38rem;font-weight:650}.stage-filter span{font-size:.88rem;color:#394b42}.stage-filter[aria-pressed=true]{border-color:var(--stage);box-shadow:0 0 0 1px var(--stage) inset}
#order-filters{display:flex;align-items:stretch;gap:8px}#order-search{width:auto;min-height:42px;background:white;border:1px solid var(--line);border-radius:8px;padding:0 14px}#order-filters label{background:white;border:1px solid var(--line);border-radius:8px;display:inline-flex;align-items:center;gap:7px;padding:0 12px;font-size:.88rem;font-weight:550}#order-issues{width:16px;height:16px;min-height:0;accent-color:var(--green)}
.connection{margin:9px 0 12px;font-size:.81rem}.connection button,.text-button{border:0;background:none;color:#24513c;text-decoration:underline;text-underline-offset:3px;min-height:32px}
.order{border-radius:11px;box-shadow:0 1px 3px #1633280b,0 4px 12px #16332805;overflow:clip}.order[open]{border-color:#8aa699;box-shadow:0 6px 22px #16332812}
#orders .order>summary{grid-template-columns:minmax(200px,1fr) minmax(260px,1.1fr);align-items:center;gap:12px 26px;padding:16px 20px 11px}.order[open]>summary{background:linear-gradient(110deg,#fff,#f6f9f6)}.customer{font-size:1.08rem;letter-spacing:-.025em}.card-head{min-width:0;gap:8px}.sub{font-size:.86rem}.card-dates{display:flex;flex-wrap:wrap;gap:7px 15px;justify-content:flex-end;font-size:.77rem}.card-dates>span:not(.order-source){display:grid;gap:3px}.card-dates b{font-size:.87rem;color:#253f32}.order-source{font-size:.75rem;align-self:center;margin-left:0}.stage-badge{border-radius:5px;padding:4px 7px;white-space:nowrap}.flow-track{grid-column:1/-1}.flow-track i{height:2px}.warn{border-radius:5px}.order[open] .flow-track i{height:3px}#orders .order-body{padding:0 20px 18px}
.prep-checklist{margin:0}.prep-header,.prep-item-title,.stock-source,.prep-actions,.prep-total>div{display:flex;align-items:center;gap:10px}.prep-header{justify-content:space-between;padding:18px 0 12px}.prep-header h2,.pack-section h2{font-size:1.17rem;letter-spacing:-.035em}.prep-header span,.prep-item-title span,.stock-source,.prep-audit{color:var(--muted);font-size:.81rem}.prep-header b{font-size:.84rem;font-weight:600;color:#365844}
.prep-item{border-top:1px solid var(--line);padding:14px 0}.prep-item-title>div{flex:1;min-width:0}.prep-item h3,.prep-total h3{font-size:1.01rem;line-height:1.3;letter-spacing:-.022em;margin:0 0 3px}.prep-item-title img{object-fit:cover;width:46px;height:46px;border:1px solid #dbe3dc;border-radius:8px}
.prep-chip{background:#eef1ef;border-radius:5px;font-size:.78rem;color:#495b51;padding:5px 8px;line-height:1.2}.prep-chip.good{background:#e1f0e5;color:#205134}.prep-chip.problem{background:#fbecd9;color:#71450d}
.stock-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:11px 0 5px;padding:10px 0;border:1px solid #dbe3de;background:linear-gradient(105deg,#f7faf8,#f2f6f3);border-radius:7px}
.stock-grid>div{padding:0 12px;border-left:1px solid #d4dfd7}.stock-grid>div:first-child{border:0}.stock-grid dt{font-size:.79rem;color:#4c6154}.stock-grid dd{margin:4px 0 0;color:#1c3828;font-size:1.08rem;font-weight:650;font-variant-numeric:tabular-nums}.stock-grid .shortage dd{color:#884924}.stock-source{flex-wrap:wrap;gap:5px 12px}.stock-source a,.stock-source button{font-size:.81rem}.prep-actions{margin-top:9px;flex-wrap:wrap;gap:6px}.prep-actions button,.qty-form button,.exception-summary button{min-height:39px;font-size:.87rem}.prep-ready:before{content:'✓';margin-right:6px}.prep-unavailable:before{content:'−';margin-right:6px}.prep-amount,.prep-log,.prep-audit{font-size:.84rem}.prep-audit{display:block;margin-top:8px}.prep-log summary{cursor:pointer;width:fit-content;color:var(--muted);padding:5px 0}
.issue-form,.qty-form,.exception-summary{padding:12px;border-radius:7px;border:1px solid #d9dfd9;background:#f6f8f5;margin:9px 0 0;display:flex;flex-wrap:wrap;align-items:end;gap:10px}.issue-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.issue-form label,.qty-form label,.exception-summary label,.alt-fields label{display:grid;gap:5px;font-weight:550;color:#384b3f;font-size:.86rem}.issue-form :is(input,select,textarea),.qty-form input,.exception-summary input{width:100%;min-width:0;padding:7px 9px;border:1px solid #a7b6ab;background:white;border-radius:6px;font:inherit;min-height:40px}.issue-form>label:has(textarea),.issue-form fieldset{grid-column:1/-1}.issue-form fieldset{margin:0;padding:10px;border:1px solid var(--line)}.alt-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.alt-fields label:first-child,.search-results{grid-column:1/-1}.search-results:empty{display:none}.issue-form button{justify-self:start}
.exception-summary{background:#fcf7ed;border-color:#e7d5b7;align-items:center;font-size:.89rem}.exception-summary>strong,.exception-summary>details{width:100%}.message-draft{white-space:pre-line}.cancelled-product{display:flex;justify-content:space-between;gap:10px;background:#f3f4f3;padding:12px;color:#626f66;font-size:.89rem}.previous-qty{color:#647269;font-size:.84rem}.pack-section{margin:12px 0}.pack-section h2{margin-bottom:8px}
dialog{width:min(94vw,740px);padding:22px;border-radius:14px;box-shadow:0 20px 100px #0b251b44}.prep-total{border-top:1px solid var(--line);padding:13px 0}.prep-total>div{justify-content:space-between;font-size:.9rem;margin-top:6px}.prep-total>strong{font-size:.9rem;color:#305a40}.notice{z-index:8;box-shadow:0 5px 16px #172b2430}.notice:empty{box-shadow:none}
@media(max-width:740px){#orders .order>summary{grid-template-columns:1fr;gap:8px;padding:13px 15px 9px}.card-dates{justify-content:flex-start}.card-dates>span:not(.order-source){display:block}.card-dates b{font-size:.8rem}.order-source{margin-left:auto}.stage-filter{padding:9px 7px}.stage-filter span{font-size:.81rem}#orders .order-body{padding-inline:14px}.prep-item-title img{width:40px;height:40px}}
@media(max-width:520px){.brand{height:48px}.wrap{padding-inline:13px}.heading{margin:21px 0 12px}.view-tabs{gap:19px}#stage-filters{gap:4px}.stage-filter{padding:8px 4px}.stage-filter span{font-size:.74rem}.stage-filter strong{font-size:1.13rem}.card-dates{gap:4px 10px}.stock-grid{grid-template-columns:1fr 1fr;row-gap:11px}.stock-grid>div:nth-child(3){border-left:0}.stock-grid dt{font-size:.83rem}.prep-actions button{min-height:44px}.prep-header{padding-top:14px}.issue-form{grid-template-columns:1fr}.prep-item-title{align-items:start}.prep-chip{font-size:.74rem}.prep-actions{gap:4px}.prep-actions button{padding:.48rem .6rem}.stock-source{gap:4px 9px}.alt-fields{grid-template-columns:1fr}.pack-section{overflow:auto}.exception-summary label{width:100%}.prep-total>div{align-items:start;flex-wrap:wrap}.switch button{font-size:.85rem;padding:.45rem .55rem}.switch{gap:4px}#print{margin-left:0}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* Second pass: keep completed rows quiet and open actions easy to find. */
.view-tabs a,.view-tabs button{gap:.48rem}.nav-icon{width:15px;height:15px;display:inline-block;position:relative;flex-shrink:0;color:currentColor}.list-icon{border:1.5px solid;border-radius:2px}.list-icon:before,.list-icon:after{content:'';position:absolute;left:3px;right:3px;top:4px;border-top:1px solid}.list-icon:after{top:8px}
.chat-icon{border:1.5px solid;border-radius:4px 4px 4px 0;height:12px}.chat-icon:after{content:'';position:absolute;bottom:-3px;left:1px;width:4px;height:4px;transform:skewY(-32deg);border-left:1px solid;background:inherit}
.pack-icon{height:13px;border:1.5px solid;border-radius:2px}.pack-icon:before{content:'';position:absolute;border-bottom:1px solid;left:0;right:0;top:3px}.pack-icon:after{content:'';position:absolute;border-left:1px solid;height:6px;left:6px}
.card-chevron{width:8px;height:8px;border-right:1.5px solid #486253;border-bottom:1.5px solid #486253;transform:rotate(45deg);margin:0 1px 3px 4px}.order[open] .card-chevron{transform:rotate(225deg);margin:3px 1px 0 4px}
.alert-sign{padding:1px 0;border:1px solid #c49b62;background:#fcf4e6;color:#805d22;width:19px;height:19px;text-align:center;border-radius:50%;font:650 .78rem/15px system-ui}
.prep-header{position:relative}.prep-header h2{padding-left:11px;border-left:3px solid #61886d}.prep-header span{display:block;margin:4px 0 0 14px}.prep-header b{padding:5px 9px;border-radius:5px;background:#edf2ed}
.ready-change summary,.prep-log summary{cursor:pointer;color:#475d50;font-size:.85rem}.ready-change summary{margin-top:6px}.prep-audit{overflow-wrap:anywhere}.stock-source a,.stock-source button,.ready-change summary,.prep-log summary{line-height:1.6}
@media(min-width:741px){#orders .order>summary{grid-template-columns:minmax(0,.98fr) minmax(280px,.82fr)}.card-dates{justify-content:space-between}.order .card-head{gap:12px}}
@media(max-width:520px){.view-tabs{gap:15px}.view-tabs a,.view-tabs button{gap:6px}.card-head{gap:6px}.prep-chip{padding:5px 6px}.prep-item-title>div>span{line-height:1.6}}
