.orders-two-col{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem;margin-top:1rem}
.order-snapshot{padding:1rem;line-height:1.55}.pre-line{white-space:pre-line}.numeric{text-align:right;white-space:nowrap}
.order-totals{width:min(100%,370px);margin:1rem 0 0 auto}.order-totals>div{display:flex;justify-content:space-between;padding:.35rem .5rem;border-bottom:1px solid var(--snm-line)}
.order-totals .grand{font-size:1.1rem;background:var(--snm-greige);font-weight:700}.order-timeline{list-style:none;margin:0;padding:0 0 0 .4rem}.order-timeline li{position:relative;display:flex;gap:.85rem;padding:.5rem 0 1rem 1.1rem;border-left:2px solid var(--snm-line)}
.timeline-dot{position:absolute;left:-7px;top:.8rem;width:11px;height:11px;border-radius:50%;background:var(--snm-olive);border:2px solid var(--snm-paper)}
.order-timeline small{display:block;margin-top:.2rem}.order-actions{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}.order-actions dialog{position:fixed;inset:0;margin:auto;border:1px solid var(--snm-line);border-radius:4px;padding:1.2rem;max-width:440px;width:calc(100% - 2rem);max-height:calc(100dvh - 2rem);overflow:auto;box-sizing:border-box;background:var(--snm-paper);color:var(--snm-machine-black)}
.order-actions dialog::backdrop{background:rgba(20,23,18,.55)}.order-actions dialog form{display:grid;gap:.8rem}.dialog-actions{display:flex;justify-content:flex-end;gap:.5rem}.form-section{border-bottom:1px solid var(--snm-line);padding:1rem 0;margin-bottom:.5rem}.form-section h2,.order-snapshot h2{font-family:var(--font-heading);margin:.1rem 0 .8rem}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.8rem;align-items:end}.form-grid label,.form-section>label,.order-actions label{display:grid;gap:.3rem}.form-grid .wide{grid-column:1/-1}.form-section input,.form-section select,.form-section textarea,.order-actions textarea{min-height:44px;padding:.55rem;border:1px solid var(--snm-line);background:#fff;color:var(--snm-machine-black);font:inherit}.numeric-input{text-align:right;font-family:var(--font-mono);width:7rem}.order-line-row td{padding:.35rem}.order-line-row input,.order-line-row select{min-height:44px;max-width:100%;padding:.35rem;border:1px solid var(--snm-line)}.order-line-row .sku-search{width:9rem;margin-top:.3rem}.sku-results{position:relative;z-index:2;display:grid;max-height:180px;overflow:auto}.sku-result{padding:.45rem;text-align:left;background:#fff;border:1px solid var(--snm-line);min-height:40px}.sku-result-empty{padding:.45rem;background:#fff}.placeholder-box{margin:1rem 0;padding:1rem;border-left:4px solid var(--snm-hold);background:var(--snm-paper)}.alert-hold{padding:.8rem 1rem;background:#fff7e6;border-left:4px solid var(--snm-hold);margin:.75rem 0}
@media(max-width:640px){.order-actions{align-items:stretch}.order-actions .btn{min-height:44px}.order-line-row .numeric-input{width:6rem}.form-grid .wide{grid-column:auto}}

/* Keep the global module bar inside the narrower Orders review widths. */
@media(max-width:1366px){
  .orders-module .top-bar{box-sizing:border-box;max-width:100vw;overflow:hidden}
  .orders-module .top-bar-actions .btn-nav-desktop{display:none!important}
  .orders-module .main-content{min-width:0}
}
@media(max-width:900px){
  .orders-module .mobile-toggle{display:flex}
  .orders-module .sidebar{position:fixed;top:56px;bottom:0;left:0;z-index:90;transform:translateX(-100%);box-shadow:2px 0 8px rgba(0,0,0,.15)}
  .orders-module .sidebar.mobile-open{transform:translateX(0)}
  .orders-module .top-bar{padding:0 .5rem;min-height:52px;height:auto}
  .orders-module .top-bar-actions{gap:.35rem}
  .orders-module .user-badge{display:none}
  .orders-module .main-content{width:100%;max-width:100vw;padding:1rem;box-sizing:border-box;overflow-x:hidden}
}
@media(min-width:901px){
  .order-line-editor{min-width:0!important;table-layout:fixed}
  .order-line-editor .order-line-row{display:grid;grid-template-columns:minmax(145px,1.7fr) minmax(145px,1.7fr) minmax(120px,1fr) minmax(58px,.55fr) minmax(90px,1fr) minmax(75px,.7fr) minmax(132px,1.15fr) minmax(72px,.65fr);width:100%;align-items:center}
  .order-line-editor .order-line-row td{min-width:0;padding:.25rem}
  .order-line-editor .order-line-row input,.order-line-editor .order-line-row select,.order-line-editor .numeric-input,.order-line-editor .sku-search{width:100%;min-width:0;box-sizing:border-box}
  .order-line-editor .numeric-input{font-size:.85rem}
}
.gem-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:.75rem;margin:0}.gem-detail-grid dt{font-size:.78rem;color:#5d6256}.gem-detail-grid dd{margin:.2rem 0 0;overflow-wrap:anywhere}.line-job-link{margin:.55rem 0}.line-job-link label{display:grid;gap:.25rem;max-width:360px}.line-job-link input{min-height:42px;padding:.4rem}.job-result-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4rem;border:1px solid var(--snm-line);background:#fff;flex-wrap:wrap}.linked-job{margin:.3rem 0;font-size:.9rem}
.orders-filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.75rem;align-items:end}.orders-filter-grid label{display:grid;align-content:end;gap:.35rem;min-height:72px}.orders-filter-grid input,.orders-filter-grid select{min-height:42px;box-sizing:border-box}.orders-register-table th,.orders-register-table td{text-align:left}.orders-register-table th:last-child,.orders-register-table td:last-child{text-align:right}.order-register-link{color:var(--snm-olive);text-decoration:underline;text-underline-offset:2px;font-weight:700}
.orders-filter-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.orders-filter-grid>*{min-width:0}.orders-filter-grid input,.orders-filter-grid select{width:100%;min-width:0}
.order-detail-scroll{overflow-x:auto}.order-detail-table th,.order-detail-table td{padding:.55rem .65rem}.order-detail-table .numeric{padding-left:.85rem;padding-right:.85rem}.order-line-jobs-row td{padding:.4rem .65rem .8rem;border-top:0}.order-line-jobs{display:flex;align-items:flex-start;gap:.65rem;flex-wrap:wrap;padding:.4rem .6rem;background:var(--snm-paper)}.linked-job a,.job-result-row a{color:var(--snm-olive);text-decoration:none;font-weight:600}.linked-job a:hover,.job-result-row a:hover{text-decoration:underline;text-underline-offset:2px}.order-job-footnote{margin:.75rem 0 0}
@media(min-width:901px){.order-line-editor .quantity-input{min-width:7.5rem;font-size:.9rem;padding-left:.25rem;padding-right:.25rem}}
@media(max-width:900px){
  .orders-register-table{min-width:0!important;table-layout:fixed}
  .orders-register-table th:nth-child(2),.orders-register-table td:nth-child(2),.orders-register-table th:nth-child(5),.orders-register-table td:nth-child(5){display:none}
  .orders-register-table th:nth-child(1){width:25%}.orders-register-table th:nth-child(3){width:30%}
  .orders-register-table th:nth-child(4){width:14%}.orders-register-table th:nth-child(6){width:17%}
  .orders-register-table th:nth-child(7){width:14%}
  .order-line-scroll{overflow:visible!important}.order-line-editor{min-width:0!important;table-layout:fixed}
  .order-line-editor thead{display:none}.order-line-editor tbody{display:block}
  .order-line-editor .order-line-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.25rem;padding:.5rem 0;border-bottom:1px solid var(--snm-line)}
  .order-line-editor .order-line-row td{display:flex;flex-direction:column;min-width:0;padding:.25rem}
  .order-line-editor .order-line-row td:first-child{grid-column:1/-1}
  .order-line-editor .order-line-row td:nth-child(1)::before{content:"Type and SKU"}
  .order-line-editor .order-line-row td:nth-child(2)::before{content:"Description"}
  .order-line-editor .order-line-row td:nth-child(3)::before{content:"Quantity"}
  .order-line-editor .order-line-row td:nth-child(4)::before{content:"Unit"}
  .order-line-editor .order-line-row td:nth-child(5)::before{content:"Unit price"}
  .order-line-editor .order-line-row td:nth-child(6)::before{content:"GST %"}
  .order-line-editor .order-line-row td:nth-child(7)::before{content:"Delivery date"}
  .order-line-editor .order-line-row td:nth-child(8){grid-column:1/-1;align-items:flex-end}
  .order-line-editor .order-line-row td::before{font-size:.78rem;color:#474b2f;margin-bottom:.2rem}
  .order-line-editor .order-line-row input,.order-line-editor .order-line-row select,.order-line-editor .order-line-row .numeric-input,.order-line-editor .order-line-row .sku-search{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
  .order-line-editor .sku-results{overflow-wrap:anywhere}
  .orders-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .order-detail-table{min-width:820px!important;table-layout:auto;font-size:.82rem}
  .order-detail-table td:nth-child(2),.order-timeline{overflow-wrap:anywhere}
}
@media(max-width:560px){.orders-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
