.production-execution-header-title {
  display: none;
}

/* Production shell geometry is shared by every production subpage. */
body:has(#productionView.is-active) {
  --production-shell-sidebar-width: 176px;
  --production-shell-sidebar-collapsed-width: 56px;
  margin: 0;
  padding: 0;
  background: #f5f8fc;
}

body:has(#productionView.is-active) .app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body:has(#productionView.is-active) .app-header {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: none;
  min-height: 64px;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(#productionView.is-active) .app-header::after {
  content: none;
}

body:has(#productionView.is-active) .app-brand {
  box-sizing: border-box;
  flex: 0 0 var(--production-shell-sidebar-width);
  width: var(--production-shell-sidebar-width);
  min-width: var(--production-shell-sidebar-width);
  max-width: var(--production-shell-sidebar-width);
  height: 64px;
  margin: 0;
  padding: 0 15px;
  background: var(--header-surface);
}

body:has(#productionView.is-active) .app-brand h1 {
  color: var(--header-ink);
  font-size: 16px;
  white-space: nowrap;
}

body:has(#productionView.is-active) .header-sidebar-toggle {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-left: auto;
  color: var(--header-ink);
  background: transparent;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
}

body:has(#productionView.is-active) .header-sidebar-toggle:hover {
  color: var(--header-ink);
  background: var(--header-hover);
}

body:has(#productionView.is-active) .production-execution-header-title {
  position: absolute;
  top: 0;
  left: calc(var(--production-shell-sidebar-width) + 22px);
  display: flex;
  align-items: center;
  height: 64px;
  color: #0b2c58;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

body:has(#productionView.is-active) .header-actions {
  gap: 7px;
  padding-right: 14px;
}

body:has(#productionView.is-active) .header-actions .icon-button,
body:has(#productionView.is-active) .header-actions .session-card {
  min-height: 34px;
  color: #213e5e;
  background: #ffffff;
  border: 1px solid #dce5ef;
  border-radius: 4px;
  box-shadow: none;
}

body:has(#productionView.is-active) .workspace-layout {
  width: 100%;
  max-width: none;
  min-height: calc(100dvh - 64px);
  margin: 0;
  padding: 0;
  grid-template-columns: var(--production-shell-sidebar-width) minmax(0, 1fr);
  gap: 0;
}

body:has(#productionView.is-active) .sidebar-nav {
  top: 64px;
  width: var(--production-shell-sidebar-width);
  min-height: calc(100dvh - 64px);
  max-height: calc(100dvh - 64px);
  padding: 10px 7px 14px;
  background: #071d3b;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(#productionView.is-active) .sidebar-title {
  display: none;
}

body:has(#productionView.is-active) .view-tab {
  min-height: 40px;
  padding: 0 12px;
  color: #e7f0fb;
  font-size: 14px;
  border-radius: 3px;
}

body:has(#productionView.is-active) .view-tab.is-active {
  color: #ffffff;
  background: #176df1;
  box-shadow: none;
}

body:has(#productionView.is-active) .workspace-layout.sidebar-collapsed {
  grid-template-columns: var(--production-shell-sidebar-collapsed-width) minmax(0, 1fr);
}

body:has(#productionView.is-active) .workspace-layout.sidebar-collapsed .sidebar-nav {
  width: var(--production-shell-sidebar-collapsed-width);
  padding-inline: 7px;
}

body:has(#productionView.is-active):has(.workspace-layout.sidebar-collapsed) .app-brand {
  flex-basis: var(--production-shell-sidebar-collapsed-width);
  width: var(--production-shell-sidebar-collapsed-width);
  min-width: var(--production-shell-sidebar-collapsed-width);
  max-width: var(--production-shell-sidebar-collapsed-width);
  justify-content: center;
  padding: 0;
}

body:has(#productionView.is-active):has(.workspace-layout.sidebar-collapsed) .app-brand > div {
  display: none;
}

body:has(#productionView.is-active):has(.workspace-layout.sidebar-collapsed) .header-sidebar-toggle {
  margin-left: 0;
}

body:has(#productionView.is-active):has(.workspace-layout.sidebar-collapsed) .production-execution-header-title {
  left: calc(var(--production-shell-sidebar-collapsed-width) + 22px);
}

/* Keep the production shell continuous while the active panel is switching.
   The navigation state is updated before the page panel, so it is the stable
   source for removing the legacy workspace gutter on every production page. */
body:has(.view-tab[data-view="production"].is-active) .workspace-layout {
  margin: 0;
  padding-top: 0;
  gap: 0;
}

body:has(.view-tab[data-view="production"].is-active) .sidebar-nav {
  margin: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) {
  --execution-sidebar-width: 176px;
  --execution-sidebar-collapsed-width: 56px;
  --execution-rank-width: 40px;
  --execution-track-width: 36px;
  --execution-project-width: 190px;
  margin: 0;
  padding: 0;
  background: #f5f8fc;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-header {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: none;
  min-height: 64px;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-header::after {
  content: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-brand {
  box-sizing: border-box;
  flex: 0 0 var(--execution-sidebar-width);
  width: var(--execution-sidebar-width);
  min-width: var(--execution-sidebar-width);
  max-width: var(--execution-sidebar-width);
  height: 64px;
  margin: 0;
  padding: 0 15px;
  background: var(--header-surface);
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .header-sidebar-toggle {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-left: auto;
  color: var(--header-ink);
  background: transparent;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .header-sidebar-toggle:hover {
  color: var(--header-ink);
  background: var(--header-hover);
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-brand h1 {
  font-size: 16px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-execution-header-title {
  position: absolute;
  top: 0;
  left: calc(var(--execution-sidebar-width) + 22px);
  display: flex;
  align-items: center;
  height: 64px;
  color: #0b2c58;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .header-actions {
  gap: 7px;
  padding-right: 14px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .header-actions .icon-button,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .header-actions .session-card {
  min-height: 34px;
  color: #213e5e;
  background: #ffffff;
  border: 1px solid #dce5ef;
  border-radius: 4px;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .workspace-layout {
  width: 100%;
  max-width: none;
  min-height: calc(100dvh - 64px);
  margin: 0;
  padding: 0;
  grid-template-columns: var(--execution-sidebar-width) minmax(0, 1fr);
  gap: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .workspace-layout.sidebar-collapsed {
  grid-template-columns: var(--execution-sidebar-collapsed-width) minmax(0, 1fr);
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .sidebar-nav {
  top: 64px;
  width: var(--execution-sidebar-width);
  min-height: calc(100dvh - 64px);
  padding: 10px 7px 14px;
  background: #071d3b;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .workspace-layout.sidebar-collapsed .sidebar-nav {
  width: var(--execution-sidebar-collapsed-width);
  padding-inline: 7px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])):has(.workspace-layout.sidebar-collapsed) .app-brand {
  flex-basis: var(--execution-sidebar-collapsed-width);
  width: var(--execution-sidebar-collapsed-width);
  min-width: var(--execution-sidebar-collapsed-width);
  max-width: var(--execution-sidebar-collapsed-width);
  justify-content: center;
  padding: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])):has(.workspace-layout.sidebar-collapsed) .app-brand > div {
  display: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])):has(.workspace-layout.sidebar-collapsed) .header-sidebar-toggle {
  margin-left: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])):has(.workspace-layout.sidebar-collapsed) .production-execution-header-title {
  left: calc(var(--execution-sidebar-collapsed-width) + 22px);
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .sidebar-title {
  display: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .view-tab {
  min-height: 40px;
  padding: 0 12px;
  color: #e7f0fb;
  font-size: 14px;
  border-radius: 3px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .view-tab.is-active {
  color: #ffffff;
  background: #176df1;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .workspace-main {
  min-width: 0;
  height: calc(100dvh - 64px);
  padding: 0 18px 8px;
  overflow: hidden;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) #productionView,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel {
  height: 100%;
  min-height: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel {
  display: flex;
  flex-direction: column;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-heading {
  display: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-overview-host {
  order: 1;
  flex: 0 0 auto;
  margin-top: 14px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-overview {
  grid-template-columns: minmax(0, 1.55fr) minmax(390px, 1fr);
  min-height: 84px;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d9e4ef;
  border-radius: 5px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics > div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: 24px 30px;
  align-items: center;
  min-height: 82px;
  padding: 12px 20px;
  border-right: 1px solid #e2e9f1;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics > div > svg {
  grid-row: 1 / -1;
  width: 20px;
  height: 20px;
  color: #0e6be8;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics > div.is-risk > svg {
  color: #cf423c;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics span {
  color: #203d5c;
  font-size: 13px;
  font-weight: 800;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics strong {
  color: #0d65db;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics .is-risk strong {
  color: #d1443d;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 9px 14px;
  background: #fffafa;
  border-left: 1px solid #fedfdb;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief > strong {
  align-self: start;
  padding-top: 3px;
  color: #bf3f39;
  font-size: 13px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief > div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button {
  display: grid;
  grid-template-columns: 13px auto minmax(0, 1fr) auto 13px;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0;
  color: #294563;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button svg {
  width: 12px;
  height: 12px;
  color: #d24841;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button b {
  color: #173857;
  font-size: 12px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button span {
  overflow: hidden;
  color: #49617c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button em {
  padding: 2px 5px;
  color: #cb443e;
  font-size: 11px;
  font-style: normal;
  background: #fff0ef;
  border-radius: 3px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar {
  order: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  margin-top: 12px;
  padding: 8px 11px;
  background: #ffffff;
  border: 1px solid #d9e4ef;
  border-radius: 5px 5px 0 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls > span {
  color: #506a85;
  font-size: 13px;
  font-weight: 800;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls .sort-tab {
  min-height: 31px;
  padding: 0 12px;
  border-radius: 3px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control {
  display: grid;
  grid-template-columns: auto 105px;
  align-items: center;
  gap: 7px;
  min-width: 172px;
  color: #526c86;
  font-size: 13px;
  font-weight: 750;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control select {
  width: 105px;
  min-height: 31px;
  padding: 0 25px 0 9px;
  color: #243f5b;
  font-size: 13px;
  font-weight: 750;
  background: #ffffff;
  border: 1px solid #d9e3ee;
  border-radius: 4px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar-actions {
  margin-left: auto;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-tool-button,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search {
  min-height: 31px;
  color: #304c69;
  background: #ffffff;
  border: 1px solid #d9e3ee;
  border-radius: 4px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-tool-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 750;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-tool-button.is-active {
  color: #ffffff;
  background: #176df1;
  border-color: #176df1;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-tool-button.is-active svg {
  color: #ffffff;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-tool-button svg,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search svg {
  width: 14px;
  height: 14px;
  color: #3c72a7;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 182px;
  padding: 0 8px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search input {
  width: 145px;
  min-width: 0;
  color: #263f5b;
  font-size: 13px;
  border: 0;
  outline: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-zoom {
  display: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt {
  order: 3;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-execution-x-scroll {
  display: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-execution-scroll {
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d9e4ef;
  border-top: 0;
  border-radius: 0;
  scrollbar-width: thin;
  scrollbar-color: #aab8c8 transparent;
}

.production-execution-board {
  width: var(--execution-board-width, 100%);
  min-width: 0;
  color: #173654;
  background: #ffffff;
}

.production-execution-axis,
.production-execution-row {
  display: grid !important;
  grid-template-columns: var(--execution-rank-width) var(--execution-project-width) var(--execution-track-width) minmax(0, 1fr) !important;
  width: 100% !important;
}

.production-execution-axis {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 63px !important;
  background: #f8fbff;
  border-bottom: 1px solid #d4e0ec;
}

.production-execution-axis-date,
.production-execution-axis-project,
.production-execution-axis-tracks,
.production-execution-axis-tasks {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #26425f;
  font-size: 13px;
  font-weight: 850;
  background: #f8fbff;
  border-right: 1px solid #d9e4ef;
}

.production-execution-axis-date {
  position: sticky;
  left: 0;
  z-index: 40;
  justify-content: center;
  padding: 0;
}

.production-execution-axis-project { position: sticky; left: var(--execution-rank-width); z-index: 40; }
.production-execution-axis-tracks { position: sticky; left: calc(var(--execution-rank-width) + var(--execution-project-width)); z-index: 40; justify-content: center; padding: 0; font-size: 12px; }
.production-execution-track-labels { position: sticky; left: calc(var(--execution-rank-width) + var(--execution-project-width)); z-index: 20; min-width: 0; background: #f8fbff; border-right: 1px solid #d9e4ef; }
.production-execution-track-labels span { position: absolute; left: 0; width: 100%; color: #536d88; text-align: center; font-size: 12px; line-height: 18px; }
.production-execution-track-labels .is-plan { top: calc(var(--execution-plan-top) - 6px); }
.production-execution-track-labels .is-daily { top: calc(var(--execution-plan-top) + 18px); }
.production-execution-board.is-sort-mode .production-execution-track-labels,
.production-execution-board.is-sort-mode .production-execution-axis-tracks { left: calc(68px + var(--execution-project-width)); }
.production-execution-board.is-sort-mode .production-execution-project,
.production-execution-board.is-sort-mode .production-execution-axis-project { left: 68px; }
body:has(.production-execution-board) .production-gantt { display: flex; flex-direction: column; }
.production-execution-window-nav { display: flex; align-items: center; flex: 0 0 auto; gap: 12px; padding: 6px 12px; border: 1px solid #d9e4ef; background: #fff; }
.production-execution-slider-wrap { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 180px; color: #536d88; font-size: 12px; }
.production-execution-slider-wrap > span { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.production-execution-window-nav input[type="range"] { appearance: none; flex: 1; width: 100%; min-width: 80px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: ew-resize; }
.production-execution-window-nav input[type="range"]::-webkit-slider-runnable-track { height: 10px; border: 1px solid #c4d4e5; border-radius: 5px; background: #e4edf6; }
.production-execution-window-nav input[type="range"]::-webkit-slider-thumb { appearance: none; width: 38px; height: 22px; margin-top: -7px; border: 1px solid #0e5cc2; border-radius: 4px; background: #2474db; box-shadow: 0 1px 2px #cad6e4; }
.production-execution-window-nav input[type="range"]::-moz-range-track { height: 8px; border: 1px solid #c4d4e5; border-radius: 5px; background: #e4edf6; }
.production-execution-window-nav input[type="range"]::-moz-range-thumb { width: 38px; height: 20px; border: 1px solid #0e5cc2; border-radius: 4px; background: #2474db; }
.production-execution-window-nav input[type="range"]:focus-visible { outline: 2px solid #176de5; outline-offset: 2px; }
.production-execution-window-nav button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #d9e4ef; border-radius: 4px; background: #fff; color: #26577f; cursor: pointer; white-space: nowrap; }
.production-execution-window-nav button:hover { background: #f0f6ff; }
.production-execution-window-nav button:disabled { opacity: 0.4; cursor: default; }
.production-execution-window-nav svg { width: 16px; height: 16px; }
.production-execution-window-nav input[type="date"] { width: 138px; min-height: 30px; padding: 3px 6px; font-size: 12px; border: 1px solid #d9e4ef; border-radius: 4px; }
.production-execution-window-nav [data-execution-window-label] { flex: 0 0 auto; font-size: 12px; font-variant-numeric: tabular-nums; color: #294966; }
.production-execution-board .production-execution-plan-bar { top: calc(var(--execution-plan-top) - 4px); height: 14px; padding: 0; overflow: hidden; border: 1px solid #bad2f0; border-radius: 2px; box-shadow: none; background: #dbe8fb; cursor: pointer; }
.production-execution-plan-bar:hover { background: #cbdff8; }
.production-execution-plan-label { position: absolute; top: 0; font-size: 11px; line-height: 12px; white-space: nowrap; color: #355f8d; }
.production-execution-node-line { position: absolute; top: calc(var(--execution-plan-top) + 2px); height: 1px; z-index: 2; background: #c9d5e0; pointer-events: none; }
.production-execution-board .production-execution-delay-bar { top: calc(var(--execution-plan-top) + 7px); height: 3px; }
.production-execution-event { position: absolute; inset-block: 0; width: 0; z-index: 11; color: #286ab5; }
.production-execution-event > i { position: absolute; top: calc(var(--execution-plan-top) - 3px); left: -4px; width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 50%; background: #fff; }
.production-execution-event::before { content: ""; position: absolute; left: 0; top: var(--execution-stem-top); height: calc(var(--execution-plan-top) - var(--execution-stem-top)); border-left: 1px solid currentColor; opacity: 0.35; }
.production-execution-event-label { position: absolute; display: flex; align-items: baseline; gap: 5px; width: max-content; height: 18px; padding: 0 4px; border: 0; border-radius: 2px; background: rgba(255,255,255,0.96); color: inherit; cursor: pointer; text-align: center; white-space: nowrap; }
.production-execution-event-label b { font-size: 12px; line-height: 18px; }
.production-execution-event-label small { font-size: 11px; line-height: 18px; }
.production-execution-event-label:focus-visible { outline: 2px solid #176df1; outline-offset: 1px; }
.production-execution-event.is-outside-window .production-execution-event-label { visibility: hidden; }
.production-execution-event.is-actual, .production-execution-event.is-delivery-actual { color: #14765f; }
.production-execution-event.is-actual > i, .production-execution-event.is-delivery-actual > i { background: currentColor; }
.production-execution-event.is-late-plan, .production-execution-event.is-late-delivery, .production-execution-event.is-unconfirmed { color: #a0670e; }
.production-execution-event.is-late-plan > i, .production-execution-event.is-late-delivery > i, .production-execution-event.is-unconfirmed > i { border-style: dashed; }
.production-execution-event.is-delivery > i { border-radius: 0; transform: rotate(45deg); }
.production-execution-activity-segments i.is-pending { opacity: 0.5; }
.production-execution-activity-segments i.is-stopped, .production-execution-legend i.execution-stopped { background: repeating-linear-gradient(135deg, #82909c 0 3px, #637485 3px 6px); }
.production-execution-detail-dialog { width: min(680px, calc(100vw - 32px)); max-height: 85dvh; padding: 0; color: #173654; border: 1px solid #ccd9e7; border-radius: 6px; overflow: auto; }
.production-execution-activity-segments i.is-electrical,
.production-execution-legend i.execution-stage-electrical { background: #168e90; }
.production-execution-activity-segments i.is-sheetmetal,
.production-execution-legend i.execution-stage-sheetmetal { background: #bf7926; }
.production-execution-detail-dialog::backdrop { background: rgba(16,32,53,0.35); }
.production-execution-detail-dialog header, .production-execution-detail-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; background: #f7fafe; }
.production-execution-detail-dialog h2 { margin: 0; font-size: 18px; }
.production-execution-detail-dialog h3 { margin: 0 0 10px; font-size: 14px; }
.production-execution-detail-dialog p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.production-execution-detail-dialog section { padding: 16px 20px; border-top: 1px solid #e1e8f0; }
.production-execution-detail-dialog button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 5px 10px; color: #26577f; background: #fff; border: 1px solid #cfdeec; border-radius: 4px; cursor: pointer; }
.production-execution-detail-dialog svg { width: 16px; height: 16px; }
.production-execution-detail-records > div { display: grid; grid-template-columns: 100px minmax(0,1fr) 70px; gap: 8px; padding: 8px 0; border-bottom: 1px solid #edf1f6; font-size: 13px; }
.production-execution-detail-dialog article { padding: 12px 0; border-bottom: 1px solid #edf1f6; }
.production-execution-detail-dialog article > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.production-execution-detail-dialog .is-empty { color: #73869a; }
.production-execution-detail-dialog .is-risk { color: #b9433f; }
.production-execution-detail-dialog footer { justify-content: flex-end; }
@media (max-width: 1100px) {
  .production-execution-window-nav { flex-wrap: wrap; }
  .production-execution-slider-wrap { order: 4; flex-basis: 100%; }
}

.production-execution-axis-timeline {
  position: relative;
  display: grid;
  grid-template-rows: 27px 36px;
  width: auto !important;
  min-width: 0;
  background: #ffffff;
}

.production-execution-week-row,
.production-execution-day-row,
.production-execution-day-grid {
  display: grid;
  grid-template-columns: repeat(var(--execution-day-count), minmax(0, 1fr));
  min-width: 0;
}

.production-execution-week-row {
  border-bottom: 1px solid #d9e4ef;
}

.production-execution-week-row span {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #294966;
  font-size: 12px;
  font-weight: 850;
  border-right: 1px solid #d9e4ef;
}

.production-execution-day-row span {
  display: grid;
  place-content: center;
  min-width: 0;
  color: #405c77;
  text-align: center;
  border-right: 1px solid #e4ebf3;
}

.production-execution-day-row span.is-weekend {
  background: #fffaf2;
}

.production-execution-day-row span.is-today { color: #fff; background: #087f7a; }
.production-execution-day-row span.is-today small { color: #fff; }

.production-execution-day-row b,
.production-execution-day-row small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  letter-spacing: 0;
  line-height: 1.15;
  text-overflow: clip;
  white-space: nowrap;
}

.production-execution-day-row b {
  font-size: 11px;
  font-weight: 800;
}

.production-execution-day-row small {
  margin-top: 2px;
  color: #71849a;
  font-size: 11px;
}

.production-execution-today-label {
  position: absolute;
  top: 20px;
  z-index: 7;
  min-width: max-content;
  padding: 4px 7px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  background: #0b938d;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(5, 84, 80, 0.18);
  transform: translate(-50%, -100%);
}

.production-execution-group {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100% !important;
  min-height: 31px;
  padding: 0 12px;
  background: #f8fbff;
  border-bottom: 1px solid #d8e3ef;
}

.production-execution-group strong {
  display: inline-flex;
  align-items: center;
  color: #1d3e61;
  font-size: 14px;
  font-weight: 900;
}

.production-execution-group strong::before {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  background: #1673e8;
  border-radius: 50%;
  content: "";
}

.production-execution-group span {
  color: #73869c;
  font-size: 12px;
}

.production-execution-group.is-week strong::before {
  background: #e69a16;
}

.production-execution-group.is-later strong::before {
  background: #158f86;
}

.production-execution-row {
  position: relative;
  min-height: var(--execution-row-height, 88px) !important;
  background: #ffffff;
  border-bottom: 2px solid #cbd8e5;
}

.production-execution-row:hover {
  background: #fbfdff;
}

.production-execution-row.is-daily-only {
  background: #fffdf8;
}

.production-execution-row.is-daily-only .production-execution-project {
  box-shadow: inset 2px 0 #e69a16;
}

.production-execution-row.is-daily-only .production-execution-rank::before {
  color: #9b6407;
  background: #fff5dd;
  border-color: #efd292;
  content: "临";
}

.production-execution-rank,
.production-execution-project,
.production-execution-tasks {
  position: sticky;
  z-index: 20;
  background: inherit;
  min-width: 0;
  border-right: 1px solid #dce6ef;
}

.production-execution-rank {
  left: 0;
  display: grid;
  place-items: center;
  color: #176de5;
  font-size: 12px;
  font-weight: 900;
  background: #fbfdff;
}

.production-execution-rank::before {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: inherit;
  background: #eef5ff;
  border: 1px solid #d3e4fb;
  border-radius: 4px;
  content: attr(data-rank);
}

.production-execution-order-actions {
  display: grid;
  gap: 2px;
}

.production-execution-order-actions button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  color: #176de5;
  background: #ffffff;
  border: 1px solid #cfe0f4;
  border-radius: 3px;
  cursor: pointer;
}

.production-execution-order-actions button:hover:not(:disabled) {
  color: #ffffff;
  background: #176df1;
  border-color: #176df1;
}

.production-execution-order-actions button:disabled {
  color: #aebdcc;
  background: #f4f7fa;
  cursor: not-allowed;
}

.production-execution-order-actions svg {
  width: 13px;
  height: 13px;
}

.production-execution-board.is-sort-mode .production-execution-axis,
.production-execution-board.is-sort-mode .production-execution-row {
  grid-template-columns: 68px var(--execution-project-width) var(--execution-track-width) minmax(0, 1fr) !important;
}

.production-execution-board.is-sort-mode .production-execution-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px;
  background: #f4f8fe;
}

.production-execution-project {
  left: var(--execution-rank-width);
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 5px 9px;
}

.production-execution-project button {
  display: block;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.production-execution-project button:hover strong {
  color: #0b66df;
}

.production-execution-project strong,
.production-execution-project span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-execution-project strong {
  color: #173653;
  font-size: 16px;
  font-weight: 900;
  line-height: 20px;
}

.production-execution-project button span {
  margin-top: 1px;
  color: #667c93;
  font-size: 12px;
  line-height: 15px;
}

.production-execution-progress-line {
  height: 4px;
  overflow: hidden;
  background: #dfeafb;
  border-radius: 999px;
}

.production-execution-progress-line i {
  display: block;
  height: 100%;
  background: #25b781;
  border-radius: inherit;
}

.production-execution-progress-summary { display: flex; align-items: center; gap: 8px; min-width: 0; height: 16px; color: #536d88; font-size: 12px; line-height: 16px; }
.production-execution-progress-summary > span { flex: 0 0 auto; }
.production-execution-progress-summary b { color: #173653; font-variant-numeric: tabular-nums; }
.production-execution-progress-summary .production-execution-progress-line { flex: 1; min-width: 20px; }

.production-execution-project p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin: 0;
  color: #567089;
  font-size: 12px;
  line-height: 18px;
}

.production-execution-project p span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-execution-project p b {
  flex: 0 0 auto;
  color: #183d5e;
  font-size: 12px;
}

.production-execution-overdue-badge {
  flex: 0 0 auto;
  padding: 1px 4px;
  color: #c53f39;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 16px;
  background: #fff1ef;
  border: 1px solid #f4c6c2;
  border-radius: 3px;
  white-space: nowrap;
}

.production-execution-tasks {
  display: grid !important;
  align-content: center;
  gap: 4px;
  padding: 6px 7px !important;
  background: #ffffff !important;
}

.production-execution-task-chip {
  display: grid;
  align-content: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 5px 7px;
  color: #314f6b;
  font: inherit;
  text-align: left;
  background: #f3faf8;
  border: 1px solid #cae8df;
  border-radius: 3px;
  cursor: pointer;
}

.production-execution-task-chip:hover,
.production-execution-task-chip:focus-visible {
  border-color: #75c5b7;
  background: #eaf7f3;
  outline: none;
}

.production-execution-task-chip b,
.production-execution-task-chip small {
  overflow: hidden;
  font-size: 12px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-execution-task-chip b {
  color: #1d5e59;
  font-weight: 850;
}

.production-execution-task-chip small {
  min-width: 0;
  color: #647b91;
  line-height: 1.2;
}

.production-execution-task-more {
  color: #166fe3;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.production-execution-no-task {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
  min-height: 30px;
  padding: 0 6px;
  color: #a6650b;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  background: #fffaf0;
  border: 1px solid #f0ddb9;
  border-radius: 3px;
  cursor: pointer;
}

.production-execution-no-task:hover {
  color: #8d5100;
  background: #fff5df;
  border-color: #e7c887;
}

.production-execution-no-task svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.production-execution-lane {
  position: relative;
  min-width: 0;
  min-height: 84px;
  overflow: hidden;
  background: #ffffff;
}

.production-execution-day-grid {
  position: absolute;
  inset: 0;
}

.production-execution-day-grid i {
  min-width: 0;
  border-right: 1px solid #e5ecf3;
}

.production-execution-day-grid i.is-weekend {
  background: #fffaf3;
}

.production-execution-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 12;
  width: 2px;
  background: #0c9991;
  transform: translateX(-1px);
  pointer-events: none;
}

.production-execution-plan-bar,
.production-execution-actual-bar {
  position: absolute;
  top: 18px;
  z-index: 3;
  height: 20px;
  border-radius: 3px;
}

.production-execution-plan-bar {
  min-width: 5px;
  background: #dbe8fb;
  box-shadow: inset 0 0 0 1px rgba(121, 157, 206, 0.16);
}

.production-execution-actual-bar {
  z-index: 4;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  background: #0a8d87;
  box-shadow: inset -1px 0 rgba(1, 78, 75, 0.2);
}

.production-execution-actual-bar span {
  display: block;
  overflow: hidden;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 850;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-execution-actual-bar.is-needs-reschedule {
  display: none;
}

.production-execution-delay-bar {
  position: absolute;
  top: 36px;
  z-index: 6;
  height: 3px;
  min-width: 8px;
  background: #e65750;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(154, 43, 38, 0.2);
  pointer-events: none;
}

.production-execution-milestone,
.production-execution-delivery {
  position: absolute;
  z-index: 8;
  top: 3px;
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  transform: translateX(-5px);
}

.production-execution-milestone i {
  width: 9px;
  height: 9px;
  background: #176fc4;
  transform: rotate(45deg);
}

.production-execution-milestone b,
.production-execution-delivery b {
  margin-left: 5px;
  color: #36526e;
  font-size: 12px;
  font-weight: 800;
}

.production-execution-delivery {
  top: 65px;
  transform: translateX(3px);
}

.production-execution-delivery i {
  width: 9px;
  height: 12px;
  background: #d64d47;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 50%, 0 68%);
}

.production-execution-delivery b {
  color: #a63c38;
}

.production-execution-delivery.is-edge {
  transform: translateX(-70px);
}

.production-execution-forecast {
  position: absolute;
  top: 65px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: max-content;
  color: #08746f;
  font-size: 11px;
  font-weight: 850;
  transform: translateX(-4px);
  white-space: nowrap;
}

.production-execution-forecast i {
  width: 7px;
  height: 7px;
  background: #0a918a;
  transform: rotate(45deg);
}

.production-execution-forecast.is-edge {
  transform: translateX(-100%);
}

.production-execution-row.is-risk .production-execution-project {
  box-shadow: inset 2px 0 #e2544e;
}

.production-execution-plan-bar.is-overdue {
  background: repeating-linear-gradient(135deg, #edf3fc 0 9px, #e3ecf9 9px 18px);
  box-shadow: inset 0 0 0 1px #cbd9e8;
}

.production-execution-plan-bar.is-overdue.has-forecast {
  background: #dbe8fb;
  box-shadow: inset 0 0 0 1px rgba(121, 157, 206, 0.16);
}

.production-execution-plan-bar.is-overdue.is-needs-reschedule {
  background: repeating-linear-gradient(135deg, #f3f6fa 0 9px, #e9eef5 9px 18px);
  box-shadow: inset 0 0 0 1px #c9d5e2;
}

.production-execution-actual-bar.is-overdue {
  background: #0a8d87;
  box-shadow: inset -1px 0 rgba(1, 78, 75, 0.2);
}

.production-execution-plan-bar.is-unscheduled {
  background: repeating-linear-gradient(135deg, #f3f6fa 0 9px, #e9eef5 9px 18px);
  box-shadow: inset 0 0 0 1px #c9d5e2;
}

.production-execution-plan-status {
  position: absolute;
  top: 0;
  left: 8px;
  z-index: 1;
  color: #9b4a45;
  font-size: 11px;
  font-weight: 850;
  line-height: 20px;
  white-space: nowrap;
}

.production-execution-plan-bar.is-unscheduled .production-execution-plan-status {
  color: #61788f;
}

.production-execution-continuation {
  position: absolute;
  top: 5px;
  right: 7px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #315d8b;
  white-space: nowrap;
}

.production-execution-continuation i {
  position: relative;
  width: 15px;
  height: 2px;
  background: #3978b8;
}

.production-execution-continuation i::after {
  position: absolute;
  top: -3px;
  right: 0;
  width: 6px;
  height: 6px;
  border-top: 2px solid #3978b8;
  border-right: 2px solid #3978b8;
  transform: rotate(45deg);
  content: "";
}

.production-execution-continuation b {
  font-size: 11px;
  font-weight: 850;
}

.production-execution-plan-bar.is-clipped-start::before,
.production-execution-plan-bar.is-clipped-end::after {
  position: absolute;
  top: 5px;
  z-index: 2;
  color: #6e8caf;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.production-execution-plan-bar.is-clipped-start::before {
  left: 3px;
  content: "\2039";
}

.production-execution-plan-bar.is-clipped-end::after {
  right: 3px;
  content: "\203A";
}

.production-execution-delivery.is-overdue-date {
  top: 65px;
  transform: translateX(3px);
}

.production-execution-activity-track {
  position: absolute;
  top: calc(var(--execution-plan-top, 46px) + 16px);
  right: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(var(--execution-day-count), minmax(0, 1fr));
  height: 22px;
  pointer-events: none;
}

.production-execution-activity-track::before {
  position: absolute;
  top: -2px;
  right: 0;
  left: 0;
  height: 1px;
  background: #e7eef5;
  content: "";
}

.production-execution-activity-cell {
  position: relative;
  display: block;
  min-width: 0;
  height: 22px;
  margin: 0;
  padding: 2px;
  overflow: hidden;
  color: #ffffff;
  font: inherit;
  line-height: 1;
  background: transparent;
  border: 0;
  border-right: 1px solid transparent;
  border-radius: 0;
  pointer-events: auto;
}

button.production-execution-activity-cell {
  cursor: pointer;
}

button.production-execution-activity-cell:hover,
button.production-execution-activity-cell:focus-visible {
  z-index: 2;
  overflow: visible;
  outline: 2px solid #176de5;
  outline-offset: -1px;
}

.production-execution-activity-cell.is-empty {
  pointer-events: none;
}

.production-execution-activity-cell.is-today-entry {
  pointer-events: auto;
  cursor: pointer;
}

.production-execution-activity-cell.is-today-entry::before {
  position: absolute;
  inset: 3px;
  display: grid;
  place-items: center;
  color: #0b7e78;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  background: #eff9f7;
  border: 1px dashed #79c4bb;
  border-radius: 2px;
  opacity: 0;
  content: "+";
  transition: opacity 120ms ease;
}

.production-execution-activity-cell.is-today-entry:hover::before,
.production-execution-activity-cell.is-today-entry:focus-visible::before {
  opacity: 1;
}

.production-execution-activity-cell.is-today .production-execution-activity-segments {
  box-shadow: inset 0 0 0 1px #087a74, 0 0 0 1px rgba(12, 153, 145, 0.22);
}

.production-execution-activity-segments {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #6f7f90;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(18, 51, 77, 0.14);
}

.production-execution-activity-cell.is-recorded .production-execution-activity-segments {
  opacity: 1;
  background: #fff;
  box-shadow: inset 0 0 0 1px #a7bbce;
}

.production-execution-activity-cell.is-recorded .production-execution-activity-segments i { opacity: 0.23; }
.production-execution-activity-cell.is-recorded > b { color: #294966; text-shadow: none; }

.production-execution-activity-cell.is-recorded::after {
  position: absolute;
  inset: 2px;
  border: 1px dashed #7594b1;
  border-radius: 2px;
  content: "";
  pointer-events: none;
}

.production-execution-activity-cell.is-exception {
  box-shadow: inset 0 0 0 2px #d94b45;
}

.production-execution-activity-segments i {
  flex: 1 1 0;
  min-width: 0;
}

.production-execution-activity-segments i.is-cutting,
.production-execution-legend i.execution-stage-cutting { background: #2f74d0; }
.production-execution-activity-segments i.is-forming,
.production-execution-legend i.execution-stage-forming { background: #7659bd; }
.production-execution-activity-segments i.is-machining,
.production-execution-legend i.execution-stage-machining { background: #526f91; }
.production-execution-activity-segments i.is-welding,
.production-execution-legend i.execution-stage-welding { background: #d6801f; }
.production-execution-activity-segments i.is-assembly,
.production-execution-legend i.execution-stage-assembly { background: #2b986a; }
.production-execution-activity-segments i.is-testing,
.production-execution-legend i.execution-stage-testing { background: #138b98; }
.production-execution-activity-segments i.is-packing,
.production-execution-legend i.execution-stage-packing { background: #cb5652; }
.production-execution-activity-segments i.is-progress { background: #176de5; }
.production-execution-activity-segments i.is-other { background: #6f7f90; }

.production-execution-activity-cell > b {
  position: absolute;
  inset: 2px;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(14, 39, 61, 0.42);
  white-space: nowrap;
  pointer-events: none;
}

.production-execution-delivery.is-overdue-date b {
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 2px;
}

.production-execution-delivery.is-overdue-date.is-edge {
  transform: translateX(-76px);
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-execution-legend {
  order: 4;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 6px;
  flex-wrap: wrap;
  min-height: 31px;
  margin: 0;
  padding: 7px 2px 0;
  color: #50677e;
  background: transparent;
  border: 0;
}

.production-execution-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.production-execution-legend i[class^="execution-stage-"] {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.production-execution-legend i.execution-actual,
.production-execution-legend i.planned {
  width: 22px;
  height: 8px;
  border-radius: 2px;
}

.production-execution-legend i.execution-actual {
  background: #0a8d87;
}

.production-execution-legend i.planned {
  background: #dbe8fb;
}

.production-execution-legend i.execution-milestone {
  width: 8px;
  height: 8px;
  background: #176fc4;
  transform: rotate(45deg);
}

.production-execution-legend i.execution-delivery {
  width: 9px;
  height: 12px;
  background: #d64d47;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 50%, 0 68%);
}

.production-execution-legend em {
  flex: 1 1 300px;
  margin-left: auto;
  color: #6f8296;
  font-size: 11px;
  font-style: normal;
  text-align: right;
}

.production-execution-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  height: 100%;
  color: #6d8196;
  background: #ffffff;
  border: 1px solid #d9e4ef;
}

.production-execution-empty svg {
  width: 28px;
  height: 28px;
  color: #7a9abd;
}

.production-execution-empty strong {
  color: #294865;
  font-size: 0.86rem;
}

.production-execution-empty span {
  font-size: 0.68rem;
}

@media (max-width: 1380px) {
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) {
    --execution-project-width: 166px;
    --execution-task-width: 102px;
  }

  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar {
    gap: 8px;
  }

  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control {
    grid-template-columns: auto 86px;
    min-width: 145px;
  }

  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control select {
    width: 86px;
  }

  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search {
    width: 150px;
  }

  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search input {
    width: 112px;
  }
}

@media (max-width: 860px) {
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .app-shell { background: #f5f8fc !important; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .workspace-layout { grid-template-columns: minmax(0, 1fr) !important; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .app-header { flex-direction: row; align-items: flex-start; height: 108px !important; min-height: 108px !important; max-height: 108px !important; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .app-brand { flex: 0 0 44px !important; width: 44px !important; min-width: 44px !important; max-width: 44px !important; height: 64px !important; padding: 8px !important; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .app-brand > div { display: none; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-page-back { left: 50px !important; width: 34px; padding: 0 !important; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-page-back span { display: none; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-execution-header-title { left: 96px !important; font-size: 20px; white-space: nowrap; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .header-actions { position: absolute; inset: 64px 0 auto; width: 100%; min-height: 44px; box-sizing: border-box; padding: 4px 8px !important; flex-wrap: nowrap; justify-content: flex-end; border-top: 1px solid #e0e8ef; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .header-actions .session-card { min-width: 112px; padding-inline: 6px; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .session-card strong { white-space: nowrap; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) #sessionRole { display: none; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .sidebar-nav { position: fixed !important; z-index: 100; top: 108px !important; width: 220px !important; height: calc(100dvh - 108px); }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-gantt-toolbar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 8px; padding: 10px; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-gantt-filter-group { flex: 1 0 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 8px; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-gantt-filter-control { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; width: auto; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-gantt-filter-control select { width: 100%; min-width: 0; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-gantt-toolbar-actions { display: flex; flex: 1 0 100%; min-width: 0; gap: 8px; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-gantt-search { flex: 1; min-width: 0; width: auto; }
  body:has(#productionView.is-active #productionGantt .production-lifecycle-board) .production-gantt-search input { width: 100%; min-width: 0; }
  body:has(#productionView.is-active #productionGantt) .production-lifecycle-overview { grid-template-columns: minmax(0, 1fr) !important; }
  body:has(#productionView.is-active #productionGantt) .production-lifecycle-overview .production-gantt-execution-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body:has(#productionView.is-active #productionGantt) .production-lifecycle-overview .production-gantt-execution-metrics > button { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px; }
  body:has(#productionView.is-active #productionGantt) .production-lifecycle-overview .production-gantt-execution-metrics > button > svg { display: none; }
  body:has(#productionView.is-active #productionGantt) .production-lifecycle-overview .production-gantt-execution-metrics > button > strong { grid-column: 1; font-size: 20px; }
  body:has(#productionView.is-active #productionGantt) .production-lifecycle-overview .production-gantt-execution-metrics > button > span { min-height: 36px; font-size: 11px; }
  body:has(#productionView.is-active #productionGantt) .production-lifecycle-overview .production-gantt-risk-brief { padding: 8px; }
  body:has(#productionView.is-active #productionGantt) .production-lifecycle-detail-heading { flex-wrap: wrap; }
  body:has(#productionView.is-active #productionGantt) .production-lifecycle-detail-actions { flex-wrap: wrap; }
}

/* Twelve-week planning view: the same fixed project order as the 30-day board,
   with one readable plan/actual rail and week-level milestones. */
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-weekly-scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d9e4ef;
  border-radius: 0 0 4px 4px;
}

.production-weekly-board {
  --weekly-rank-width: 42px;
  --weekly-project-width: 235px;
  --weekly-owner-width: 145px;
  --weekly-fixed-width: calc(var(--weekly-rank-width) + var(--weekly-project-width) + var(--weekly-owner-width));
  width: 100%;
  min-width: 0;
  color: #173653;
  background: #ffffff;
}

.production-weekly-board.is-fluid { width: 100%; }
.production-weekly-board.is-wide { width: 100%; }

.production-weekly-axis,
.production-weekly-row {
  display: grid;
  grid-template-columns: var(--weekly-rank-width) var(--weekly-project-width) var(--weekly-owner-width) minmax(0, 1fr);
}

.production-weekly-axis {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  background: #f7fafe;
  border-bottom: 1px solid #cedbe9;
}

.production-weekly-axis-rank,
.production-weekly-axis-project,
.production-weekly-axis-owner {
  position: sticky;
  z-index: 24;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 12px;
  color: #28445f;
  font-size: 13px;
  font-weight: 850;
  background: #f7fafe;
  border-right: 1px solid #d8e3ef;
}

.production-weekly-axis-rank { left: 0; justify-content: center; padding: 0; }
.production-weekly-axis-project { left: var(--weekly-rank-width); }
.production-weekly-axis-owner { left: calc(var(--weekly-rank-width) + var(--weekly-project-width)); }

.production-weekly-axis-timeline {
  position: relative;
  display: grid;
  grid-template-rows: 30px 42px;
  min-width: 0;
  overflow: visible;
}

.production-weekly-months,
.production-weekly-weeks {
  display: grid;
  grid-template-columns: repeat(var(--weekly-count), minmax(0, 1fr));
}

.production-weekly-months span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: #203f5e;
  font-size: 13px;
  font-weight: 850;
  background: #f7fafe;
  border-right: 1px solid #d8e3ef;
  white-space: nowrap;
}

.production-weekly-weeks span {
  display: grid;
  place-content: center;
  min-width: 0;
  text-align: center;
  background: #fbfdff;
  border-top: 1px solid #e2e9f1;
  border-right: 1px solid #e1e8f0;
}

.production-weekly-weeks span.is-current { background: #f0fbf9; }
.production-weekly-weeks b { color: #203f5e; font-size: 12px; line-height: 1.2; }
.production-weekly-weeks small { margin-top: 2px; color: #6b7f95; font-size: 10px; line-height: 1.2; white-space: nowrap; }
.production-weekly-board.is-compressed .production-weekly-weeks b { font-size: 11px; }
.production-weekly-board.is-compressed .production-weekly-weeks small { font-size: 9px; }

.production-weekly-today-label {
  position: absolute;
  top: 3px;
  z-index: 30;
  min-width: 48px;
  padding: 4px 7px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  background: #10978e;
  border-radius: 3px;
  transform: translateX(-50%);
}

.production-weekly-rows { position: relative; }

.production-weekly-row {
  position: relative;
  min-height: 82px;
  background: #ffffff;
  border-bottom: 1px solid #dfe7f0;
}

.production-weekly-row:hover { background: #fbfdff; }
.production-weekly-row.is-risk { box-shadow: inset 3px 0 0 #e24b43; }

.production-weekly-rank,
.production-weekly-project,
.production-weekly-owner {
  position: sticky;
  z-index: 8;
  min-width: 0;
  background: inherit;
  border-right: 1px solid #dfe7f0;
}

.production-weekly-rank {
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #176df1;
  font-size: 14px;
  font-weight: 850;
}

.production-weekly-rank > span { display: grid; width: 26px; height: 26px; place-items: center; background: #f0f6ff; border-radius: 3px; }
.production-weekly-rank .production-execution-order-actions { position: static; display: grid; gap: 3px; }

.production-weekly-project {
  left: var(--weekly-rank-width);
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 8px 12px;
}

.production-weekly-project > button {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.production-weekly-project > button strong { flex: 0 0 auto; color: #102f51; font-size: 16px; font-weight: 900; }
.production-weekly-project > button span { overflow: hidden; color: #61748b; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.production-weekly-project > div { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 8px; }
.production-weekly-project > div > i { height: 5px; overflow: hidden; background: #e5edf6; border-radius: 2px; }
.production-weekly-project > div > i b { display: block; height: 100%; background: #17a67c; }
.production-weekly-project > div > strong { color: #153a5f; font-size: 12px; text-align: right; }
.production-weekly-project small { overflow: hidden; color: #327c70; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.production-weekly-owner {
  left: calc(var(--weekly-rank-width) + var(--weekly-project-width));
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 9px 12px;
}

.production-weekly-owner strong,
.production-weekly-owner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-weekly-owner strong { color: #1d3e5f; font-size: 13px; }
.production-weekly-owner span { color: #5b7189; font-size: 12px; }

.production-weekly-lane { position: relative; min-width: 0; overflow: hidden; }

.production-weekly-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: calc(100% / var(--weekly-count)) 100%;
  background-image: linear-gradient(to right, transparent calc(100% - 1px), #e3eaf2 calc(100% - 1px));
  pointer-events: none;
}

.production-weekly-plan,
.production-weekly-actual {
  position: absolute;
  top: 32px;
  height: 19px;
  min-width: 4px;
  overflow: hidden;
  border-radius: 2px;
}

.production-weekly-plan { z-index: 2; color: #436380; background: #dce9fb; }
.production-weekly-plan.is-unscheduled { color: #9a6a13; background: #fff4d9; border: 1px dashed #dca13a; }
.production-weekly-plan.is-risk-plan { color: #9f423c; background: #fdeae8; border: 1px solid #efaaa5; }
.production-weekly-actual { z-index: 3; color: #ffffff; background: #159f94; }

.production-weekly-plan span,
.production-weekly-actual span { display: block; overflow: hidden; padding: 2px 7px 0; font-size: 11px; font-weight: 800; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }

.production-weekly-milestone,
.production-weekly-delivery {
  position: absolute;
  top: 25px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transform: translateX(-5px);
}

.production-weekly-milestone i { width: 10px; height: 10px; flex: 0 0 10px; background: #1471d8; transform: rotate(45deg); }
.production-weekly-milestone { top: 13px; }
.production-weekly-milestone b,
.production-weekly-delivery b { color: #28435f; font-size: 11px; font-weight: 800; }
.production-weekly-milestone b { padding: 1px 4px; background: rgba(255, 255, 255, 0.94); border-radius: 2px; }
.production-weekly-delivery { top: 22px; color: #ce3731; }
.production-weekly-delivery i { position: relative; width: 2px; height: 17px; flex: 0 0 2px; background: #d63e36; }
.production-weekly-delivery i::after { content: ""; position: absolute; top: 1px; left: 2px; width: 9px; height: 7px; background: #d63e36; }
.production-weekly-delivery.is-edge { transform: translateX(-100%); }

.production-weekly-forecast {
  position: absolute;
  top: 55px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #126b9f;
  white-space: nowrap;
  transform: translateX(-5px);
}

.production-weekly-forecast i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: #ffffff;
  border: 2px solid #1575bb;
  transform: rotate(45deg);
}

.production-weekly-forecast b { padding: 1px 3px; font-size: 10px; font-weight: 850; background: rgba(255, 255, 255, 0.94); }
.production-weekly-forecast.is-edge { transform: translateX(-100%); }

.production-weekly-delay {
  position: absolute;
  top: 57px;
  z-index: 4;
  height: 3px;
  min-width: 4px;
  background: #e4544c;
  border-radius: 2px;
  pointer-events: none;
}

.production-weekly-risk-chip {
  position: absolute;
  top: 7px;
  z-index: 9;
  padding: 2px 5px;
  color: #c43d36;
  font-size: 10px;
  font-weight: 850;
  line-height: 16px;
  white-space: nowrap;
  background: #fff0ef;
  border: 1px solid #f1b1ad;
  border-radius: 2px;
  transform: translateX(4px);
}

.production-weekly-overdue { position: absolute; top: 27px; z-index: 5; height: 29px; min-width: 12px; overflow: hidden; border: 2px solid #ef594f; border-radius: 2px; pointer-events: none; }
.production-weekly-overdue b { display: block; overflow: hidden; padding: 5px 8px 0; color: #d7443e; font-size: 11px; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }
.production-weekly-today-line { position: absolute; top: 0; bottom: 0; z-index: 12; width: 2px; background: #10978e; pointer-events: none; }

/* Full-cycle lifecycle view: compressed monthly history on the left and
   week-level current/future planning on the right. */
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-lifecycle-scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d9e4ef;
  border-radius: 0 0 4px 4px;
}

.production-lifecycle-board {
  --lifecycle-rank-width: 34px;
  --lifecycle-project-width: 172px;
  --lifecycle-current-width: 168px;
  --lifecycle-note-width: 240px;
  --lifecycle-fixed-width: calc(var(--lifecycle-rank-width) + var(--lifecycle-project-width) + var(--lifecycle-current-width));
  width: 100%;
  min-width: 1060px;
  color: #173653;
  background: #ffffff;
}

.production-lifecycle-axis,
.production-lifecycle-row {
  display: grid;
  grid-template-columns: var(--lifecycle-rank-width) var(--lifecycle-project-width) var(--lifecycle-current-width) minmax(420px, 1fr) var(--lifecycle-note-width);
}

.production-lifecycle-axis {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 76px;
  background: #f7fafe;
  border-bottom: 1px solid #cbd9e8;
}

.production-lifecycle-axis-rank,
.production-lifecycle-axis-project,
.production-lifecycle-axis-current {
  z-index: 3;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 8px;
  color: #28445f;
  font-size: 13px;
  font-weight: 850;
  background: #f7fafe;
  border-right: 1px solid #d8e3ef;
}

.production-lifecycle-axis-rank { justify-content: center; padding: 0; }

.production-lifecycle-axis-remark { display: flex; align-items: center; padding: 10px 12px; border-left: 1px solid #d8e3ef; font-size: 13px; font-weight: 700; }
.production-lifecycle-remark { min-width: 0; padding: 8px 12px 12px; border-left: 1px solid #d8e3ef; font-size: 12px; line-height: 1.65; background: #fff; overflow-wrap: anywhere; }
.production-lifecycle-remark-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.production-lifecycle-remark-heading small { color: #73879a; }
.production-lifecycle-remark-heading button { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #2376bc; cursor: pointer; }
.production-lifecycle-remark-heading button:hover { background: #edf5ff; }
.production-lifecycle-remark-heading svg { width: 16px; height: 16px; }
.production-lifecycle-remark > strong { display: block; color: #a85a14; font-weight: 600; }
.production-lifecycle-remark p { margin: 4px 0 0; white-space: pre-wrap; }
.production-remark-review { display: block; margin-top: 8px; color: #a15d0c; font-size: 12px; }
.production-remark-dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #d8e3ef; border-radius: 6px; color: #173653; background: #fff; }
.production-remark-dialog::backdrop { background: rgb(15 35 50 / 45%); }
.production-remark-dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.production-remark-dialog header, .production-remark-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; flex-shrink: 0; }
.production-remark-dialog header { border-bottom: 1px solid #d8e3ef; }
.production-remark-dialog h2 { margin: 0; font-size: 20px; }
.production-remark-dialog header p { margin: 6px 0 0; font-size: 13px; color: #657d93; overflow-wrap: anywhere; }
.production-remark-dialog button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid #d8e3ef; border-radius: 4px; background: #fff; color: #2376bc; cursor: pointer; }
.production-remark-dialog button.primary-button { color: #fff; background: #176bd4; border-color: #176bd4; }
.production-remark-dialog button:disabled { opacity: .6; cursor: wait; }
.production-remark-dialog svg { width: 18px; height: 18px; }
.production-remark-body { padding: 16px 20px; overflow-y: auto; }
.production-remark-body label { display: block; font-size: 14px; margin-bottom: 8px; }
.production-remark-body textarea { box-sizing: border-box; width: 100%; min-height: 180px; resize: vertical; border: 1px solid #c4d5e7; border-radius: 4px; padding: 10px; font: inherit; font-size: 14px; line-height: 1.7; }
.production-remark-stamp { font-size: 12px; color: #73879a; }
.production-remark-error { font-size: 13px; color: #bf3030; margin: 8px 0 0; }
.production-remark-dialog footer { border-top: 1px solid #d8e3ef; justify-content: flex-end; }

.production-lifecycle-axis-timeline {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #fbfdff;
}

.production-lifecycle-axis-groups {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 35% 65%;
  height: 29px;
  border-bottom: 1px solid #dce6f0;
}

.production-lifecycle-axis-groups strong {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2d4d6a;
  font-size: 12px;
  font-weight: 850;
  background: #f7fafe;
  border-right: 1px solid #d3e0ec;
}

.production-lifecycle-axis-groups strong:last-child { border-right: 0; }

.production-lifecycle-history-scale,
.production-lifecycle-future-scale {
  position: absolute;
  top: 29px;
  bottom: 0;
}

.production-lifecycle-history-scale {
  left: 0;
  width: 35%;
  background: #f8fbfd;
}

.production-lifecycle-future-scale {
  left: 35%;
  width: 65%;
  background: #ffffff;
}

.production-lifecycle-history-scale > span,
.production-lifecycle-future-scale > span {
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  place-content: center;
  min-width: 0;
  text-align: center;
  border-right: 1px solid #e1e8f0;
}

.production-lifecycle-history-scale > span b {
  overflow: visible;
  color: #667d94;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.production-lifecycle-history-scale > span:not(.has-label) b { visibility: hidden; }
.production-lifecycle-future-scale > span.is-current { background: #effaf8; }
.production-lifecycle-future-scale > span.is-month { background: #f7f9fc; }
.production-lifecycle-future-scale > span b { color: #234664; font-size: 12px; font-weight: 750; white-space: nowrap; }
.production-lifecycle-history-scale > span small,
.production-lifecycle-future-scale > span small { margin-top: 3px; color: #647a90; font-size: 11px; line-height: 1; white-space: nowrap; }
.production-lifecycle-future-scale > span.is-quiet > * { visibility: hidden; }

.production-lifecycle-today-label {
  position: absolute;
  top: 4px;
  left: 35%;
  z-index: 8;
  min-width: 66px;
  padding: 4px 7px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  background: #0a8e84;
  border-radius: 3px;
  transform: translateX(-50%);
  box-shadow: 0 2px 5px rgba(7, 90, 84, 0.16);
}

.production-lifecycle-rows { position: relative; }

.production-lifecycle-row {
  --lifecycle-rail-top: 62px;
  --lifecycle-plan-top: 82px;
  --lifecycle-row-height: 116px;
  position: relative;
  min-height: var(--lifecycle-row-height);
  background: #ffffff;
  border-bottom: 2px solid #cbd8e5;
}

.production-lifecycle-row:hover,
.production-lifecycle-row.is-expanded { background: #fbfdff; }

.production-lifecycle-rank,
.production-lifecycle-project,
.production-lifecycle-current {
  position: relative;
  z-index: 16;
  min-width: 0;
  background: inherit;
  border-right: 1px solid #dfe7f0;
}

.production-lifecycle-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #176df1;
  font-size: 14px;
  font-weight: 850;
}

.production-lifecycle-rank > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  background: #f0f6ff;
  border-radius: 3px;
}

.production-lifecycle-rank .production-execution-order-actions { position: static; display: grid; gap: 3px; }

.production-lifecycle-project {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px 8px;
}

.production-lifecycle-project > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.production-lifecycle-project > button > span { display: grid; min-width: 0; gap: 3px; }
.production-lifecycle-project > button strong { color: #102f51; font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.production-lifecycle-project > button small { overflow: hidden; color: #60758a; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.production-lifecycle-project > button svg { width: 16px; height: 16px; flex: 0 0 16px; color: #6f89a2; }
.production-lifecycle-project > div { display: grid; align-items: center; gap: 6px; }
.production-lifecycle-project > div > i { height: 6px; overflow: hidden; background: #e4edf6; border-radius: 2px; }
.production-lifecycle-project > div > i b { display: block; height: 100%; background: #198b73; }
.production-lifecycle-project > div > strong { color: #173f62; font-size: 12px; font-weight: 600; }
.production-lifecycle-stages-count > span { display: flex; gap: 3px; }
.production-lifecycle-stages-count > span i { flex: 1; height: 4px; background: #e2e9ef; border-radius: 1px; }
.production-lifecycle-stages-count > span i.is-done { background: #198b73; }
.production-lifecycle-feedback { color: #667c8e; font-size: 11px; line-height: 16px; }
.production-lifecycle-project > .production-lifecycle-countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  min-height: 18px;
  color: #315373;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.production-lifecycle-project > .production-lifecycle-countdown > strong {
  color: inherit;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}
.production-lifecycle-project > .production-lifecycle-countdown.is-soon,
.production-lifecycle-project > .production-lifecycle-countdown.is-today { color: #99600c; }
.production-lifecycle-project > .production-lifecycle-countdown.is-overdue { color: #bf3731; }
.production-lifecycle-project > .production-lifecycle-countdown.is-complete { color: #167560; }
.production-lifecycle-project > .production-lifecycle-countdown.is-unknown { color: #667c8e; }

.production-lifecycle-current {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 8px;
}

.production-lifecycle-current > strong,
.production-lifecycle-current > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-lifecycle-current > strong { color: #126f67; font-size: 13px; font-weight: 850; }
.production-lifecycle-current > span { color: #526b83; font-size: 12px; font-weight: 600; }
.production-lifecycle-current > span.production-lifecycle-next { white-space: normal; line-height: 18px; color: #294760; font-weight: 400; }
.production-lifecycle-pending { display: flex; align-items: center; gap: 4px; padding: 2px 0; border: 0; background: transparent; color: #926009; font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.production-lifecycle-pending svg { width: 14px; height: 14px; flex: 0 0 14px; }
.production-lifecycle-pending:hover { text-decoration: underline; }
.production-lifecycle-pending:focus-visible { outline: 2px solid #176de5; outline-offset: 2px; }
.production-lifecycle-current > em { display: flex; align-items: center; gap: 4px; margin-top: 2px; color: #93600b; font-size: 11px; font-style: normal; font-weight: 650; line-height: 16px; }
.production-lifecycle-current > em.is-clear { color: #2d7b67; }
.production-lifecycle-current > em.is-risk { color: #b9433f; }
.production-lifecycle-row.is-risk .production-lifecycle-project { box-shadow: inset 2px 0 #df625b; }
.production-lifecycle-current > em svg { width: 13px; height: 13px; flex: 0 0 13px; }

.production-lifecycle-lane {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #f4f8fb 0 35%, #ffffff 35% 100%);
}

.production-lifecycle-grid { position: absolute; inset: 0; pointer-events: none; }
.production-lifecycle-grid i { position: absolute; top: 0; bottom: 0; border-left: 1px solid #e6edf4; }
.production-lifecycle-grid i.is-scale-boundary { border-left: 1px dashed #9cb0c5; }

.production-lifecycle-lane::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 35%;
  z-index: 1;
  width: 1px;
  background: #a8d9d4;
}

.production-lifecycle-baseline,
.production-lifecycle-actual-rail,
.production-lifecycle-plan-rail,
.production-lifecycle-delay-rail {
  position: absolute;
  top: var(--lifecycle-rail-top);
  z-index: 3;
  height: 6px;
  border-radius: 2px;
}

.production-lifecycle-baseline { left: 34px; right: 1%; height: 1px; margin-top: 2px; background: #e0e8ee; }
.production-lifecycle-baseline.is-plan { top: var(--lifecycle-plan-top); }
.production-lifecycle-actual-rail { background: #14765f; }
.production-lifecycle-plan-rail { top: var(--lifecycle-plan-top); height: 4px; background: #b9d4f4; }
.production-lifecycle-delay-rail { top: calc(var(--lifecycle-plan-top) - 7px); height: 3px; background: #e6534b; }
.production-lifecycle-delay-rail.is-projected { height: 0; border-top: 2px dashed #e6534b; background: none; }
.production-lifecycle-track-name { position: absolute; left: 4px; z-index: 4; padding: 0 2px; color: #61778b; background: #f4f8fb; font-size: 10px; line-height: 14px; }
.production-lifecycle-track-name.is-actual { top: calc(var(--lifecycle-rail-top) - 6px); color: #14765f; }
.production-lifecycle-track-name.is-plan { top: calc(var(--lifecycle-plan-top) - 5px); color: #326eaf; }

.production-lifecycle-node {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 7;
  width: 0;
  color: #235d9d;
}

.production-lifecycle-node::before {
  content: "";
  position: absolute;
  top: calc(var(--lifecycle-node-top, var(--lifecycle-rail-top)) + 3px);
  left: 0;
  width: var(--lifecycle-leader-length, 12px);
  height: 1px;
  background: currentColor;
  opacity: 0.42;
  transform: rotate(var(--lifecycle-leader-angle, -90deg));
  transform-origin: 0 0;
}

.production-lifecycle-node > i {
  position: absolute;
  top: calc(var(--lifecycle-node-top, var(--lifecycle-rail-top)) - 2px);
  left: 0;
  z-index: 2;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border: 3px solid currentColor;
  border-radius: 50%;
  transform: translateX(-50%);
}

.production-lifecycle-node-label {
  position: absolute;
  left: 0;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 185px;
  padding: 2px 4px;
  color: currentColor;
  font-family: inherit;
  text-align: center;
  line-height: 16px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.96);
  border: 0;
  border-radius: 2px;
  box-shadow: none;
  cursor: pointer;
}
.production-lifecycle-node-label > b { font-size: 12px; font-weight: 650; white-space: normal; overflow-wrap: anywhere; }
.production-lifecycle-node-label > small { display: flex; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; line-height: 14px; }
.production-lifecycle-node-label em { font-style: normal; font-weight: 400; }
.production-lifecycle-node-label:hover,
.production-lifecycle-node-label:focus-visible { outline: 2px solid #176de5; outline-offset: 1px; }
.production-lifecycle-node.is-actual,
.production-lifecycle-node.is-delivery-actual { color: #116c57; }
.production-lifecycle-node.is-current { color: #078f85; }
.production-lifecycle-node.is-plan,
.production-lifecycle-node.is-forecast,
.production-lifecycle-node.is-delivery { color: #2169ad; }
.production-lifecycle-node.is-late-plan,
.production-lifecycle-node.is-late-delivery,
.production-lifecycle-node.is-unconfirmed { color: #94620d; }
.production-lifecycle-node.is-actual > i,
.production-lifecycle-node.is-delivery-actual > i { background: currentColor; }
.production-lifecycle-node.is-late-plan > i,
.production-lifecycle-node.is-late-delivery > i,
.production-lifecycle-node.is-unconfirmed > i { border-style: dashed; border-width: 2px; }
.production-lifecycle-node.is-delivery > i,
.production-lifecycle-node.is-late-delivery > i,
.production-lifecycle-node.is-delivery-actual > i { border-radius: 1px; transform: translateX(-50%) rotate(45deg); }

.production-lifecycle-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--lifecycle-fixed-width) + (100% - var(--lifecycle-fixed-width) - var(--lifecycle-note-width)) * 0.35);
  z-index: 4;
  width: 2px;
  background: #0a8e84;
  pointer-events: none;
}

.production-lifecycle-empty-history,
.production-lifecycle-empty-plan { position: absolute; top: calc(var(--lifecycle-rail-top) - 21px); color: #73879a; font-size: 12px; line-height: 18px; }
.production-lifecycle-empty-history { left: 38px; max-width: 30%; }
.production-lifecycle-empty-plan { left: calc(35% + 16px); top: calc(var(--lifecycle-plan-top) + 12px); max-width: 55%; }

.production-lifecycle-detail {
  position: relative;
  z-index: 18;
  display: grid;
  gap: 12px;
  padding: 13px 16px 15px calc(var(--lifecycle-rank-width) + 16px);
  background: #f8fbfe;
  border-bottom: 1px solid #cbdbe9;
  box-shadow: inset 0 3px 0 #d7e7f4;
}

.production-lifecycle-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.production-lifecycle-detail-heading > div { display: grid; min-width: 0; gap: 3px; }
.production-lifecycle-detail-heading strong { color: #173a5b; font-size: 13px; font-weight: 900; }
.production-lifecycle-detail-heading span { color: #60768d; font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.production-lifecycle-detail-actions { display: flex !important; flex: 0 0 auto; align-items: center; gap: 8px !important; }
.production-lifecycle-pending-detail { padding: 10px 12px; border-left: 3px solid #d6a645; background: #fffaf0; color: #755113; font-size: 12px; }
.production-lifecycle-pending-detail ul { display: flex; flex-wrap: wrap; gap: 6px 24px; padding-left: 16px; margin: 6px 0 0; }
.production-lifecycle-detail-actions button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 9px; color: #176bd5; font-size: 12px; font-weight: 700; background: #ffffff; border: 1px solid #bcd3eb; border-radius: 3px; cursor: pointer; }
.production-lifecycle-detail-actions button svg { width: 16px; height: 16px; }

.production-lifecycle-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  border: 1px solid #dbe5ef;
  background: #ffffff;
}

.production-lifecycle-stage {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 9px 10px 9px 13px;
  border-right: 1px solid #e1e8f0;
}

.production-lifecycle-stage::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: #8aa8c4; }
.production-lifecycle-stage:last-child { border-right: 0; }
.production-lifecycle-stage strong { color: #264864; font-size: 13px; font-weight: 750; }
.production-lifecycle-stage span { color: #486781; font-size: 12px; font-weight: 600; }
.production-lifecycle-stage small { overflow: hidden; color: #64798e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.production-lifecycle-stage.is-done::before { background: #14765f; }
.production-lifecycle-stage.is-current::before { background: #078f85; }
.production-lifecycle-stage.is-plan::before { background: #4f8dcc; }
.production-lifecycle-stage.is-missing::before { background: #d89a2f; }
.production-lifecycle-stage.is-missing span { color: #9a6a13; }

.production-lifecycle-records { display: grid; gap: 8px; font-size: 13px; }
.production-lifecycle-record-list > div { display: grid; grid-template-columns: 112px minmax(100px, 1.2fr) 76px minmax(100px, 1fr); gap: 12px; align-items: center; min-height: 34px; border-bottom: 1px solid #dfe7ef; }
.production-lifecycle-record-list time,
.production-lifecycle-record-list span { font-size: 12px; color: #536e85; }
.production-lifecycle-record-list strong { font-size: 12px; font-weight: 650; }
.production-lifecycle-record-list span.is-actual,
.production-lifecycle-record-list span.is-delivery-actual { color: #116c57; }
.production-lifecycle-record-list span.is-late-plan,
.production-lifecycle-record-list span.is-late-delivery,
.production-lifecycle-record-list span.is-unconfirmed { color: #94620d; }

.production-lifecycle-daily { display: grid; gap: 6px; }
.production-lifecycle-daily-title { display: flex; align-items: center; gap: 8px; }
.production-lifecycle-daily-title strong { color: #244561; font-size: 13px; }
.production-lifecycle-daily-title span { color: #64798e; font-size: 12px; }
.production-lifecycle-daily-list { display: grid; border-top: 1px solid #dce5ed; }
.production-lifecycle-daily-list > div { display: grid; grid-template-columns: 54px 82px minmax(120px, 1.4fr) minmax(110px, 1fr) 64px; align-items: center; gap: 10px; min-height: 29px; border-bottom: 1px solid #e3eaf1; }
.production-lifecycle-daily-list time { color: #5c738a; font-size: 12px; font-weight: 650; }
.production-lifecycle-daily-list strong { color: #254966; font-size: 12px; }
.production-lifecycle-daily-list span { color: #405f79; font-size: 12px; overflow-wrap: anywhere; }
.production-lifecycle-daily-list em { color: #177565; font-size: 12px; font-style: normal; font-weight: 650; text-align: right; }
.production-lifecycle-daily-list [data-record-kind="plan"] em { color: #64798e; }
.production-lifecycle-daily-list [data-record-kind="feedback"] em { color: #2169ad; }
.production-lifecycle-daily-list [data-record-kind="feedback"],
.production-lifecycle-daily-list [data-record-kind="plan"] { padding-block: 7px; }
.production-lifecycle-no-daily { margin: 0; padding: 8px 0; color: #7a8d9f; font-size: 10px; }

.production-lifecycle-overview .production-gantt-execution-metrics > button { position: relative; display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; align-content: center; align-items: center; gap: 5px 10px; padding: 12px 18px; min-width: 0; text-align: left; color: #294861; background: #fff; border: 0; border-right: 1px solid #e1e9f1; border-radius: 0; cursor: pointer; font: inherit; }
.production-lifecycle-overview .production-gantt-execution-metrics > button > svg { width: 20px; height: 20px; grid-row: 1 / 3; color: #1671ed; }
.production-lifecycle-overview .production-gantt-execution-metrics > button > span { font-size: 12px; line-height: 18px; }
.production-lifecycle-overview .production-gantt-execution-metrics > button > strong { grid-column: 2; font-size: 24px; color: #1264ce; }
.production-lifecycle-overview .production-gantt-execution-metrics > button.is-active { background: #f5f9ff; box-shadow: inset 0 -3px #176def; }
.production-lifecycle-overview .production-gantt-execution-metrics > button:focus-visible { outline: 2px solid #176def; outline-offset: -3px; }
.production-lifecycle-overview .production-gantt-execution-metrics > button.is-warning strong,
.production-lifecycle-overview .production-gantt-execution-metrics > button.is-warning svg { color: #a16b13; }
.production-lifecycle-overview .production-gantt-execution-metrics > button.is-risk strong,
.production-lifecycle-overview .production-gantt-execution-metrics > button.is-risk svg { color: #c84740; }
.production-lifecycle-filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; padding: 4px 12px; color: #355c7d; background: #f5f9ff; font-size: 12px; }
.production-lifecycle-filter-summary button { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; color: #2364a2; background: none; border: 0; font: inherit; cursor: pointer; }
.production-lifecycle-filter-summary svg { width: 14px; height: 14px; }
.production-lifecycle-filter-empty { padding: 40px; color: #5a7389; font-size: 14px; text-align: center; }

.production-execution-legend .lifecycle-actual { width: 22px; height: 7px; background: #14765f; border-radius: 2px; }
.production-execution-legend .lifecycle-plan { width: 22px; height: 7px; background: #d7e7fb; border-radius: 2px; }
.production-execution-legend .lifecycle-today { width: 2px; height: 14px; background: #0a8e84; }
.production-execution-legend .lifecycle-delay { width: 22px; height: 4px; background: #e6534b; border-radius: 2px; }
.production-execution-legend .lifecycle-missing { width: 22px; height: 12px; background: #fff7e5; border: 1px dashed #d89a2f; border-radius: 2px; }
.production-execution-legend .lifecycle-forecast-delay { width: 22px; height: 0; border-top: 2px dashed #e6534b; }
.production-execution-legend .lifecycle-delivery { width: 8px; height: 8px; border: 2px solid #2169ad; transform: rotate(45deg); }

@media (max-width: 1450px) {
  .production-lifecycle-board {
    --lifecycle-rank-width: 32px;
    --lifecycle-project-width: 160px;
    --lifecycle-current-width: 164px;
  }

  .production-lifecycle-axis-project,
  .production-lifecycle-axis-current { padding-inline: 8px; font-size: 12px; }
}

@media (max-width: 1100px) {
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-lifecycle-scroll { overflow-x: auto; }
  .production-lifecycle-board { min-width: 1100px; }
}

.production-execution-legend .execution-overdue { width: 22px; height: 12px; background: transparent; border: 2px solid #ef594f; border-radius: 2px; }
.production-execution-legend .execution-pending { width: 22px; height: 12px; background: repeating-linear-gradient(135deg, #f3f6fa 0 5px, #e9eef5 5px 10px); border: 1px solid #c9d5e2; border-radius: 2px; }

@media (max-width: 1450px) {
  .production-weekly-board { --weekly-rank-width: 40px; --weekly-project-width: 210px; --weekly-owner-width: 130px; }
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar { gap: 8px; }
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls .sort-tab { padding-inline: 9px; }
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar {
  flex-wrap: nowrap;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls {
  flex: 0 0 auto;
  white-space: nowrap;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls > span {
  display: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control {
  grid-template-columns: auto 78px;
  min-width: 139px;
  white-space: nowrap;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control select {
  width: 78px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar-actions {
  flex: 0 0 auto;
  white-space: nowrap;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search {
  width: 168px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search input {
  width: 130px;
}

/* Final shell guard: the legacy theme uses a 76px sticky offset while the
   production header is 64px. Lock both values and bridge the rail so browser
   zoom cannot expose a strip between the brand and the navigation. */
body:has(#productionView.is-active) .app-header,
body:has(.view-tab[data-view="production"].is-active) .app-header {
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
}

body:has(#productionView.is-active) .workspace-layout,
body:has(.view-tab[data-view="production"].is-active) .workspace-layout {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body:has(#productionView.is-active) .sidebar-nav,
body:has(.view-tab[data-view="production"].is-active) .sidebar-nav {
  top: 64px !important;
  margin-top: 0 !important;
  box-shadow: 0 -16px 0 #071d3b !important;
}

/* Paint the rail on the shell itself. This keeps the brand and navigation
   visually continuous across intentional content gutters and browser zoom. */
body:has(#productionView.is-active) .app-shell,
body:has(.view-tab[data-view="production"].is-active) .app-shell {
  background: linear-gradient(90deg, #071d3b 0 176px, #f5f8fc 176px 100%) !important;
}

body:has(#productionView.is-active):has(.workspace-layout.sidebar-collapsed) .app-shell,
body:has(.view-tab[data-view="production"].is-active):has(.workspace-layout.sidebar-collapsed) .app-shell {
  background: linear-gradient(90deg, #071d3b 0 56px, #f5f8fc 56px 100%) !important;
}

/* Separate time range, project filters and actions into readable groups. */
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar {
  display: grid;
  grid-template-columns: max-content max-content minmax(280px, 1fr);
  align-items: end;
  gap: 12px 18px;
  min-height: 70px;
  padding: 10px 12px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls {
  align-self: center;
  gap: 4px;
  padding: 3px;
  background: #f3f7fc;
  border: 1px solid #dce6f2;
  border-radius: 5px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls .sort-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-group {
  display: grid;
  grid-template-columns: 156px 176px 176px 34px;
  gap: 10px;
  width: max-content;
  min-width: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
  color: #536d88;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control select {
  width: 100%;
  min-height: 34px;
  padding: 0 28px 0 10px;
  font-size: 14px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar-actions {
  align-self: end;
  justify-self: end;
  margin-left: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-tool-button,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search {
  min-height: 34px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search {
  width: 240px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search input {
  width: 202px;
}

@media (max-width: 1450px) {
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-group {
    grid-template-columns: 140px 155px 155px 34px;
  }

  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search {
    width: 210px;
  }

  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search input {
    width: 172px;
  }
}

@media (max-width: 1680px) {
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar {
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
  }

  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-group {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(3, minmax(140px, 1fr)) 34px;
    width: 100%;
  }

  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
}

body:has(#productionView.is-active) .production-gantt-filter-reset {
  align-self: end;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
}

body:has(#productionView.is-active) .production-gantt-filter-reset:disabled {
  color: #91a1b3;
  background: #f5f7fa;
  cursor: default;
}

body:has(#productionView.is-active) .production-gantt-tool-button:focus-visible {
  outline: 2px solid #1671ef;
  outline-offset: 2px;
}

/* The full-canvas production pages hide the legacy tab strip. Keep a direct,
   consistent route back to the production overview in the module header. */
.production-page-back {
  display: none;
}

body:has(#productionView.is-active) .production-page-back:not([hidden]) {
  position: absolute;
  top: 15px;
  left: calc(var(--production-shell-sidebar-width) + 14px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 10px;
  color: #315373;
  background: #ffffff;
  border: 1px solid #d8e3ef;
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

body:has(#productionView.is-active) .production-page-back:not([hidden]):hover {
  color: #0b63d7;
  background: #f4f8fd;
  border-color: #b8d0eb;
}

body:has(#productionView.is-active) .production-page-back:not([hidden]) svg {
  width: 16px;
  height: 16px;
}

body:has(#productionView.is-active):has(#productionPageBack:not([hidden])) .production-execution-header-title {
  left: calc(var(--production-shell-sidebar-width) + 128px);
}

body:has(#productionView.is-active):has(.workspace-layout.sidebar-collapsed) .production-page-back:not([hidden]) {
  left: calc(var(--production-shell-sidebar-collapsed-width) + 14px);
}

body:has(#productionView.is-active):has(.workspace-layout.sidebar-collapsed):has(#productionPageBack:not([hidden])) .production-execution-header-title {
  left: calc(var(--production-shell-sidebar-collapsed-width) + 128px);
}

body:has(#productionView.is-active) .header-actions {
  justify-content: flex-end;
  padding-left: 180px;
  min-width: 0;
}

body:has(#productionView.is-active):has(#productionPageBack:not([hidden])) .header-actions {
  padding-left: 266px;
}

@media (max-width: 1200px) {
  body:has(#productionView.is-active) .header-actions > .icon-button > span { display: none; }
  body:has(#productionView.is-active) .header-actions > .icon-button { width: 32px; min-width: 32px; padding-inline: 6px; }
  body:has(#productionView.is-active) .header-actions { gap: 4px; }
}

@media (max-width: 1380px) {
  .production-execution-no-task {
    gap: 3px;
    padding-inline: 4px;
    font-size: 11px;
    white-space: nowrap;
  }

  .production-execution-no-task svg {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }
}
