@layer loadpulse-legacy, modern-pulse-shell;
@import url("/web/core/modern-pulse-components.css");
@import url("/web/core/daily-workspaces.css?v=18");
@layer modern-pulse-shell {
/* Modern Pulse — approved September 28, 2026.
 * Presentation only. Existing role-aware navigation, metrics and workflows
 * remain the source of truth. Shared screen system, revision 2. */
:root {
  --lp-canvas:#f5f6f8;
  --lp-workspace:#f5f6f8;
  --lp-surface:#fff;
  --lp-surface-soft:#f2f3f6;
  --lp-utility-blue:#eeebfa;
  --lp-ink:#24252d;
  --lp-muted:#626572;
  --lp-border:#e2e4eb;
  --lp-brand:#292a32;
  --lp-action:#6a4cb5;
  --lp-mint:#e2f2eb;
  --lp-lime:#bce0cf;
  --lp-orange:#ec9765;
  --lp-red:#b83250;
  --lp-blue:#4166ad;
  --mp-pink:#df4b92;
  --mp-violet:#8971dc;
  --mp-mint:#52ae91;
  --mp-chart-missed:#cf4141;
  --mp-peach:#ed9662;
  --mp-success:#287258;
  --mp-warning:#93551f;
  --mp-warning-bg:#fbf0e6;
  --mp-danger-bg:#fcecf0;
  --mp-pink-bg:#faedf4;
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:12px;
  --radius-xl:16px;
  --navy:var(--lp-brand);
  --red:var(--lp-red);
  --amber:var(--mp-warning);
  --lp-glass:rgba(255,255,255,.88);
  --lp-glass-strong:rgba(255,255,255,.96);
  --lp-glass-border:var(--lp-border);
  --lp-glass-shadow:0 3px 12px rgba(36,37,45,.035);
  --ink:var(--lp-ink);
  --muted:var(--lp-muted);
  --paper:var(--lp-workspace);
  --card:var(--lp-surface);
  --green:var(--lp-action);
  --green-dark:var(--lp-action);
  --line:var(--lp-border);
  --line-strong:#c6c9d4;
  --surface-soft:var(--lp-surface-soft);
  --surface-green:var(--lp-mint);
  --shadow-soft:0 3px 12px rgba(36,37,45,.035);
  --shadow:0 8px 24px rgba(36,37,45,.06);
  --shadow-float:0 20px 60px rgba(36,37,45,.16);
  --mp-header:76px;
  --mp-nav:56px;
}
[data-theme="dark"] {
  --lp-canvas:#15161c;
  --lp-workspace:#15161c;
  --lp-surface:#1f2029;
  --lp-surface-soft:#282a35;
  --lp-utility-blue:#302a46;
  --lp-ink:#f2f2f7;
  --lp-muted:#b4b6c5;
  --lp-border:#3a3c4a;
  --lp-brand:#dedcea;
  --lp-action:#c4afff;
  --lp-mint:#243b34;
  --lp-red:#ff97ad;
  --lp-blue:#9ebfff;
  --lp-orange:#f5b48d;
  --mp-pink:#f28bbb;
  --mp-violet:#b5a1f5;
  --mp-mint:#7acdb0;
  --mp-chart-missed:#ff8585;
  --mp-peach:#f1b38f;
  --mp-success:#a4e2ca;
  --mp-warning:#f1bf91;
  --mp-warning-bg:#3a2e25;
  --mp-danger-bg:#422932;
  --mp-pink-bg:#3d2837;
  --lp-glass:rgba(31,32,41,.9);
  --lp-glass-strong:rgba(31,32,41,.97);
  --line-strong:#555867;
  --lp-glass-shadow:0 3px 12px rgba(0,0,0,.12);
}
html,body,button,input,select,textarea,h1,h2,h3,h4,
.shell h1,.shell h2,.shell h3,.shell h4,.modal,
.login-card h2,.login-story h1 { font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
#app,#app * { font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
body { color:var(--lp-ink); background:var(--lp-workspace); font-size:16px; }
.shell { background:var(--lp-workspace); }
.shell .card,.shell .panel,.modal,.login-card {
  background:var(--lp-surface); color:var(--lp-ink); border:1px solid var(--lp-border);
  border-radius:12px; box-shadow:var(--shadow-soft); backdrop-filter:none;
}
.shell h1 { font-size:clamp(27px,2.2vw,34px); font-weight:600; letter-spacing:-.045em; }
.shell h2 { font-weight:600; letter-spacing:-.025em; }
.shell p { color:var(--lp-muted); }
.shell .btn,.login-card .btn { border-radius:9px; font-weight:500; }
.btn-primary,.shell .btn-primary { background:var(--lp-brand); color:var(--lp-surface); border-color:var(--lp-brand); box-shadow:none; }
.btn-primary:hover,.shell .btn-primary:hover { color:var(--lp-surface); background:color-mix(in srgb,var(--lp-brand) 85%,var(--lp-muted)); border-color:var(--lp-brand); }
.shell .btn-secondary,.shell .btn-ghost { color:var(--lp-ink); background:var(--lp-surface); border-color:var(--lp-border); }
.shell .btn-secondary:hover,.shell .btn-ghost:hover { background:var(--lp-surface-soft); border-color:var(--line-strong); }
.shell input,.shell select,.shell textarea { border-radius:8px; background:var(--lp-surface); color:var(--lp-ink); }
.shell .field label { font-size:14px; color:var(--lp-muted); }
.shell thead th { background:var(--lp-surface-soft); color:var(--lp-muted); font-size:14px; font-weight:500; }
.shell tbody td { font-size:15px; line-height:1.5; }
.shell tbody tr:hover { background:color-mix(in srgb,var(--lp-utility-blue) 35%,var(--lp-surface)); }
.table-wrap { border-radius:10px; }
.shell .table-wrap,.shell .search-box,.shell .company-filter,.shell .load-filter-grid { background:var(--lp-surface); border-color:var(--lp-border); color:var(--lp-ink); }
.shell .tabs,.shell .period-tabs,.shell .planner-mill-switcher,.shell .inventory-workspace-tabs { background:var(--lp-surface-soft); border-color:var(--lp-border); }
.shell .table-wrap tbody tr { background:transparent; }
.shell .table-wrap tbody tr:hover { background:var(--lp-surface-soft); }
.shell .tab.active,.shell .period-tabs button.active,.shell .planner-mill-switcher button.active,
.shell .ops-nav button.active,.shell .driver-nav button.active,.shell .inventory-workspace-tabs button.active,
.shell .coordination-operations-nav button.active { color:var(--lp-action); background:var(--lp-utility-blue); border-color:transparent; box-shadow:none; }
.shell .ops-nav,.shell .driver-nav,.shell .coordination-operations-nav { gap:4px; }
.shell .badge-completed { color:#287258; background:#e2f2eb; }
[data-theme="dark"] .shell .badge-completed { color:#a4e2ca; background:#243b34; }
button:focus-visible,a:focus-visible,summary:focus-visible {
  outline:3px solid var(--lp-action); outline-offset:3px;
}
.shell > .topbar,.shell > .topbar.sidebar-expanded {
  left:0; right:0; height:var(--mp-header); min-height:var(--mp-header);
  top:var(--environment-banner-height,0px); padding:0 clamp(20px,3vw,48px);
  grid-template-columns:minmax(180px,1fr) minmax(240px,550px) minmax(280px,1fr);
  grid-template-rows:1fr; gap:20px; border-bottom:1px solid var(--lp-border);
  background:var(--lp-glass); box-shadow:none;
}
.workspace-context { max-width:none; }
.workspace-context strong { font-size:16px; }
.mobile-workspace-logo { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border:0; border-radius:10px; background:var(--lp-brand); color:var(--lp-surface); }
.mobile-workspace-logo svg { width:21px; fill:none; stroke:currentColor; stroke-width:2.2; }
.workspace-search { display:grid; grid-column:2; grid-row:1; border-radius:9px; box-shadow:none; background:var(--lp-surface-soft); border-color:transparent; }
.workspace-search input { background:transparent; }
.shell > .topbar .userbox { grid-column:3; grid-row:1; gap:6px; min-width:0; }
.topbar .avatar { background:var(--lp-utility-blue); color:var(--lp-action); border-radius:50%; }
.topbar .user-meta small { max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shell > .topbar .live-pill { display:none; }
.shell > .topbar .icon-btn,.shell > .topbar .theme-toggle,.shell > .topbar .notification-bell { min-width:44px; width:44px; min-height:44px; height:44px; }
.workspace-rail,.workspace-rail.expanded,.has-environment-banner .workspace-rail {
  inset:auto 0 auto 0; top:calc(var(--mp-header) + var(--environment-banner-height,0px));
  width:100%; height:var(--mp-nav); padding:0 clamp(20px,3vw,48px);
  display:flex; flex-direction:row; align-items:stretch; gap:clamp(4px,1vw,18px);
  border:0; border-bottom:1px solid var(--lp-border); background:var(--lp-glass);
  box-shadow:none; overflow:visible; transition:none;
}
.workspace-rail .rail-logo,.workspace-rail .rail-expand { display:none; }
.workspace-rail .rail-button,.workspace-rail.expanded .rail-button {
  flex:0 1 auto; width:auto; height:56px; min-width:0; display:flex;
  justify-content:center; align-items:center; gap:7px; padding:0 9px;
  color:var(--lp-muted); border:0; border-radius:0; background:transparent; box-shadow:none;
}
.workspace-rail .rail-button .rail-glyph { width:20px; height:20px; flex-shrink:0; }
.workspace-rail .rail-button .rail-label,.workspace-rail.expanded .rail-button .rail-label { display:block; font-size:14px; line-height:18px; white-space:nowrap; }
.workspace-rail .rail-button.active,[data-theme="dark"] .workspace-rail .rail-button.active { color:var(--lp-ink); background:transparent; box-shadow:inset 0 -3px var(--mp-violet); }
.workspace-rail .rail-button:hover,[data-theme="dark"] .workspace-rail .rail-button:hover { color:var(--lp-action); background:color-mix(in srgb,var(--lp-utility-blue) 40%,transparent); }
.workspace-rail .rail-settings { display:none; }
.workspace-rail .rail-spacer { flex:1; }
.workspace-rail .mobile-more { display:none; }
.workspace-rail:not(.mobile-open) .mobile-module-drawer { display:none; }
.workspace-rail.mobile-open .mobile-nav-backdrop { display:block; position:fixed; inset:0; z-index:38; background:rgba(24,25,34,.24); border:0; backdrop-filter:blur(3px); }
.workspace-rail.mobile-open .mobile-module-drawer { display:block; position:fixed; inset:auto 24px auto auto; top:calc(var(--mp-header) + var(--mp-nav) + var(--environment-banner-height,0px) + 10px); width:min(440px,calc(100vw - 32px)); max-height:calc(100dvh - var(--mp-header) - var(--mp-nav) - var(--environment-banner-height,0px) - 32px); overflow:auto; z-index:39; opacity:1; pointer-events:auto; transform:none; padding:20px; background:var(--lp-glass-strong); border:1px solid var(--lp-border); border-radius:12px; box-shadow:var(--shadow-float); }
.shell > .page,.shell > .workspace-rail.expanded ~ .page,
.has-environment-banner .shell > .page,.has-environment-banner .shell > .workspace-rail.expanded ~ .page {
  width:100%; max-width:none; margin:0; padding:calc(var(--mp-header) + var(--mp-nav) + 28px) clamp(20px,3vw,48px) 40px;
}
.shell > .app-footer,.workspace-rail.expanded ~ .app-footer { width:100%; margin-left:0; padding-inline:clamp(20px,3vw,48px); background:var(--lp-workspace); }
.shell > .history-page,.shell > .workspace-rail.expanded ~ .history-page { height:calc(100dvh - var(--environment-banner-height,0px)); padding-bottom:16px; }
.shell:has(> .history-page) > .app-footer { display:none; }
.shell:has(> .history-page) { min-height:0; }
.history-page .bulk-toolbar { background:var(--lp-surface-soft); border-radius:8px; }
.reference-metric-strip { grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:14px; }
.shell .reference-metric { position:relative; min-height:126px; padding:18px 20px; display:flex; flex-direction:column; align-items:flex-start; gap:8px; border-radius:11px; border-top:3px solid var(--mp-violet); background:var(--lp-surface); box-shadow:none; backdrop-filter:none; }
.shell .reference-metric:nth-child(3n+2) { border-top-color:var(--mp-pink); }
.shell .reference-metric:nth-child(3n) { border-top-color:var(--mp-mint); }
.shell .reference-metric > strong { font-size:34px; line-height:1.15; font-weight:600; align-self:auto; letter-spacing:-.04em; }
.shell .reference-metric > span,.shell .reference-metric > small { font-size:13px; white-space:normal; text-align:left; }
.shell .reference-metric > small { align-self:auto; }
.shell .reference-metric:hover { border-color:var(--mp-violet); background:var(--lp-surface); box-shadow:0 3px 12px rgba(36,37,45,.06); }
.ct-hero { margin-bottom:8px; }
.ct-hero h1 { font-size:34px; font-weight:600; }
.ct-hero p { max-width:720px; }
.ct-mill-grid { gap:20px; }
.shell .ct-mill-card,.shell .ct-operating-card,.shell .ct-action-card,.shell .ct-daily-flow { padding:24px; border-radius:12px; }
.ct-mill-primary { gap:12px; margin-top:24px; }
.ct-mill-primary > div { background:transparent; border-right:1px solid var(--lp-border); border-radius:0; padding:0 12px 8px 0; }
.ct-mill-primary > div:last-child { border-right:0; }
.ct-mill-primary strong { font-size:24px; letter-spacing:-.035em; }
.ct-mill-primary span,.ct-inventory-controls span { font-size:14px; }
.ct-mill-primary small,.ct-inventory-controls small { font-size:12px; line-height:1.5; }
.ct-inventory-controls { gap:12px; margin-top:18px; }
.ct-inventory-controls > div { padding:14px; background:var(--lp-utility-blue); border-radius:8px; }
.ct-inventory-controls > div:last-child { background:var(--lp-mint); }
.ct-inventory-controls strong { font-size:20px; }
.ct-mill-card summary,.ct-operating-card summary,.ct-action-card summary { min-height:44px; align-items:center; font-size:13px; }
.ct-mill-card h2,.ct-operating-card h2,.ct-action-card h2,.ct-daily-flow h2 { font-family:inherit; font-weight:600; }
.ct-mill-card dl dt,.ct-mill-card dl dd { font-size:13px; }
.ct-readiness-item { background:var(--lp-surface-soft); border-color:var(--lp-border); }
.ct-readiness-item strong { font-size:14px; }
.ct-readiness-item small,.ct-readiness-item em { font-size:12px; line-height:1.5; }
.ct-daily-flow nav button { background:var(--lp-surface-soft); border-color:var(--lp-border); }
.ct-daily-flow nav button b { background:var(--lp-utility-blue); color:var(--lp-action); }
.ct-change-button { color:var(--lp-action); border-color:var(--lp-border); background:var(--lp-utility-blue); }
.shell .reference-quality,[data-theme="dark"] .shell .reference-quality { background:var(--lp-mint); color:var(--lp-ink); border-color:var(--lp-border)!important; }
.shell .reference-finance,[data-theme="dark"] .shell .reference-finance { background:var(--lp-utility-blue); color:var(--lp-ink); }
.shell .stat { border-top:3px solid var(--mp-violet); border-radius:11px; background:var(--lp-surface); }
.shell .stat:nth-child(3n+2) { border-top-color:var(--mp-pink); }
.shell .stat:nth-child(3n) { border-top-color:var(--mp-mint); }
.shell .stat::after { display:none; }
.shell .stat-value { color:var(--lp-ink); font-weight:600; font-size:34px; letter-spacing:-.04em; }
.login-page { background:var(--lp-workspace); color:var(--lp-ink); }
.login-card,[data-theme="dark"] .login-card { background:var(--lp-surface); color:var(--lp-ink); border-color:var(--lp-border); border-radius:14px; box-shadow:var(--shadow); }
.login-card input { background:var(--lp-surface-soft); color:var(--lp-ink); }
.login-panel,[data-theme="dark"] .login-panel { background:var(--lp-workspace); border-color:var(--lp-border); box-shadow:none; }
.login-story { background:#292a32; color:#fff; }
.login-story p { color:#d2d1df; }
.login-story h1 em { color:#c4afff; }
.login-story .login-learn-link { color:#d4c2ff; }
.login-story .brand-mark { color:#292a32; background:#dedcea; box-shadow:none; }
.login-story .login-float { background:rgba(43,39,61,.92); border-color:#59516e; }
.login-story .login-float small { color:#c4bed2; }
.login-story .login-route-line { stroke:#b5a1f5; }
.login-screen .login-footer { background:#292a32; color:#e8e5f0; }
.login-role,[data-theme="dark"] .login-role { background:var(--lp-surface); border-color:var(--lp-border); color:var(--lp-ink); border-radius:9px; }
.login-role.active,[data-theme="dark"] .login-role.active { background:var(--lp-utility-blue); border-color:var(--lp-action); color:var(--lp-ink); box-shadow:none; }
.login-role strong { font-size:14px; }
.login-role small { font-size:12px; color:var(--lp-muted); }
.toast { background:#292a32; color:#fff; box-shadow:var(--shadow-float); }
.reference-week-bars i { background:linear-gradient(0deg,color-mix(in srgb,var(--mp-pink) 20%,var(--lp-surface)),var(--mp-pink)); border:0; border-radius:5px 5px 0 0; }
.reference-week-bars .current i { background:var(--mp-violet); border-color:transparent; }
.forecast-chart-bars .physical,.forecast-chart-key .physical { background:var(--mp-violet); }
.forecast-chart-bars .shippable,.forecast-chart-key .shippable { background:var(--mp-mint); }
.intelligence-nav button,.documentation-subnav button { color:var(--lp-muted); font-size:14px; font-weight:500; }
.intelligence-nav button.active { color:var(--lp-action); background:var(--lp-utility-blue); box-shadow:none; }
.doc-stat:after { background:var(--lp-utility-blue); }
@media (min-width:761px) and (max-width:1200px) {
  .shell > .topbar,.shell > .topbar.sidebar-expanded { grid-template-columns:minmax(150px,1fr) minmax(220px,1.5fr) auto; gap:12px; }
  .topbar .user-meta { display:none; }
  .workspace-rail .rail-button .rail-glyph { display:none; }
  .workspace-rail .rail-button,.workspace-rail.expanded .rail-button { padding-inline:6px; }
  .workspace-rail .rail-button .rail-label { white-space:normal; font-size:13px; }
  .workspace-rail { gap:4px; }
}
@media (max-width:760px) {
  :root { --mp-header:68px; --mp-nav:76px; }
  .shell > .topbar,.shell > .topbar.sidebar-expanded { grid-template-columns:minmax(0,1fr) auto; grid-template-rows:1fr; padding:0 12px; gap:6px; }
  .workspace-context { max-width:none; gap:8px; }
  .workspace-context span { display:none; }
  .workspace-context strong { max-width:calc(100vw - 218px); font-size:14px; }
  .shell > .topbar .userbox { grid-column:2; }
  .workspace-search,.topbar .user-meta,.shell > .topbar .sign-out-button { display:none; }
  .workspace-rail,.workspace-rail.expanded,.has-environment-banner .workspace-rail { top:auto; bottom:0; height:calc(var(--mp-nav) + env(safe-area-inset-bottom)); padding:4px 6px calc(4px + env(safe-area-inset-bottom)); display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:2px; border-top:1px solid var(--lp-border); border-bottom:0; }
  .workspace-rail .rail-button,.workspace-rail.expanded .rail-button,.workspace-rail .rail-spacer { display:none; }
  .workspace-rail .rail-button.mobile-primary,.workspace-rail.expanded .rail-button.mobile-primary,.workspace-rail .mobile-more { width:100%; height:64px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:5px; padding:3px 2px; border:0; border-radius:8px; color:var(--lp-muted); background:transparent; box-shadow:none; }
  .workspace-rail .rail-button.mobile-primary .rail-glyph { display:grid; width:22px; height:22px; }
  .workspace-rail .rail-button.mobile-primary .rail-label { max-width:100%; font-size:11px; line-height:13px; white-space:normal; text-align:center; }
  .workspace-rail .mobile-more small { font-size:11px; }
  .workspace-rail .rail-button.mobile-primary.active,[data-theme="dark"] .workspace-rail .rail-button.mobile-primary.active,.workspace-rail .mobile-more.active { color:var(--lp-action); background:var(--lp-utility-blue); box-shadow:none; }
  .workspace-rail.mobile-open .mobile-module-drawer { inset:auto 12px calc(var(--mp-nav) + env(safe-area-inset-bottom) + 10px) 12px; width:auto; max-height:calc(100dvh - var(--mp-header) - var(--mp-nav) - var(--environment-banner-height,0px) - 32px); }
  .shell > .page,.shell > .workspace-rail.expanded ~ .page,.has-environment-banner .shell > .page,.has-environment-banner .shell > .workspace-rail.expanded ~ .page { padding:calc(var(--mp-header) + 20px) 16px 20px; width:100%; margin:0; }
  .shell > .app-footer,.workspace-rail.expanded ~ .app-footer { padding:20px 16px calc(var(--mp-nav) + env(safe-area-inset-bottom) + 20px); }
  .shell > .history-page,.shell > .workspace-rail.expanded ~ .history-page { height:calc(100dvh - var(--mp-nav) - var(--environment-banner-height,0px) - env(safe-area-inset-bottom)); padding-bottom:10px; }
  .ct-hero h1 { font-size:28px; }
  .ct-hero p { font-size:14px; }
  .reference-metric-strip,.control-tower-page .reference-metric-strip { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; overflow:visible; }
  .shell .reference-metric { min-width:0; min-height:130px; padding:14px; }
  .shell .reference-metric > strong { font-size:29px; }
  .shell .ct-mill-card,.shell .ct-operating-card,.shell .ct-action-card,.shell .ct-daily-flow { padding:18px; }
  .ct-mill-primary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ct-mill-primary > div:last-child { grid-column:1/-1; }
  .ct-inventory-controls { grid-template-columns:1fr; }
  .shell .ct-hero-actions .btn { font-size:14px; }
  .shadow-pill { max-width:116px; white-space:normal; font-size:11px; }
  .shell > .history-page > .heading-row { min-height:0; margin-bottom:12px; align-items:flex-start; text-align:left; }
  .history-page > .heading-row p { display:none; }
  .history-summary { margin-bottom:10px; }
  .history-summary .card { flex-basis:126px; min-height:50px; padding:10px 12px; }
  .history-summary span { font-size:11px; letter-spacing:0; }
  .history-page .history-panel { padding:10px; }
  .history-toolbar { gap:8px; }
  .history-page .bulk-toolbar { display:flex; flex-wrap:wrap; gap:8px; padding:8px; margin-top:8px; }
  .history-page .bulk-toolbar:not(.active) .bulk-actions { display:none; }
  .history-page .bulk-actions { display:flex; flex-direction:row; flex:1 1 100%; gap:4px; overflow-x:auto; }
  .history-page .bulk-actions button { min-height:44px; flex:0 0 auto; font-size:12px; padding:8px; }
  .history-page .bulk-select-all { min-height:32px; }
  .history-page .history-result-label { margin-block:8px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

/* Modern Pulse information architecture: one header, one contextual navigation.
   The old compatibility nav functions intentionally render no markup. */
:root { --mp-header:76px; --mp-section:54px; }
.shell > .mp-shell-header {
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  padding:0 clamp(20px,2.5vw,44px); z-index:320;
  background:var(--lp-glass-strong); backdrop-filter:none; transform:none;
}
.mp-brand { display:flex; flex:none; align-items:center; gap:9px; padding:0; border:0; background:none; color:var(--lp-ink); min-height:44px; }
.mp-brand b { font-size:19px; letter-spacing:-.8px; font-weight:650; }
.mp-brand > span { display:grid; place-items:center; width:29px; height:29px; border-radius:8px; color:var(--lp-surface); background:var(--lp-brand); }
.mp-brand svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; }
.mp-shell-header .workspace-rail {
  position:static; display:flex; flex-direction:row; align-items:stretch; flex:1; justify-content:center;
  inset:auto; width:auto; height:100%; min-width:0; padding:0; gap:clamp(2px,.9vw,15px);
  background:none; border:0; box-shadow:none; backdrop-filter:none; transform:none; overflow:visible;
}
.mp-shell-header .workspace-rail .rail-button {
  display:flex; align-items:center; justify-content:center; gap:5px; width:auto; height:100%; min-height:44px;
  flex:0 1 auto; border:0; border-bottom:2px solid transparent; border-radius:0; padding:0 6px;
  color:var(--lp-muted); background:none; box-shadow:none;
}
.mp-shell-header .workspace-rail .rail-button .rail-label { display:inline; white-space:nowrap; font-size:14px; font-weight:500; line-height:1.3; }
.mp-shell-header .workspace-rail .rail-button .rail-glyph { display:none; }
.mp-shell-header .workspace-rail .rail-button.active { border-bottom-color:var(--mp-violet); color:var(--lp-ink); background:none; box-shadow:none; }
.mp-shell-header .workspace-rail .rail-button:hover { color:var(--lp-action); background:none; transform:none; }
.mp-shell-header .userbox { flex:none; display:flex; gap:5px; margin:0; }
.mp-shell-header .userbox > button { flex:none; }
.mp-shell-header .mp-search-toggle svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; }
.mp-shell-header .profile-button { padding:0; min-width:44px; }
.mp-shell-header .topbar-theme,.mp-shell-header .icon-btn,.mp-shell-header .notification-bell { width:40px; min-width:40px; height:44px; min-height:44px; }
.mp-shell-header .avatar { width:34px; height:34px; background:var(--lp-utility-blue); color:var(--lp-action); font-size:12px; }
.mp-section-nav {
  position:fixed; z-index:310; top:calc(var(--environment-banner-height,0px) + var(--mp-header));
  left:0; right:0; height:var(--mp-section); padding:0 clamp(20px,2.5vw,44px);
  display:flex; align-items:center; gap:24px; border-bottom:1px solid var(--lp-border);
  background:var(--lp-glass-strong); backdrop-filter:blur(14px);
}
.mp-section-nav > span { font-size:12px; font-weight:600; color:var(--lp-muted); white-space:nowrap; }
.mp-section-nav > div { display:flex; align-self:stretch; gap:24px; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; min-width:0; }
.mp-section-nav > div::-webkit-scrollbar { display:none; }
.mp-section-nav button { flex:none; min-height:44px; border:0; border-bottom:2px solid transparent; border-radius:0; color:var(--lp-muted); background:none; font-size:14px; padding:0 2px; }
.mp-section-nav button.active { border-bottom-color:var(--mp-violet); color:var(--lp-action); }
.shell:has(> .mp-shell-header) > .page { padding:calc(var(--mp-header) + 28px) clamp(20px,2.5vw,44px) 32px; margin:0; width:100%; max-width:none; }
.shell:has(> .mp-section-nav) > .page { padding-top:calc(var(--mp-header) + var(--mp-section) + 28px); }
.shell:has(> .mp-shell-header) > .history-page { height:calc(100dvh - var(--environment-banner-height,0px)); padding-bottom:16px; }
.mp-skip-link { position:fixed; top:-100px; left:18px; padding:12px 18px; z-index:2000; background:var(--lp-surface); color:var(--lp-ink); }
.mp-skip-link:focus { top:calc(var(--environment-banner-height,0px) + 8px); }
.mp-shell-header .mobile-module-drawer { display:none; }
.mp-shell-header .workspace-rail.mobile-open .mobile-module-drawer {
  display:block; position:fixed; inset:calc(var(--environment-banner-height,0px) + var(--mp-header) + 8px) 24px auto auto;
  width:340px; max-height:calc(100dvh - var(--environment-banner-height,0px) - var(--mp-header) - 30px);
  overflow-y:auto; overscroll-behavior:contain; padding:18px; border:1px solid var(--lp-border); border-radius:14px;
  background:var(--lp-glass-strong); backdrop-filter:blur(22px); box-shadow:var(--shadow-float); z-index:325;
}
.mp-shell-header .mobile-nav-backdrop { display:none; }
.mp-shell-header .workspace-rail.mobile-open .mobile-nav-backdrop { display:block; position:fixed; inset:0; width:100vw; height:100dvh; background:rgba(18,20,30,.18); border:0; z-index:321; }
.mp-shell-header .mobile-drawer-head { display:flex; align-items:center; justify-content:space-between; padding:0 0 10px; border-bottom:1px solid var(--lp-border); }
.mp-shell-header .mobile-drawer-head button { border:0; background:none; color:var(--lp-ink); width:44px; height:44px; }
.mp-menu-content section { margin-top:16px; }
.mp-menu-content h3 { margin:0 0 6px; color:var(--lp-muted); font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:1px; }
.mp-menu-link { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:44px; text-align:left; padding:9px 10px; border:0; border-radius:7px; background:none; color:var(--lp-ink); font-size:14px; }
.mp-menu-link:hover,.mp-menu-link.active { background:var(--lp-utility-blue); color:var(--lp-action); }
.mp-menu-link > span { color:var(--lp-muted); }
.mp-menu-signout { margin-top:12px; border-top:1px solid var(--lp-border); border-radius:0; }
.mp-mobile-group { display:none; }
.mp-mobile-group { border-bottom:1px solid var(--lp-border); }
.mp-mobile-group > summary { padding:14px 4px; min-height:48px; cursor:pointer; font-size:14px; font-weight:500; color:var(--lp-ink); }
.mp-mobile-group .mp-menu-link { padding-left:18px; }
.mp-search-panel[hidden] { display:none; }
.mp-search-panel { position:fixed; top:calc(var(--environment-banner-height,0px) + var(--mp-header) + 10px); right:28px; width:min(560px,calc(100vw - 32px)); padding:20px; border:1px solid var(--lp-border); border-radius:12px; background:var(--lp-glass-strong); backdrop-filter:blur(20px); box-shadow:var(--shadow-float); z-index:330; }
.mp-search-panel .workspace-search { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; background:none; padding:0; border:0; }
.mp-search-panel label { grid-column:1/-1; font-size:15px; font-weight:600; }
.mp-search-panel input { width:100%; min-width:0; background:var(--lp-surface); border:1px solid var(--lp-border); padding:10px 12px; height:46px; }
.mp-search-panel > .text-btn { margin-top:12px; min-height:36px; }

/* Overview follows the approved mockup hierarchy, using real authorized data. */
.mp-overview-hero { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:24px; }
.mp-overview-hero > div > span { font-size:11px; letter-spacing:1.3px; font-weight:500; color:var(--lp-muted); }
.mp-overview-hero h1 { margin:10px 0 8px; }
.mp-overview-hero p { margin:0; font-size:15px; }
.mp-overview-tools { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:12px; }
.mp-mill-switch { display:flex; gap:2px; border:1px solid var(--lp-border); border-radius:9px; padding:3px; background:var(--lp-surface-soft); }
.mp-mill-switch button { background:none; color:var(--lp-muted); border:0; border-radius:6px; min-height:38px; padding:8px 13px; font-size:13px; }
.mp-mill-switch button.active { color:var(--lp-ink); background:var(--lp-surface); box-shadow:0 1px 4px #0000000a; }
.mp-overview .reference-section-head { margin-bottom:10px; border:0; padding:0; min-height:0; }
.mp-overview .reference-section-head > div { display:none; }
.mp-overview .reference-section-head > button { margin-left:auto; font-size:12px; min-height:30px; color:var(--lp-muted); }
.mp-overview .reference-snapshot { margin:0 0 24px; }
.mp-overview .reference-metric { min-height:140px; }
.mp-overview-main { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(280px,1fr); gap:22px; margin-bottom:26px; }
.mp-overview-main:has(> :only-child) { grid-template-columns:1fr; }
.mp-throughput { padding:24px; min-width:0; }
.mp-panel-head,.mp-section-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.mp-panel-head span { color:var(--lp-muted); font-size:12px; }
.mp-panel-head h2 { font-size:22px; margin:6px 0 0; }
.mp-chart-key { display:flex; flex-wrap:wrap; gap:18px; margin:22px 0 10px; color:var(--lp-muted); font-size:12px; }
.mp-chart-key span { display:flex; gap:6px; align-items:center; }
.mp-chart-key i { display:inline-block; width:7px; height:7px; border-radius:2px; }
.mp-throughput .completed { background:var(--mp-mint); }
.mp-throughput .missed { background:var(--mp-chart-missed); }
.mp-throughput .pending { background:repeating-linear-gradient(135deg,var(--mp-violet) 0 2px,var(--lp-utility-blue) 2px 4px); }
.mp-throughput .other { background:var(--lp-muted); }
.mp-week-chart { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:14px; padding:0 8px; }
.mp-chart-day { display:grid; text-align:center; justify-items:center; gap:8px; min-width:0; font-size:12px; color:var(--lp-muted); }
.mp-bar-space { height:155px; width:100%; display:flex; align-items:flex-end; justify-content:center; border-bottom:1px solid var(--lp-border); background:repeating-linear-gradient(to top,transparent 0,transparent 37px,var(--lp-border) 38px,transparent 39px); }
.mp-bar-stack { display:flex; flex-direction:column; justify-content:flex-end; width:clamp(12px,3vw,38px); gap:2px; border-radius:5px 5px 0 0; overflow:hidden; min-height:1px; }
.mp-bar-stack i { display:block; min-height:3px; }
.mp-chart-day strong { color:var(--lp-ink); font-size:14px; font-weight:500; }
.mp-throughput footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:24px; padding-top:14px; border-top:1px solid var(--lp-border); color:var(--lp-muted); font-size:13px; }
.mp-overview .ct-operating-card { padding:24px; }
.mp-overview .ct-card-metric > strong { font-size:44px; font-weight:500; letter-spacing:-2px; }
.mp-section-heading { margin-bottom:14px; }
.mp-section-heading h2 { font-size:20px; margin:0; }
.mp-mill-section { margin-bottom:26px; }
.mp-overview .ct-mill-card { padding:22px; }
.mp-overview .ct-mill-card h2 { font-size:20px; }
.mp-overview .ct-mill-primary { gap:16px; }
.mp-overview .ct-mill-primary strong { font-size:24px; }
.mp-overview .ct-inventory-controls { margin-top:18px; padding-top:16px; }
.mp-overview-bottom { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:22px; margin-bottom:26px; align-items:start; }
.mp-overview-bottom:has(> :only-child),.mp-overview .ct-mill-grid:has(> :only-child) { grid-template-columns:1fr; }
.mp-overview .ct-action-card { padding:24px; }
.mp-overview .ct-action-card > header { margin-bottom:18px; }
.mp-overview .ct-readiness-item { margin:0; padding:13px 0; border:0; border-bottom:1px solid var(--lp-border); border-radius:0; background:none; }
.mp-overview .ct-readiness-item em { display:none; }
.mp-overview .ct-active-strategy { margin-top:18px; }
.mp-overview .overview-booking-targets { margin-bottom:26px; padding:24px; }
.mp-overview .overview-mill-target { background:none; border:0; border-radius:0; padding:0; }
.mp-overview .overview-mill-grid { gap:32px; }
.mp-overview .overview-mill-grid:has(> :only-child) { grid-template-columns:1fr; }
.mp-overview .overview-total-progress { background:var(--lp-surface-soft); }
.mp-overview .overview-total-progress i,.mp-overview .overview-customer-target > div > i { background:var(--mp-violet); }
.mp-daily-flow { padding:24px; }
.mp-daily-flow header > span { font-size:12px; color:var(--lp-muted); }
.mp-daily-flow h2 { font-size:20px; margin:6px 0 20px; }
.mp-daily-flow nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.mp-daily-flow nav button { display:flex; text-align:left; gap:10px; align-items:center; min-height:64px; padding:12px; border:1px solid var(--lp-border); border-radius:9px; background:none; color:var(--lp-ink); }
.mp-daily-flow nav button:hover { background:var(--lp-utility-blue); border-color:var(--mp-violet); }
.mp-daily-flow nav span { font-size:12px; color:var(--lp-muted); }
.mp-daily-flow nav strong { font-size:13px; font-weight:500; }
.mp-daily-flow nav i { margin-left:auto; font-style:normal; }
.mp-manual-dispatch { margin:0 0 20px; border:1px solid var(--lp-border); border-radius:10px; background:var(--lp-surface); }
.mp-manual-dispatch > summary { padding:16px 20px; min-height:56px; cursor:pointer; color:var(--lp-ink); }
.mp-manual-dispatch > summary span { font-size:15px; font-weight:500; margin-right:16px; }
.mp-manual-dispatch > summary small { color:var(--lp-muted); font-size:12px; }
.mp-manual-dispatch .dispatch-grid { margin:0; padding:16px; }
.mp-manual-dispatch .workflow-strip { margin:0 16px 16px; }
.shell .mp-document-view { display:flex; align-items:center; justify-content:flex-start; gap:14px; padding:0; margin:22px 0; background:none; border:0; box-shadow:none; }
.mp-document-view label { font-size:14px; color:var(--lp-muted); }
.mp-document-view select { width:auto; max-width:100%; min-height:44px; min-width:220px; }
.shell .inventory-mill-switcher,.shell .planner-mill-switcher { border-radius:9px; box-shadow:none; }
.mp-shell-header .workspace-rail .rail-button::before { display:none; }
[data-theme="dark"] .mp-shell-header .workspace-rail .rail-button.active { color:var(--lp-ink); background:none; }
.shell .doc-calendar-column,.shell .doc-template-column,
[data-theme="dark"] .shell .doc-calendar-column,[data-theme="dark"] .shell .doc-template-column {
  background:var(--lp-surface-soft); border-color:var(--lp-border); border-radius:10px;
}
.shell .doc-calendar-column > header,.shell .doc-calendar-empty,
.shell .doc-calendar-column small,.shell .doc-calendar-legend span,
.shell .doc-deadline-list small,.shell .doc-file-list small,
[data-theme="dark"] .shell .doc-calendar-column > header,
[data-theme="dark"] .shell .doc-calendar-empty,
[data-theme="dark"] .shell .doc-calendar-column small,
[data-theme="dark"] .shell .doc-calendar-legend span {
  color:var(--lp-muted); font-size:12px; font-weight:500;
}
.shell .doc-calendar-column time,.shell .doc-deadline-list time,
[data-theme="dark"] .shell .doc-calendar-column time,[data-theme="dark"] .shell .doc-deadline-list time { color:var(--lp-ink); font-size:13px; font-weight:500; }
.shell .doc-calendar-column article > button:first-child { color:var(--lp-action); font-size:12px; font-weight:500; min-height:30px; }
.shell .doc-calendar-column .btn,.shell .doc-deadline-list .btn { font-size:12px; min-height:44px; }
.shell .doc-calendar-grid { grid-template-columns:repeat(5,minmax(225px,1fr)); gap:14px; }
.shell .doc-calendar-legend span,[data-theme="dark"] .shell .doc-calendar-legend span { background:var(--lp-surface); border-color:var(--lp-border); border-radius:6px; }
.shell .doc-table-card,.shell .doc-detail-panel,.shell .doc-timeline,
[data-theme="dark"] .shell .doc-table-card,[data-theme="dark"] .shell .doc-detail-panel,[data-theme="dark"] .shell .doc-timeline { background:var(--lp-surface); color:var(--lp-ink); border-color:var(--lp-border); }
.shell .doc-table-card { border-radius:12px; }
@media (min-width:761px) and (max-width:1180px) {
  .shell > .mp-shell-header { gap:10px; padding-inline:18px; }
  .mp-brand b { display:none; }
  .mp-shell-header .workspace-rail { gap:2px; }
  .mp-shell-header .workspace-rail .rail-button { padding-inline:5px; }
  .mp-shell-header .workspace-rail .rail-button .rail-label { font-size:12px; }
  .shell > .mp-shell-header .topbar-theme { display:none; }
  .mp-overview-hero { align-items:flex-start; }
  .mp-overview-tools { max-width:380px; }
  .mp-daily-flow nav { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (min-width:761px) and (max-width:1000px) {
  .mp-shell-header .workspace-rail .rail-button:not(.mobile-primary):not(.rail-more-button) { display:none; }
  .mp-mobile-group { display:block; }
}
@media (max-width:760px) {
  :root { --mp-header:64px; --mp-section:54px; }
  .shell > .mp-shell-header { padding:0 16px; gap:8px; }
  .mp-brand b { font-size:18px; }
  .mp-shell-header .userbox { gap:1px; }
  .shell > .mp-shell-header .topbar-theme { display:none; }
  .mp-shell-header:has(.shadow-pill) .mp-brand b { display:none; }
  .mp-shell-header:has(.shadow-pill) .shadow-pill { max-width:100px; min-height:44px; }
  .mp-shell-header .workspace-rail { position:fixed; inset:auto 0 0; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); height:calc(72px + env(safe-area-inset-bottom)); padding:4px 6px calc(4px + env(safe-area-inset-bottom)); background:var(--lp-glass-strong); border-top:1px solid var(--lp-border); }
  .mp-shell-header .workspace-rail .rail-button { display:none; }
  .mp-shell-header .workspace-rail .rail-button.mobile-primary,.mp-shell-header .workspace-rail .mobile-more { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:5px; height:64px; min-height:44px; padding:4px 2px; border:0; border-radius:8px; }
  .mp-shell-header .workspace-rail .rail-button.mobile-primary .rail-glyph { display:block; width:21px; height:21px; }
  .mp-shell-header .workspace-rail .rail-button.mobile-primary .rail-label { white-space:normal; font-size:11px; text-align:center; }
  .mp-shell-header .workspace-rail .rail-button.mobile-primary { order:var(--mobile-order,0); }
  .mp-shell-header .workspace-rail .mobile-more { order:9; }
  .mp-shell-header .workspace-rail .rail-button.mobile-primary.active { color:var(--lp-action); background:var(--lp-utility-blue); }
  .mp-shell-header .workspace-rail.mobile-open .mobile-module-drawer { inset:auto 10px calc(82px + env(safe-area-inset-bottom)); width:auto; max-height:calc(100dvh - var(--environment-banner-height,0px) - var(--mp-header) - 100px); }
  .mp-mobile-group { display:block; }
  .mp-section-nav { padding-inline:16px; }
  .mp-section-nav > span { display:none; }
  .mp-section-nav > div { gap:22px; width:100%; }
  .mp-section-nav button { font-size:13px; }
  .shell:has(> .mp-shell-header) > .page { padding:calc(var(--mp-header) + 20px) 16px 24px; }
  .shell:has(> .mp-section-nav) > .page { padding-top:calc(var(--mp-header) + var(--mp-section) + 20px); }
  .shell:has(> .mp-shell-header) > .history-page { height:calc(100dvh - var(--environment-banner-height,0px) - 72px - env(safe-area-inset-bottom)); padding-bottom:10px; }
  .mp-search-panel { right:16px; }
  .mp-overview-hero { display:block; margin-bottom:8px; }
  .mp-overview-hero h1 { font-size:27px; }
  .mp-overview-hero p { font-size:14px; }
  .mp-overview-tools { justify-content:space-between; margin-top:20px; gap:10px; }
  .mp-overview-tools .btn { width:100%; }
  .mp-mill-switch { width:100%; }
  .mp-mill-switch button { flex:1; min-height:44px; padding-inline:7px; font-size:12px; }
  .mp-overview-main,.mp-overview-bottom,.mp-overview .ct-mill-grid { grid-template-columns:1fr; gap:16px; }
  .mp-overview .reference-metric { min-height:140px; }
  .mp-overview .reference-metric small { font-size:12px; }
  .mp-throughput,.mp-overview .ct-mill-card,.mp-overview .ct-operating-card,.mp-overview .ct-action-card,.mp-overview .overview-booking-targets,.mp-daily-flow { padding:18px; }
  .mp-panel-head,.mp-section-heading { align-items:flex-start; flex-wrap:wrap; gap:8px; }
  .mp-chart-key { gap:12px; font-size:10px; }
  .mp-week-chart { gap:8px; padding:0; }
  .mp-daily-flow nav { grid-template-columns:1fr; }
  .mp-overview .ct-mill-primary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mp-overview .ct-inventory-controls { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .mp-overview .ct-inventory-controls strong { font-size:18px; }
  .mp-overview .ct-action-card > header { flex-wrap:wrap; gap:12px; }
  .mp-overview .ct-readiness-item { grid-template-columns:20px minmax(0,1fr); }
  .mp-overview .ct-readiness-item > b { grid-column:2; }
}
}
