:root {
  --brand: #009e95;
  --brand-dark: #007e78;
  --ink: #000;
  --stone: #7b7b7b;
  --line: #dce3e7;
  --surface: #fff;
  --bg: #f5f7f7;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
  background: var(--bg);
}

/* Phase 7: controlled WIP baseline and route-aware quantity flow. */
.wip-baseline-intro .section-title {
  align-items: center;
}

.wip-import-form {
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.55fr);
}

.wip-order-picker {
  max-height: 460px;
  border-block: 1px solid var(--line);
}

.wip-order-picker thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.wip-order-picker tr.is-selected td {
  background: #eaf7f4;
}

.wip-distribution-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 8px;
}

.wip-distribution-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.wip-distribution-heading p {
  margin: 3px 0 0;
  color: var(--stone);
}

.wip-balance-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 1px;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  background: var(--line);
}

.wip-balance-strip > div {
  min-width: 0;
  min-height: 76px;
  padding: 12px 14px;
  border: 0;
  background: var(--surface);
}

.wip-balance-strip > div.has-quantity {
  box-shadow: inset 4px 0 0 var(--brand);
}

.wip-balance-strip > div.is-complete.has-quantity {
  background: #eef9f7;
}

.wip-balance-strip span,
.wip-balance-strip strong {
  display: block;
}

.wip-balance-strip span {
  color: var(--stone);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.wip-balance-strip strong {
  margin-top: 5px;
  font-size: 1.35rem;
}

.wip-stage-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.wip-stage-card {
  min-width: 0;
  margin: 0;
  padding: 14px 14px 16px;
  border: 0;
  border-top: 4px solid var(--brand);
  background: #fff;
}

.wip-stage-card legend {
  width: 100%;
  padding: 0 0 10px;
  color: var(--ink);
  font-weight: 700;
}

.wip-stage-card label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.wip-stage-card label span {
  display: block;
  color: #566267;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.wip-stage-card input[type="number"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #b9c7cb;
  border-radius: 8px;
  padding: 0 11px;
  background: #fbfdfd;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.wip-stage-card input[type="number"]:hover {
  border-color: #81979b;
  background: #fff;
}

.wip-stage-card input[type="number"]:focus {
  outline: 0;
  border-color: var(--brand-dark);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 158, 149, .16);
}

.wip-stage-card.is-inactive {
  background: #f4f6f6;
  border-top-color: #aeb8bb;
  opacity: 0.72;
}

.wip-stage-card.is-inactive input {
  background: #edf1f1;
}

.wip-baseline-editor {
  border-top: 4px solid var(--brand);
  scroll-margin-top: 150px;
}

.wip-baseline-editor .section-title .badge {
  max-width: min(640px, 52vw);
  white-space: normal;
  line-height: 1.35;
  text-align: right;
}

.wip-baseline-meta {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(260px, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.wip-baseline-meta label {
  display: grid;
  gap: 6px;
  color: #566267;
  font-size: 0.8rem;
  font-weight: 800;
}

.wip-baseline-meta input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #b9c7cb;
  border-radius: 8px;
  padding: 0 11px;
  background: #fff;
  font: inherit;
}

.wip-baseline-meta input:focus {
  outline: 0;
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(0, 158, 149, .16);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
}

.wip-row-action {
  min-width: 58px;
  height: 34px;
  padding-inline: 11px;
  box-shadow: 0 3px 9px rgba(0, 126, 120, .14);
}

.wip-row-action:focus-visible {
  outline: 3px solid rgba(0, 158, 149, .22);
  outline-offset: 2px;
}

.wip-baseline-editor .form-actions {
  display: flex;
}

.sticky-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  justify-content: flex-end;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
}

.wip-import-preview {
  border-left: 4px solid var(--brand);
}

@media (max-width: 1180px) {
  .wip-balance-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .wip-balance-strip > div:nth-child(3n) {
    border-right: 0;
  }

  .wip-stage-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .wip-distribution-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .wip-import-form,
  .wip-baseline-meta,
  .wip-stage-grid,
  .wip-balance-strip {
    grid-template-columns: 1fr;
  }

  .wip-balance-strip > div,
  .wip-balance-strip > div:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wip-balance-strip > div:last-child {
    border-bottom: 0;
  }

  .wip-stage-card {
    padding: 12px;
  }

  .wip-baseline-editor .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .wip-baseline-editor .section-title .badge {
    max-width: none;
    text-align: left;
  }
}

