/* Shared compact layout. Text remains at its existing readable size. */
:root{--mes-control-height:40px}
body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=color]),body select{height:var(--mes-control-height)!important;min-height:var(--mes-control-height)!important;max-height:var(--mes-control-height)!important;box-sizing:border-box!important;padding-top:0!important;padding-bottom:0!important;line-height:normal!important;vertical-align:middle!important}
body textarea{box-sizing:border-box;min-height:80px;padding-top:10px;padding-bottom:10px}
body .card,body .staff-panel,body main>section:not(.intro):not(.cards):not(.source-grid),body .panel{padding:19.2px}
body .cards{gap:14.4px}body .fields,body .form-grid,body .staff-create{gap:12.8px}body .query,body .toolbar,body .data-actions{gap:8px}body .card{min-height:196px}body .intro{padding-top:32px;padding-bottom:24px}body .notice{margin-top:19.2px;margin-bottom:26.4px;padding:12.8px 15.2px}body .staff-panel{margin-bottom:19.2px}body main>section{margin-top:16px;margin-bottom:16px}
body #mesLanguage{position:fixed!important;top:8px!important;right:12px!important;z-index:10010!important}body #mesLanguage select{height:32px!important;min-height:32px!important;max-height:32px!important}
body #mesSyncStatus:not(.warning){display:none!important}
#mesMenuToggle{position:fixed;left:12px;top:8px;z-index:10009;width:44px;height:44px;padding:6px;border:1px solid #dbe5ef;border-radius:8px;background:#fff;cursor:pointer;display:grid;place-items:center}#mesMenuToggle img{width:30px;height:30px;object-fit:contain}
body.mes-has-menu>aside{z-index:10008;position:fixed!important;inset:0 auto 0 0!important;width:238px!important;height:100dvh;padding:64px 18.4px 28.8px!important;overflow:auto;transition:transform .18s ease}
body.mes-has-menu>main{transition:margin-left .18s ease;padding-top:56px!important}body.mes-menu-hidden>aside{transform:translateX(-100%);visibility:hidden}body.mes-menu-hidden>main{margin-left:0!important}
.mes-sort-button{font:inherit!important;font-weight:inherit!important;color:inherit!important;background:transparent!important;border:0!important;min-height:32px!important;padding:4px!important;text-align:inherit;cursor:pointer}.mes-sort-button:focus-visible{outline:2px solid #2265c9}
@media(max-width:700px){body.mes-has-menu>main{margin-left:0!important}body.mes-has-menu>aside nav{display:grid;overflow:visible}body.mes-has-menu>aside .brand{display:flex}body.mes-has-menu>aside .aside-foot{display:block}}
@media(prefers-reduced-motion:reduce){body.mes-has-menu>aside,body.mes-has-menu>main{transition:none}}
@media print{#mesMenuToggle,body.mes-has-menu>aside{display:none!important}body.mes-has-menu>main{margin-left:0!important;padding-top:0!important}}
body.mes-locked #mesMenuToggle{display:none}body #mesLanguage select{height:40px!important;min-height:40px!important;max-height:40px!important}

/* Language is part of the header flow, never a floating overlay. */
body #mesLanguage{position:static!important;inset:auto!important;z-index:auto!important;margin:0!important;box-shadow:none!important;width:auto!important;flex-direction:row!important}
.mes-header-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-basis:100%;width:100%;order:-1;position:static}
body>main>header,body>header{padding-top:12px!important}
#mesGate .mes-header-tools{margin-bottom:16px}
@media print{.mes-header-tools{display:none!important}}
/* One navigation logo: the menu toggle remains visible in both states. */
body.mes-has-menu>aside .brand>img.peak-shared-logo{display:none!important}

/* Keep header controls together, without reserved floating-control space. */
body.mes-has-menu>main{padding-top:0!important}
body>main>header,body>header,body .mes-simple-header{min-height:56px!important;height:auto!important;padding-top:8px!important;padding-bottom:8px!important;gap:8px 16px!important;flex-wrap:wrap!important;align-items:center!important}
body .mes-header-tools{width:auto;flex-basis:auto;order:0;margin-left:auto;gap:12px;flex-wrap:wrap}
body .mes-header-tools #mesAccount{flex-basis:auto!important;width:auto!important;min-width:0;justify-content:flex-end!important;gap:6px;margin:0;padding:0}
body .mes-header-tools #mesAccount .mes-link{display:inline-flex!important;align-items:center;width:auto!important;margin:0!important;white-space:nowrap}
body .mes-header-tools #mesAccount button{white-space:nowrap}
body .mes-header-tools #mesLanguage{padding:0 8px!important;flex-shrink:0}
body .intro{padding-top:16px!important;padding-bottom:16px!important;margin-top:0!important;margin-bottom:8px!important}
body.mes-menu-hidden>main>header{padding-left:24px}
@media(max-width:760px){body .mes-header-tools{gap:6px;margin-left:0;flex-basis:100%;justify-content:space-between}body .mes-header-tools #mesAccount{justify-content:flex-start!important;flex:1}body.mes-menu-hidden>main>header{padding-left:40px}body .intro{gap:10px!important}}

/* Center native date controls, including Safari/iPad date rendering. */
body input[type=date]{text-align:center!important;line-height:40px!important;align-items:center!important}
body input[type=date]::-webkit-datetime-edit{padding:0;line-height:40px;text-align:center}
body input[type=date]::-webkit-datetime-edit-fields-wrapper{padding:0}
body input[type=date]::-webkit-date-and-time-value{display:flex;align-items:center;justify-content:center;text-align:center;height:100%;margin:0}
body .mes-header-tools{order:10}

/* Header tools contain controls only, not a second login brand. */
body #mesGate .mes-header-tools>img.peak-shared-logo{display:none!important}
/* Reserve the fixed menu logo width in the collapsed header at every size. */
body.mes-menu-hidden>main>header{padding-left:64px!important;min-height:60px!important}
body.mes-has-menu>main{min-width:0}
body.mes-has-menu:not(.mes-menu-hidden)>main{margin-left:238px}
body>main>header>*{min-width:0}
body .mes-header-tools{max-width:100%;min-width:0}
@media(max-width:900px){
 body.mes-has-menu>aside{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;max-height:none!important;padding:60px 18px 16px!important;transform:none!important;overflow:visible!important}
 body.mes-has-menu>aside nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px!important;overflow:visible!important;margin-top:12px}
 body.mes-has-menu>aside nav>*{white-space:normal;min-width:0;overflow-wrap:anywhere}
 body.mes-has-menu>aside .nav-label,body.mes-has-menu>aside .aside-foot{display:none}
 body.mes-menu-hidden>aside{display:none!important}
 body.mes-has-menu>main,body.mes-has-menu:not(.mes-menu-hidden)>main{margin-left:0!important;width:100%!important;max-width:100%;padding-left:16px!important;padding-right:16px!important}
 body.mes-has-menu>main>header{padding-left:56px!important;min-height:60px!important}
 body .breadcrumb{white-space:normal!important;overflow-wrap:anywhere;line-height:1.5}
 body .intro{flex-wrap:wrap;min-width:0}
 body .intro>div{min-width:0;max-width:100%}
 body h1{overflow-wrap:anywhere}
 body .eyebrow{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
 body .mes-header-tools{flex-basis:100%;justify-content:flex-start;margin-left:0}
 body .mes-header-tools #mesAccount{max-width:100%;justify-content:flex-start!important}
 body .mes-header-tools #mesLanguage{max-width:100%}
}

/* MES design system */
@media screen{ :root{--primary:#244e7e!important;--primary-dark:#193b63!important;--primary-pale:#edf3ff!important;--blue:#244e7e!important;--cloud:#244e7e!important;--navy:#11233e!important;--bg:#f5f7fb!important;--background:#f5f7fb!important;--card:#fff!important;--text:#243149!important;--ink:#243149!important;--muted:#78869a!important;--line:#e0e6ef!important;--border:#e0e6ef!important} body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Apple SD Gothic Neo','Malgun Gothic',sans-serif!important;font-size:14px!important;color:#243149!important;background:#f5f7fb!important} body :is(button,input,select,textarea){font-family:inherit!important}body :is(input,select,textarea){font-size:14px;border-color:#d9e1ec!important;border-radius:7px!important;background-color:#fff;color:#243149} body :is(.card,.panel,.report-panel,.staff-panel,.source-card,.stat,.summary-card,.report-stat){background:#fff;border-color:#e0e6ef!important;border-radius:11px!important;box-shadow:none!important} body :is(.panel-heading,.title,.dialog-header){background:#f8faff;border-color:#e0e6ef!important;padding:16px 19px}body :is(.panel-body,.dialog-body){padding:19px} body :is(.intro,.page-heading,.hero,.header-inner,.topbar) h1,body>header h1,body main>h1{font-family:inherit!important;font-size:28px!important;line-height:1.3;color:#162941!important;letter-spacing:-.7px} body :is(.panel-heading,.report-panel,.staff-heading) h2{font-family:inherit;font-size:18px;color:#223952} body :is(.btn,.button,.primary,.secondary){border-radius:7px!important;font-size:13px;min-height:40px}body :is(.primary,.btn.cloud,.launch){background:#244e7e!important;border-color:#244e7e!important;color:#fff!important}body :is(.secondary,.button.ghost){background:#fff!important;border:1px solid #d9e1ec!important;color:#4b607a!important} body :is(.sidebar,.ipqc-sidebar){background:#11233e!important;color:#b7c6da}body :is(.sidebar,.ipqc-sidebar) :is(.brand,.brand-title){color:#fff!important}body :is(.sidebar,.ipqc-sidebar) label{color:#b7c6da}body :is(.sidebar,.ipqc-sidebar) .subtle{color:#92a9c7}body :is(.nav-item.active,.side-summary.active){background:#2a466c!important;color:#fff!important;box-shadow:none!important} body :is(th,thead td){background:#edf2f8!important;border-color:#e0e6ef;color:#617893}body :is(.topbar,.ipqc-topbar){background:#fff!important;border-color:#e0e6ef;min-height:56px;height:auto;gap:12px;flex-wrap:wrap} body .mes-header-tools button{font-size:12px!important}body.mes-menu-hidden>:is(.workspace,.ipqc-workspace){margin-left:0!important}body.mes-has-menu:not(.mes-menu-hidden)>:is(.workspace,.ipqc-workspace){margin-left:238px} body[data-mes-app=npi] :is(.brand,.cards b,.title h2,.name b,.delta b,.tag strong,.traybox h3,.bake-values b){font-family:inherit!important}body[data-mes-app=npi] .hero{background:#edf3ff;padding:20px 4vw}body[data-mes-app=npi] .tabs button.active{color:#244e7e;border-color:#244e7e}body[data-mes-app=npi] .upload{background:#244e7e} @media(max-width:900px){body.mes-has-menu>:is(.workspace,.ipqc-workspace),body.mes-has-menu:not(.mes-menu-hidden)>:is(.workspace,.ipqc-workspace){margin-left:0!important;min-width:0;width:100%}body :is(.intro,.page-heading,.hero,.header-inner,.topbar) h1{font-size:24px!important}} }

@media screen{body .header-inner{display:contents}body .header-title{flex:1;min-width:200px}body .header-inner .mes-logo{width:36px;height:36px;margin:0 8px}body .mes-eyebrow{margin-top:6px!important}body .topbar-tools:empty{display:none}body header .mes-header-tools{align-self:center}body header .lang-top label{margin:0}body header:has(.header-inner){display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:16px 4%!important}}

@media screen{body.mes-has-menu>aside .brand :is(img,.brand-symbol,.brand-icon,.brand-mark){display:none!important}body :is(.sidebar,.ipqc-sidebar) :is(a,button).active{background:#2a466c!important;box-shadow:none!important}body[data-mes-app=npi] .empty :is(b,h2){font-family:inherit!important}:root{--accent:#244e7e!important}}

/* Inspection/reject use a workspace div instead of the portal's main element. */
@media screen{
 body.mes-menu-hidden>:is(main,.workspace,.ipqc-workspace)>:is(header,.topbar,.ipqc-topbar){padding-left:64px!important}
 @media(max-width:900px){
  body.mes-has-menu>:is(main,.workspace,.ipqc-workspace)>:is(header,.topbar,.ipqc-topbar){padding-left:64px!important;min-width:0;max-width:100%}
 }
}

/* Distinguish all sub-app navigation from the navy MES hub. */
@media screen {
 body.mes-subpage :is(aside.sidebar,aside.ipqc-sidebar,aside.spec-sidebar,aside#mesSideMenu) {background:#17555c!important;color:#fff!important;}
 body.mes-subpage :is(aside.sidebar,aside.ipqc-sidebar,aside.spec-sidebar,aside#mesSideMenu) :is(.brand,.brand-title,.brand-subtitle,.nav-item,label,.subtle,.nav-label,.nav-section,.side-summary) {color:#fff!important;}
 body.mes-subpage :is(aside.sidebar,aside.ipqc-sidebar,aside.spec-sidebar,aside#mesSideMenu) :is(a,button).active,
 body.mes-subpage :is(aside.sidebar,aside.ipqc-sidebar,aside.spec-sidebar,aside#mesSideMenu) :is(.nav-item.active,.side-summary.active) {background:#28757b!important;color:#fff!important;box-shadow:inset 3px 0 #a4e4dd!important;}
 body.mes-subpage :is(aside.sidebar,aside.ipqc-sidebar,aside.spec-sidebar,aside#mesSideMenu) :is(.nav-item,.side-summary):hover {background:#22696f!important;color:#fff!important;}
}

/* PEAK 2026-11-11 — reversible brand theme; business state colours preserved. */
@media screen {
 :root{--peak-header-height:68px;--primary:#df0014!important;--primary-dark:#b90010!important;--primary-pale:#fff1f2!important;--accent:#df0014!important;--blue:#df0014!important;--cloud:#df0014!important;--navy:#101010!important;--bg:#f4f4f5!important;--background:#f4f4f5!important;--text:#242424!important;--ink:#242424!important;--muted:#707074!important;--line:#e2e2e5!important;--border:#e2e2e5!important}
 body.peak-20261111{background:#f4f4f5!important;color:#242424!important;padding-top:var(--peak-header-height)!important}
 body #mesTopbar{position:fixed!important;inset:0 0 auto!important;z-index:10020!important;background:#101010!important;color:white!important;display:flex!important;align-items:center!important;gap:14px!important;min-height:68px!important;padding:10px 24px!important;border:0!important;border-bottom:3px solid #df0014!important;box-shadow:0 3px 14px #0002!important;flex-wrap:wrap!important}
 body #mesTopbar .mes-top-brand{display:inline-flex;gap:12px;align-items:center;color:#fff!important;text-decoration:none;flex-shrink:0;font-size:18px;font-weight:750;letter-spacing:.3px}
 body #mesTopbar .mes-top-brand img{width:34px!important;height:34px!important;object-fit:contain!important;border-radius:5px;margin:0!important;background:white;padding:2px}
 body #mesTopbar #mesMenuToggle{position:static!important;inset:auto!important;display:grid!important;place-items:center;width:40px!important;height:40px!important;flex-shrink:0;margin:0;padding:0!important;border:1px solid #4b4b4b!important;background:#202020!important;color:#fff!important;border-radius:9px;font-size:23px}
 body #mesTopbar .mes-header-tools{display:flex!important;flex:1;flex-basis:auto!important;justify-content:flex-end!important;gap:12px!important;min-width:0;margin-left:auto!important;order:0}
 body #mesTopbar #mesAccount{gap:6px!important;color:#fff!important}
 body #mesTopbar #mesAccount :is(span,a){color:#ededed!important}
 body #mesTopbar #mesAccount button{background:#252525!important;border:1px solid #555!important;color:#fff!important;min-height:32px;border-radius:7px;padding:5px 9px}
 body #mesTopbar #mesLanguage{background:transparent!important;color:#fff!important;border:0!important}
 body #mesTopbar #mesLanguage select{background:#252525!important;color:#fff!important;border:1px solid #555!important;border-radius:8px!important;max-width:185px}
 body.peak-20261111>:is(main,.workspace,.ipqc-workspace),body.peak-20261111.mes-has-menu:not(.mes-menu-hidden)>:is(main,.workspace,.ipqc-workspace){margin-left:0!important;width:100%!important;min-width:0;max-width:1800px;padding-top:0!important}
 body.peak-20261111>main{margin-right:auto!important;margin-left:auto!important;padding-left:32px!important;padding-right:32px!important}
 body.peak-20261111>:is(main,.workspace,.ipqc-workspace)>:is(header,.topbar,.ipqc-topbar){padding-left:0!important;min-height:44px!important;background:transparent!important;color:#666!important;border-color:#dedee1!important}
 body.peak-20261111.mes-has-menu>aside{display:flex!important;position:fixed!important;inset:var(--peak-header-height) auto 0 0!important;width:270px!important;max-width:85vw!important;height:calc(100dvh - var(--peak-header-height))!important;max-height:calc(100dvh - var(--peak-header-height))!important;padding:24px 18px!important;z-index:10019!important;background:#161616!important;color:#fff!important;overflow:auto!important;box-shadow:12px 0 35px #0002;transform:translateX(0);visibility:visible}
 body.peak-20261111.mes-menu-hidden>aside{transform:translateX(-105%)!important;visibility:hidden!important;pointer-events:none}
 body.peak-20261111>aside nav{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;margin-top:12px!important;overflow:visible!important}
 body.peak-20261111>aside :is(.brand,.brand-title,.brand-subtitle,.nav-label,.nav-section,.aside-foot,nav a,nav button,.nav-item,.side-summary,label,.subtle){color:#eee!important}
 body.peak-20261111>aside .brand{font-size:23px!important}
 body.peak-20261111>aside :is(nav button,nav a,.nav-item,.side-summary){font-size:15px!important;border-radius:9px!important;padding:12px!important}
 body.peak-20261111>aside :is(nav button,nav a,.nav-item,.side-summary):hover{background:#303030!important}
 body.peak-20261111>aside :is(a,button,.nav-item,.side-summary).active{background:#352025!important;color:white!important;box-shadow:inset 3px 0 #e60012!important}
 body.peak-20261111.mes-subpage>aside{background:#eaeaec!important;color:#242424!important}
 body.peak-20261111.mes-subpage>aside :is(.brand,.brand-title,.brand-subtitle,.nav-label,.nav-section,.aside-foot,nav a,nav button,.nav-item,.side-summary,label,.subtle){color:#303034!important}
 body.peak-20261111.mes-subpage>aside :is(nav button,nav a,.nav-item,.side-summary):hover{background:#dedee1!important}
 body.peak-20261111.mes-subpage>aside :is(a,button,.nav-item,.side-summary).active{background:#fff!important;color:#b90010!important;box-shadow:inset 3px 0 #e60012!important}
 #mesMenuBackdrop{position:fixed;inset:var(--peak-header-height) 0 0;z-index:10018;background:#0005;border:0;border-radius:0;width:100%;height:auto;backdrop-filter:blur(2px)}#mesMenuBackdrop[hidden]{display:none!important}
 body.peak-20261111 :is(h1,h2,h3,.card h3,.summary strong,.eyebrow,.breadcrumb){color:#202024!important}
 body.peak-20261111 :is(.description,.intro p){color:#68686e!important}
 body.peak-20261111 :is(.card,.panel,.staff-panel,.source-card,.summary-card,.report-stat){border-color:#e1e1e4!important;border-radius:16px!important;background:#fff;box-shadow:0 3px 12px #00000005!important}
 body.peak-20261111 .card{padding:22px;min-height:205px;transition:box-shadow .15s,border-color .15s}
 body.peak-20261111 .card:hover{border-color:#bfc0c4!important;box-shadow:0 6px 20px #0000000c!important}
 body.peak-20261111 :is(.primary,.btn.cloud,.mes-submit){background:#df0014!important;border-color:#df0014!important;color:white!important;border-radius:9px!important}
 body.peak-20261111 .launch{background:#fff!important;color:#252525!important;border:1px solid #ddd!important;border-radius:8px!important;font-weight:650}
 body.peak-20261111 .launch:hover{background:#fff1f2!important;border-color:#df0014!important;color:#bd0010!important}
 body.peak-20261111 .filters{border-bottom:1px solid #ddd;gap:8px;padding-bottom:10px}
 body.peak-20261111 .filters button{background:transparent!important;color:#555!important;border:0!important;border-radius:0!important;padding:10px 14px;border-bottom:3px solid transparent!important;font-size:13px}
 body.peak-20261111 .filters button.active{color:#b90010!important;border-bottom-color:#e60012!important;background:#fff!important}
 body.peak-20261111 :is(th,thead td){background:#eeeef0!important;color:#505055!important;border-color:#dedee1!important}
 body.peak-20261111 :is(input,select,textarea){border-color:#d4d4d8!important;color:#252525!important;border-radius:9px!important}
 body.peak-20261111 :is(button,a,input,select,textarea):focus-visible{outline:3px solid #d00018!important;outline-offset:3px}
 body.peak-20261111 .notice{background:#fff!important;border-color:#ddd!important;border-left:3px solid #e60012!important}body.peak-20261111 .notice :is(b,p){color:#555!important}
 body.peak-20261111.mes-locked #mesTopbar,body.peak-20261111.mes-locked #mesMenuBackdrop{display:none!important}
 body.peak-20261111 #mesGate{z-index:10050!important;background:linear-gradient(#101010 0 40%,#f0f0f2 40% 100%)!important;padding:28px 20px}
 body.peak-20261111 .mes-login{border-radius:24px!important;padding:36px!important;background:#fff!important;box-shadow:0 24px 65px #0002!important;color:#252525;width:440px}
 body.peak-20261111 .mes-login>div{color:#555!important}
 body.peak-20261111 .mes-login .mes-task-logo{width:42px!important;height:42px!important;object-fit:contain}
 body.peak-20261111 .mes-login .mes-header-tools{border-bottom:1px solid #eee;padding-bottom:16px}
 body.peak-20261111 .mes-login input{min-height:46px!important;height:46px!important;border-radius:10px!important}
 body.peak-20261111 .mes-login .mes-submit{min-height:46px!important;font-weight:700}
 body.peak-20261111 .mes-login .mes-link{color:#5c5c62!important}
 @media(max-width:900px){body #mesTopbar{padding:8px 14px!important;gap:8px!important}body #mesTopbar .mes-top-brand{font-size:16px}body #mesTopbar .mes-header-tools{flex-basis:100%!important;gap:8px!important;justify-content:space-between!important}body #mesTopbar #mesAccount{justify-content:flex-start!important;flex:1}body #mesTopbar #mesLanguage select{max-width:150px}body.peak-20261111>main{padding-left:16px!important;padding-right:16px!important}body.peak-20261111 .cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
 @media(max-width:560px){body #mesTopbar #mesAccount{flex-basis:100%!important;font-size:11px}body #mesTopbar .mes-header-tools{flex-wrap:wrap!important}body #mesTopbar #mesAccount button{font-size:11px!important;padding:4px 7px}body.peak-20261111 .cards{grid-template-columns:1fr}body.peak-20261111 .mes-login{padding:26px!important}}
 @media(prefers-reduced-motion:reduce){body.peak-20261111>aside{transition:none!important}}
}
@media print{#mesTopbar,#mesMenuBackdrop{display:none!important}body.peak-20261111{padding-top:0!important}}

@media screen{body #mesTopbar #mesMenuToggle{order:0!important}body #mesTopbar .mes-top-brand{order:1!important}body #mesTopbar .mes-header-tools{order:2!important}}

@media screen{body #mesTopbar{justify-content:flex-start!important}body #mesTopbar .mes-top-brand{margin:0!important}body #mesTopbar #mesMenuToggle{margin:0!important}}
