/* Only the two owner portals share these header measurements. */
@media screen {
 #owner-workspace .aw-title,.production-page .production-title-group{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 18px;min-width:0}
 #owner-workspace .aw-cycle-week,.production-page .production-cycle-week{font:700 18px/1.4 'Work Sans',Arial,sans-serif;color:var(--green);white-space:nowrap}
 .production-header-frame{display:flow-root;max-width:1240px;margin-inline:auto;padding-inline:30px}
 html body #owner-workspace .jj-owner-header,
 html body.production-page .jj-owner-header{
  display:flex;align-items:center;gap:14px;min-height:76px;
  width:auto;max-width:none;padding:12px 24px;margin:0 0 20px;
 }
 html body #owner-workspace .jj-owner-header h1,
 html body.production-page .production-header.jj-owner-header .plan-title{margin:0;font:400 40px/1.2 'Capriola','Trebuchet MS',sans-serif}
 html body .jj-owner-header .jj-owner-header-actions{
  display:grid;grid-template-columns:repeat(3,160px);align-items:stretch;
  gap:10px;width:auto;margin:0 0 0 auto;
 }
 html body #owner-workspace .jj-owner-header-actions{grid-template-columns:repeat(2,160px)}
 html body .shell #owner-workspace .jj-owner-header .jj-owner-header-actions .button,
 html body.production-page .jj-owner-header .jj-owner-header-actions :is(#production-invoices,#production-log,#save-production,#back-portal){
  display:flex;align-items:center;justify-content:center;box-sizing:border-box;
  width:100%!important;min-width:0!important;max-width:100%;height:50px!important;min-height:50px!important;
  margin:0;padding:10px 8px!important;
  font:700 16px/1.4 'Work Sans',Arial,sans-serif!important;text-align:center;
  white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;hyphens:none;
 }
 .production-page>.inventory-shell{padding-top:0}
}
@media screen and (max-width:850px){
 #owner-workspace .aw-title{gap:4px 12px;margin-bottom:12px}
 html body #owner-workspace .jj-owner-header .aw-title h1{margin:0}
 #owner-workspace .aw-cycle-week,.production-page .production-cycle-week{font-size:14px}
 html body #owner-workspace .jj-owner-header,
 html body.production-page .jj-owner-header{display:block;min-height:0;padding:10px 12px;margin-bottom:14px}
 html body #owner-workspace .jj-owner-header h1,
 html body.production-page .production-header.jj-owner-header .plan-title{font-size:30px;margin-bottom:12px}
 html body .jj-owner-header .jj-owner-header-actions{
  grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;margin:0;
 }
 html body #owner-workspace .jj-owner-header-actions{
  grid-template-columns:repeat(2,minmax(0,1fr));width:calc(66.666667% - 2px);
 }
 html body .shell #owner-workspace .jj-owner-header .jj-owner-header-actions .button,
 html body.production-page .jj-owner-header .jj-owner-header-actions :is(#production-invoices,#production-log,#save-production,#back-portal){
  height:52px!important;min-height:52px!important;padding:8px 4px!important;
  font-size:13px!important;line-height:1.25!important;white-space:normal!important;
 }
}
@media screen and (max-width:760px){.production-header-frame{padding-inline:19px}}
@media screen and (max-width:420px){.production-header-frame{padding-inline:13px}}

/* The invoice shortcut joins only the Production header's existing actions. */
@media screen {
 html body.production-page .jj-owner-header .jj-owner-header-actions{
  grid-template-columns:repeat(4,160px);
  margin-inline-end:var(--production-header-action-inset,0px);
 }
 /* Match the Wholesale owner header actions, without changing their destinations. */
 html body.production-page .jj-owner-header .jj-owner-header-actions :is(#production-invoices,#production-log,#back-portal){
  border-radius:999px;box-shadow:none;
 }
 html body.production-page .jj-owner-header .jj-owner-header-actions :is(#production-invoices,#production-log){
  border-color:var(--portal-yellow-line,#d4b754);background:var(--portal-yellow,#ffe27a);color:var(--green);
 }
 html body.production-page .jj-owner-header .jj-owner-header-actions #back-portal{
  border-color:var(--copper);background:var(--copper);color:var(--white);
 }
}
@media screen and (max-width:1000px){
 html body.production-page .jj-owner-header{display:block;min-height:0;padding:10px 12px;margin-bottom:14px}
 .production-page .production-title-group{gap:4px 8px;margin-bottom:12px}
 html body.production-page .production-header.jj-owner-header .production-title-group .plan-title{margin:0}
 html body.production-page .jj-owner-header .jj-owner-header-actions{
  grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:auto;margin-inline-start:0;
 }
}
@media screen and (max-width:650px){
 html body.production-page .jj-owner-header .jj-owner-header-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
 html body.production-page .jj-owner-header .production-save-control{grid-column:1/-1}
}

/* The freezer assignment page hides the save status; keep its three actions in the rightmost tracks. */
@media screen and (min-width:651px){
 html body.production-page[data-production-panel="assignments"] .jj-owner-header .jj-owner-header-actions #production-invoices{grid-column:2}
}