body { margin: 0; }
html { scroll-behavior: smooth; }
.shell { max-width: 1180px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.fullwidth-shell { max-width: none; padding: 18px 24px 28px; }
.shell.narrow { max-width: 520px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
h1, h2, p { margin-top: 0; }
p { color: #657176; }
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(340px, 460px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 10px 24px;
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
}
.brand-block { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.brand-logo { width: 220px; max-width: 48vw; height: auto; display: block; }
.login-logo { width: 280px; max-width: 100%; height: auto; display: block; margin-bottom: 18px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f4c84a;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #17202d;
}
.brand-block h1 { font-size: 16px; margin: 0 0 2px; }
.brand-block p { margin: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-title-row,
.login-title-row { display: flex; align-items: center; gap: 10px; }
.login-title-row { margin-bottom: 12px; }
.login-title-row h1 { margin: 0; }
.flow-dev-environment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  background: #bd3333;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.mega-nav { display: flex; align-items: stretch; gap: 4px; min-width: 0; }
.mega-item { position: relative; padding-bottom: 10px; margin-bottom: -10px; }
.mega-trigger {
  height: 42px;
  border: 0;
  background: transparent;
  color: #1d2733;
  padding: 0 12px;
  border-radius: 8px;
}
.mega-trigger:hover,
.mega-item:focus-within .mega-trigger,
.mega-item.open .mega-trigger { background: rgba(0,158,149,.1); color: var(--brand-dark); }
.mega-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 330px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(31,42,58,.16);
  padding: 10px;
  display: none;
  gap: 6px;
  box-sizing: border-box;
}
.mega-item.open .mega-panel { display: grid; }
.mega-panel a,
.mega-panel button {
  width: 100%;
  box-sizing: border-box;
  min-height: 58px;
  height: auto;
  border: 0;
  background: transparent;
  color: #1d2733;
  text-align: left;
  justify-content: flex-start;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
}
.mega-panel a:hover,
.mega-panel button:hover { background: #eef8f7; }
.mega-panel .logout-form { margin: 0; }
.mega-panel strong { font-size: 14px; }
.mega-panel span { color: #667386; font-size: 12px; }
.masterdata-mega-panel {
  left: 50%;
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 110px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  overflow-y: auto;
  transform: translateX(-50%);
}
.sectioned-mega-panel {
  left: 50%;
  width: min(900px, calc(100vw - 48px));
  max-height: calc(100vh - 110px);
  align-items: start;
  overflow-y: auto;
  transform: translateX(-50%);
}
.mega-panel-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mega-panel-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.planning-mega-panel {
  left: 0;
  width: min(980px, calc(100vw - 48px));
  transform: none;
}
.integrations-mega-panel,
.quality-mega-panel,
.administration-mega-panel {
  right: 0;
  left: auto;
  transform: none;
}
.administration-mega-panel { width: min(980px, calc(100vw - 48px)); }
.sectioned-mega-panel > .mega-column:only-child { grid-column: 1 / -1; }
.mega-column { display: grid; align-content: start; gap: 4px; min-width: 0; }
.mega-panel .mega-column-title {
  display: block;
  padding: 7px 10px 5px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.masterdata-mega-panel a { min-height: 52px; }
.user-tools { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.language-form { display: flex; align-items: center; gap: 8px; }
.language-form label { display: flex; align-items: center; gap: 6px; color: #667386; font-size: 12px; font-weight: 700; }
.language-form select { height: 34px; border: 1px solid #d8dee7; border-radius: 8px; padding: 0 8px; font: inherit; }
.language-form button { height: 34px; }
.user-badge { background: #e7f6f5; color: var(--brand-dark); border-radius: 999px; padding: 7px 10px; font-weight: 700; white-space: nowrap; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0 4px;
}
.page-heading h2 { font-size: 24px; margin-bottom: 4px; }
.page-heading p { margin-bottom: 0; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notice-box { margin: 0 0 16px; padding: 10px 12px; border: 1px solid #b9ddd8; border-left: 4px solid var(--brand); border-radius: 6px; background: #eef9f7; color: #185f59; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .7fr); gap: 14px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: 0 8px 22px rgba(0,0,0,.045); }
.compact-panel { padding: 12px 16px; }
.inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-form label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.inline-form select { height: 34px; border: 1px solid #d8dee7; border-radius: 8px; padding: 0 8px; font: inherit; }
.badge { background: #e7f6f5; color: var(--brand-dark); border-radius: 999px; padding: 6px 10px; font-weight: 700; }
.badge a { color: inherit; }
button, .button-link { height: 38px; border: 1px solid var(--brand-dark); background: var(--brand); color: #fff; border-radius: 8px; padding: 0 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; }
button:hover, .button-link:hover { background: var(--brand-dark); }
button:disabled { opacity: .55; cursor: not-allowed; }
.secondary-link { border-color: #cbd5dc; background: #fff; color: #1d2733; }
.secondary-link:hover { background: #f4f8f8; color: #1d2733; }
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.danger-button { border-color: #b83232; background: #b83232; margin-left: 6px; }
pre { overflow: auto; background: #17202d; color: #f8fafc; padding: 14px; border-radius: 8px; min-height: 240px; }
.metric-card { background: #fff; border: 1px solid #d8dee7; border-radius: 8px; padding: 16px; box-shadow: 0 12px 30px rgba(31,42,58,.08); display: grid; gap: 8px; }
.metric-card small { color: #667386; font-weight: 700; text-transform: uppercase; }
.metric-card strong { font-size: 34px; line-height: 1; }
.metric-card span { color: #667386; font-size: 13px; }
.section-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.section-title h2 { margin-bottom: 4px; }
.stack-list { display: grid; gap: 10px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f5; padding: 9px 0; }
.list-row strong { display: block; }
.list-row span { display: block; color: #667386; font-size: 13px; }
.row-metrics { display: flex; gap: 10px; align-items: center; text-align: right; flex-wrap: wrap; justify-content: flex-end; }
.demand-row { display: grid; gap: 6px; }
.bar { height: 9px; border-radius: 999px; background: #edf1f5; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.bar.risk span { background: #d89019; }
.bar.bad span { background: #bd3333; }
.compact-table { min-width: 760px; }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill.risk { background: #fff1d9; color: #a76600; }
.status-pill.bad { background: #ffe5e5; color: #bd3333; }
.alert-card { border: 1px solid #d8dee7; border-radius: 8px; padding: 10px; background: #fffdf8; }
.alert-card p { margin: 8px 0 0; font-size: 13px; line-height: 1.35; }
.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.card-actions select { height: 34px; border: 1px solid #d8dee7; border-radius: 8px; padding: 0 8px; font: inherit; }
.planner-release-groups { display: grid; gap: 10px; }
.planner-release-group { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.planner-release-group summary { cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: #f8fafc; flex-wrap: wrap; }
.planner-release-group summary::-webkit-details-marker { display: none; }
.planner-release-group summary::before { content: ">"; color: var(--brand); font-weight: 900; flex: 0 0 auto; }
.planner-release-group[open] summary::before { transform: rotate(90deg); }
.planner-release-group summary .order-main { min-width: 220px; }
.planner-release-group summary > span:not(.status-pill):not(.badge) { color: var(--stone); font-size: 12px; }
.planner-release-group summary b { color: var(--ink); }
.planner-release-group .table-wrap { border-top: 1px solid var(--line); }
.planner-release-group .card-actions { margin-top: 6px; }
.granular-routing-panel { min-width: 0; max-width: 100%; }
.granular-routing-groups { display: grid; gap: 10px; min-width: 0; max-width: 100%; }
.granular-article-group { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; min-width: 0; max-width: 100%; }
.granular-article-group > summary { cursor: pointer; display: flex; align-items: center; gap: 18px; padding: 14px 16px; background: #f4f8f8; flex-wrap: wrap; }
.granular-article-group > summary::-webkit-details-marker { display: none; }
.granular-article-group > summary::before { content: ">"; color: var(--brand); font-weight: 900; flex: 0 0 auto; }
.granular-article-group[open] > summary::before { transform: rotate(90deg); }
.granular-article-group > summary > span:not(.granular-article-main) { color: var(--stone); font-size: 12px; }
.granular-article-main { display: grid; min-width: 190px; margin-right: auto; }
.granular-article-main strong { color: var(--ink); font-size: 18px; }
.granular-article-main small { color: var(--stone); }
.granular-departments { border-top: 1px solid var(--line); min-width: 0; max-width: 100%; }
.granular-department-band { min-width: 0; max-width: 100%; }
.granular-department-band + .granular-department-band { border-top: 8px solid #eef2f3; }
.granular-department-band .table-wrap { width: 100%; max-width: 100%; }
.granular-department-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.granular-department-heading h3 { margin: 0; font-size: 15px; }
.granular-department-heading span { color: var(--stone); font-size: 12px; }
.granular-step-table { min-width: 1280px; }
.granular-step-table td:nth-child(3) { min-width: 220px; }
.routing-action-center { border-top: 4px solid var(--brand); scroll-margin-top: 150px; }
.routing-workflow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 18px; }
.routing-workflow-steps > div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 3px 10px; align-items: center; border: 1px solid #d8dee7; border-radius: 8px; padding: 12px; background: #f8fafc; }
.routing-workflow-steps strong { grid-row: 1 / span 2; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #667386; color: #fff; }
.routing-workflow-steps span { font-weight: 800; color: var(--ink); }
.routing-workflow-steps small { color: var(--stone); }
.routing-workflow-steps > div.current { border-color: #d89019; background: #fff8eb; }
.routing-workflow-steps > div.current strong { background: #d89019; }
.routing-workflow-steps > div.complete { border-color: #92d5c4; background: #eff9f6; }
.routing-workflow-steps > div.complete strong { background: var(--brand); }
.routing-workflow-message { margin: 0 0 14px; }
.routing-action-band { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.routing-action-band h3 { margin: 0 0 4px; font-size: 16px; }
.routing-action-band p { margin: 0; color: var(--stone); font-size: 13px; }
.routing-action-table { min-width: 1180px; }
.routing-action-table td { vertical-align: top; }
.routing-action-table th:nth-last-child(2), .routing-action-table td:nth-last-child(2) { position: sticky; right: 150px; z-index: 2; min-width: 112px; background: #fff; }
.routing-action-table th:last-child, .routing-action-table td:last-child { position: sticky; right: 0; z-index: 2; min-width: 150px; background: #fff; box-shadow: -10px 0 16px rgba(16, 48, 48, .07); }
.routing-action-table td:last-child button { width: 140px; white-space: normal; }
.routing-action-table th:nth-last-child(2), .routing-action-table th:last-child { background: #f4f8f8; }
.routing-action-table th:last-child { z-index: 3; background: #f4f8f8; }
.routing-action-table td small { display: block; margin-top: 4px; color: var(--stone); }
.routing-action-table input[type="number"] { min-width: 94px; max-width: 130px; }
.routing-action-table select { min-width: 180px; }
.routing-affected-list { min-width: 220px; max-width: 380px; white-space: normal; }
.routing-required-input:invalid { border-color: #bd3333; background: #fff5f5; }
.routing-action-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.routing-action-footer p { margin: 0 auto 0 0; color: var(--stone); font-size: 13px; max-width: 760px; }
.secondary-button { background: #fff; color: var(--brand-dark); border: 1px solid #b9c7cb; }
.secondary-button:hover { background: #edf7f5; }
.granular-editor-row td { background: #f2f8f7; padding: 14px 16px; }
.granular-editor-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; align-items: end; }
.granular-editor-grid label { display: grid; gap: 5px; color: #566267; font-size: 12px; font-weight: 800; }
.granular-editor-grid label.wide { grid-column: span 2; }
.granular-editor-grid input:not([type="checkbox"]), .granular-editor-grid select { width: 100%; min-width: 0; }
.granular-editor-grid .checkbox-editor { align-content: end; }
.granular-editor-grid .checkbox-editor input { width: 20px; }
.granular-editor-actions { display: flex; justify-content: flex-end; }
.pagination-bar { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pagination-bar > span { color: var(--stone); font-weight: 700; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form input { height: 38px; border: 1px solid #d8dee7; border-radius: 8px; padding: 0 10px; font: inherit; }
.form select, .data-table select, .data-table input { height: 34px; border: 1px solid #d8dee7; border-radius: 8px; padding: 0 8px; font: inherit; }
.data-table input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); }
.error { color: #bd3333; background: #ffe5e5; border-radius: 8px; padding: 10px; }
.success { color: #12805c; background: #e4f6ef; border-radius: 8px; padding: 10px; }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.data-table th, .data-table td { border-bottom: 1px solid #d8dee7; padding: 9px 10px; text-align: left; }
.data-table th { color: #566267; background: #f4f8f8; font-size: 12px; text-transform: uppercase; }
.muted { color: #667386; font-size: 12px; }
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-bar input,
.filter-bar select { height: 38px; border: 1px solid #d8dee7; border-radius: 8px; padding: 0 10px; font: inherit; min-width: 180px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { border: 1px solid #d8dee7; border-radius: 8px; padding: 8px 11px; text-decoration: none; color: #1d2733; background: #f8fafc; }
.tabs a.active { border-color: var(--brand-dark); background: var(--brand); color: #fff; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: #092a2a;
  color: #fff;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
}
.home-hero small { display: block; color: #bfecea; font-weight: 800; text-transform: uppercase; }
.home-hero strong { display: block; font-size: 54px; line-height: 1; margin: 8px 0; }
.home-hero span { color: #e9fbfa; }
.home-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.home-hero .secondary-link { border-color: rgba(255,255,255,.5); background: transparent; color: #fff; }
.home-hero .secondary-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.home-scheduler-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.22);
}
.home-scheduler-meta span { min-width: 0; }
.home-scheduler-meta small {
  color: #9edbd7;
  font-size: 10px;
  text-transform: uppercase;
}
.home-scheduler-meta b {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.home-scheduler-meta.warning b { color: #ffd9a0; }
.home-kpis .metric-card { min-height: 112px; }
.home-capacity-list { display: grid; gap: 12px; }
.home-capacity-row { display: grid; gap: 8px; }
.home-action-list { display: grid; gap: 10px; }
.home-action-card {
  border: 1px solid #d8dee7;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: start;
}
.home-action-card strong,
.home-action-card span { display: block; }
.home-action-card p { grid-column: 1 / -1; margin: 0; color: #1d2733; }
.home-action-card .button-link { justify-self: start; }
.today-cockpit { border-top: 4px solid var(--brand); }
.today-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.today-action-card {
  border: 1px solid #d8dee7;
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 10px;
  min-height: 186px;
}
.today-action-card.neutral { border-top-color: #b7c2c9; background: #f8fafc; }
.today-action-card.ok { border-top-color: #12805c; }
.today-action-card.risk { border-top-color: #d89019; }
.today-action-card.bad { border-top-color: #bd3333; }
.today-action-number {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e9f6f4;
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
}
.today-action-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.today-action-head strong,
.today-action-head span { display: block; }
.today-action-head .today-action-number {
  display: grid;
  place-items: center;
  line-height: 1;
  margin-top: 0;
  text-transform: none;
  color: var(--brand-dark);
}
.today-action-head strong { font-size: 16px; line-height: 1.2; }
.today-action-head span { color: #667386; font-size: 12px; font-weight: 800; text-transform: uppercase; margin-top: 3px; }
.today-action-count { font-size: 32px; line-height: 1; color: #111; }
.today-action-metric { margin-left: auto; text-align: right; display: grid; gap: 2px; justify-items: end; }
.today-action-metric small { color: #667386; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.today-action-card p { margin: 0; color: #1d2733; line-height: 1.4; }
.today-action-card .card-actions { align-self: end; margin-top: 0; }
.today-blocker-details {
  margin-top: 16px;
  border-top: 1px solid #d8dee7;
  padding-top: 14px;
}
.compact-title { margin-bottom: 10px; }
.compact-title h3 { margin: 0; font-size: 18px; }
.today-blocker-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.today-blocker-row {
  border: 1px solid #d8dee7;
  border-left: 4px solid #bd3333;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #1d2733;
  text-decoration: none;
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(0, 1.4fr) auto;
  gap: 10px;
  align-items: center;
}
.today-blocker-row:hover { border-color: #bd3333; background: #fff7f7; }
.today-blocker-row span,
.today-blocker-row b,
.today-blocker-row small,
.today-blocker-row em { display: block; min-width: 0; }
.today-blocker-row b { font-size: 14px; }
.today-blocker-row small { color: #667386; overflow-wrap: anywhere; }
.today-blocker-row em { font-style: normal; color: #1d2733; overflow-wrap: anywhere; }
.today-blocker-row strong {
  min-width: 32px;
  height: 28px;
  border-radius: 999px;
  background: #ffe7e7;
  color: #8f1d1d;
  display: grid;
  place-items: center;
  padding: 0 8px;
}
.workflow-layout { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); }
.workflow-panel { border-top: 4px solid var(--brand-dark); }
.home-workflow-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.home-workflow-step {
  border: 1px solid #d8dee7;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: #1d2733;
  text-decoration: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 116px;
}
.home-workflow-step:hover { border-color: var(--brand); background: #eef8f7; }
.home-workflow-step > strong {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  line-height: 1;
}
.home-workflow-step span,
.home-workflow-step b,
.home-workflow-step small { display: block; }
.home-workflow-step b { font-size: 14px; line-height: 1.2; margin-bottom: 5px; }
.home-workflow-step small { color: #667386; line-height: 1.35; }
.role-shortcuts-panel { border-top: 4px solid #d89019; }
.role-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.role-shortcuts a {
  border: 1px solid #d8dee7;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
  color: #1d2733;
  text-decoration: none;
  min-height: 74px;
}
.role-shortcuts a:hover { border-color: var(--brand); background: #eef8f7; }
.role-shortcuts strong,
.role-shortcuts span { display: block; }
.role-shortcuts strong { font-size: 14px; line-height: 1.2; }
.role-shortcuts span { color: #667386; font-size: 12px; margin-top: 4px; line-height: 1.3; }
.focus-panel {
  border-top: 5px solid var(--brand);
  background: linear-gradient(180deg, #f2fbfa 0%, #fff 58%);
  box-shadow: 0 16px 38px rgba(0, 75, 70, .10);
}
.focus-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.focus-card {
  border: 1px solid #d8dee7;
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 12px;
}
.focus-card.risk { border-top-color: #d89019; }
.focus-card.bad { border-top-color: #bd3333; }
.focus-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.focus-card-head strong,
.focus-card-head span { display: block; }
.focus-card-head strong { font-size: 20px; line-height: 1.15; }
.focus-card-head span { color: #667386; font-size: 12px; margin-top: 4px; }
.focus-card p { margin: 0; color: #1d2733; line-height: 1.4; }
.focus-article-callout {
  border: 1px solid #a9ddd9;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  padding: 12px 14px;
  background: #eef8f7;
}
.focus-article-callout small { display: block; color: #376469; font-weight: 800; text-transform: uppercase; font-size: 12px; }
.focus-article-callout strong { display: block; color: #071313; font-size: 30px; line-height: 1.05; margin-top: 4px; overflow-wrap: anywhere; }
.focus-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.focus-metrics span {
  border: 1px solid #d8dee7;
  border-radius: 8px;
  padding: 8px;
  color: #667386;
  font-size: 12px;
  background: #f8fafc;
}
.focus-metrics b { display: block; color: #1d2733; margin-top: 3px; }
.focus-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.focus-steps div { border: 1px solid #d8dee7; border-radius: 8px; padding: 12px; background: #fff; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.focus-steps strong { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.focus-steps span { color: #1d2733; font-size: 13px; line-height: 1.35; }
.inline-priority-form { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.inline-priority-form input { width: 76px; min-width: 76px; height: 34px; border: 1px solid #d8dee7; border-radius: 8px; padding: 0 8px; }
.inline-priority-form button { height: 34px; padding: 0 10px; }
.priority-highlight-head { background: #fff4d9 !important; color: #5f4100 !important; box-shadow: inset 0 -3px 0 #d89019; }
.priority-highlight-cell { background: #fffaf0; box-shadow: inset 3px 0 0 #d89019; }
.aps-priority-box { display: grid; gap: 6px; min-width: 220px; }
.aps-priority-box strong { font-size: 24px; line-height: 1; color: #071313; }
.aps-priority-box span { color: #667386; font-size: 12px; line-height: 1.35; }
.blocker-context-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; margin-bottom: 12px; }
.blocker-context-grid div { border: 1px solid #d8dee7; border-radius: 8px; padding: 10px; background: #fff; }
.blocker-context-grid small { display: block; color: #667386; font-weight: 800; text-transform: uppercase; font-size: 11px; }
.blocker-context-grid b { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.blocker-focus-panel {
  border: 2px solid #d89019;
  border-top-width: 6px;
  background: linear-gradient(180deg, #fff8eb 0%, #fff 62%);
}
.blocker-focus-panel .section-title h2 { color: #5f4100; }
.release-print-guide {
  border: 1px solid #a9ddd9;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  padding: 12px;
  background: #eef8f7;
  display: grid;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.release-print-slot[hidden] { display: none !important; }
.release-print-slot { display: block; min-width: 0; }
.release-print-guide strong,
.release-print-guide span { display: block; }
.release-print-guide span { color: #376469; font-size: 13px; line-height: 1.35; }
.release-print-guide .card-actions { margin-top: 0; }
.focus-card .release-print-guide { margin-top: 0; }
.home-risk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-risk-grid h3 { margin: 0 0 10px; font-size: 15px; }
.outlook-grid { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 10px; }
.outlook-card {
  border: 1px solid #d8dee7;
  border-top: 3px solid var(--brand);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.outlook-card.risk { border-top-color: #d89019; }
.outlook-card.bad { border-top-color: #bd3333; }
.outlook-card.custom { margin-top: 12px; background: #f8fafc; }
.outlook-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.outlook-head strong,
.outlook-head span { display: block; }
.outlook-head span { color: #667386; font-size: 12px; }
.outlook-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.outlook-metrics span { color: #667386; font-size: 12px; }
.outlook-metrics b { display: block; color: #1d2733; font-size: 15px; margin-top: 2px; }
.outlook-form { margin: 14px 0 0; }
.outlook-form label { display: grid; gap: 4px; }
.status-pill.ok { background: #e4f6ef; color: #12805c; }
.release-kpis .metric-card:nth-child(1) { border-top: 3px solid #12805c; }
.release-kpis .metric-card:nth-child(2) { border-top: 3px solid #a76600; }
.release-kpis .metric-card:nth-child(3) { border-top: 3px solid #bd3333; }
.v2-authority-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-left: 4px solid #d98b00; }
.v2-authority-banner > div { display: flex; align-items: center; gap: 12px; }
.v2-run-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.v2-run-form label { display: grid; gap: 6px; color: var(--stone); font-size: 12px; font-weight: 800; }
.v2-run-form select, .v2-run-form input { min-width: 175px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; background: #fff; }
.freeze-settings-form {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(260px, 1fr) auto;
  gap: 14px 24px;
  align-items: center;
  margin-top: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.freeze-toggle-control {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}
.freeze-toggle-control input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--brand);
}
.freeze-master-toggle { font-size: 16px; }
.freeze-duration-control {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0;
}
.freeze-field-label { color: var(--ink); font-weight: 700; }
.freeze-duration-input {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--stone);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.freeze-duration-input input {
  box-sizing: border-box;
  width: 92px;
  height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  font: inherit;
}
.freeze-protection-controls {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px 24px;
}
.freeze-settings-actions {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  align-self: stretch;
  align-items: center;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.freeze-settings-actions button { min-width: 110px; }
.freeze-exception-editor {
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
}
.freeze-exception-editor > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  color: var(--brand-dark);
  cursor: pointer;
  list-style: none;
}
.freeze-exception-editor > summary::-webkit-details-marker { display: none; }
.freeze-exception-editor > summary::before {
  content: ">";
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 900;
}
.freeze-exception-editor[open] > summary::before { transform: rotate(90deg); }
.freeze-exception-body { padding: 0 0 16px 18px; }
.freeze-exception-body > p { margin: 0 0 12px; color: var(--stone); }
.freeze-exception-form {
  display: grid;
  grid-template-columns: minmax(190px, .55fr) minmax(320px, 1.45fr) auto;
  gap: 12px;
  align-items: end;
}
.freeze-exception-form label {
  display: grid;
  gap: 6px;
  color: var(--stone);
  font-size: 12px;
  font-weight: 800;
}
.freeze-exception-form input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  font: inherit;
}
@media (max-width: 1200px) {
  .freeze-settings-form { grid-template-columns: minmax(210px, .8fr) minmax(240px, 1fr); }
  .freeze-protection-controls { grid-column: 1 / 3; }
  .freeze-settings-actions {
    grid-column: 1 / 3;
    grid-row: auto;
    justify-content: flex-end;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .freeze-exception-form { grid-template-columns: minmax(180px, .6fr) minmax(280px, 1.4fr); }
  .freeze-exception-form button { justify-self: start; }
}
@media (max-width: 760px) {
  .freeze-settings-form { grid-template-columns: 1fr; }
  .freeze-duration-control { grid-template-columns: 1fr; }
  .freeze-duration-input { justify-content: flex-start; }
  .freeze-protection-controls { grid-column: 1; grid-template-columns: 1fr; }
  .freeze-settings-actions { grid-column: 1; justify-content: stretch; }
  .freeze-settings-actions button { width: 100%; }
  .freeze-exception-body { padding-left: 0; }
  .freeze-exception-form { grid-template-columns: 1fr; }
  .freeze-exception-form button { width: 100%; }
}
.scheduler-queue-panel { border-left: 5px solid var(--brand); }
.scheduler-queue-meta { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.label-campaign-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.label-rule-editor { margin: 0 0 14px; border: 1px solid #d5dfdf; border-left: 4px solid var(--brand); background: #f7fbfb; }
.label-rule-editor summary { padding: 12px 14px; font-weight: 700; cursor: pointer; }
.label-rule-form { padding: 0 14px 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.v2-kpis { grid-template-columns: repeat(5, minmax(160px, 1fr)); }
.v2-coverage-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.v2-comparison-table { min-width: 1380px; }
.v2-comparison-table td small { display: block; color: var(--muted); margin-top: 4px; }
.v2-resources-cell { min-width: 210px; max-width: 320px; white-space: normal; }
@media (max-width: 900px) {
  .v2-authority-banner { align-items: flex-start; flex-direction: column; }
  .v2-authority-banner > div { align-items: flex-start; flex-direction: column; }
  .v2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .v2-kpis { grid-template-columns: 1fr; }
}
.release-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.release-card { background: #fff; border: 1px solid #d8dee7; border-top: 4px solid #bd3333; border-radius: 8px; padding: 14px; display: grid; gap: 12px; min-width: 0; box-shadow: 0 10px 28px rgba(31,42,58,.08); }
.release-card.review { border-top-color: #a76600; }
.release-card.ready-to-release { border-top-color: #12805c; }
.release-card.released { border-top-color: #12805c; }
.release-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.release-card-head .order-sub { display: block; margin-top: 2px; }
.release-state-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 0; }
.release-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.release-meta div, .check-chip { border: 1px solid #edf1f5; background: #f8fafc; border-radius: 8px; padding: 8px; min-width: 0; }
.release-meta small, .check-chip strong { display: block; color: #667386; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.release-meta b, .check-chip span { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.check-chip.ok { border-color: #bce8d4; background: #f2fbf7; }
.check-chip.info { border-color: #cbd9df; background: #f3f7f8; }
.check-chip.risk { border-color: #f4d39c; background: #fff8eb; }
.check-chip.bad { border-color: #f4b7b7; background: #fff5f5; }
.release-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.workflow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.workflow-steps div { border: 1px solid #d8dee7; border-radius: 8px; padding: 12px; background: #f8fafc; display: grid; gap: 8px; }
.workflow-steps strong { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.workflow-steps span { color: #1d2733; font-size: 13px; line-height: 1.35; }
.wave-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.wave-flow div {
  border: 1px solid #d8dee7;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}
.wave-flow small {
  display: block;
  color: #667386;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.wave-flow b { display: block; margin-top: 4px; font-size: 18px; }
.planning-proposal-list { display: grid; gap: 14px; }
.proposal-card { background: #fff; border: 1px solid #d8dee7; border-top: 4px solid #12805c; border-radius: 8px; padding: 14px; display: grid; gap: 12px; box-shadow: 0 10px 28px rgba(31,42,58,.08); }
.proposal-card.high { border-top-color: #a76600; }
.proposal-card.critical { border-top-color: #bd3333; }
.proposal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.proposal-head .order-sub { display: block; margin-top: 2px; }
.proposal-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.proposal-columns h3 { margin: 0 0 8px; font-size: 15px; }
.clean-list { margin: 0; padding-left: 18px; color: #1d2733; }
.clean-list li { margin: 5px 0; line-height: 1.35; }
.users-layout { grid-template-columns: minmax(320px, .55fr) minmax(320px, .45fr); }
.roles-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.role-card { border: 1px solid #d8dee7; border-top: 3px solid var(--brand); border-radius: 8px; padding: 14px; display: grid; gap: 12px; background: #fff; }
.role-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid #edf1f5; padding-bottom: 8px; }
.role-card-head strong { font-size: 18px; }
.role-card-head span { color: #667386; font-weight: 700; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.permission-toggle { border: 1px solid #edf1f5; border-radius: 8px; padding: 8px; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; background: #f8fafc; }
.permission-toggle input { margin-top: 2px; accent-color: var(--brand); }
.permission-toggle b { display: block; font-size: 12px; color: #1d2733; overflow-wrap: anywhere; }
.permission-toggle small { display: block; color: #667386; font-size: 11px; margin-top: 2px; line-height: 1.25; }
.actions-cell form { display: flex; flex-wrap: wrap; gap: 6px; }
.code-block { background: #0f1f28; color: #e8f3f4; border-radius: 8px; padding: 14px; overflow-x: auto; }
.report-preview-frame { border: 1px solid #d8dee7; border-radius: 8px; overflow: hidden; background: #eef3f5; min-height: 640px; }
.report-preview-frame iframe { width: 100%; height: 640px; border: 0; display: block; background: #eef3f5; }
.help-layout { grid-template-columns: minmax(420px, 1fr) minmax(260px, .28fr); align-items: start; }
.help-chat-panel { min-height: 680px; display: grid; grid-template-rows: auto auto minmax(360px, 1fr) auto auto; gap: 12px; }
.help-messages { min-width: 0; border: 1px solid #d8dee7; border-radius: 8px; background: #f8fafc; padding: 12px; overflow: auto; max-height: 520px; display: grid; align-content: start; gap: 12px; }
.help-message { min-width: 0; max-width: 82%; box-sizing: border-box; border: 1px solid #d8dee7; border-radius: 8px; padding: 10px 12px; background: #fff; box-shadow: 0 8px 18px rgba(31,42,58,.06); }
.help-message.user { justify-self: end; background: #e7f7f5; border-color: #a7dcd6; }
.help-message.assistant { justify-self: start; position: relative; padding-left: 34px; }
.help-message.assistant::before { content: ""; position: absolute; left: 13px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: #101417; }
.help-message.assistant.thinking p::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: #101417; animation: help-answer-pulse 1s ease-in-out infinite; }
@keyframes help-answer-pulse { 0%, 100% { opacity: .25; transform: scale(.75); } 50% { opacity: 1; transform: scale(1); } }
.help-message strong { display: block; margin-bottom: 6px; font-size: 12px; color: #566267; text-transform: uppercase; }
.help-message p { margin: 0; line-height: 1.45; white-space: pre-wrap; }
.help-message small { display: block; margin-top: 6px; color: #667386; font-size: 11px; }
.help-form { display: grid; gap: 8px; }
.help-form label { font-weight: 800; }
.help-form textarea { width: 100%; min-height: 110px; resize: vertical; border: 1px solid #d8dee7; border-radius: 8px; padding: 10px; font: inherit; box-sizing: border-box; }
.help-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-topic-list a { border: 1px solid #d8dee7; border-radius: 8px; padding: 10px 12px; color: #1d2733; text-decoration: none; background: #f8fafc; font-weight: 800; }
.help-topic-list a:hover { border-color: var(--brand); color: var(--brand-dark); background: #eef9f7; }
.help-drawer-toggle { cursor: pointer; }
.help-drawer { position: fixed; inset: 0; background: rgba(9, 28, 33, .28); z-index: 80; display: none; justify-content: flex-end; }
.help-drawer.open { display: flex; }
.help-drawer-panel { width: min(840px, 100vw); height: 100vh; background: #fff; box-shadow: -18px 0 38px rgba(31,42,58,.22); padding: 16px; display: grid; grid-template-rows: auto minmax(240px, 1fr) auto auto auto; gap: 12px; }
.help-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f5; padding-bottom: 12px; }
.help-drawer-head strong, .help-drawer-head span { display: block; }
.help-drawer-head span { color: #667386; font-size: 13px; margin-top: 3px; }
.work-drawer { position: fixed; inset: 0; background: rgba(9, 28, 33, .30); z-index: 90; display: none; justify-content: flex-end; }
.work-drawer.open { display: flex; }
.work-drawer-panel { width: min(1660px, calc(100vw - 28px)); height: 100vh; background: #fff; box-shadow: -18px 0 42px rgba(31,42,58,.28); display: grid; grid-template-rows: auto minmax(0, 1fr); }
.work-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f5; padding: 12px 14px; background: #f8fafc; }
.work-drawer-head strong, .work-drawer-head span { display: block; }
.work-drawer-head span { color: #667386; font-size: 13px; margin-top: 3px; }
.work-drawer-actions { display: flex; align-items: center; gap: 8px; }
.work-drawer iframe { width: 100%; height: 100%; border: 0; background: #fff; }
body.drawer-open { overflow: hidden; }
.overlay-body { background: #f8fafc; font-size: 15px; }
.overlay-shell { width: 100%; padding: 18px 20px; box-sizing: border-box; }
.overlay-shell .panel { box-shadow: none; }
.overlay-shell .compact-table { font-size: 14px; }
.overlay-shell .woc-data-list dt { font-size: 12px; }
.overlay-shell .woc-data-list dd { font-size: 13px; }
.overlay-shell .woc-variant-table td { padding-top: 12px; padding-bottom: 12px; }
.orders-actual-table thead th:last-child {
  position: sticky;
  right: 0;
  z-index: 8;
  min-width: 230px;
  background: #edf6f5;
  box-shadow: -10px 0 16px rgba(16, 48, 48, .10);
}
.orders-actual-table tbody tr:not(.order-group-row):not(.parent-group-row) > td:last-child {
  position: sticky;
  right: 0;
  z-index: 5;
  min-width: 230px;
  background: #fff;
  box-shadow: -10px 0 16px rgba(16, 48, 48, .10);
}
.orders-actual-table tbody tr:hover:not(.order-group-row):not(.parent-group-row) > td:last-child { background: #fbfefe; }
.icon-button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #d8dee7; background: #f8fafc; color: #1d2733; font-size: 20px; line-height: 1; padding: 0; display: grid; place-items: center; cursor: pointer; }
.help-messages.compact { max-height: none; }
.editable-table input, .editable-table select { min-width: 120px; width: 100%; box-sizing: border-box; }
.editable-table textarea { width: 100%; min-width: 320px; border: 1px solid #d8dee7; border-radius: 8px; padding: 8px; font: inherit; box-sizing: border-box; resize: vertical; }
.editable-table .checkbox-cell { display: flex; justify-content: center; min-width: 70px; }
.editable-table .line-select { min-width: 220px; }
.editable-table .variant-label-field { min-width: 420px; }
.editable-table input[readonly] { background: #f4f6f8; color: #667386; }
.editable-table tr.row-saved td { background: #e4f6ef; transition: background .2s ease; }
.editable-table tr.row-error td { background: #ffe5e5; transition: background .2s ease; }
.editable-table input[list] { min-width: 140px; }
.assistant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.assistant-card { background: #fff; border: 1px solid #d8dee7; border-radius: 8px; padding: 14px; box-shadow: 0 12px 30px rgba(31,42,58,.08); display: grid; gap: 12px; }
.assistant-card.applied { border-color: #12805c; background: #fbfffd; }
.assistant-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f5; padding-bottom: 10px; }
.assistant-head strong { display: block; }
.assistant-head span { color: #667386; font-size: 13px; }
.assistant-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.assistant-facts div { background: #f8fafc; border: 1px solid #edf1f5; border-radius: 8px; padding: 8px; min-width: 0; }
.assistant-facts small { display: block; color: #667386; font-size: 11px; text-transform: uppercase; font-weight: 700; }
.assistant-facts b { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.proposal-box { border: 1px solid #cbd8e8; border-radius: 8px; padding: 12px; display: grid; gap: 10px; background: #f8fbff; }
.proposal-box small { color: #667386; font-size: 11px; text-transform: uppercase; font-weight: 700; }
.muted-box { background: #f8fafc; }
.traveler-sheet { background: #fff; border: 1px solid #d8dee7; border-radius: 8px; padding: 18px; display: grid; gap: 14px; }
.traveler-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 2px solid #1d2733; padding-bottom: 12px; }
.traveler-title h2 { margin-bottom: 4px; }
.traveler-meta { display: grid; gap: 4px; text-align: right; }
.traveler-meta span { color: #667386; font-size: 13px; }
.traveler-batch { border: 1px solid #bfc9d8; border-radius: 8px; padding: 12px; page-break-inside: avoid; display: grid; gap: 10px; }
.batch-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f5; padding-bottom: 8px; }
.batch-head strong { display: block; font-size: 18px; }
.batch-head span { color: #667386; }
.qr-step-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qr-step { border: 1px solid #edf1f5; border-radius: 8px; padding: 8px; display: grid; gap: 5px; align-content: start; min-width: 0; }
.qr-box { width: 100%; display: grid; place-items: center; }
.qr-svg { max-width: 116px; height: auto; }
.qr-step strong { font-size: 12px; line-height: 1.25; }
.qr-step span, .qr-step small { color: #667386; font-size: 10px; overflow-wrap: anywhere; }
.scan-confirm { margin-top: 14px; }
.scan-result-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.scan-confirm-top {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(130px, 170px) auto;
  align-items: end;
  gap: 8px;
  padding: 9px;
  border: 2px solid var(--brand);
  border-radius: 8px;
  background: #effaf8;
}
.scan-confirm-top label {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.scan-confirm-top label span {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.scan-confirm-top input {
  width: 100%;
  min-width: 0;
}
.scan-confirm-top button {
  min-height: 42px;
}
.material-workflow-primary-link {
  min-height: 42px;
  padding-inline: 18px;
  box-shadow: 0 2px 0 rgba(0, 93, 86, .18);
}
.lot-traveler-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: start; }
.single-qr-card { border: 1px solid #edf1f5; border-radius: 8px; padding: 10px; display: grid; justify-items: center; gap: 6px; text-align: center; }
.single-qr-card .qr-svg { max-width: 150px; }
.single-qr-card small { color: #667386; overflow-wrap: anywhere; max-width: 100%; }
.traveler-checks { display: grid; gap: 8px; }
.traveler-check { border: 1px solid #edf1f5; border-radius: 8px; padding: 9px 10px; display: flex; justify-content: space-between; gap: 10px; }
.traveler-check span { color: #1d2733; }
.traveler-check b { color: #667386; }
.scan-step-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.scan-step-card { border: 1px solid #d8dee7; border-radius: 8px; padding: 12px; display: grid; gap: 8px; background: #f8fafc; }
.scan-step-card strong { min-height: 38px; }
.scan-step-card span { color: #667386; font-size: 12px; }
.step-qr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.step-qr-card { border: 1px solid #bfc9d8; border-radius: 8px; padding: 12px; display: grid; gap: 10px; page-break-inside: avoid; }
.step-qr-card .qr-svg { max-width: 132px; }
.step-qr-card strong { display: block; min-height: 50px; line-height: 1.25; }
.step-qr-card span, .step-qr-card small { display: block; color: #667386; font-size: 11px; overflow-wrap: anywhere; }
.scan-progress { margin-top: 14px; }
.order-main { display: inline-block; color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: 0; line-height: 1.15; }
.article-main { display: inline-block; color: var(--ink); font-size: 18px; font-weight: 850; letter-spacing: 0; line-height: 1.15; }
.assistant-head .article-main { display: block; margin-top: 3px; font-size: 21px; }
.compact-table .article-main { font-size: 18px; }
.order-sub { color: var(--stone); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.traveler-title .order-main { font-size: 22px; }
.traveler-title .order-sub { font-size: 12px; }
.data-table tbody tr:hover { background: #fbfefe; }
.data-table .order-group-row td { background: #edf7f5; color: var(--brand-dark); font-weight: 800; border-top: 2px solid #b9ddd8; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 22, 34, .42); display: grid; place-items: center; padding: 20px; }
.modal-card { width: min(460px, 100%); background: #fff; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(31,42,58,.28); padding: 18px; display: grid; gap: 12px; }
.modal-card h2 { margin: 0; font-size: 20px; }
.modal-card p { margin: 0; color: var(--stone); line-height: 1.45; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.consistency-details summary { cursor: pointer; color: var(--brand-dark); font-weight: 800; }
.consistency-detail-list { display: grid; gap: 8px; margin-top: 8px; min-width: 320px; }
.consistency-detail-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
}
.consistency-detail-item strong,
.consistency-detail-item span { display: block; }
.consistency-detail-item span { color: #667386; font-size: 12px; margin-top: 2px; }
.metric-card { border-top: 3px solid var(--brand); }
.step-qr-card { border-top: 4px solid var(--brand); }
.nav-toggle { display: none; width: 42px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; align-items: center; justify-content: center; gap: 4px; flex-direction: column; }
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); display: block; border-radius: 2px; }
.woc-groups { display: grid; gap: 12px; }
.woc-order-group { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; background: #fff; overflow: hidden; }
.woc-order-group > summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: minmax(190px, 1.3fr) repeat(5, minmax(110px, .7fr)) auto; gap: 12px; align-items: center; padding: 14px 16px; background: #fff; }
.woc-order-group > summary::-webkit-details-marker,
.woc-parent-group > summary::-webkit-details-marker { display: none; }
.woc-order-group > summary::before { content: "›"; color: var(--brand); font-size: 24px; font-weight: 800; transition: transform .15s ease; }
.woc-order-group[open] > summary::before { transform: rotate(90deg); }
.woc-order-group > summary { grid-template-columns: 18px minmax(190px, 1.3fr) repeat(5, minmax(110px, .7fr)) auto; }
.woc-order-group > summary > span:not(.status-pill) { min-width: 0; }
.woc-order-group > summary small { display: block; color: var(--stone); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.woc-order-group > summary b { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.woc-order-identity strong { display: block; font-size: 20px; color: var(--ink); overflow-wrap: anywhere; }
.woc-order-identity small { margin-top: 3px; text-transform: none !important; font-size: 12px !important; }
.woc-order-body { border-top: 1px solid var(--line); background: #f8fafc; }
.woc-group-meta { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 16px; color: var(--stone); font-size: 12px; font-weight: 700; }
.woc-parent-group { border-top: 1px solid var(--line); background: #fff; }
.woc-parent-group > summary { cursor: pointer; list-style: none; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 11px 16px; background: #eef7f5; color: var(--brand-dark); }
.woc-parent-group > summary strong { font-size: 16px; margin-right: auto; }
.woc-parent-group > summary span { color: var(--stone); font-size: 12px; font-weight: 700; }
.woc-variant-table { min-width: 1320px; margin: 0; }
.woc-variant-table th { white-space: nowrap; }
.woc-variant-table td { vertical-align: top; }
.woc-variant-table td > small { display: block; margin-top: 5px; color: var(--stone); }
.woc-description { min-width: 180px; max-width: 260px; overflow-wrap: anywhere; }
.woc-data-list { display: grid; gap: 3px; margin: 0; min-width: 150px; }
.woc-data-list div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted #d8dee7; }
.woc-data-list dt { color: var(--stone); font-size: 10px; }
.woc-data-list dd { margin: 0; font-size: 11px; font-weight: 800; white-space: nowrap; }
.woc-data-list.dates { min-width: 235px; }
.woc-variant-table .bar { width: 120px; }
.v2-plan-groups { margin-top: 12px; }
.v2-plan-table { min-width: 1450px; }
.v2-plan-table td { vertical-align: top; }
.v2-plan-table td > small,
.orders-actual-table td > small { display: block; margin-top: 4px; color: var(--stone); }
.orders-actual-table { min-width: 1180px; }
.orders-actual-table th, .orders-actual-table td { vertical-align: top; }
.orders-actual-table th:nth-child(1) { min-width: 110px; }
.orders-actual-table th:nth-child(2) { min-width: 110px; }
.orders-actual-table th:nth-child(3) { min-width: 205px; }
.orders-actual-table th:nth-child(4) { min-width: 175px; }
.orders-actual-table th:nth-child(5) { min-width: 170px; }
.orders-actual-table th:nth-child(6) { min-width: 125px; }
.orders-list-summary { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e3e9ec; color: var(--stone); }
.orders-list-summary > strong { color: var(--ink); }
.table-pagination { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.table-pagination > span { color: var(--stone); font-size: 12px; font-weight: 800; white-space: nowrap; }
.table-pagination .button-link { height: 34px; }
.table-pagination-bottom { justify-content: flex-end; margin-top: 14px; }
.orders-article-cell .article-main { display: block; margin-top: 5px; }
.orders-variant-meta { display: block; margin-top: 7px; color: var(--stone); font-size: 12px; font-weight: 700; }
.orders-quantity-cell .progress-with-value { margin-top: 9px; min-width: 0; }
.orders-date-cell { display: grid; gap: 3px; }
.orders-date-cell small { margin-top: 5px !important; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.orders-date-cell small:first-child { margin-top: 0 !important; }
.orders-action-cell { min-width: 210px; }
.orders-material-state { display: grid; gap: 3px; }
.orders-material-state small { color: var(--stone); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.orders-status-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.orders-primary-action { width: 100%; min-height: 36px; height: auto; box-sizing: border-box; text-align: center; }
.orders-actual-table .aps-priority-box { min-width: 0; margin-top: 8px; }
.orders-actual-table .aps-priority-box > span:not(.status-pill) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.data-table .parent-group-row td { background: #f5faf9; color: var(--brand-dark); font-weight: 800; border-top: 1px solid #cfe3df; }
.metric-word { font-size: 22px !important; line-height: 1.15 !important; overflow-wrap: anywhere; }
.workflow-lead-panel { border-left: 5px solid var(--brand); padding: 18px 20px; }
.workflow-lead-panel.focused { background: #f3fbfa; }
.workflow-lead-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.workflow-lead-grid h2 { margin: 3px 0 6px; font-size: 22px; }
.workflow-lead-grid p { margin: 0; max-width: 920px; line-height: 1.5; }
.workflow-eyebrow { display: block; color: var(--brand-dark); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.workflow-inline-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.workflow-inline-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; border: 1px solid #d8e5e4; background: #fff; border-radius: 8px; padding: 9px 10px; }
.workflow-inline-steps strong { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; color: #fff; background: var(--brand); }
.workflow-inline-steps span { color: #25343b; font-size: 13px; font-weight: 700; line-height: 1.3; }
.mode-switch, .segmented-nav { display: inline-flex; align-items: stretch; gap: 0; border: 1px solid #cbd5dc; border-radius: 8px; overflow: hidden; background: #fff; }
.mode-switch a, .segmented-nav a { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; color: #33434b; text-decoration: none; font-size: 13px; font-weight: 800; border-right: 1px solid #cbd5dc; }
.mode-switch a:last-child, .segmented-nav a:last-child { border-right: 0; }
.mode-switch a.active, .segmented-nav a.active { color: #fff; background: var(--brand-dark); }
.segmented-nav { margin-bottom: 14px; }
.segmented-nav small { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: rgba(0,0,0,.08); text-align: center; }
.release-board-focused { grid-template-columns: 1fr; }
.overlay-body .release-board { grid-template-columns: 1fr; }
.release-card { padding: 18px; gap: 16px; }
.release-order-identity .order-main { display: block; font-size: 27px; line-height: 1.1; margin-top: 3px; }
.release-primary-grid { display: grid; grid-template-columns: minmax(270px, 1.7fr) repeat(3, minmax(150px, .7fr)); gap: 10px; }
.release-primary-grid > div { border: 1px solid #dfe6e9; background: #f8fafc; border-radius: 8px; padding: 11px 12px; min-width: 0; }
.release-primary-grid small, .release-detail-grid small { display: block; color: #667386; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.release-primary-grid b, .release-detail-grid b { display: block; margin-top: 5px; font-size: 16px; overflow-wrap: anywhere; }
.release-article-callout { border-left: 5px solid var(--brand) !important; background: #eef9f7 !important; }
.release-article-callout strong { display: block; margin-top: 3px; font-size: 28px; line-height: 1.05; color: #071313; overflow-wrap: anywhere; }
.release-article-callout span { display: block; margin-top: 5px; color: #456067; line-height: 1.35; }
.release-check-grid .check-chip { min-height: 78px; display: flex; flex-direction: column; align-items: flex-start; }
.release-check-grid .inline-fix-link { display: inline-block; margin-top: auto; padding-top: 7px; color: #8f1d1d; font-size: 12px; font-weight: 900; text-decoration: none; }
.release-import-details { border: 1px solid #d8dee7; border-radius: 8px; background: #fff; overflow: hidden; }
.release-import-details > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 14px; padding: 11px 13px; background: #f8fafc; }
.release-import-details > summary::-webkit-details-marker { display: none; }
.release-import-details > summary::before { content: ">"; color: var(--brand); font-weight: 900; }
.release-import-details[open] > summary::before { transform: rotate(90deg); }
.release-import-details > summary strong { margin-right: auto; }
.release-import-details > summary span { color: #667386; font-size: 12px; }
.release-detail-grid { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 1px; background: #e5eaed; border-top: 1px solid #d8dee7; }
.release-detail-grid > div { padding: 11px 12px; background: #fff; }
.release-action-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #e4e9ec; padding-top: 14px; }
.release-action-footer > div:first-child strong, .release-action-footer > div:first-child span { display: block; }
.release-action-footer > div:first-child span { margin-top: 4px; color: #5d6b72; font-size: 13px; }
.release-action-footer .card-actions { margin-top: 0; justify-content: flex-end; }
.overlay-body .release-action-footer { position: sticky; top: 0; z-index: 18; margin: 0 -6px; border: 1px solid #c9ddda; border-left: 5px solid var(--brand); border-radius: 8px; padding: 12px 14px; background: #fff; box-shadow: 0 8px 20px rgba(7,59,58,.12); }
.overlay-body .release-action-footer button:not(:disabled) { min-width: 190px; }
.blocker-cause-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.blocker-cause-grid article { border: 1px solid #ead3d3; border-left: 4px solid #bd3333; border-radius: 8px; padding: 12px; background: #fff; }
.blocker-cause-grid strong { display: block; margin-top: 9px; font-size: 16px; }
.blocker-cause-grid p { margin: 6px 0; color: #25343b; line-height: 1.4; }
.blocker-cause-grid small { color: #667386; }
.horizon-explanation { border-left: 5px solid #d89019; background: #fffaf0; }
.horizon-explanation p { margin: 0; color: #513d16; line-height: 1.5; }
.capacity-hotspot-grid { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 10px; }
.capacity-hotspot-grid article { display: grid; gap: 11px; border: 1px solid #d8dee7; border-top: 5px solid #bd3333; border-radius: 8px; padding: 13px; background: #fff; }
.capacity-hotspot-grid article > div:first-child small,
.capacity-hotspot-grid article > div:first-child strong,
.capacity-hotspot-grid article > div:first-child span { display: block; }
.capacity-hotspot-grid article > div:first-child small { color: #667386; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.capacity-hotspot-grid article > div:first-child strong { margin: 3px 0; font-size: 17px; }
.capacity-hotspot-grid article > div:first-child span { color: #667386; font-size: 12px; }
.hotspot-utilization { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hotspot-utilization b { font-size: 25px; }
.hotspot-utilization span { color: #667386; font-size: 12px; }
.capacity-hotspot-grid dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.capacity-hotspot-grid dl div { padding: 8px; background: #f4f7f8; }
.capacity-hotspot-grid dt { color: #667386; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.capacity-hotspot-grid dd { margin: 3px 0 0; font-weight: 900; }
.blocker-action-list { display: grid; gap: 10px; }
.blocker-action-card { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(320px, 1.7fr) minmax(170px, .55fr) auto; gap: 16px; align-items: center; border: 1px solid #d8dee7; border-left: 5px solid #bd3333; border-radius: 8px; padding: 14px; background: #fff; }
.blocker-action-card small { display: block; color: #667386; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.blocker-action-identity > strong { display: block; margin: 3px 0 6px; font-size: 21px; overflow-wrap: anywhere; }
.blocker-action-identity span { display: block; color: #56656d; }
.blocker-action-identity span b { color: #111; font-size: 16px; }
.blocker-action-cause > strong { display: block; margin-top: 3px; color: #8f1d1d; }
.blocker-action-cause p { margin: 5px 0; color: #18252b; line-height: 1.45; }
.blocker-action-cause span { display: block; color: #667386; font-size: 12px; }
.blocker-action-cause .blocker-root-department { margin: 8px 0 3px; color: #293c46; }
.blocker-action-metrics { display: grid; grid-template-columns: repeat(2, minmax(70px, 1fr)); gap: 8px; }
.blocker-action-metrics span { padding: 9px; border-radius: 8px; background: #f8fafc; }
.blocker-action-metrics b { display: block; margin-top: 3px; font-size: 16px; }
.planning-progress { display: block; height: 6px; margin-top: 7px; overflow: hidden; background: #dfe7e8; }
.planning-progress > i { display: block; height: 100%; background: #d89019; }
.blocker-action-guidance { margin: 8px 0 0; padding: 9px 11px; border-left: 4px solid #d89019; background: #fff8e8; color: #263641; font-size: 12px; }
.blocker-action-guidance.cutting-guidance { border-left-color: #00a89c; background: #edf9f7; }
.blocker-action-buttons { display: grid; gap: 7px; min-width: 145px; }
.bc-action-grid { display: grid; gap: 10px; }
.bc-action-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid #d8dee7; border-radius: 8px; padding: 12px; background: #fff; }
.bc-action-card > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 900; }
.bc-action-card strong { font-size: 16px; }
.bc-action-card p { margin: 3px 0 0; line-height: 1.4; }
.readable-table { min-width: 900px; font-size: 14px; }
.readable-table th, .readable-table td { padding: 11px 12px; }
.readable-table-wrap { max-height: 620px; }
.bc-run-list .list-row strong small { display: block; margin-top: 3px; color: #667386; font-weight: 400; }
.bcwi-safety-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.notice { display: grid; gap: 4px; border: 1px solid #d8dee7; border-left-width: 5px; border-radius: 8px; padding: 12px 14px; background: #fff; }
.notice.ok { border-left-color: var(--brand); background: #eef9f7; color: #185f59; }
.notice.bad { border-left-color: #bd3333; background: #fff5f5; color: #8f1d1d; }
.notice span { font-size: 13px; line-height: 1.45; }
.bcwi-read-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-left: 5px solid var(--brand); }
.bcwi-read-panel h2 { margin: 3px 0 5px; }
.bcwi-read-panel p { margin: 0; }
.bcwi-read-form { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.bcwi-batch-title { align-items: center; margin: 2px 0 -4px; }
.bcwi-batch-title p { margin: 0; }
.bcwi-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bcwi-kpis .risk-card { border-top: 5px solid #d89019; }
.bcwi-kpis .danger-card { border-top: 5px solid #bd3333; }
.bcwi-action-center { border-left: 6px solid var(--brand); }
.bcwi-action-center .section-title p { margin: 4px 0 0; max-width: 900px; }
.bcwi-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.bcwi-action-grid article { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 6px 10px; min-height: 126px; padding: 12px; border: 1px solid #dfe6e8; border-top: 4px solid var(--brand); border-radius: 8px; background: #fff; }
.bcwi-action-grid article.needs-action { border-top-color: #d89019; background: #fffdf7; }
.bcwi-action-grid article > small { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #073b3a; color: #fff; font-size: 14px; font-weight: 900; }
.bcwi-action-grid article > div { min-width: 0; }
.bcwi-action-grid strong, .bcwi-action-grid span { display: block; }
.bcwi-action-grid strong { margin-bottom: 4px; font-size: 15px; }
.bcwi-action-grid span { color: #667386; font-size: 12px; line-height: 1.4; }
.bcwi-action-grid article > a, .bcwi-action-grid article > form, .bcwi-action-grid article > .status-pill { grid-column: 1 / -1; align-self: end; justify-self: start; margin: 0; }
.bcwi-action-grid article > form button { min-height: 36px; height: auto; padding: 7px 10px; line-height: 1.2; }
#bcwi-priority-workflow > .panel { margin-top: 12px; }
.bcwi-match-form { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(360px, 1.5fr) auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid #ead3d3; background: #fffafa; border-radius: 8px; }
.bcwi-match-form label, .bcwi-filter-bar label { display: grid; gap: 5px; color: #566267; font-size: 12px; font-weight: 800; }
.bcwi-match-form select { width: 100%; min-width: 0; height: 40px; border: 1px solid #cbd5dc; border-radius: 8px; padding: 0 9px; font: inherit; background: #fff; }
.bcwi-scope-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; border: 1px solid #e2c27f; border-left: 5px solid #d89019; border-radius: 8px; padding: 14px 16px; background: #fffaf0; }
.bcwi-scope-suggestion h3 { margin: 3px 0 5px; font-size: 18px; }
.bcwi-scope-suggestion p { margin: 0 0 5px; max-width: 900px; line-height: 1.45; }
.bcwi-scope-suggestion small { color: #725719; font-weight: 700; }
.bcwi-scope-suggestion form { flex: 0 0 auto; margin: 0; }
.bcwi-unmatched-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 9px; margin-top: 12px; }
.bcwi-unmatched-grid article { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e1e6e9; border-left: 4px solid #bd3333; border-radius: 8px; padding: 11px 12px; background: #fff; }
.bcwi-unmatched-grid article.scope-suggested { border-left-color: #d89019; background: #fffdf7; }
.bcwi-unmatched-grid small, .bcwi-unmatched-grid strong, .bcwi-unmatched-grid span { display: block; }
.bcwi-unmatched-grid small { color: #667386; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.bcwi-unmatched-grid strong { margin: 2px 0; font-size: 18px; }
.bcwi-unmatched-grid span { color: #667386; font-size: 12px; }
.bcwi-unmatched-grid button { height: auto; min-height: 36px; max-width: 170px; padding: 7px 10px; line-height: 1.2; }
.bcwi-filter-bar { align-items: end; margin-bottom: 13px; }
.bcwi-filter-bar .grow { flex: 1 1 300px; }
.bcwi-filter-bar .grow input { width: 100%; box-sizing: border-box; }
.bcwi-table { min-width: 1480px; font-size: 13px; }
.bcwi-table th, .bcwi-table td { padding: 11px 12px; vertical-align: top; }
.bcwi-table td > small { display: block; margin-top: 5px; color: #667386; max-width: 260px; line-height: 1.35; }
.bcwi-table .bcwi-workorder-no { display: block; color: #111; font-size: 20px; line-height: 1.1; }
.bcwi-table .bcwi-item-no { display: block; font-size: 18px; line-height: 1.15; }
.bcwi-version-check { display: grid; gap: 4px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #d8e1e5; }
.bcwi-version-check .status-pill { justify-self: start; }
.bcwi-version-check small { display: block; line-height: 1.35; }
.bcwi-match-arrow { display: block; margin-top: 5px; color: var(--brand-dark); font-size: 15px; font-weight: 900; }
.bcwi-table .text-danger { color: #9d2626; font-weight: 800; }
.bcwi-row-blocked td { background: #fffafa; }
.bcwi-row-warning td { background: #fffdf7; }
.bcwi-data-list { display: grid; gap: 3px; margin: 0; min-width: 135px; }
.bcwi-data-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px dotted #d8dee7; }
.bcwi-data-list dt { color: #667386; font-size: 11px; }
.bcwi-data-list dd { margin: 0; font-weight: 900; white-space: nowrap; }
.bcwi-data-list.dates { min-width: 150px; }
.bcwi-decision { display: block; margin-top: 8px; }
.bcwi-row-actions { display: grid; gap: 7px; min-width: 145px; }
.bcwi-row-actions form { margin: 0; }
.bcwi-row-actions button, .bcwi-row-actions .button-link { width: 100%; height: auto; min-height: 36px; padding: 7px 9px; box-sizing: border-box; text-align: center; line-height: 1.2; }
.bcwi-variant-table { min-width: 1580px; }
.bcwi-variant-table td:nth-child(1) { min-width: 190px; }
.bcwi-variant-table td:nth-child(2) { min-width: 190px; }
.bcwi-variant-table td:nth-child(5) { min-width: 330px; }
.bcwi-operation-details { border: 1px solid #d8e1e5; border-radius: 8px; background: #fff; }
.bcwi-operation-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 7px 10px; cursor: pointer; color: #18363a; }
.bcwi-operation-details summary span { color: #667386; font-size: 11px; font-weight: 800; }
.bcwi-operation-details[open] summary { border-bottom: 1px solid #d8e1e5; background: #f2f8f7; }
.bcwi-operation-list { display: grid; gap: 0; }
.bcwi-operation-list article { display: grid; grid-template-columns: 58px minmax(120px, 1fr) minmax(170px, .8fr); gap: 9px; align-items: center; padding: 9px 10px; border-bottom: 1px solid #edf1f3; }
.bcwi-operation-list article:last-child { border-bottom: 0; }
.bcwi-operation-list strong, .bcwi-operation-list small { display: block; }
.bcwi-operation-list small { margin-top: 2px; color: #667386; font-size: 11px; }
.bcwi-operation-list dl { display: grid; grid-template-columns: repeat(3, minmax(48px, 1fr)); gap: 6px; margin: 0; }
.bcwi-operation-list dl div { display: grid; gap: 1px; }
.bcwi-operation-list dt { color: #667386; font-size: 10px; }
.bcwi-operation-list dd { margin: 0; font-weight: 900; }
.bcwi-unassigned-panel { border-left: 6px solid #bd3333; }
.bcwi-unassigned-panel .data-table { min-width: 1050px; }
.bcwi-assignment-panel { border: 2px solid #d89019; border-left-width: 7px; background: #fffdf7; }
.bcwi-assignment-panel .section-title { align-items: flex-start; }
.bcwi-assignment-panel .section-title p { margin: 4px 0 0; max-width: 900px; }
.bcwi-assignment-form { display: grid; grid-template-columns: minmax(420px, 1fr) auto auto; gap: 12px; align-items: end; }
.bcwi-assignment-form label { display: grid; gap: 5px; color: #566267; font-size: 12px; font-weight: 800; }
.bcwi-assignment-form select { width: 100%; min-width: 0; height: 40px; border: 1px solid #cbd5dc; border-radius: 8px; padding: 0 9px; background: #fff; font: inherit; }
.bcwi-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.bcwi-pagination span { color: #667386; font-weight: 800; }
.bcwi-pilot-panel { border-left: 6px solid #d89019; }
.bcwi-pilot-panel .section-title p { margin: 4px 0 0; max-width: 900px; }
.bcwi-pilot-form { display: grid; gap: 14px; }
.bcwi-pilot-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 8px; max-height: 430px; overflow-y: auto; padding-right: 3px; }
.bcwi-pilot-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; align-items: start; border: 1px solid #d8dee7; border-radius: 8px; padding: 10px 11px; background: #fff; cursor: pointer; }
.bcwi-pilot-row:has(input:checked) { border-color: var(--brand); background: #eef9f7; box-shadow: inset 4px 0 0 var(--brand); }
.bcwi-pilot-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); }
.bcwi-pilot-row strong, .bcwi-pilot-row b, .bcwi-pilot-row small { display: block; }
.bcwi-pilot-row strong { font-size: 17px; }
.bcwi-pilot-row b { margin-top: 2px; color: var(--brand-dark); }
.bcwi-pilot-row small { margin-top: 4px; color: #667386; line-height: 1.35; }
.bcwi-pilot-confirm { display: flex; align-items: center; justify-content: flex-end; gap: 14px; border-top: 1px solid #e1e6e9; padding-top: 13px; }
.bcwi-pilot-confirm .check-label { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 13px; font-weight: 800; }
.bcwi-pilot-confirm input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.bcwi-pilot-review-panel { border-left: 6px solid var(--brand); background: #f8fcfb; }
.bcwi-pilot-review-table { min-width: 1180px; }
.bcwi-pilot-review-table th, .bcwi-pilot-review-table td { padding: 10px 11px; vertical-align: top; }
.bcwi-pilot-review-table td > small, .bcwi-pilot-results-table td > small { display: block; margin-top: 4px; color: #667386; }
.bcwi-review-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 14px; border-top: 1px solid #dbe5e3; padding-top: 14px; }
.bcwi-review-actions form { margin: 0; }
.bcwi-pilot-final-confirm { display: flex; align-items: center; gap: 14px; }
.bcwi-pilot-final-confirm .check-label { display: flex; align-items: center; gap: 8px; max-width: 620px; font-size: 13px; font-weight: 800; }
.bcwi-pilot-final-confirm input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); flex: 0 0 auto; }
.bcwi-pilot-results-panel { border-left: 6px solid #2b7d5d; }
.bcwi-pilot-results-table { min-width: 1450px; }
.bcwi-pilot-results-table th, .bcwi-pilot-results-table td { padding: 10px 11px; vertical-align: top; }
.bcwi-order-chain-shadow { display: grid; gap: 8px; min-width: 430px; }
.bcwi-order-chain-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bcwi-order-chain-member { display: grid; gap: 3px; padding-top: 7px; border-top: 1px solid #d6e4e1; }
.bcwi-order-chain-member small { display: block; margin: 0; line-height: 1.35; }
.bcwi-order-chain-identity { color: #152d34; }
.bcwi-order-chain-progress, .bcwi-order-chain-lifecycle { color: #667386; }
.bcwi-final-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-left: 6px solid var(--brand); }
.bcwi-final-panel.blocked { border-left-color: #bd3333; background: #fffafa; }
.bcwi-final-panel h2 { margin: 3px 0 5px; }
.bcwi-final-panel p { margin: 0; max-width: 900px; }
.bcwi-final-form { display: grid; gap: 10px; justify-items: end; min-width: 340px; }
.bcwi-final-form .check-label { display: flex; align-items: flex-start; gap: 8px; color: #25343b; font-size: 13px; font-weight: 800; line-height: 1.35; }
.bcwi-final-form input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); flex: 0 0 auto; }
@media (max-width: 1180px) {
  .bcwi-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bcwi-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bcwi-unmatched-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .bcwi-pilot-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .bcwi-match-form { grid-template-columns: 1fr 1fr; }
  .bcwi-match-form button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 760px) {
  .bcwi-read-panel, .bcwi-final-panel, .bcwi-scope-suggestion { align-items: stretch; flex-direction: column; }
  .bcwi-read-form { justify-content: flex-start; }
  .bcwi-kpis, .bcwi-unmatched-grid, .bcwi-match-form { grid-template-columns: 1fr; }
  .bcwi-action-grid { grid-template-columns: 1fr; }
  .bcwi-match-form button { grid-column: auto; width: 100%; }
  .bcwi-unmatched-grid article { align-items: stretch; flex-direction: column; }
  .bcwi-pilot-grid { grid-template-columns: 1fr; max-height: 520px; }
  .bcwi-pilot-confirm { align-items: stretch; flex-direction: column; }
  .bcwi-pilot-confirm button { width: 100%; }
  .bcwi-review-actions, .bcwi-pilot-final-confirm { align-items: stretch; flex-direction: column; }
  .bcwi-assignment-form { grid-template-columns: 1fr; }
  .bcwi-review-actions form, .bcwi-review-actions button, .bcwi-pilot-final-confirm button { width: 100%; }
  .bcwi-unmatched-grid button { width: 100%; max-width: none; }
  .bcwi-final-form { min-width: 0; justify-items: stretch; }
  .bcwi-pagination { justify-content: space-between; flex-wrap: wrap; }
}
.help-scope-note { border-left: 4px solid var(--brand); border-radius: 6px; padding: 10px 12px; background: #eef9f7; }
.help-scope-note strong, .help-scope-note span { display: block; }
.help-scope-note span { margin-top: 4px; color: #376469; font-size: 13px; line-height: 1.4; }
.help-quick-prompts { display: flex; flex-wrap: wrap; gap: 7px; }
.help-quick-prompts button { height: auto; min-height: 34px; padding: 7px 10px; border-color: #c8d9d8; background: #f4faf9; color: #24524f; font-size: 12px; text-align: left; }
.help-quick-prompts button:hover { background: #e7f6f5; color: #173e3b; }
.help-message.has-data { width: 96%; max-width: 1040px; min-width: 0; }
.help-data-result { margin-top: 12px; padding-top: 12px; border-top: 2px solid #d5ebe8; min-width: 0; }
.help-data-result h3 { margin: 0 0 8px; font-size: 16px; color: #173e3b; }
.help-data-table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid #d8dee7; box-sizing: border-box; }
.help-data-table { width: 100%; min-width: 620px; border-collapse: collapse; background: #fff; font-size: 12px; }
.help-data-table th, .help-data-table td { padding: 8px 9px; border-bottom: 1px solid #e4e9ef; text-align: left; vertical-align: top; white-space: nowrap; }
.help-data-table th { position: sticky; top: 0; background: #edf6f5; color: #254b49; font-size: 11px; text-transform: uppercase; }
.help-data-table td:nth-child(2) { white-space: normal; min-width: 180px; }
.help-data-table tbody tr:last-child td { border-bottom: 0; }
.help-data-table a { color: var(--brand-dark); font-weight: 900; }
.help-data-meta { margin-top: 8px !important; line-height: 1.4; }
@media (max-width: 1250px) {
  .woc-order-group > summary { grid-template-columns: 18px minmax(180px, 1fr) repeat(3, minmax(100px, .7fr)) auto; }
  .woc-order-group > summary > span:nth-of-type(5), .woc-order-group > summary > span:nth-of-type(6) { display: none; }
}
@media (max-width: 1200px) {
  .app-header { grid-template-columns: 1fr; align-items: start; }
  .mega-nav { flex-wrap: wrap; }
  .user-tools { justify-content: flex-start; flex-wrap: wrap; }
  .mega-panel { position: fixed; left: 24px; right: 24px; top: 132px; min-width: 0; }
}
@media (max-width: 1520px) {
  .app-header { padding: 10px 14px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .brand-block { min-width: 0; }
  .nav-toggle { display: inline-flex; }
  .mega-nav { display: none; grid-column: 1 / -1; width: 100%; flex-direction: column; align-items: stretch; overflow: visible; padding-top: 8px; }
  .app-header.nav-open .mega-nav { display: flex; }
  .mega-item { width: 100%; }
  .mega-trigger { width: 100%; justify-content: space-between; }
  .mega-panel { position: static; min-width: 0; width: 100%; box-shadow: none; border-radius: 8px; margin-top: 6px; }
  .masterdata-mega-panel,
  .sectioned-mega-panel { max-height: 70vh; transform: none; }
  .masterdata-mega-panel,
  .mega-panel-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mega-panel-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mega-item.open .mega-panel { display: grid; }
  .user-tools { grid-column: 1 / -1; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 1000px) { .dashboard-grid, .outlook-grid, .today-action-grid, .home-workflow-steps, .focus-card-grid, .focus-metrics, .focus-steps, .blocker-context-grid, .today-blocker-list, .workflow-inline-steps, .release-primary-grid, .release-detail-grid, .blocker-cause-grid, .capacity-hotspot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dashboard-layout, .assistant-grid, .home-hero, .home-risk-grid, .help-layout, .workflow-layout { grid-template-columns: 1fr; } .home-hero-actions { justify-content: flex-start; } .home-scheduler-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qr-step-grid, .scan-step-grid, .step-qr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .blocker-action-card { grid-template-columns: minmax(190px, .8fr) minmax(0, 1.4fr); } .blocker-action-buttons { display: flex; } }
@media (max-width: 800px) {
  .grid, .dashboard-grid, .outlook-grid, .outlook-metrics, .today-action-grid, .home-workflow-steps, .home-scheduler-meta, .role-shortcuts, .focus-card-grid, .focus-metrics, .focus-steps, .blocker-context-grid, .today-blocker-list, .workflow-inline-steps, .release-primary-grid, .release-detail-grid, .blocker-cause-grid, .capacity-hotspot-grid { grid-template-columns: 1fr; }
  .section-title { align-items: stretch; flex-direction: column; }
  .section-title > .badge, .section-title > .status-pill { align-self: flex-start; max-width: 100%; white-space: normal; }
  .today-blocker-row { grid-template-columns: 1fr auto; }
  .today-blocker-row em { grid-column: 1 / -1; }
  .topbar, .page-heading { align-items: flex-start; flex-direction: column; }
  .fullwidth-shell { padding: 14px; }
  .app-header { padding: 10px 14px; grid-template-columns: 1fr auto; }
  .brand-block { min-width: 0; }
  .brand-block h1 { font-size: 18px; }
  .nav-toggle { display: inline-flex; }
  .mega-nav { display: none; grid-column: 1 / -1; width: 100%; flex-direction: column; align-items: stretch; overflow: visible; padding-top: 8px; }
  .app-header.nav-open .mega-nav { display: flex; }
  .mega-item { width: 100%; }
  .mega-trigger { width: 100%; justify-content: space-between; }
  .mega-panel { position: static; min-width: 0; width: 100%; box-shadow: none; border-radius: 8px; margin-top: 6px; }
  .masterdata-mega-panel,
  .sectioned-mega-panel { max-height: 70vh; grid-template-columns: 1fr; transform: none; }
  .mega-item.open .mega-panel { display: grid; }
  .user-tools { grid-column: 1 / -1; width: 100%; }
  .assistant-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .release-board, .release-meta, .check-grid, .workflow-steps, .wave-flow, .roles-grid, .permission-grid, .proposal-columns, .lot-traveler-grid, .scan-step-grid, .step-qr-grid { grid-template-columns: 1fr; }
  .help-message { max-width: 100%; }
  .orders-list-summary { align-items: flex-start; flex-wrap: wrap; }
  .orders-list-summary .table-pagination { width: 100%; margin-left: 0; justify-content: space-between; }
  .orders-table-wrap { overflow: visible; }
  .orders-actual-table, .orders-actual-table tbody { display: block; min-width: 0; width: 100%; }
  .orders-actual-table thead { display: none; }
  .orders-actual-table tbody { display: grid; gap: 10px; }
  .orders-actual-table tbody tr:not(.order-group-row):not(.parent-group-row) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #d8dee7; border-radius: 8px; background: #fff; overflow: hidden; }
  .orders-actual-table tbody tr:not(.order-group-row):not(.parent-group-row) > td { display: block; min-width: 0; padding: 11px 12px; border-bottom: 1px solid #edf1f5; position: static; box-shadow: none; }
  .orders-actual-table tbody tr:not(.order-group-row):not(.parent-group-row) > td::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--stone); font-size: 10px; font-weight: 900; text-transform: uppercase; }
  .orders-actual-table tbody tr:not(.order-group-row):not(.parent-group-row) > td:nth-child(3),
  .orders-actual-table tbody tr:not(.order-group-row):not(.parent-group-row) > td:last-child { grid-column: 1 / -1; }
  .orders-actual-table .order-group-row, .orders-actual-table .parent-group-row { display: table; width: 100%; }
  .orders-actual-table .order-group-row td, .orders-actual-table .parent-group-row td { display: table-cell; width: 100%; }
  .orders-action-cell { min-width: 0; background: #f7fbfa !important; }
  .orders-status-pills { margin: 8px 0 10px; }
  .table-pagination-bottom { justify-content: space-between; }
  .help-form-actions { align-items: flex-start; flex-direction: column; }
  .woc-order-group > summary { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .woc-order-group > summary > span:not(.woc-order-identity):not(.status-pill) { display: none; }
  .woc-order-identity strong { font-size: 17px; }
  .woc-group-meta { gap: 10px; }
  .routing-workflow-steps, .granular-editor-grid { grid-template-columns: 1fr; }
  .granular-editor-grid label.wide { grid-column: auto; }
  .routing-action-footer { justify-content: stretch; }
  .routing-action-footer p { flex-basis: 100%; }
  .work-drawer-panel { width: 100vw; }
  .workflow-lead-grid, .release-action-footer { align-items: stretch; flex-direction: column; }
  .mode-switch { width: 100%; }
  .mode-switch a { flex: 1; justify-content: center; text-align: center; }
  .release-card-head { align-items: stretch; flex-direction: column; }
  .release-card-head .status-pill { align-self: flex-start; }
  .release-card, .release-card * { overflow-wrap: anywhere; }
  .blocker-action-card, .bc-action-card { grid-template-columns: 1fr; }
  .blocker-action-buttons { display: grid; }
  .bc-action-card > span { display: none; }
}
@media (max-width: 560px) {
  .orders-actual-table tbody tr:not(.order-group-row):not(.parent-group-row) { grid-template-columns: 1fr; }
  .orders-actual-table tbody tr:not(.order-group-row):not(.parent-group-row) > td:nth-child(3),
  .orders-actual-table tbody tr:not(.order-group-row):not(.parent-group-row) > td:last-child { grid-column: auto; }
}
.campaign-rule-panel { border-left: 5px solid var(--brand); }
.campaign-table { min-width: 1480px; }
.campaign-table td { vertical-align: top; }
.campaign-table td > strong, .campaign-table td > small { display: block; }
.campaign-table td > small { margin-top: 4px; color: #667386; }
.campaign-risk-row td { background: #fff7e8; }
.campaign-risk-row td:first-child { box-shadow: inset 4px 0 0 #d89019; }
.priority-intro { border-left: 5px solid var(--brand); }
.today-action-detail { display: block; margin-top: -4px; color: #4f6268; font-weight: 800; line-height: 1.4; }
.priority-table { min-width: 1740px; }
.priority-table th:first-child, .priority-table td:first-child { width: 92px; }
.priority-table td { vertical-align: top; }
.priority-table td > small { display: block; margin-top: 5px; color: #667386; line-height: 1.35; }
.priority-rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-dark); color: #fff; font-size: 15px; font-weight: 900; }
.order-main { display: block; font-size: 18px; color: #101417; }
.progress-with-value { display: grid; grid-template-columns: minmax(120px, 1fr) 52px; gap: 8px; align-items: center; min-width: 190px; }
.progress-with-value .bar { height: 10px; border-radius: 5px; overflow: hidden; background: #e4eaee; }
.progress-with-value .bar span { display: block; height: 100%; background: var(--brand); }
.progress-with-value strong { text-align: right; font-size: 12px; }
.priority-actions { display: grid; gap: 7px; min-width: 180px; }
.priority-actions form { margin: 0; }
.priority-actions button { width: 100%; min-height: 36px; height: auto; white-space: normal; }
.pause-button { border-color: #d89019 !important; color: #855500 !important; background: #fff9ef !important; }
.paused-row td { background: #fff9ef; }
.paused-row td:first-child { box-shadow: inset 4px 0 0 #d89019; }
@media (max-width: 800px) {
  .label-rule-editor { grid-template-columns: 1fr; }
  .campaign-table, .priority-table { font-size: 13px; }
}
@media print {
  :root, body { background: #fff; color: #000; }
  .app-header, .page-heading, .no-print { display: none !important; }
  .shell, .fullwidth-shell { padding: 0; display: block; }
  .traveler-sheet { border: 0; padding: 0; box-shadow: none; }
  .traveler-batch { break-inside: avoid; page-break-inside: avoid; box-shadow: none; }
  .qr-step-grid { grid-template-columns: repeat(2, 1fr); }
  .step-qr-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .step-qr-card { padding: 9px; min-height: 300px; box-shadow: none; }
  .step-qr-card .qr-svg { max-width: 118px; }
  .step-qr-card strong { min-height: 34px; font-size: 12px; }
  .lot-traveler-grid { grid-template-columns: 170px 1fr; }
  button, .button-link { display: none !important; }
}
.material-inbound-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.material-inbound-table { min-width: 1280px; }
.material-inbound-entry { min-width: 190px; }
.material-inbound-entry > summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 900;
}
.material-inbound-entry form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  min-width: 270px;
}
.material-inbound-entry label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.material-inbound-entry input { width: 100%; }
.material-inbound-table td { vertical-align: top; }
.material-inbound-table td > small,
.material-inbound-table td > strong { display: block; }
@media (max-width: 900px) {
  .material-inbound-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .material-inbound-summary { grid-template-columns: 1fr; }
}

/* Granular routing lifecycle states */
.routing-state-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.status-pill.routing-state-active {
  color: #087455;
  background: #dff4ed;
}
.status-pill.routing-state-inactive {
  color: #4f6067;
  background: #e6ecee;
}
.routing-state-copy {
  display: block;
  max-width: 310px;
  margin-top: 5px;
  color: #52646b;
  line-height: 1.35;
}
.granular-display-row.is-inactive > td {
  color: #66767c;
  background: #f2f5f6;
}
.granular-display-row.is-inactive > td strong {
  color: #4e5f65;
}
.granular-display-row.is-inactive > td.sticky-action-column {
  background: #f2f5f6;
}
.granular-activation-control {
  grid-column: span 2;
  align-self: stretch;
  border-left: 3px solid #0b8e70;
  padding: 8px 10px;
  background: #edf8f5;
}
.granular-activation-control.is-inactive {
  border-left-color: #829096;
  background: #e9eef0;
}
.granular-activation-control small {
  color: #52646b;
  font-weight: 600;
  line-height: 1.35;
}
.granular-editor-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.granular-editor-archive-note {
  max-width: 280px;
  color: #66767c;
  line-height: 1.35;
}
@media (max-width: 900px) {
  .granular-activation-control { grid-column: 1 / -1; }
}

/* Audited material LOT substitutions and consolidated transfers */
.material-effective-lot {
  display: grid;
  gap: 2px;
  min-width: 180px;
}
.material-lot-substitution {
  margin-top: 8px;
  border-top: 1px solid #d5e0e3;
  padding-top: 8px;
}
.material-lot-substitution > summary,
.material-transfer-cancel > summary {
  color: #007d6c;
  cursor: pointer;
  font-weight: 800;
}
.material-lot-substitution-trigger {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #d5e0e3;
  color: #007d6c;
  font-weight: 800;
  text-decoration: none;
}
.material-lot-substitution-trigger::before {
  content: '▸';
  margin-right: 5px;
}
.material-lot-substitution-trigger:hover,
.material-lot-substitution-trigger:focus-visible {
  text-decoration: underline;
}
.material-lot-substitution-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #c8d8dc;
  border-left: 4px solid #00a495;
  background: #f8fbfb;
}
.material-lot-substitution-form .material-lot-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  color: #3f5057;
  font-weight: 800;
}
.material-lot-substitution-form .material-lot-field input,
.material-lot-substitution-form .material-lot-field select {
  width: 100%;
  min-width: 0;
}
.material-lot-substitution-form .material-lot-reason {
  grid-column: 1 / -1;
}
.material-lot-substitution-form > button {
  align-self: end;
  justify-self: start;
}
.material-transfer-guide {
  border-left: 4px solid #00a495;
}
.material-transfer-document {
  border-top: 3px solid #00a495;
}
.material-transfer-completion-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 16px;
  padding: 18px 20px;
  border: 1px solid #b9ddd8;
  border-left: 6px solid var(--brand);
  border-radius: 8px;
  background: #e4f6ef;
  color: #185f59;
  scroll-margin-top: 16px;
}
.material-transfer-completion-copy {
  display: grid;
  gap: 5px;
}
.material-transfer-completion-copy h2,
.material-transfer-completion-copy p {
  margin: 0;
}
.material-transfer-completion-copy h2 {
  color: #071313;
  font-size: 22px;
}
.material-transfer-completion-copy small {
  color: #456067;
}
.material-transfer-document .material-progress-summary {
  margin-bottom: 14px;
}
.material-transfer-allocation {
  display: grid;
  grid-template-columns: 28px minmax(120px, 1fr) minmax(160px, 1.5fr) minmax(90px, auto);
  align-items: center;
  gap: 8px;
  min-width: 520px;
  padding: 8px 0;
  border-bottom: 1px solid #dce5e7;
  cursor: pointer;
}
.material-transfer-allocation:last-child {
  border-bottom: 0;
}
.material-transfer-allocation-picker {
  min-width: 360px;
}
.material-transfer-allocation-picker > summary {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 2px solid #00a495;
  background: #eef9f7;
  color: #005e55;
  cursor: pointer;
  list-style-position: outside;
}
.material-transfer-allocation-picker > summary:hover,
.material-transfer-allocation-picker > summary:focus-visible {
  background: #e1f5f2;
  outline: 2px solid #073b3a;
  outline-offset: 2px;
}
.material-transfer-allocation-picker[open] > summary,
.material-transfer-allocation-picker:has(input:checked) > summary {
  background: #dff4ef;
  border-color: #007d6c;
}
.material-transfer-step-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #007d6c;
  color: #fff;
  font-weight: 900;
}
.material-transfer-selection-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.material-transfer-selection-copy strong,
.material-transfer-selection-copy small {
  display: block;
}
.material-transfer-selection-copy small {
  color: #456067;
  line-height: 1.35;
}
.material-transfer-allocation input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
}
.material-transfer-candidates td {
  vertical-align: top;
}
.material-transfer-candidates td > small,
.material-transfer-candidates td strong {
  display: block;
}
.material-transfer-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.material-transfer-cancel form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
@media (max-width: 760px) {
  .material-transfer-completion-status {
    display: grid;
  }
  .material-lot-substitution-form {
    grid-template-columns: 1fr;
  }
  .material-lot-substitution-form .material-lot-reason {
    grid-column: auto;
  }
  .material-transfer-allocation-picker {
    min-width: 0;
  }
  .scan-result-header-actions,
  .scan-confirm-top {
    width: 100%;
  }
  .scan-confirm-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .material-transfer-allocation {
    grid-template-columns: 28px 1fr;
    min-width: 0;
  }
  .material-transfer-allocation span {
    grid-column: 2;
  }
}
@media print {
  .material-transfer-actions,
  .material-transfer-cancel,
  .material-transfer-guide {
    display: none !important;
  }
}
