:root{font-family:Inter,Arial,sans-serif;color:#292321;background:#faf8f6;font-synthesis:none}*{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:inherit}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.9rem,3vw,2.9rem);font-weight:430;letter-spacing:-.045em}h2{font-size:1.4rem;font-weight:560;letter-spacing:-.025em}h3{font-size:1rem}p{line-height:1.5}.shell{min-height:100vh;display:grid;grid-template-columns:230px minmax(0,1fr)}.sidebar{background:#f1e8e5;padding:25px 14px 20px;display:flex;flex-direction:column;gap:22px;border-right:1px solid #e6dcd8}.brand{padding:0 14px}.brandmark{font-family:Georgia,serif;font-size:2.7rem;line-height:.9;letter-spacing:-.16em}.brand-name{font-size:.75rem;letter-spacing:.23em;margin-top:14px;font-weight:700}.brand-sub{font-size:.66rem;letter-spacing:.17em;color:#806f69;margin-top:4px}.nav{display:grid;gap:4px}.nav button{width:100%;border:0;background:none;text-align:left;padding:11px 14px;border-radius:9px;color:#574b47}.nav button:hover,.nav button.active{background:#fff;color:#2b2421}.side-bottom{margin-top:auto;font-size:.79rem;color:#766965;padding:0 12px}.side-bottom button{background:none;border:0;text-decoration:underline;padding:0;margin-top:12px}.main{min-width:0}.topbar{height:64px;border-bottom:1px solid #eee5e1;display:flex;justify-content:space-between;align-items:center;padding:0 32px;background:#fff}.topbar .crumb{font-size:.78rem;letter-spacing:.13em;text-transform:uppercase;color:#786963}.topbar .user{font-size:.8rem;color:#786963}.content{max-width:1540px;margin:auto;padding:28px 32px 60px}.eyebrow{font-size:.73rem;text-transform:uppercase;letter-spacing:.16em;color:#966b74;font-weight:700;margin-bottom:10px}.lead{color:#766c68;max-width:780px}.hero{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}.hero-actions{display:flex;gap:9px;flex-wrap:wrap}.card,.panel{background:#fff;border:1px solid #e9e2de;border-radius:14px;box-shadow:0 3px 18px rgba(44,31,24,.025)}.panel{padding:22px;margin-bottom:20px}.card{padding:20px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{font-size:2rem;letter-spacing:-.05em;margin-top:8px}.muted{color:#887e79}.small{font-size:.79rem}.pill{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:20px;background:#f3f0ee;font-size:.75rem;font-weight:650;white-space:nowrap}.pill.warning{background:#f8e4e6;color:#8f4151}.pill.notice{background:#f7ecdc;color:#8b6541}.pill.ok{background:#e8f1ea;color:#456c55}.pill.demo{background:#3c3131;color:#fff}.banner{background:#f7e8e9;border:1px solid #e9cdd1;border-radius:10px;padding:12px 16px;margin-bottom:22px;color:#704450;font-size:.84rem}.toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:16px}.field{display:grid;gap:6px;min-width:130px}.field label{font-size:.75rem;font-weight:650;color:#746a66}input,select,textarea{border:1px solid #dcd2cd;border-radius:8px;background:#fff;color:#2a2421;padding:10px 11px;min-height:40px;max-width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #d8aab2;outline-offset:1px}textarea{min-height:150px;resize:vertical;width:100%}.field.wide{flex:1;min-width:200px}.btn{border:1px solid #d8c9c5;border-radius:8px;padding:10px 14px;background:#fff;color:#342b28;font-weight:620;min-height:40px}.btn:hover{background:#f7f0ee}.btn.primary{background:#2c2625;color:white;border-color:#2c2625}.btn.primary:hover{background:#5b4547}.btn.rose{background:#e9cbd0;border-color:#e9cbd0}.btn.tiny{padding:6px 10px;min-height:30px;font-size:.77rem}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;font-size:.86rem}.table th{text-align:left;color:#837771;font-size:.72rem;letter-spacing:.04em;text-transform:uppercase;font-weight:700;border-bottom:1px solid #e9e2de;padding:11px 12px;white-space:nowrap}.table td{padding:13px 12px;border-bottom:1px solid #f1edeb;vertical-align:top}.table tr:last-child td{border-bottom:0}.table tr.attention{background:#fff9f7}.table tr:hover{background:#faf7f5}.code{font-family:ui-monospace,Consolas,monospace;font-size:.79rem;color:#876f6d}.name{font-weight:630}.sub{font-size:.75rem;color:#8a7e78;margin-top:3px}.num{font-variant-numeric:tabular-nums;white-space:nowrap}.right{text-align:right}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.empty{padding:35px;text-align:center;color:#827873}.section-title{display:flex;justify-content:space-between;align-items:baseline;gap:10px}.stack{display:grid;gap:12px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.form-grid .span{grid-column:span 3}.form-grid .field{min-width:0}.notice-list{display:grid;gap:8px}.notice-row{display:flex;align-items:start;gap:10px;padding:11px 0;border-bottom:1px solid #f1edeb}.notice-row:last-child{border:0}.notice-dot{height:8px;width:8px;border-radius:50%;background:#c2828e;margin-top:5px;flex:none}.notice-dot.late{background:#c98c5b}.notice-dot.missing{background:#b3a08c}.notice-dot.expiry{background:#c98c5b}.split{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(320px,.9fr);gap:16px;align-items:start}.detail{position:sticky;top:16px}.detail-line{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #f2ece9}.detail-line:last-child{border:0}.tabs{display:flex;gap:4px;overflow:auto;border-bottom:1px solid #e6deda;margin-bottom:18px}.tabs button{border:0;background:none;padding:10px 14px;white-space:nowrap;color:#7b6e69}.tabs button.active{color:#342726;border-bottom:2px solid #a46c79;font-weight:700}.login{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 20% 20%,#efd9dc,transparent 32%),#faf8f6}.login-card{width:min(460px,100%);padding:38px}.login-card .brandmark{font-size:4rem}.login-card h1{margin-top:35px}.login-card .stack{margin-top:20px}.error{color:#a13f4e;font-size:.84rem}.success{color:#3e7652;font-size:.84rem}.divider{border:0;border-top:1px solid #eee3df;margin:20px 0}.mobile-nav{display:none}.timeline{border-left:1px solid #e2d3ce;margin-left:5px;padding-left:18px}.timeline div{position:relative;padding:0 0 15px}.timeline div:before{content:"";position:absolute;left:-23px;top:4px;background:#bd8d98;border-radius:50%;width:9px;height:9px}.nowrap{white-space:nowrap}.link{border:0;background:none;color:#885763;text-decoration:underline;padding:0}.danger{color:#9b4753}.loading{text-align:center;padding:20vh 20px;color:#796b65}@media(max-width:1100px){.split{grid-template-columns:1fr}.detail{position:static}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.shell{display:block}.sidebar{display:none}.topbar{height:56px;padding:0 17px}.topbar .user{display:none}.content{padding:22px 16px 95px}.hero{display:block}.hero-actions{margin:18px 0}.grid,.grid.two,.form-grid{grid-template-columns:1fr}.form-grid .span{grid-column:span 1}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #e8dedb;z-index:10;overflow-x:auto;box-shadow:0 -5px 20px #38251a11}.mobile-nav button{border:0;background:none;min-width:95px;padding:12px 8px;font-size:.72rem;color:#786c67}.mobile-nav button.active{color:#392a2d;font-weight:700;border-top:2px solid #b17d89}.table{min-width:760px}.panel{padding:17px}.login-card{padding:24px}.metric{font-size:1.6rem}}@media print{.sidebar,.topbar,.mobile-nav,.btn{display:none!important}.shell{display:block}.content{padding:0}.panel,.card{box-shadow:none;border:0}}
.settings-split{grid-template-columns:minmax(260px,.8fr) minmax(420px,1.2fr)}.form-grid input,.form-grid select,.form-grid textarea{width:100%;min-width:0}@media(max-width:1100px){.settings-split{grid-template-columns:1fr}}@media(min-width:761px){.settings-split .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-split .form-grid .span{grid-column:span 2}}
.overview-metrics{grid-template-columns:repeat(7,minmax(145px,1fr));gap:12px;margin-bottom:30px;padding:2px 2px 12px;overflow-x:auto;scroll-snap-type:x proximity}
.overview-card{width:100%;min-height:150px;padding:15px;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;text-align:left;color:inherit;scroll-snap-align:start}
.overview-card:hover{border-color:#cba6ac;background:#fffaf9;transform:translateY(-2px)}
.overview-card:focus-visible{outline:3px solid #b98390;outline-offset:3px}
.overview-card.active{border-color:#a76e7d;background:#fff5f6;box-shadow:0 0 0 2px #e7cbd1}
.overview-card .metric{display:block;margin:8px 0}
.overview-selection{margin-bottom:30px}
.overview-selection-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.overview-selection-head h2{margin:0}
.overview-selection-head .row-actions{align-items:center}
.overview-selection-list{height:220px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:8px}
.grid.two.overview-lower{grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:24px;margin-top:0;align-items:start}
.overview-lower>.panel{margin-bottom:0}
.overview-lower .section-title{flex-wrap:wrap}
.overview-lower .section-title>.small{flex:none;white-space:nowrap}
.overview-lower .detail-line{flex-wrap:wrap;align-items:center;row-gap:8px;padding:12px 0}
.overview-lower .detail-line>.link{flex:1 1 180px;min-width:0;text-align:left}
.overview-lower .detail-line>.pill{flex:0 1 auto;align-self:flex-start;max-width:100%;white-space:normal}
.overview-lower .link{text-align:left}
.grid.two + .overview-lower{margin-top:30px}
.overview-order{align-items:center}
@media(max-width:760px){.overview-metrics{margin-bottom:25px}.overview-card{min-height:135px}.overview-selection-list{height:190px}.overview-lower{gap:0}}

/* Keep wide tables inside their own scroll area on narrow screens. */
.content,.panel,.card,.split>*{min-width:0}
.table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.overview-card{overflow-wrap:anywhere}
.overview-card .small{line-height:1.35}
.notice-row>div,.detail-line>div{min-width:0}
.notice-row .link,.detail-line .link,.detail-line .sub,.banner,.lead{overflow-wrap:anywhere}

/* Consistent, quiet scrollbars for horizontal lists and tall detail areas. */
@supports (-moz-appearance:none){.overview-metrics,.overview-selection-list,.overview-scroll,.table-wrap,.tabs,.stack,.mobile-menu{scrollbar-width:thin;scrollbar-color:#b98692 transparent}}
.overview-metrics::-webkit-scrollbar,.overview-scroll::-webkit-scrollbar,.overview-selection-list::-webkit-scrollbar,.table-wrap::-webkit-scrollbar,.tabs::-webkit-scrollbar,.stack::-webkit-scrollbar{width:9px;height:9px}
.overview-metrics::-webkit-scrollbar-track,.overview-scroll::-webkit-scrollbar-track,.overview-selection-list::-webkit-scrollbar-track,.table-wrap::-webkit-scrollbar-track,.tabs::-webkit-scrollbar-track,.stack::-webkit-scrollbar-track{background:transparent;border-radius:999px}
.overview-metrics::-webkit-scrollbar-thumb,.overview-scroll::-webkit-scrollbar-thumb,.overview-selection-list::-webkit-scrollbar-thumb,.table-wrap::-webkit-scrollbar-thumb,.tabs::-webkit-scrollbar-thumb,.stack::-webkit-scrollbar-thumb{background:#b98692;border:2px solid transparent;background-clip:padding-box;border-radius:999px}
.overview-metrics::-webkit-scrollbar-thumb:hover,.overview-scroll::-webkit-scrollbar-thumb:hover,.overview-selection-list::-webkit-scrollbar-thumb:hover,.table-wrap::-webkit-scrollbar-thumb:hover,.tabs::-webkit-scrollbar-thumb:hover,.stack::-webkit-scrollbar-thumb:hover{background:#916473}
.overview-metrics::-webkit-scrollbar-button,.overview-scroll::-webkit-scrollbar-button,.overview-selection-list::-webkit-scrollbar-button,.table-wrap::-webkit-scrollbar-button,.tabs::-webkit-scrollbar-button,.stack::-webkit-scrollbar-button{display:none;width:0;height:0}

.mobile-menu-button,.mobile-menu{display:none}
@media(max-width:760px){
  .topbar{position:sticky;top:0;z-index:30;justify-content:space-between;gap:14px;padding:0 16px;box-shadow:0 2px 14px #38251a0a}
  .topbar .crumb{order:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:.08em}
  .mobile-menu-button{order:2;display:inline-flex;align-items:center;gap:9px;flex:none;min-height:38px;padding:7px 10px;margin-left:auto;border:1px solid #e5d7d3;border-radius:10px;background:#fff;color:#433434;font-size:.81rem;font-weight:650}
  .mobile-menu-button:hover,.mobile-menu-button[aria-expanded="true"]{background:#f8eff0;border-color:#d5b4bd}
  .menu-icon{width:17px;display:grid;gap:3px}
  .menu-icon i{display:block;height:2px;border-radius:2px;background:currentColor}
  .mobile-menu{display:grid;position:absolute;top:calc(100% + 7px);right:12px;width:min(320px,calc(100% - 24px));max-height:min(75vh,580px);overflow-y:auto;padding:8px;border:1px solid #e7d9d5;border-radius:14px;background:#fff;box-shadow:0 16px 40px #3c29252b}
  .mobile-menu>button{width:100%;padding:11px 13px;border:0;border-radius:8px;background:none;text-align:left;color:#564945}
  .mobile-menu>button:hover,.mobile-menu>button.active{background:#f8eff0;color:#493039;font-weight:700}
  .mobile-menu-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px 5px;margin-top:5px;border-top:1px solid #eee5e1;font-size:.72rem;color:#80716c}
  .mobile-menu-footer span{min-width:0;overflow-wrap:anywhere}
  .mobile-menu-footer button{flex:none;border:0;background:none;color:#885763;text-decoration:underline;padding:5px}
  .content{padding-bottom:45px}
  .section-title,.detail-line{flex-wrap:wrap}
  .pill{max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .field,.field.wide{min-width:0;max-width:100%;grid-template-columns:minmax(0,1fr)}
  .field input[type="file"]{width:100%;min-width:0}
  .toolbar .field,.toolbar .field.wide{flex:1 1 100%;width:100%}
  .toolbar .field input,.toolbar .field select{width:100%}
  .hero h1{overflow-wrap:anywhere}
}
@media print{.mobile-menu-button,.mobile-menu{display:none!important}}

/* Purchasing workflow: readable summaries, documents and editable draft rows. */
.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:100;max-width:min(560px,calc(100% - 32px));padding:14px 20px;border-radius:12px;background:#f7eee9;color:#65534e;border:1px solid #e8d9d1;box-shadow:0 8px 30px #80635918;font-size:.9rem}
.toast-error{background:#f4e7e4;color:#76524e;border-color:#e6d0ca}
summary{cursor:pointer;font-weight:650;color:#79535f;line-height:1.5}
details[open]>summary{margin-bottom:16px}
.settings-editor{margin-top:22px;padding-top:18px;border-top:1px solid #eee5e1}
.settings-editor form{margin-top:14px}
.settings-editor .field{min-width:0}
.order-details-grid.grid.two{grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));align-items:start}
.order-details-grid textarea{min-height:90px}
#email-draft{min-height:310px}
.selection-toolbar,.confirmation-box{padding:16px;background:#faf4f4;border-radius:10px;margin-bottom:18px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.confirmation-box{margin:20px 0 0;display:block}
.selection-toolbar>span{margin-right:auto}
.calculation{max-width:290px;margin-top:8px;font-size:.73rem;color:#766c68}
.calculation summary{font-size:.73rem}
.calculation p{margin:7px 0;line-height:1.45}
.planning-table td:first-child{min-width:150px}
.planning-table td{line-height:1.4}
.select-line{display:flex;gap:7px;align-items:center;font-size:.8rem}
input[type=checkbox]{min-height:0;width:17px;height:17px;accent-color:#a76e7d}
.purchase-input{min-width:180px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.purchase-input>input,.purchase-input>.sub,.purchase-input>button,.purchase-input>.unsaved{grid-column:1/-1}
.purchase-input label{font-size:.73rem;color:#746a66}
.purchase-input input{width:100%;min-width:0}
.draft-row{padding:18px 0;border-bottom:1px solid #eee5e1}
.draft-row>div:first-child{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.draft-row .row-actions{margin-top:12px;align-items:center}
.draft-row .quantity-preview{margin-right:auto;font-weight:650}
.unsaved{display:block;grid-column:1/-1;color:#966b3c;padding-top:6px}
.order-lines{margin:20px 0}
.order-item,.receive-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid #eee5e1;flex-wrap:wrap}
.order-item>div,.receive-row>div{min-width:0}
.order-item strong,.receive-row strong,.order-item .sub{display:block}
.receive-row form{align-items:flex-end;min-width:0}
.receive-row input{max-width:150px}
.order-list{display:grid;gap:10px}
.order-summary{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(140px,.8fr) minmax(190px,1fr) 24px;gap:16px;width:100%;text-align:left;align-items:center;border:1px solid #e9e2de;border-radius:12px;background:white;padding:17px;color:inherit}
.order-summary:hover{border-color:#cba6ac;background:#fffafa}
.order-summary .sub{display:block;margin-top:6px}
.order-summary .pill{margin:2px 4px 2px 0;white-space:normal}
.document-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px;margin:16px 0}
.document-check{display:grid;gap:8px;padding:14px;border:1px solid #e7d8d2;border-radius:10px;background:#fdf9f4}
.document-check.complete{border-color:#d3e3d7;background:#f4f9f5}
.document-check strong{font-size:.95rem}
.document-check span{line-height:1.5}
.document-row{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid #eee5e1}
.document-row>div{min-width:0;overflow-wrap:anywhere}
.document-row summary{font-size:.78rem}
.document-row form{display:flex;gap:8px;flex-wrap:wrap}
.document-list{margin-bottom:20px}
.upload-form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;padding:16px;background:#faf7f5;border-radius:12px}
.upload-form .field{flex:1 1 190px;min-width:0;grid-template-columns:minmax(0,1fr)}
.upload-form input[type=file]{width:100%;min-width:0}
.next-stages{margin:15px 0}
.next-stages summary{font-size:.8rem}
.notice-row.unread .notice-dot{box-shadow:0 0 0 4px #f8edef}
.focus-panel{display:flex;justify-content:space-between;gap:15px;align-items:center;flex-wrap:wrap}
.focus-panel h2{margin:0}
.section-title{flex-wrap:wrap}
.topbar .unread-count{white-space:nowrap}
.panel .detail-line{align-items:flex-start}
@media(max-width:1200px){.order-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.order-summary>span:last-child{display:none}}
@media(max-width:760px){
 .order-summary{grid-template-columns:1fr;gap:10px}
 .order-item,.receive-row{align-items:flex-start;flex-direction:column}
 .receive-row form,.receive-row .field{width:100%}
 .receive-row input{max-width:100%;width:100%}
 .document-checks{grid-template-columns:1fr}
 .upload-form{padding:12px}
 .upload-form>.btn{width:100%}
 .order-details-grid .panel{margin-bottom:0}
 .order-details-grid{gap:20px}
 .order-details-grid .field{min-width:0}
 .selection-toolbar>.btn{width:100%}
 .document-row form select{max-width:100%}
 .panel h2{overflow-wrap:anywhere}
}

.upload-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}.upload-form .field{width:100%;min-width:0}.upload-form select,.upload-form input{width:100%;box-sizing:border-box}.upload-form>.btn{grid-column:1/-1;justify-self:start}.copy-field{display:flex;gap:8px;min-width:0}.copy-field input{flex:1;min-width:0}.copy-field .btn{flex-shrink:0}.print-sheet{display:none}
@media(max-width:760px){.upload-form{grid-template-columns:minmax(0,1fr)}.copy-field{flex-direction:column}}
@media print{@page{size:A4;margin:15mm}body{background:white!important}.print-sheet{display:block!important;color:black;background:white}.print-sheet table{width:100%;min-width:0;border-collapse:collapse}.print-sheet th,.print-sheet td{padding:10px;border-bottom:1px solid #ccc;text-align:left}body:has(.print-sheet) .content>:not(.print-sheet){display:none!important}.sidebar,.topbar,.mobile-nav,.toast{display:none!important}.shell,main,.content{display:block!important;margin:0!important;padding:0!important;min-height:0!important;overflow:visible!important}}

.overview-lower>.panel{height:480px;max-height:480px;display:flex;flex-direction:column;min-height:0;overflow:hidden}.overview-lower .section-title{flex-shrink:0}.overview-scroll{min-height:0;overflow-y:auto;overflow-x:hidden;flex:1;padding-right:8px;overscroll-behavior:contain}.overview-scroll.notice-list{display:block}.overview-scroll .notice-row>div{min-width:0;overflow-wrap:anywhere}.overview-panel-footer{flex-shrink:0;margin:12px 0 0}.overview-scroll:focus-visible{outline:2px solid #d8aab2;outline-offset:2px}

.order-toolbar .order-number-field{flex:0 1 190px;min-width:130px}.order-toolbar .order-supplier-field{flex:2 1 300px;min-width:0}.order-toolbar input{width:100%}.supplier-combobox{position:relative;min-width:0}.supplier-combobox-control{position:relative}.supplier-combobox-control input{padding-right:44px}.dropdown-toggle{position:absolute;right:1px;top:1px;bottom:1px;width:40px;border:0;background:transparent;display:grid;place-items:center;color:#746a66}.supplier-options{position:absolute;top:calc(100% + 5px);left:0;right:0;max-height:250px;overflow:auto;z-index:30;border:1px solid #dcd2cd;border-radius:8px;background:white;box-shadow:0 8px 24px #30252218;padding:5px}.supplier-options[hidden]{display:none}.supplier-options button{display:block;width:100%;padding:10px 12px;text-align:left;border:0;background:transparent;border-radius:5px;color:inherit;overflow-wrap:anywhere}.supplier-options button:hover,.supplier-options button:focus-visible,.supplier-options button[aria-selected=true]{background:#f5ecee}.print-order-button{margin-left:auto}.copy-field{position:relative;display:block}.copy-field input{width:100%;padding-right:46px}.copy-icon{width:36px;height:36px;padding:8px;border:0;border-radius:6px;background:transparent;color:#80606a;display:inline-grid;place-items:center;flex-shrink:0}.copy-icon:hover{background:#f5ecee;color:#493138}.copy-icon:focus-visible{outline:2px solid #d8aab2}.copy-field .copy-icon{position:absolute;right:3px;top:50%;transform:translateY(-50%)}.copy-label{display:flex;align-items:center;justify-content:space-between;gap:10px}.copy-label label{font-size:.85rem}@media(max-width:600px){.order-toolbar .order-number-field{flex:1 1 140px}.order-toolbar .order-supplier-field{flex-basis:100%}}

.copy-textarea{position:relative;min-width:0}.copy-textarea textarea{display:block;padding-right:48px}.copy-textarea>.copy-icon{position:absolute;top:5px;right:7px}

.article-combobox{position:relative}.article-combobox input{width:100%}.supplier-options button[hidden]{display:none}.article-picker{max-width:850px}.receipt-table input{width:110px;min-width:85px}.receipt-actions{margin-top:20px}.receipt-print-value{display:none}@media print{body:has(.receipt-panel) .content>:not(.receipt-panel){display:none!important}.receipt-panel .receipt-actions,.receipt-panel input{display:none!important}.receipt-print-value{display:inline}.receipt-panel .table-wrap{overflow:visible}.receipt-table{min-width:0!important;width:100%;font-size:10pt}.receipt-table th{white-space:normal}.receipt-table td,.receipt-table th{padding:8px}.receipt-panel{padding:0}}

.brand-logo{display:block;width:64px;height:66px;object-fit:contain}.login-card .brand-logo{width:90px;height:94px}.selection-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.selection-toolbar>.btn{width:300px;max-width:100%;min-height:44px;padding:10px 14px;font-size:.9rem}.toolbar .field:has(#search),.toolbar .search-field{flex:0 1 190px;min-width:140px}.toolbar .field:has(#plan-supplier),.toolbar .field:has(#supplier-select),.toolbar .order-supplier-field{flex:2 1 300px;min-width:0}.toolbar input,.toolbar select{width:100%}.toolbar .field:has(#supplier-select){order:2}.toolbar .field:has(#search){order:0}.last-supplier{white-space:normal;max-width:220px}.article-picker{max-width:850px}@media(max-width:600px){.toolbar .field:has(#search){flex:1 1 140px}.toolbar .field:has(#plan-supplier),.toolbar .field:has(#supplier-select){flex-basis:100%}.selection-toolbar>.btn{width:100%}}
@media(max-width:600px){.selection-toolbar>.btn{min-height:56px}}

@media(min-width:761px){.sidebar{position:sticky;top:0;height:100vh;height:100dvh;align-self:start;overflow:hidden}.sidebar>.brand,.sidebar>.side-bottom{flex-shrink:0}.sidebar>.nav{flex:1;min-height:0;overflow-y:auto;align-content:start}.sidebar>.side-bottom{margin-top:0}}

.supplier-page-combo{position:relative}.supplier-page-combo input{width:100%}.supplier-article,.supplier-recent-order{padding:15px 0;border-top:1px solid #eee5e1}.supplier-article>summary,.supplier-recent-order>summary{cursor:pointer;overflow-wrap:anywhere}.supplier-article>summary .sub{display:block;margin-left:17px}.supplier-article-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.supplier-article-info>div{display:grid;gap:5px;overflow-wrap:anywhere}.supplier-recent-order[open]>summary{margin-bottom:14px}@media(max-width:600px){.supplier-article-info{grid-template-columns:1fr}}

.supplier-company-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:20px 0}.supplier-company-info>div{min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}.article-edit-toggle{padding:12px;background:#faf6f5;border:1px solid #eadedb;border-radius:8px}.article-edit-toggle>summary{display:list-item;width:fit-content;padding:8px 12px;background:white;border:1px solid #d8c9c5;border-radius:6px;font-size:.8rem;font-weight:600;color:#70545d;cursor:pointer}.supplier-order-link{display:flex;justify-content:space-between;gap:14px;width:100%;padding:16px 0;text-align:left;border:0;border-top:1px solid #eee5e1;background:transparent;color:inherit}.supplier-order-link:hover{background:#faf6f5}@media(max-width:600px){.supplier-company-info{grid-template-columns:1fr}}

.supplier-info-groups,.supplier-form-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:20px 0}.supplier-info-group{padding:18px;border:1px solid #eee5e1;border-radius:10px}.supplier-info-group h3{margin-bottom:18px;font-size:.95rem}.supplier-info-group dl,.supplier-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0}.supplier-info-group dl>div{min-width:0}.supplier-info-group dt{font-size:.75rem;color:#746a66;font-weight:600;margin-bottom:6px}.supplier-info-group dd{margin:0;font-size:.9rem;font-weight:400;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.supplier-field-full{grid-column:1/-1}.supplier-form-groups fieldset{margin:0;min-width:0;padding:18px;border:1px solid #e6dcd8;border-radius:10px}.supplier-form-groups legend{padding:0 6px;font-size:.95rem;font-weight:600}.supplier-fields .field{min-width:0}.supplier-fields input,.supplier-fields select{width:100%}.supplier-edit-form{margin-top:20px}@media(max-width:1000px){.supplier-info-groups,.supplier-form-groups{grid-template-columns:1fr}}@media(max-width:480px){.supplier-info-group dl,.supplier-fields{grid-template-columns:1fr}}

@media(min-width:1001px){.supplier-info-groups>:nth-child(1),.supplier-form-groups>:nth-child(1){grid-column:1;grid-row:1}.supplier-info-groups>:nth-child(2),.supplier-form-groups>:nth-child(2){grid-column:2;grid-row:1}.supplier-info-groups>:nth-child(3),.supplier-form-groups>:nth-child(3){grid-column:2;grid-row:2}.supplier-info-groups>:nth-child(4),.supplier-form-groups>:nth-child(4){grid-column:1;grid-row:2}}

.add-supplier-article{margin-bottom:22px}.add-supplier-article>summary{display:list-item;width:fit-content;cursor:pointer}.add-supplier-article form{margin-top:18px;padding:18px;background:#faf6f5;border-radius:10px}.new-article-field[hidden]{display:none}


.overview-selection{overflow:hidden}.overview-selection-list{height:auto;max-height:220px;min-height:0}.overview-selection-list>.muted{margin-bottom:0}.overview-selection-list>.detail-line:last-child{border-bottom:0}@media(max-width:760px){.overview-selection-list{height:auto;max-height:190px}}

.need-article-combo{position:relative;min-width:0}.need-article-combo input:not([type=hidden]){width:100%}.need-article-field{min-width:0}

.supplier-article-title{font-weight:600}.supplier-article-section{margin-top:22px}.supplier-article-section h3{font-size:14px;margin:0;padding-bottom:10px;border-bottom:1px solid #eee5e1}.supplier-article-section .supplier-article-info{margin:14px 0 20px}.supplier-article-info dd{margin:0;font-weight:600}.supplier-article-info dt{margin:0}

.planning-table select[data-plan-supplier]{width:240px;min-width:240px;max-width:240px;box-sizing:border-box}

/* Keep receipt values aligned with the quantity input. */
.receipt-table td{vertical-align:middle}.receipt-table td:nth-last-child(-n+2){white-space:nowrap}.receipt-table input{vertical-align:middle;margin-right:4px}.receipt-actions{align-items:center}.receipt-actions p{margin:0}
.pill.unpaid,.pill.unregistered{background:#fae5e5;color:#9d3131}.books-connection-note{margin:14px 0 0}.books-receipt-panel .table-wrap{margin-bottom:14px}

/* Login shares Purchase's warm neutrals, with one clear action per step. */
.login{min-height:100vh;min-height:100dvh;padding:48px 20px;background:#f8f5f3}
.login-card{width:min(440px,100%);padding:40px;border:1px solid #e5dcd6;border-radius:18px;box-shadow:0 18px 60px #3925200a}
.login-brand{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:28px;margin-bottom:28px;border-bottom:1px solid #eee6e1}
.login-card .brand-logo{width:68px;height:70px}
.login-wordmark{margin-top:15px;padding-left:.22em;font-size:11px;font-weight:650;letter-spacing:.22em;color:#655651}
.login-card h1{margin:7px 0 0;font-size:30px;font-weight:450;letter-spacing:-.035em;line-height:1.15}
.login-section-title{margin:0 0 22px;font-size:20px;font-weight:550;letter-spacing:-.025em;line-height:1.35}
.login-form{display:grid;gap:20px;animation:login-appear .18s ease-out}
.login-field{display:grid;gap:9px;min-width:0;font-size:13px;font-weight:600;color:#655650}
.login-field input{display:block;width:100%;min-width:0;min-height:50px;padding:13px 14px;border-radius:9px;font-size:16px;font-weight:400;color:#292321}
.login-field input::placeholder{color:#a1958e}
.login-field input:focus{border-color:#b58d97;outline:3px solid #ead7dc;outline-offset:1px}
.login-form>.btn{width:100%;min-height:50px;border-radius:9px;font-size:14px;font-weight:600}
.login-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.login-field-hint{font-size:11px;font-weight:400;color:#857570}
.login-field .login-code{font-size:25px;text-align:center;letter-spacing:.34em;padding-left:calc(14px + .34em);font-variant-numeric:tabular-nums}
.login-field input[aria-invalid=true]{border-color:#b65b69}
.login-identity{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:-5px 0 18px;padding:12px 14px;background:#f8f4f2;border:1px solid #ede3de;border-radius:9px}
.login-identity>span{min-width:0;overflow-wrap:anywhere;font-size:13px;color:#5f514b}
.login-text-button{border:0;border-radius:5px;padding:4px 0;background:none;color:#865d69;font-size:12px;line-height:1.5;font-weight:600;white-space:nowrap}
.login-text-button:hover:not(:disabled){color:#56333f;text-decoration:underline}
.login-text-button:focus-visible{outline:3px solid #ead7dc;outline-offset:4px}
.login-text-button:disabled{color:#897c75;opacity:1;cursor:default}
.login-feedback{margin:0 0 20px;font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.login-notice{color:#796a63}
.login-error{padding:12px 14px;background:#fff3f3;border:1px solid #eed1d6;border-radius:9px;color:#9a3549}
.login-secondary{display:flex;justify-content:center;margin-top:20px}
.login-links{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:22px;flex-wrap:wrap}
.login-password-control{position:relative;display:block;min-width:0}
.login-password-control input{padding-right:48px}
.login-password-toggle{position:absolute;top:50%;right:7px;transform:translateY(-50%);display:grid;place-items:center;width:36px;height:38px;padding:8px;background:transparent;border:0;border-radius:6px;color:#8b7972}
.login-password-toggle svg{width:20px;height:20px}
.login-password-toggle:hover{background:#f8f1ef;color:#57423f}
.login-password-toggle:focus-visible{outline:3px solid #ead7dc;outline-offset:1px}
.login-password-toggle[aria-pressed=true]{background:#f4e9ec;color:#865d69}
.login-card--setup{padding-top:30px;padding-bottom:30px}
.login-card--setup .login-brand{padding-bottom:18px;margin-bottom:22px}
.login-card--setup .brand-logo{width:46px;height:48px}
.login-card--setup .login-wordmark{margin-top:10px}
.login-card--setup h1{font-size:26px}
.login-card .login-demo-actions{margin-top:0;overflow:visible}
.login-demo-actions .btn{min-height:48px}
@keyframes login-appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:480px){.login{padding:28px 16px}.login-card{padding:30px 24px;border-radius:16px}.login-brand{padding-bottom:24px;margin-bottom:24px}.login-card .brand-logo{width:62px;height:64px}.login-card h1{font-size:28px}.login-section-title{font-size:19px}.login-identity{gap:10px}}
@media(max-height:620px){.login{align-items:start;padding-top:24px;padding-bottom:24px}}
@media(prefers-reduced-motion:reduce){.login-form{animation:none}}

.article-toolbar{margin-bottom:0;gap:16px}.article-class-field{flex:0 0 160px}.article-toolbar .wide{min-width:0}.article-suppliers{margin:24px 0}.article-suppliers h3{margin-bottom:8px}.article-suppliers .supplier-order-link span:first-child{overflow-wrap:anywhere}.article-toolbar #article-empty{padding:12px;margin:0}@media(max-width:600px){.article-toolbar{display:grid;grid-template-columns:1fr}.article-class-field{min-width:0}}

.article-settings-notice,.article-component-form{margin-top:15px}.supplier-link-form{margin-top:10px}

.article-class-field{flex:1 1 340px;min-width:0}.article-toolbar .field.wide{flex:1.5 1 320px}.article-class-field select{width:100%;min-width:0;text-overflow:ellipsis}.article-picker .supplier-options button,.panel p.code{overflow-wrap:anywhere}

.article-toolbar{align-items:start}.article-class-description{margin:0;overflow-wrap:anywhere}
.related-article-combo{position:relative;min-width:0}.related-article-combo .supplier-options button{overflow-wrap:anywhere}.related-article-combo .supplier-options p{padding:10px 14px;margin:0}
.relation-add-form{margin-top:24px}.purchase-relations>.section-title{gap:16px;flex-wrap:wrap}.purchase-relations .settings-editor{margin-bottom:20px}.relation-table{min-width:650px}.relation-table td{vertical-align:middle}.relation-table td:first-child{min-width:200px;max-width:390px;overflow-wrap:anywhere}.relation-table th,.relation-table tfoot{white-space:nowrap}.relation-table tfoot th{padding-top:18px;border-top:1px solid var(--border,#e8ded9)}.relation-table .num{white-space:nowrap}.relation-edit summary{white-space:nowrap;color:#865d69;cursor:pointer;font-size:13px}.relation-edit[open]{min-width:180px}.relation-edit form{display:grid;gap:12px;padding-top:12px}.relation-edit label{display:grid;gap:8px;font-size:12px}.relation-review{margin-top:20px}.relation-review summary{cursor:pointer;font-weight:600}.relation-issue{gap:16px;align-items:center}.relation-issue span{min-width:0;overflow-wrap:anywhere}.relation-issue .btn{flex-shrink:0}
@media(max-width:600px){.relation-issue{align-items:start;flex-direction:column}.relation-add-form{grid-template-columns:1fr}.relation-add-form .span{grid-column:auto}.purchase-relations .toolbar{align-items:stretch}.purchase-relations .toolbar .field{min-width:0;width:100%}}

.relation-sales-period{display:block;margin-top:5px;text-transform:none;font-weight:400;letter-spacing:0;color:#948982}.relation-channel-label{display:inline-block;margin-left:8px;font-size:10px;font-weight:650;padding:2px 6px;border-radius:4px;vertical-align:middle}.relation-channel-label.gl{background:#edf2ef;color:#62776b}.relation-channel-label.pl{background:#f4ecef;color:#926776}.relation-channel-gl td:first-child{border-left:2px solid #e1ebe5}.relation-channel-pl td:first-child{border-left:2px solid #ecdee4}.relation-table{min-width:800px}.relation-sales{min-width:94px}.relation-purchase{background:#fcfaf9}

.plan-class-field{flex:1 1 240px;min-width:0}.plan-class-field select{width:100%;min-width:0;text-overflow:ellipsis}

.production-management .grid{align-items:start}.production-management .stack h3,.production-management .stack p{margin:0}.production-import-results{margin-top:24px}.production-import-results .table-wrap{max-height:440px;overflow:auto;margin:16px 0}.production-import-results input[type=checkbox]{width:18px;height:18px;accent-color:#926776}.production-removed-row{justify-content:space-between;margin:12px 0}.production-removed-row span{flex:1;min-width:0;overflow-wrap:anywhere}.production-management input[type=file]{max-width:100%;width:100%}@media(max-width:600px){.production-management .grid.two{grid-template-columns:1fr}.production-management .section-title{align-items:start;flex-direction:column}.production-removed-row{align-items:start}}

.production-class-picker{position:relative}.production-class-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:42px;padding:10px 12px;background:#fff;border:1px solid var(--border,#e8ded9);border-radius:6px;text-align:left;font:inherit;cursor:pointer}.production-class-trigger span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.production-class-options{position:absolute;top:100%;left:0;right:0;z-index:30;background:#fff;border:1px solid var(--border,#e8ded9);border-radius:8px;box-shadow:0 8px 24px #30252120;padding:8px;max-height:340px;overflow-y:auto;min-width:0}.production-class-options input{width:100%;margin-bottom:6px}.production-class-option-row{display:flex;align-items:stretch;gap:4px}.production-class-option-row[hidden]{display:none}.production-class-choice{flex:1;min-width:0;border:0;border-radius:4px;background:transparent;padding:10px;text-align:left;font:inherit;font-size:13px;overflow-wrap:anywhere;cursor:pointer}.production-class-choice:hover,.production-class-choice[aria-pressed=true]{background:#f4ecef}.production-class-remove{display:grid;place-items:center;flex:0 0 38px;border:0;border-radius:4px;background:transparent;color:#946570;cursor:pointer;min-height:38px}.production-class-remove:hover{background:#f8e8ec}.production-class-trigger:focus-visible,.production-class-choice:focus-visible,.production-class-remove:focus-visible{outline:2px solid #926776;outline-offset:1px}

.production-filter-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}.production-filter-toolbar>.field{min-width:0;width:100%}.production-filter-toolbar #search,.production-filter-toolbar .production-class-trigger{width:100%;height:44px;min-height:44px;padding:10px 11px;border:1px solid #dcd2cd;border-radius:8px}@media(max-width:600px){.production-filter-toolbar{grid-template-columns:1fr}}

.production-add-class-picker{position:relative;min-width:0}.production-management #production-add-class,.production-management #production-manual-code{width:100%;height:44px;min-height:44px}.production-add-class-picker>.production-class-trigger{border:1px solid #dcd2cd;border-radius:8px;padding:10px 11px}

.production-management.panel{padding:12px 16px}.production-management>.section-title{align-items:center;flex-direction:row;gap:12px}.production-management>.section-title h2{margin:0;font-size:18px;line-height:24px}.production-management [data-action=production-toggle-import]{min-height:36px;padding:8px 12px;font-size:13px;flex-shrink:0}.production-management>.grid{margin-top:16px}.production-management .stack{gap:10px}

.production-sort{border:0;background:transparent;padding:0;display:inline-flex;align-items:center;gap:6px;min-height:24px;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;white-space:nowrap;cursor:pointer}.production-sort:hover{color:#6f4451}.production-sort:focus-visible{outline:2px solid #926776;outline-offset:4px;border-radius:2px}.production-sort-mark{color:#aa969b;font-size:14px}th[aria-sort=descending] .production-sort-mark,th[aria-sort=ascending] .production-sort-mark{color:#865364}

.article-sales{margin:22px 0;padding:18px 0;border-top:1px solid #eee5e0;border-bottom:1px solid #eee5e0}.article-sales h3{margin:0;font-size:16px}.article-sales .section-title{align-items:center}.article-sales-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px}.article-sales-grid>div{display:grid;gap:8px;min-width:0}.article-sales-grid strong{font-size:22px;font-weight:600;overflow-wrap:anywhere}@media(max-width:480px){.article-sales-grid{gap:8px}.article-sales-grid strong{font-size:18px}}
.article-sales-periods{min-width:0}.article-sales-periods th,.article-sales-periods td{padding:10px 7px}@media(max-width:480px){.article-sales-periods{font-size:12px}.article-sales-periods th{font-size:10px}.article-sales-periods .num{white-space:normal}}

.draft-summary{display:flex;gap:12px;align-items:center}.draft-summary>.order-summary{flex:1;min-width:0}.draft-summary>.btn{flex-shrink:0}.document-row>.btn{flex-shrink:0}
@media(max-width:680px){.draft-summary{flex-direction:column;align-items:stretch}.draft-summary>.btn{align-self:flex-end}.document-row{flex-wrap:wrap}.document-row>div:first-child{flex-basis:100%;min-width:0;overflow-wrap:anywhere}}

.article-supplier-card{border:1px solid #eee5e0;border-radius:12px;padding:14px;margin:12px 0;background:#fcfaf9}.article-supplier-card .supplier-order-link{margin:0 0 14px}.article-supplier-form .field{min-width:0}.article-supplier-form input{width:100%;min-width:0}

.manual-purchase-panel .manual-item-name-field{grid-column:span 2}
@media(max-width:760px){.manual-purchase-panel .manual-item-name-field{grid-column:span 1}}

.pack-measure{display:grid;grid-template-columns:minmax(60px,1fr) 74px;gap:6px;align-items:end}.pack-measure label{display:grid;gap:6px;min-width:0}.pack-measure input,.pack-measure select{width:100%;min-width:0}.pack-measure select{padding-left:6px;padding-right:4px}.purchase-input{min-width:260px;grid-template-columns:minmax(150px,1.5fr) minmax(85px,1fr)}

.purchase-input>label{display:grid;gap:6px;min-width:0;grid-template-rows:1fr auto}

/* Shared compose field widths and feedback for every asynchronous operation. */
.compose-toolbar{display:grid;grid-template-columns:minmax(0,420px)}
.compose-toolbar .field.compose-field{width:100%;min-width:0;order:0}
.compose-toolbar input,.compose-toolbar select{width:100%}
.loading-indicator{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:14px 20px;max-width:calc(100vw - 32px);background:#fffaf7;color:#554440;border:1px solid #e5d9d3;border-radius:12px;box-shadow:0 6px 24px #38251a22;z-index:1000;pointer-events:none;font-size:.9rem}
.loading-spinner{display:inline-block;width:22px;height:22px;flex:none;border:3px solid #e8dcd7;border-top-color:#a46c79;border-radius:50%;animation:purchase-spin .8s linear infinite}
.loading .loading-spinner{vertical-align:middle;margin-right:10px}
@keyframes purchase-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.loading-spinner{animation-duration:2s}}
@media(max-width:760px){.loading-indicator{bottom:18px}}
@media print{.loading-indicator{display:none!important}}

body:has(.loading-indicator) .toast{bottom:94px}

.compose-search{grid-template-columns:repeat(2,minmax(0,420px));align-items:end}.compose-search select{min-width:0;text-overflow:ellipsis}
@media(max-width:1150px){.compose-search{grid-template-columns:minmax(0,420px)}}

/* Persistent article list, followed by a separate editing view. */
.article-picker{max-width:none}.article-toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:end;margin-bottom:20px}.article-toolbar>.field{min-width:0;width:100%}.article-toolbar input,.article-toolbar select{width:100%;min-width:0;text-overflow:ellipsis}.article-list-heading{margin-bottom:14px}.article-list-heading h2{margin:0}.article-list-labels,.article-list-row{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) 20px;gap:18px;align-items:center}.article-list-labels{padding:10px 12px;color:#837771;font-size:.73rem;border-bottom:1px solid #e9e2de}.article-list{max-height:800px;overflow-y:auto;scrollbar-gutter:stable}.article-list-row{width:100%;padding:15px 12px;border:0;border-bottom:1px solid #f1edeb;background:#fff;color:inherit;text-align:left;font-size:.85rem}.article-list-row:hover,.article-list-row:focus-visible{background:#faf2f3}.article-list-row:focus-visible{outline:2px solid #b98390;outline-offset:-2px}.article-list-row span,.article-list-row strong{min-width:0;overflow-wrap:anywhere}.article-list-identity{display:grid;gap:5px}.article-list-class,.article-list-suppliers{color:#80716c;font-size:.79rem}.article-list-arrow{color:#a46c79}.article-edit-view>.panel{margin-bottom:20px}
@media(max-width:1000px){.article-toolbar{grid-template-columns:1fr}.article-list-labels,.article-list-row{gap:12px}}
@media(max-width:600px){.article-list-labels{display:none}.article-list-row{grid-template-columns:minmax(0,1fr) 20px;gap:6px 12px}.article-list-identity,.article-list-class,.article-list-suppliers{grid-column:1}.article-list-arrow{grid-column:2;grid-row:1/4}.article-list{max-height:65vh}.article-list-heading{align-items:center}}

/* One size for action buttons on every page and in every form. */
:root{--action-button-width:240px;--action-button-height:48px}
.btn.btn,.btn.tiny,.selection-toolbar>.btn,.upload-form>.btn,.login-form>.btn,.login-demo-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;width:var(--action-button-width);max-width:100%;min-width:0;height:var(--action-button-height);min-height:var(--action-button-height);max-height:var(--action-button-height);flex:0 0 auto;padding:5px 12px;font-size:14px;line-height:18px;text-align:center;white-space:normal;vertical-align:middle}

.login-form>.btn{justify-self:center}

.supplier-create-form textarea{min-height:90px}.books-supplier-list{max-height:650px;overflow-y:auto}.books-supplier-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 240px;align-items:center;gap:20px;padding:16px 0;border-bottom:1px solid #eee5e1}.books-supplier-row:last-child{border-bottom:0}.books-supplier-row>div{min-width:0;overflow-wrap:anywhere}.books-supplier-row .code{margin-top:6px}
@media(max-width:1000px){.books-supplier-row{grid-template-columns:minmax(0,1fr) 240px}.books-supplier-row>div:nth-child(2){grid-column:1;grid-row:2}.books-supplier-row>.btn{grid-column:2;grid-row:1/3}}
@media(max-width:600px){.books-supplier-row{grid-template-columns:1fr;gap:12px}.books-supplier-row>div:nth-child(2),.books-supplier-row>.btn{grid-column:1;grid-row:auto}.books-supplier-list{max-height:70vh}}

.article-custom-editor,.article-image-editor{margin:24px 0;padding:20px 0;border-top:1px solid #e9e2de}.article-photo{display:block;max-width:280px;width:100%;max-height:300px;object-fit:contain;object-position:left center;margin:16px 0}.article-image-editor .toolbar{margin-top:16px}.article-image-editor input[type=file]{max-width:100%;width:100%}.article-copy-panel textarea,.article-custom-editor textarea{width:100%}.html-draft-preview{margin-top:20px}.html-draft-preview iframe{display:block;width:100%;height:650px;border:1px solid #e9e2de;border-radius:8px;background:white}.article-copy-panel p{line-height:1.6}@media(max-width:600px){.article-copy-panel .form-grid,.article-custom-editor .form-grid{grid-template-columns:1fr}.article-copy-panel .span,.article-custom-editor .span{grid-column:auto}.article-image-editor .toolbar{flex-direction:column;align-items:stretch}.html-draft-preview iframe{height:600px}}

.article-copy-panel .form-grid,.article-custom-editor .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:600px){.article-copy-panel .form-grid,.article-custom-editor .form-grid{grid-template-columns:1fr}}

.html-draft-preview iframe[hidden]{display:none}.html-draft-preview .html-preview-status[hidden]{display:none}.email-text-editor{margin:4px 0 16px}.email-text-editor[open]{display:grid;gap:12px}.email-text-editor summary{cursor:pointer}.email-text-editor textarea{width:100%;min-height:280px}.html-preview-retry{margin:8px 0}

.order-edit-row{padding:18px 0;border-bottom:1px solid #eee5e1}.order-edit-row .form-grid{margin:12px 0}.order-edit-row textarea{min-height:90px}

.preserve-lines{white-space:pre-line}

.order-edit-row>div:first-child{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}

.article-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 20px}.article-navigation>span{text-align:center}.upload-form>.field{min-width:0;align-content:start}.upload-form>.field>label{line-height:18px;min-height:18px}.upload-form select,.upload-form input[type=file]{height:46px;min-height:46px;max-height:46px;width:100%;margin:0;box-sizing:border-box}.upload-form input[type=file]{padding:10px 11px}
@media(max-width:600px){.article-navigation{display:grid;grid-template-columns:1fr 1fr;gap:10px}.article-navigation>.btn{width:100%}.article-navigation>span{grid-column:1/-1;grid-row:2}.upload-form select,.upload-form input[type=file]{min-width:0}}

.article-writeoffs{margin:20px 0;padding:18px 0;border-top:1px solid #e9e2de;border-bottom:1px solid #e9e2de}.article-writeoffs h3{margin:0}.writeoff-quantity{display:block;font-size:1.2rem;margin:12px 0}.article-writeoffs p:last-child{margin-bottom:0}

.receipt-table td>.sub{display:block}

/* Shared dropdown appearance follows the searchable supplier control. */
:root{--dropdown-height:40px;--dropdown-border:#dcd2cd;--dropdown-radius:8px;--dropdown-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23746a66' stroke-width='1.6'%3E%3Cpath d='m5 7 5 5 5-5'/%3E%3C/svg%3E")}
select:not([multiple]),.supplier-combobox-control>input,.production-class-trigger{box-sizing:border-box;height:var(--dropdown-height);min-height:var(--dropdown-height);border:1px solid var(--dropdown-border);border-radius:var(--dropdown-radius);background-color:#fff;color:#2a2421;font-size:16px;font-weight:400;line-height:18px;padding:10px 40px 10px 11px;vertical-align:middle}
select:not([multiple]),.production-class-trigger{appearance:none;-webkit-appearance:none;background-image:var(--dropdown-arrow);background-repeat:no-repeat;background-size:18px 18px;background-position:right 11px center;text-overflow:ellipsis}
select:not([multiple]):hover,.production-class-trigger:hover{border-color:#bcaeaa}
select:not([multiple]):focus-visible,.production-class-trigger:focus-visible{border-color:#b58d97;outline:2px solid #d8aab2;outline-offset:1px}
select:not([multiple]):has(option:checked[value=""]){color:#887e79}
select option{color:#2a2421;background:#fff}
select:not([multiple]):disabled{background-color:#f5f1ef;color:#948984;cursor:not-allowed}
.supplier-combobox-control>input{width:100%;padding-right:40px}
.supplier-combobox-control>input::placeholder{color:#887e79;opacity:1}
.dropdown-toggle{top:0;right:0;bottom:0;width:40px;height:100%;padding:0;border:0;border-radius:0 var(--dropdown-radius) var(--dropdown-radius) 0;font-size:0;line-height:0;background:transparent}
.dropdown-toggle>svg{display:none}
.dropdown-toggle::after{content:"";display:block;width:18px;height:18px;background:var(--dropdown-arrow) center/18px 18px no-repeat}
.production-class-trigger>span[aria-hidden="true"]{display:none}
.production-filter-toolbar .production-class-trigger{height:var(--dropdown-height);min-height:var(--dropdown-height);padding:10px 40px 10px 11px;border-color:var(--dropdown-border);border-radius:var(--dropdown-radius)}
.pack-measure select{padding-left:6px;padding-right:28px;background-position:right 5px center}
.upload-form select,.upload-form input[type=file]{height:var(--dropdown-height);min-height:var(--dropdown-height);max-height:var(--dropdown-height)}
.upload-form input[type=file]{padding:7px 11px}

.btn.danger{color:#a02f3b;border-color:#d6aeb2;background:#fff}.btn.danger:hover:not(:disabled){background:#fff3f4;border-color:#a02f3b}.btn.danger:disabled{color:#887e79;border-color:#dcd2cd;opacity:.65;cursor:not-allowed}

.order-bundle{border:1px solid #d8c3c8;background:#fcf8f9;border-radius:10px;padding:18px;margin:16px 0}.order-bundle h3{margin:0 0 7px}.bundle-components{display:grid;gap:10px;margin:14px 0}.bundle-components>div{display:grid;grid-template-columns:1fr auto;gap:3px 12px}.bundle-components .code{grid-column:1/-1}.bundle-components strong{font-size:14px}.bundle-components>div>span:last-child{white-space:nowrap}.bundle-link{margin:-4px 0 18px;padding:0 0 14px;border-bottom:1px solid #eee3df}.bundle-link>summary{cursor:pointer;color:#77545d;font-weight:600;padding:10px 0}.bundle-create-form{background:#fcf8f9;border:1px solid #eadbdf;border-radius:10px;padding:16px;margin-top:6px}.bundle-create-form>p{margin:0}.bundle-edit-form .row-actions{margin-top:12px}@media(max-width:600px){.order-bundle{padding:14px}.bundle-components>div{grid-template-columns:1fr}.bundle-components .code{grid-column:auto}}

.document-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,220px) 120px;align-items:start;gap:12px 18px}.document-row>details{min-width:0}.document-row>details>summary{box-sizing:border-box;min-height:48px;padding:14px 0;cursor:pointer}.document-row>.btn{width:120px;max-width:100%;min-width:0;margin:0}.document-row form{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.document-row form>.btn{width:100%;min-width:0;max-width:none}.document-row form select{width:100%;min-width:0}.document-row>div:first-child{padding-top:8px}@media(max-width:680px){.document-row{grid-template-columns:minmax(0,1fr) minmax(0,120px);gap:6px 14px}.document-row>div:first-child{grid-column:1/-1;padding-top:0}.document-row>details{grid-column:1}.document-row>.btn{grid-column:2}.document-row form{max-width:220px}}

.row-actions>.print-order-button{margin-left:0}.row-actions>.edit-order-button{margin-left:auto}

.section-title:has(> .row-actions > [data-action="delete-draft"]){align-items:center;gap:16px}.section-title:has(> .row-actions > [data-action="delete-draft"])>h2{margin:0}.section-title:has(> .row-actions > [data-action="delete-draft"])>.row-actions{align-items:center;gap:10px 14px;max-width:100%;margin-left:auto}.section-title:has(> .row-actions > [data-action="delete-draft"])>.row-actions>span{min-width:0;overflow-wrap:anywhere}@media(max-width:680px){.section-title:has(> .row-actions > [data-action="delete-draft"])>.row-actions{width:100%}.section-title:has(> .row-actions > [data-action="delete-draft"])>.row-actions>span{flex-basis:100%}.section-title:has(> .row-actions > [data-action="delete-draft"]) [data-action="delete-draft"]{margin-left:auto}}

.section-title:has(> .row-actions > [data-action="delete-draft"]) [data-action="delete-draft"]{margin-left:auto}

.order-delivery-form{padding:16px;margin:16px 0;border:1px solid #e7d8d2;border-radius:10px;background:#fcf9f7}.order-delivery-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:center}.order-delivery-fields .field{min-width:0}.order-delivery-fields .urgency-option{display:flex;align-items:center;gap:9px;font-size:14px;line-height:1.4;color:#40312d;cursor:pointer}.order-delivery-fields input[type=checkbox]{width:18px;height:18px;min-height:18px;padding:0;margin:0;flex:none;accent-color:#a13f4e}.order-delivery-form>.btn{margin-top:12px}.pill.urgent-order{background:#efe5fa;color:#6b3696;font-weight:700}.pill.shipping-method{background:#eaf0f5;color:#435b70}.order-delivery-badges{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.order-summary .pill{margin:2px}@media(max-width:600px){.order-delivery-fields{grid-template-columns:1fr}.order-delivery-form{padding:14px}}

.overview-metrics{grid-template-columns:repeat(8,minmax(145px,1fr))}.topbar .app-wordmark{font-size:12px;letter-spacing:.16em;color:#966b74;font-weight:700}

.overview-selection-head>.btn{width:auto;min-width:88px;max-width:120px;flex-shrink:0}.overview-selection-head>h2{min-width:0;overflow-wrap:anywhere}

.order-footer-actions>.order-edit-actions{margin-left:auto;max-width:100%;min-width:0;justify-content:flex-end}.order-edit-actions>.edit-order-button{margin-left:0}.order-edit-actions>#order-delete-reason{flex-basis:100%;max-width:486px;text-align:right}

/* Shared line icons for disclosure, navigation, dropdowns and sorting. */
:root{--dropdown-arrow:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2020%2020'%20fill%3D'none'%20stroke%3D'%23746a66'%20stroke-width%3D'1.7'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'm5%207%205%205%205-5'%2F%3E%3C%2Fsvg%3E");--dropdown-arrow-up:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2020%2020'%20fill%3D'none'%20stroke%3D'%23746a66'%20stroke-width%3D'1.7'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'm5%2012%205-5%205%205'%2F%3E%3C%2Fsvg%3E");--summary-chevron:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2020%2020'%20fill%3D'none'%20stroke%3D'%23746a66'%20stroke-width%3D'1.7'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'm7%205%205%205-5%205'%2F%3E%3C%2Fsvg%3E")}
.ui-arrow{display:inline-block;width:18px;height:18px;min-width:18px;flex:0 0 18px;vertical-align:middle;color:inherit;pointer-events:none}
.order-summary>span[aria-hidden="true"],.article-list-arrow{justify-self:end;color:#8a747a;line-height:0}
.supplier-order-link>span[aria-hidden="true"]{display:inline-flex;align-items:center;color:#8a747a}
.production-sort{min-width:max-content}
.production-sort-mark{display:inline-flex;align-items:center;line-height:0}
details>summary:not(.btn){display:block;position:relative;list-style:none;padding-left:24px}
details>summary.btn.btn{position:relative;list-style:none;padding-left:34px}
details>summary::marker{content:""}details>summary::-webkit-details-marker{display:none}
details>summary::before{content:"";position:absolute;left:0;top:50%;width:16px;height:16px;background-color:currentColor;-webkit-mask:var(--summary-chevron) center/16px 16px no-repeat;mask:var(--summary-chevron) center/16px 16px no-repeat;transform:translateY(-50%) rotate(0);transition:transform .16s ease;pointer-events:none}
details[open]>summary::before{transform:translateY(-50%) rotate(90deg)}
details>summary.btn::before{left:12px}
.supplier-article>summary .sub{margin-left:0}
.dropdown-toggle::after{transition:transform .16s ease}
.supplier-combobox-control>input[aria-expanded="true"]+.dropdown-toggle::after{transform:rotate(180deg)}
.production-class-trigger[aria-expanded="true"]{background-image:var(--dropdown-arrow-up)}
@media(prefers-reduced-motion:reduce){details>summary::before,.dropdown-toggle::after{transition:none}}

/* All native selects use the same popup surface as searchable supplier menus. */
.select-dropdown{position:relative;min-width:0;width:100%}.select-dropdown>select[hidden]{display:none!important}
.select-trigger{box-sizing:border-box;display:block;width:100%;min-width:0;height:var(--dropdown-height);min-height:var(--dropdown-height);border:1px solid var(--dropdown-border);border-radius:var(--dropdown-radius);background:#fff var(--dropdown-arrow) no-repeat right 11px center/18px 18px;color:#2a2421;font-size:16px;font-weight:400;line-height:18px;padding:10px 40px 10px 11px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.select-trigger:hover{border-color:#bcaeaa}.select-trigger:focus-visible{border-color:#b58d97;outline:2px solid #d8aab2;outline-offset:1px}.select-trigger[aria-expanded=true]{background-image:var(--dropdown-arrow-up)}.select-trigger:disabled{background-color:#f5f1ef;color:#948984;cursor:not-allowed;opacity:1}
.select-options{position:fixed;right:auto;z-index:1000;margin:0;overscroll-behavior:contain;font-size:16px;font-weight:400;text-align:left}.select-options button:disabled{cursor:not-allowed;opacity:.45}.select-options button:focus-visible{outline:2px solid #d8aab2;outline-offset:-2px}.select-group-label{padding:9px 12px 4px}.select-error{display:block;margin-top:6px}.select-error[hidden]{display:none}
.pack-measure .select-trigger{padding-left:6px;padding-right:28px;background-position:right 5px center}.select-dropdown:has(select[aria-label]){max-width:100%}
.order-list-toolbar{display:grid;grid-template-columns:minmax(130px,1fr) minmax(145px,1fr) minmax(150px,1fr) minmax(210px,1.3fr) minmax(200px,1.5fr);gap:12px}.order-list-toolbar>.field{min-width:0}.order-date-toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding-bottom:18px;margin-bottom:18px;border-bottom:1px solid #eee5e1}.order-date-toolbar .order-sort-field{min-width:240px}.order-date-toolbar>.btn{margin-left:auto}
.order-list-summary{grid-template-columns:minmax(180px,1.3fr) minmax(150px,1fr) minmax(170px,1.1fr) minmax(160px,1fr) 18px}.order-list-summary>div{min-width:0;overflow-wrap:anywhere}.order-created-info .sub:first-child{margin-top:0}.order-created-info .small{display:block;margin-top:3px}
@media(max-width:1350px){.order-list-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.order-list-toolbar>.order-supplier-field{grid-column:1/-1}.order-list-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.order-list-summary>span:last-child{display:none}}
@media(max-width:600px){.order-list-toolbar .order-number-field{grid-column:1/-1}.order-list-toolbar>.field:has(#order-status){grid-column:1/-1}.order-list-toolbar{gap:12px 10px}.order-date-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.order-date-toolbar>.field{min-width:0}.order-date-toolbar>.order-sort-field{grid-column:1/-1;min-width:0}.order-date-toolbar>.btn{grid-column:1/-1;justify-self:end}.order-list-summary{grid-template-columns:1fr}.order-created-info{padding-top:10px;border-top:1px solid #eee5e1}}
.order-updated-info .sub:first-child{margin-top:0}.order-updated-info .small{display:block;margin-top:3px}
@media(min-width:1351px){.order-list-summary{grid-template-columns:minmax(160px,1.2fr) minmax(130px,1fr) minmax(160px,1fr) minmax(160px,1fr) minmax(150px,1fr) 18px}}
@media(max-width:600px){.order-updated-info{padding-top:10px;border-top:1px solid #eee5e1}}

.document-check.optional{background:#faf8f6;border-color:#e8e0dc}
.order-audit-info{display:grid;gap:10px}.order-audit-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px}.order-audit-info .small{margin-top:0}.order-audit-info .order-created-info,.order-audit-info .order-updated-info{padding:0;border:0}
@media(min-width:1351px){.order-list-summary{grid-template-columns:minmax(150px,1fr) minmax(130px,.9fr) minmax(478px,2.4fr) minmax(150px,.9fr) 18px}}
@media(max-width:1350px){.order-audit-info{grid-column:1/-1}}

@media(min-width:1351px){.order-list-summary .order-audit-info{padding-left:48px}}

@media(min-width:1351px){.order-list-summary{grid-template-columns:minmax(220px,1.8fr) minmax(160px,.9fr) minmax(400px,2fr) minmax(100px,.7fr) 18px}.order-list-summary .order-audit-info{padding-left:0}}

.order-supplier-info .order-audit-info{margin-top:10px;padding-left:0;gap:5px;color:#887e79}
.order-supplier-info .order-audit-row{color:inherit;gap:3px 8px}
.order-supplier-info .order-audit-row>span{color:inherit}
@media(min-width:1351px){.order-list-summary{grid-template-columns:minmax(440px,2.5fr) minmax(180px,1fr) minmax(150px,1fr) 18px}}

.books-article-picker .field{margin-bottom:16px}.books-article-list{max-height:440px;overflow:auto}.books-article-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;padding:14px 0;border-bottom:1px solid #eee5e1}.books-article-row>div{min-width:0;overflow-wrap:anywhere}.books-article-row strong{display:block}.books-article-row .btn{min-width:140px;width:auto}@media(max-width:600px){.books-article-row{grid-template-columns:1fr;gap:10px}.books-article-row .btn{justify-self:start}.books-article-picker .section-title{align-items:start}}

.books-article-row .sub{display:block}

.draft-line-item{padding:14px 0;border-bottom:1px solid #eee5e1}
.draft-line-item .draft-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;align-items:end;padding:0;border:0}
.draft-line-item .draft-row>div:first-child{grid-column:1/-1;align-items:baseline;gap:4px 10px;margin:0;min-width:0}
.draft-line-item .draft-row strong{font-size:.9rem;overflow-wrap:anywhere}
.draft-line-item .draft-row>.form-grid{grid-template-columns:minmax(160px,1fr) minmax(75px,.55fr) minmax(100px,1fr);gap:10px;min-width:0}
.draft-line-item .draft-row .field{min-width:0;gap:4px}
.draft-line-item .draft-row .pack-measure{grid-template-columns:minmax(64px,1fr) 74px;gap:6px}
.draft-line-item .draft-row .row-actions{margin:0;gap:6px;flex-wrap:nowrap}
.draft-line-item .draft-row .quantity-preview{font-size:.85rem;white-space:nowrap;margin-right:6px}
.draft-line-item .draft-row .btn{width:auto;min-width:0;min-height:40px;height:40px;padding:9px 12px;font-size:.8rem;white-space:nowrap}
.draft-line-item .draft-row input{min-width:0}
.draft-line-item .bundle-link{margin:7px 0 0;padding:0;border:0}
.draft-line-item .bundle-link>summary{padding:4px 0 4px 24px;font-size:.78rem;font-weight:500}
@media(min-width:1351px){.draft-line-item .draft-row{grid-template-columns:minmax(180px,1fr) minmax(360px,1.6fr) 300px;gap:16px;align-items:center}.draft-line-item .draft-row>div:first-child{grid-column:auto;display:grid;gap:4px}.draft-line-item .draft-row .row-actions{align-self:end;display:grid;grid-template-columns:minmax(0,1fr) 102px 78px;width:100%}.draft-line-item .draft-row .quantity-preview{white-space:normal;margin:0}}
@media(max-width:1100px){.draft-line-item .draft-row>.form-grid{grid-column:1/-1}.draft-line-item .draft-row .row-actions{grid-column:1/-1}.draft-line-item .draft-row .quantity-preview{margin-right:auto}}
@media(max-width:600px){.draft-line-item .draft-row{gap:10px}.draft-line-item .draft-row>.form-grid{grid-template-columns:minmax(0,1fr) minmax(80px,.65fr);gap:8px}.draft-line-item .draft-row>.form-grid>.field:last-child{grid-column:1/-1}.draft-line-item .draft-row .row-actions{flex-wrap:wrap}.draft-line-item .draft-row .btn{min-height:44px;height:44px}.draft-line-item .draft-row .quantity-preview{font-size:.8rem}.draft-line-item .bundle-link>summary{padding:6px 0 6px 24px}}

@media(min-width:1101px){.order-delivery-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:18px}.order-delivery-form .order-delivery-fields{grid-template-columns:minmax(180px,.7fr) minmax(180px,1fr)}.order-delivery-form .urgency-field{min-height:40px;display:flex;align-items:center}.order-delivery-form>.btn{margin:0;min-width:160px;width:auto;min-height:40px}}

.books-draft-editor{margin-top:18px}.books-draft-editor>summary{cursor:pointer;font-weight:600;margin-bottom:14px}.books-draft-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin-bottom:14px}.books-draft-prices input{width:130px;max-width:100%}.books-draft-prices{min-width:480px}.books-draft-editor form>.table-wrap{margin:16px 0}.books-draft-editor .row-actions [role=status]{overflow-wrap:anywhere}
@media(max-width:600px){.books-draft-fields{grid-template-columns:1fr}.books-draft-editor form>.btn{width:100%}}

.books-draft-prices .sub{display:block;margin-top:4px}.books-draft-prices td>label{display:block;margin-bottom:6px}.books-draft-fields{align-items:end}.books-draft-fields label{min-height:28px}
@media(max-width:600px){.books-draft-prices{min-width:0}.books-draft-prices thead{display:none}.books-draft-prices tbody,.books-draft-prices tr,.books-draft-prices td{display:block;width:auto!important;min-width:0!important;max-width:none!important}.books-draft-prices tr{padding:14px 0;border-bottom:1px solid var(--line,#eadfda)}.books-draft-prices td{padding:4px 0!important;border:0!important;white-space:normal!important}.books-draft-prices td:nth-child(2)::before{content:"Saabunud: ";color:#776a64}.books-draft-prices input{width:100%}.books-draft-fields label{min-height:0}}

.receipt-cost-table{min-width:1000px;table-layout:auto}.receipt-cost-table th{white-space:normal;line-height:1.4;min-width:110px}.receipt-cost-table td{vertical-align:top}.receipt-cost-table td:first-child{min-width:175px}.receipt-cost-table .sub{display:block;margin-top:5px}.receipt-cost-table input{width:120px;max-width:100%}.receipt-cost-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:12px;margin:20px 0 12px}.receipt-cost-tiles>div{padding:15px;border:1px solid #eadfda;border-radius:10px;background:#faf7f5}.receipt-cost-tiles span{display:block;font-size:12px;color:#746860;margin-bottom:10px}.receipt-cost-tiles strong{display:block;font-size:19px}.receipt-cost-tiles .receipt-cost-grand{background:#302b29;color:#fff;border-color:#302b29}.receipt-cost-grand span{color:#eee1db}.receipt-rate-proof{display:flex;flex-wrap:wrap;gap:10px 20px;padding:14px 16px;border-radius:9px;background:#f1f6f3;margin:16px 0;font-size:13px}.receipt-rate-proof span{display:block}.receipt-cost-facts{display:flex;gap:14px 30px;flex-wrap:wrap;margin:18px 0}.receipt-cost-facts span{color:#746860}.receipt-cost-facts strong{color:#302b29;margin-left:6px}.books-cost-actions{margin-top:18px}.books-draft-editor h3{margin:24px 0 12px}.books-draft-editor .receipt-cost-table{margin-top:18px}
@media(max-width:650px){.receipt-cost-tiles{grid-template-columns:1fr 1fr}.receipt-cost-tiles .receipt-cost-grand{grid-column:1/-1}.receipt-cost-table{min-width:0!important}.receipt-cost-table thead{display:none}.receipt-cost-table tbody,.receipt-cost-table tr,.receipt-cost-table td{display:block;width:auto!important;min-width:0!important;max-width:none!important}.receipt-cost-table tr{padding:16px 0;border-bottom:1px solid #eadfda}.receipt-cost-table td{padding:5px 0!important;white-space:normal!important;border:0!important}.receipt-cost-table td:not(:first-child)::before{content:attr(data-label) ': ';font-size:12px;color:#746860}.receipt-cost-table input{width:100%}.receipt-cost-table td:nth-child(2)::before{content:attr(data-label) ': '}.receipt-rate-proof{display:block;line-height:1.7}.books-cost-actions>.btn{width:100%}}

.receipt-document-sources{margin:18px 0 24px;padding:18px;border:1px solid #e7ddd7;border-radius:10px;background:#fcfaf8}.receipt-document-sources h4{margin:0 0 12px}.receipt-document-sources .section-title{align-items:center}.receipt-document-warnings{margin:16px 0;padding:14px 16px;background:#fff3dc;border:1px solid #efd6a3;border-radius:8px;line-height:1.6}.receipt-document-warnings ul{margin:8px 0 0;padding-left:20px}.receipt-document-costs{min-width:800px;font-size:12px}.receipt-document-costs td:first-child{max-width:280px;white-space:normal;overflow-wrap:anywhere}.receipt-document-costs .sub{display:block}.receipt-document-proof{margin-top:15px}.receipt-document-proof summary{cursor:pointer;font-size:13px;font-weight:600}.receipt-document-proof dl>div{padding:10px 0;border-bottom:1px solid #eadfda}.receipt-document-proof dt{font-weight:600;font-size:12px}.receipt-document-proof dd{margin:5px 0;font-size:12px;overflow-wrap:anywhere}.receipt-document-proof .sub{display:block}.receipt-document-review{display:flex!important;align-items:flex-start;gap:10px;padding:15px 0 0;font-weight:600;font-size:13px;line-height:1.5}.receipt-document-review input{width:18px!important;height:18px;min-width:18px;margin-top:2px;accent-color:#765249}.receipt-document-sources .row-actions{margin-bottom:12px}
@media(max-width:650px){.receipt-document-sources{padding:13px}.receipt-document-sources .row-actions>.btn{width:100%}.receipt-document-warnings{font-size:12px}.receipt-document-costs{min-width:760px}}


.books-draft-fields{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 16px;align-items:start}.books-draft-fields>.field{min-width:0;grid-template-columns:minmax(0,1fr)}.books-draft-fields>.field>label{min-height:34px;line-height:1.4;display:flex;align-items:end}.books-draft-fields input{width:100%;min-width:0;height:42px}.books-draft-fields .sub{line-height:1.5}.receipt-source-subheading{margin-top:24px!important}.receipt-document-costs th{white-space:normal;min-width:100px}.receipt-document-costs th:first-child{min-width:240px}.receipt-document-costs td:not(:first-child){white-space:nowrap;font-variant-numeric:tabular-nums}.receipt-cost-lines{margin-top:10px}.receipt-cost-lines summary{cursor:pointer;font-size:12px;font-weight:600;line-height:1.5}.receipt-cost-lines .table{min-width:520px;margin-top:10px}.receipt-cost-lines .table td:first-child{max-width:none;min-width:260px}.receipt-cost-lines .table th,.receipt-cost-lines .table td{font-size:11px;padding:8px;white-space:normal}.receipt-excluded-tax{color:#877a74;background:#f3efec}.receipt-invoice-comparison{padding:18px;background:#fff;border:1px solid #e7ddd7;border-radius:8px;margin:20px 0}.receipt-invoice-comparison .table{min-width:520px;margin-bottom:14px}.receipt-invoice-comparison .table th{white-space:normal;min-width:140px}.receipt-invoice-comparison .table td{font-variant-numeric:tabular-nums}.receipt-invoice-comparison p:last-child{margin-bottom:0}
@media(max-width:1150px){.books-draft-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.books-draft-fields{grid-template-columns:minmax(0,1fr);gap:16px}.books-draft-fields>.field>label{min-height:0}.receipt-invoice-comparison{padding:12px}}

.receipt-cost-lines{padding:12px 0;border-top:1px solid #e7ddd7}.receipt-cost-lines summary{overflow-wrap:anywhere}.receipt-cost-lines .table{font-size:12px}.receipt-cost-lines .table td:nth-child(2){width:140px;font-variant-numeric:tabular-nums}.receipt-cost-lines .table td:last-child{width:190px}
@media(max-width:650px){.receipt-document-costs,.receipt-document-costs tbody,.receipt-document-costs tr{display:block;min-width:0!important;width:100%}.receipt-document-costs thead{display:none}.receipt-document-costs tr{padding:12px 0;border-bottom:1px solid #e7ddd7}.receipt-document-costs td{display:flex;justify-content:space-between;gap:16px;border:0!important;padding:5px 0;white-space:normal!important;max-width:none!important}.receipt-document-costs td:first-child{display:block;font-weight:600;padding-bottom:10px}.receipt-document-costs td[data-label]::before{content:attr(data-label);font-weight:400;color:#786b66;max-width:70%}.receipt-document-costs td[data-label="Arvestusse kokku"]{font-weight:700}.receipt-invoice-comparison .table,.receipt-invoice-comparison tbody{display:block;min-width:0;width:100%}.receipt-invoice-comparison thead{display:none}.receipt-invoice-comparison tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px;border-bottom:1px solid #e7ddd7}.receipt-invoice-comparison .table th{grid-column:1/-1;min-width:0;padding:12px 0 8px;border:0}.receipt-invoice-comparison .table td{min-width:0;padding:0 0 12px;border:0;overflow-wrap:anywhere}.receipt-invoice-comparison td::before{content:attr(data-source);display:block;font-size:10px;font-weight:400;color:#877a74;margin-bottom:5px}.receipt-cost-lines .table,.receipt-cost-lines tbody,.receipt-cost-lines tr{display:block;min-width:0;width:100%}.receipt-cost-lines thead{display:none}.receipt-cost-lines tr{padding:10px 0;border-bottom:1px solid #e7ddd7}.receipt-cost-lines .table td{display:block;width:auto!important;min-width:0!important;max-width:none!important;border:0;padding:4px}.receipt-cost-lines td[data-label]::before{content:attr(data-label) ': ';color:#877a74}}


.receipt-editor-title{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin:24px 0 10px}.receipt-editor-title h3{margin:0}.receipt-editor-title>span{max-width:60%;text-align:right}.books-draft-editor .books-draft-fields{gap:12px 16px;margin-bottom:10px}.books-draft-fields>.field>label{min-height:28px}.books-warehouse-field{position:relative}.receipt-warehouse-load{position:absolute;top:11px;right:0;font-size:11px}.books-warehouse-field>.sub:empty{display:none}.receipt-tax-note{margin:0 0 14px;font-size:11px}.books-draft-editor .receipt-cost-table{min-width:650px;margin-top:10px}.books-draft-editor .receipt-cost-table th{min-width:0}.books-draft-editor .receipt-cost-table td:first-child{width:40%}.books-draft-editor .receipt-cost-table input{width:120px}.receipt-final-total{display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid #e7ddd7;padding:18px 0 12px;margin-top:8px}.receipt-final-total>div{display:flex;align-items:baseline;gap:18px}.receipt-final-total span{font-size:13px;color:#766a65}.receipt-final-total strong{font-size:25px;font-weight:650;letter-spacing:-.03em;white-space:nowrap}.receipt-final-total p{margin:0;text-align:right;font-size:11px}.receipt-final-total a{margin-left:8px}.receipt-calculation-details{font-size:12px;margin:4px 0 16px}.receipt-calculation-details>summary{cursor:pointer;color:#79575f;font-weight:600}.receipt-calculation-details>p{margin:14px 0}.receipt-allocation-table{min-width:480px;font-size:12px}.receipt-allocation-table td,.receipt-allocation-table th{padding:8px}.receipt-document-sources{padding:0;margin:12px 0;background:transparent;border:1px solid #e7ddd7;border-radius:8px}.receipt-document-sources>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer;padding:12px 14px;font-size:12px;font-weight:600;list-style:none}.receipt-document-sources>summary::-webkit-details-marker{display:none}.receipt-document-sources>summary>span:first-child::before{content:'›';display:inline-block;width:16px;font-size:17px;line-height:12px;vertical-align:baseline}.receipt-document-sources[open]>summary>span:first-child::before{transform:rotate(90deg)}.receipt-source-status{font-size:11px;font-weight:400;color:#887c75}.receipt-source-status.needs-review{color:#94621e;background:#fff3dc;border-radius:12px;padding:3px 9px}.receipt-source-content{padding:4px 14px 14px;border-top:1px solid #eee7e2;background:#fcfaf8}.receipt-source-content .receipt-document-warnings{padding:9px 12px;margin:12px 0}.receipt-source-content .receipt-document-warnings ul{margin:0}.receipt-document-review{padding:10px 0 0;font-size:12px;font-weight:500}.books-cost-actions{margin-top:16px}.books-cost-actions .btn{min-width:170px}.books-cost-actions+p{margin:8px 0 0;font-size:11px}.receipt-source-content .receipt-invoice-comparison{margin:14px 0}
@media(max-width:650px){.receipt-editor-title{display:block}.receipt-editor-title>span{display:block;text-align:left;max-width:none;margin:7px 0 0}.books-draft-editor .receipt-cost-table{min-width:0}.books-draft-editor .receipt-cost-table input{width:100%}.receipt-final-total{display:block;padding:16px 0 8px}.receipt-final-total>div{display:flex;justify-content:space-between;gap:10px}.receipt-final-total strong{font-size:23px}.receipt-final-total p{text-align:left;margin-top:9px;line-height:1.6}.receipt-document-sources>summary{padding:12px}.receipt-source-content{padding:4px 12px 12px}.books-cost-actions .btn{flex:1 1 100%;width:100%}.receipt-document-review{line-height:1.5}.books-draft-fields>.field>label{min-height:0}.receipt-warehouse-load{top:0}}

.receipt-document-sources>summary>span:first-child::before{content:none}.receipt-document-sources>summary{padding-left:26px}.receipt-document-sources>summary::before{left:6px}

.receipt-document-costs.receipt-invoice-totals{min-width:0;width:100%;font-size:13px}.receipt-invoice-totals th:first-child,.receipt-invoice-totals td:first-child{min-width:0;max-width:none;width:60%}.receipt-invoice-totals th:last-child,.receipt-invoice-totals td:last-child{text-align:right;width:40%}.receipt-invoice-totals th{min-width:0}.receipt-invoice-totals td{padding:12px}.receipt-invoice-totals td:last-child{font-weight:600}
@media(max-width:650px){.receipt-document-costs.receipt-invoice-totals{display:table!important}.receipt-invoice-totals thead{display:table-header-group!important}.receipt-invoice-totals tbody{display:table-row-group!important}.receipt-invoice-totals tr{display:table-row!important}.receipt-invoice-totals th,.receipt-invoice-totals td{display:table-cell!important;padding:10px 6px!important;white-space:normal!important}.receipt-invoice-totals td::before{content:none!important}.receipt-invoice-totals td:first-child{font-weight:400}.receipt-invoice-totals td:last-child{white-space:nowrap!important}}

.receipt-unit-price{display:flex;align-items:center;gap:8px}.receipt-unit-price>input{min-width:0;flex:0 1 120px}.receipt-unit-price>[data-invoice-currency]{flex:none;white-space:nowrap;font-size:12px}

.books-draft-editor .books-draft-prices td{vertical-align:middle}.books-draft-editor .books-draft-fields{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start}.books-draft-editor .books-draft-fields .select-trigger{height:42px}.receipt-final-total{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px}.receipt-final-total>div{justify-content:center;flex-wrap:wrap}.receipt-final-total p{text-align:center;margin:0}@media(max-width:650px){.books-draft-editor .books-draft-fields{grid-template-columns:minmax(0,1fr)}.receipt-final-total{display:flex}.receipt-final-total>div{justify-content:center}.receipt-final-total p{text-align:center}}

.receipt-final-total{flex-direction:row;justify-content:space-between;align-items:center;text-align:left;gap:20px}.receipt-final-total>div{justify-content:flex-start;align-items:center;flex-wrap:nowrap}.receipt-final-total p{text-align:right}@media(max-width:650px){.receipt-final-total{flex-direction:column;align-items:stretch;gap:8px}.receipt-final-total>div{justify-content:flex-start;align-items:center;gap:12px}.receipt-final-total p{text-align:left}}

@media(min-width:651px) and (max-width:1000px){.books-draft-editor .books-draft-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}

.receipt-document-numbers{display:flex;flex-wrap:wrap;gap:8px 26px;margin:8px 0 18px;font-size:12px;color:#766a65}.receipt-document-numbers strong{color:#302b29;font-weight:600;margin-left:6px;overflow-wrap:anywhere}.receipt-date-picker{position:relative;min-width:0}.receipt-date-picker>input[type=text]{padding-right:42px}.receipt-calendar-button{position:absolute;right:0;top:0;width:42px;height:42px;border:0;background:transparent;display:flex;align-items:center;justify-content:center;color:#302b29;cursor:pointer}.receipt-date-picker>.receipt-native-date{position:absolute;width:1px;height:1px;min-width:0;opacity:0;pointer-events:none;left:0;top:0;padding:0;border:0}.books-draft-editor .receipt-document-review{align-items:center}.books-draft-editor .receipt-document-review input{margin-top:0}@media(max-width:650px){.receipt-document-numbers{display:grid;gap:8px}}

.books-draft-editor .receipt-document-review input[type=checkbox]{margin:0}

.email-draft-panel .html-draft-preview{position:relative;padding-top:36px;border:1px solid #e9e2de;border-radius:8px;background:white}.email-draft-panel .html-draft-preview iframe{border:0;border-radius:0 0 8px 8px}.html-draft-preview>.draft-copy-icon{position:absolute;right:6px;top:4px;z-index:1}.email-text-editor .row-actions{margin-top:4px}

.books-draft-editor .manual-receipt-lines td:first-child{width:27%}.books-draft-editor .manual-receipt-lines input{width:100%;min-width:70px}.manual-receipt-lines th:nth-child(2),.manual-receipt-lines td:nth-child(2){width:100px}.manual-receipt-lines th:nth-child(3),.manual-receipt-lines td:nth-child(3){width:80px}.receipt-comment-field{grid-column:span 2}@media(max-width:650px){.receipt-comment-field{grid-column:auto}.books-draft-editor .manual-receipt-lines td:first-child{width:auto}}

@media(min-width:651px){.books-draft-editor .manual-receipt-lines td{vertical-align:top}.books-draft-editor .manual-receipt-lines [data-cost-field]{display:inline-flex;align-items:center;min-height:42px;white-space:nowrap}}

/* Manager module selection; Purchase retains its existing views. */
.sidebar-module{padding:0 14px;margin:0 0 -12px;font-size:10px;letter-spacing:.15em;color:#88716a;font-weight:700}
.current-module{font-size:12px;color:#766a65;margin-left:auto}
.manager-home{max-width:none;margin:0}.manager-intro{margin-bottom:32px}.manager-intro h1{margin-bottom:12px}.manager-intro .lead{margin-bottom:0}
.manager-modules{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.manager-module{padding:28px;display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:290px}.manager-module-head{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:26px}.manager-module-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:12px;background:#f5ece9;color:#8e626d}.manager-module-icon svg{width:27px;height:27px}.manager-module h2{font-size:24px;margin-bottom:10px}.manager-module p{font-size:14px;line-height:1.6;flex:1;margin-bottom:24px}.manager-module-open{display:inline-flex;align-items:center;gap:16px}.manager-module--planned{background:#fbf9f7}.manager-module--planned .manager-module-icon{background:#f0ece9;color:#8a807a}.manager-module-pending{font-size:13px;color:#847872;min-height:42px;display:flex;align-items:center}.nav button[data-view=modules]{margin-bottom:10px}
@media(max-width:760px){.manager-home{margin-top:0}.manager-intro{margin-bottom:24px}.manager-modules{grid-template-columns:1fr;gap:16px}.manager-module{padding:24px;min-height:260px}.manager-module-head{margin-bottom:20px}.current-module{margin-left:0}.topbar .app-wordmark{font-size:10px;letter-spacing:.11em}.manager-module-open{width:100%;justify-content:space-between}}

/* Module navigation belongs to the top-right toolbar on every screen. */
.topbar .module-switcher{display:inline-flex;align-items:center;justify-content:center;flex:none;margin-left:auto;min-height:38px;padding:8px 13px;border:1px solid #e5d7d3;border-radius:9px;background:#fff;color:#574b47;font-size:13px;font-weight:600;white-space:nowrap}
.topbar .module-switcher:hover,.topbar .module-switcher[aria-current=page]{background:#f8eff0;border-color:#d5b4bd}
.topbar .module-switcher:focus-visible{outline:2px solid #a46c79;outline-offset:3px}
@media(max-width:760px){.topbar{gap:10px}.topbar .module-switcher{order:2;padding:8px 10px;font-size:12px}.topbar .mobile-menu-button{order:3;margin-left:0}}
