:root {
  --ink: #172b40;
  --muted: #607183;
  --blue: #2458d4;
  --blue-dark: #1946b7;
  --paper: #fff;
  --canvas: #f4f6fa;
  --green: #237b58;
  --amber: #a65b14;
  --red: #a83d38;
  --line: #dfe5ed;
  --blue-pale: #edf2ff;
  --green-pale: #edf7f1;
  --amber-pale: #fff5e8;
  --radius: 7px;
  --topbar-height: 62px;
  --primary-width: 156px;
  --secondary-width: 184px;
  font-family: "PingFang SC", "Hiragino Sans", "Yu Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.55;
  font-synthesis: none;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #7198ee;
  outline-offset: 3px;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #cfd8e5;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #f6f9ff; border-color: #9eafc8; }
button.primary, .actions > .primary { color: white; background: var(--blue); border-color: var(--blue); }
button.primary:hover:not(:disabled), .actions > .primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
input:disabled, select:disabled, textarea:disabled { background: #eef1f6; }
input[readonly], textarea[readonly] { background: #f6f8fb; color: #516178; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
label { display: block; margin-bottom: 16px; color: #40516a; font-size: 12px; }
input, select, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  margin-top: 6px;
  padding: 7px 10px;
  border: 1px solid #c7d1df;
  border-radius: 5px;
  color: var(--ink);
  background: var(--paper);
}
input::placeholder, textarea::placeholder { color: #748398; }
textarea { resize: vertical; line-height: 1.65; }
input[type="checkbox"], input[type="radio"] {
  display: inline-block;
  width: auto;
  min-height: 0;
  padding: 0;
  margin: 0 8px 0 0;
  vertical-align: middle;
  accent-color: var(--blue);
}
input[type="file"] { padding: 9px 10px; background: #f8faff; }
input[type="file"]::file-selector-button {
  padding: 5px 9px;
  margin-right: 10px;
  border: 1px solid #c9d7ed;
  border-radius: 4px;
  color: var(--blue);
  background: white;
  font: inherit;
  cursor: pointer;
}
h1 { margin: 0 0 5px; font-size: 24px; font-weight: 650; letter-spacing: -.3px; line-height: 1.35; }
h2 { margin: 0 0 10px; font-size: 16px; font-weight: 650; line-height: 1.5; }
h3 { margin: 17px 0 8px; font-size: 14px; font-weight: 600; }
p { margin: 0 0 12px; color: var(--muted); line-height: 1.7; }
ul, ol { padding-left: 22px; }
small { font-size: 11px; }
strong { font-weight: 650; }

/* Login and keyboard access. */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px 18px; }
.login form { width: 410px; max-width: 100%; padding: 34px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 12px 34px #172b400a; }
.login .brand-mark { width: 38px; height: 38px; margin-bottom: 20px; }
.login h1 { margin-bottom: 9px; }
.eyebrow { margin-bottom: 9px; color: var(--blue); font-size: 10px; font-weight: 600; letter-spacing: .1em; }
.login-intro { margin-bottom: 24px; font-size: 12px; }
.login .primary { width: 100%; min-height: 38px; }
#login-message { margin: 12px 0 0; color: var(--red); font-size: 12px; }
#login-message:empty { display: none; }
.skip-link { position: fixed; left: 12px; top: 10px; z-index: 100; padding: 9px 14px; border: 1px solid var(--blue); border-radius: 5px; color: var(--blue); background: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
#page:focus-visible { outline: 2px solid #a5bce9; outline-offset: 5px; border-radius: 2px; }

/* The navigation is part of the grid: neither aside overlays the workspace. */
.global-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 18px; height: var(--topbar-height); padding: 0 24px 0 22px; border-bottom: 1px solid var(--line); background: white; }
.brand { display: flex; align-items: center; flex-shrink: 0; gap: 10px; font-size: 17px; font-weight: 650; }
.brand-mark { display: inline-grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 7px; color: white; background: var(--blue); font-size: 12px; font-weight: 650; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 400; letter-spacing: .05em; }
.global-status { display: flex; align-items: center; gap: 7px; min-width: 0; margin-left: auto; color: var(--muted); font-size: 11px; }
.status-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: #8191a4; }
#readiness { overflow-wrap: anywhere; }
.timezone { margin-left: 12px; padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.user { display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: 12px; }
.user strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user button { min-height: 30px; padding: 4px 9px; font-size: 11px; }
.mobile-menu { display: none; }
.workspace-shell { display: grid; grid-template-columns: calc(var(--primary-width) + var(--secondary-width)) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-height)); }
.workspace-navigation { position: sticky; top: var(--topbar-height); align-self: start; display: grid; grid-template-columns: var(--primary-width) var(--secondary-width); height: calc(100vh - var(--topbar-height)); height: calc(100dvh - var(--topbar-height)); min-height: 0; }
.primary-nav, .secondary-nav { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.primary-nav { padding: 22px 12px 18px; color: #d2dce7; background: var(--ink); }
.nav-caption { margin: 0 10px 13px; color: #aab8c8; font-size: 11px; }
.primary-nav nav { display: grid; gap: 5px; min-height: 0; padding: 2px 0; overflow-y: auto; }
.primary-nav nav button { position: relative; justify-content: flex-start; width: 100%; min-height: 44px; padding: 9px 10px; border: 0; color: #d2dce7; background: transparent; text-align: left; gap: 10px; }
.primary-nav nav button span { width: 17px; flex-shrink: 0; text-align: center; font-size: 16px; }
.primary-nav nav button:hover:not(:disabled) { color: white; background: #ffffff12; }
.primary-nav nav button.selected { color: white; background: #324a67; font-weight: 650; }
.primary-nav nav button.selected::before { content: ""; position: absolute; left: -12px; top: 12px; width: 3px; height: 20px; border-radius: 0 2px 2px 0; background: #9cb7f4; }
.nav-footer { margin-top: auto; padding: 20px 10px 0; border-top: 1px solid #ffffff20; color: #aab8c8; font-size: 11px; }
.nav-footer small { display: block; margin-top: 5px; font-size: 10px; }
.secondary-nav { padding: 24px 14px 18px; border-right: 1px solid var(--line); background: white; }
.secondary-heading { padding: 0 10px 23px; }
.secondary-heading strong { display: block; font-size: 16px; }
.secondary-heading small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.secondary-nav nav, #section-navigation { min-height: 0; overflow-y: auto; }
.secondary-nav nav { display: grid; gap: 3px; padding: 2px 0; }
.secondary-nav nav button, #section-navigation button { justify-content: flex-start; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; color: #33485e; background: transparent; text-align: left; }
.secondary-nav nav button:hover:not(:disabled), #section-navigation button:hover:not(:disabled) { background: #f3f6fb; }
.secondary-nav nav button.selected, #section-navigation button.selected { color: var(--blue); background: var(--blue-pale); font-weight: 650; }
.nav-section-label { margin: 20px 10px 7px; color: var(--muted); font-size: 11px; }
.secondary-note { margin-top: auto; padding: 17px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.8; }
#section-navigation:empty { display: none; }
.menu-backdrop { display: none; }
main { min-width: 0; margin: 0; }
.content { width: 100%; padding: 22px 26px 26px; }
.breadcrumb { margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.page-description { max-width: 75ch; margin: 0; font-size: 12px; }
.page-description:empty { display: none; }
.heading-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; gap: 9px; padding-top: 1px; }
.notice { margin: 0 0 17px; padding: 10px 13px; border: 1px solid #d6e1f2; border-radius: 5px; color: #405774; background: #f7faff; font-size: 12px; overflow-wrap: anywhere; }
.notice:empty { display: none; }

/* Shared production forms, tables and existing business feature panels. */
.panel { min-width: 0; margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.panel > :last-child { margin-bottom: 0; }
.panel p { max-width: 90ch; font-size: 12px; }
.panel a { line-height: 1.9; overflow-wrap: anywhere; }
.panel button { margin-top: 6px; }
.panel .actions button, .panel .tools button, .panel td button { margin-top: 0; }
.panel .panel { margin-top: 18px; padding: 17px; background: #fafbfd; }
.panel > .table-wrap { margin: 13px 0; }
.table-wrap { min-width: 0; max-width: 100%; overflow: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 12px; }
th { padding: 10px 14px; border-bottom: 1px solid var(--line); color: #52647b; background: #f7f9fc; font-size: 11px; font-weight: 500; text-align: left; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #edf0f5; line-height: 1.65; vertical-align: middle; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
td input, td select { min-width: 115px; margin: 0; font-size: 12px; }
td input[type="checkbox"], td input[type="radio"] { min-width: 0; }
td button { min-height: 30px; padding: 4px 9px; font-size: 11px; }
.tools { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 17px; }
.tools input { flex: 1 1 220px; max-width: 460px; margin: 0; }
.tools select { width: auto; margin: 0; }
.tools button { flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.form-grid label { min-width: 0; margin: 0; }
.form-grid p { align-self: center; font-size: 12px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.actions p { margin: 0; font-size: 12px; }
.subnav { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 0 17px; }
.subnav button { min-height: 33px; color: #40516a; background: white; }
.subnav button.selected { color: var(--blue); background: var(--blue-pale); border-color: #c4d5f8; font-weight: 600; }
fieldset { min-width: 0; margin: 20px 0; padding: 15px; border: 1px solid var(--line); border-radius: 5px; }
legend { padding: 0 7px; color: #40516a; font-size: 12px; }
fieldset label { margin-bottom: 11px; }
fieldset label:last-child { margin-bottom: 0; }
.segment { margin: 0 0 8px; padding: 11px 12px; border: 1px solid #e2e8f1; border-radius: 5px; background: white; }
.segment:has(input:checked) { border-color: #91afe8; background: #f4f7ff; }
.explicit-ack { display: flex; align-items: flex-start; gap: 1px; margin: 0; padding: 11px 12px; border-radius: 4px; background: #f4f7fb; line-height: 1.7; }
.explicit-ack input { flex-shrink: 0; margin-top: 4px; }
.archive, .history-pending { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.summary { display: flex; flex-wrap: wrap; gap: 18px; margin: 8px 0 15px; }
.summary p { margin: 0; font-size: 12px; }
.summary strong { margin-left: 3px; font-size: 18px; font-variant-numeric: tabular-nums; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.card { padding: 17px 19px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: white; font-size: 12px; }
.card strong { display: block; margin-top: 7px; color: var(--ink); font-size: 25px; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 2px 7px; border-radius: 4px; color: #375b84; background: #eaf0f8; font-size: 11px; }
.empty { padding: 36px 18px; color: var(--muted); text-align: center; }
.issues { padding-left: 22px; color: var(--amber); font-size: 12px; }
.issues li { margin-bottom: 5px; }
.pager { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 15px; color: var(--muted); font-size: 11px; }
.pager button { min-height: 30px; font-size: 11px; }
pre { padding: 13px; overflow: auto; border-radius: 4px; background: #f7f9fc; font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.box-scan select { max-width: 170px; margin: 0; }
.box-scan input { max-width: 420px; }
.box-reason:empty { display: none; }
.box-reason { margin-top: 15px; }
#lifecycle-review:not(:empty), #correction-editor { margin-top: 18px; }
article[data-review-id] { padding: 14px 0; border-top: 1px solid var(--line); }
.replacement-target { padding: 11px 13px; border-left: 3px solid #b6c9ed; background: #f5f8fd; font-size: 12px; }

/* The board uses only statuses supplied by the application. */
.work-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 15px 24px; margin: 0 0 15px; padding-bottom: 13px; border-bottom: 1px solid var(--line); color: var(--muted); }
.summary-item { display: flex; align-items: baseline; gap: 7px; font-size: 12px; white-space: nowrap; }
.summary-item strong { color: var(--ink); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-item.warning strong, .summary-item.alert strong { color: var(--amber); }
.flow-strip { display: flex; gap: 0; margin-bottom: 17px; padding: 13px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.flow-step { display: flex; align-items: center; justify-content: flex-start; flex: 1; gap: 9px; min-width: 0; min-height: 29px; padding: 0; border: 0; border-radius: 0; color: #4c6076; background: transparent; font-size: 12px; text-align: left; }
.flow-step + .flow-step { margin-left: 15px; padding-left: 15px; border-left: 1px solid #e6ebf2; }
.flow-step:hover:not(:disabled) { color: var(--blue); background: transparent; }
.flow-step > span:first-child, .step-number, .flow-number { display: inline-grid; place-items: center; flex-shrink: 0; width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: #f6f8fb; font-size: 11px; }
.flow-step strong, .flow-step b { color: var(--ink); font-size: 12px; font-weight: 600; }
.flow-step small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; }
.flow-step.current { color: var(--blue); }
.flow-step.current > span:first-child { color: var(--blue); background: var(--blue-pale); border-color: #d2dff9; }
.board-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.board-title h2 { margin: 0; }
.board-title > span { color: var(--muted); font-size: 11px; }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 13px; }
.board-filter { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.board-filter button[data-filter] { min-height: 31px; margin: 0; padding: 5px 9px; border-color: transparent; color: #506279; background: transparent; font-size: 11px; }
.board-filter button[data-filter].selected, .board-filter button[data-filter][aria-pressed="true"] { color: var(--blue); background: var(--blue-pale); font-weight: 650; }
.board-filter button[data-filter]:hover:not(:disabled) { background: #f0f4fb; }
.board-filter span { font-variant-numeric: tabular-nums; }
.board-search { display: flex; align-items: center; gap: 8px; flex: 0 1 310px; min-width: 0; margin: 0; color: var(--muted); font-size: 11px; }
.board-search > span { flex-shrink: 0; }
.board-search input { min-height: 34px; margin: 0; font-size: 12px; }
.board-search button { flex-shrink: 0; min-height: 34px; }
.board-layout { display: grid; grid-template-columns: minmax(0, 1fr) 244px; gap: 20px; align-items: start; }
.board-main { min-width: 0; }
.board-panel { margin-bottom: 0; }
.board-layout .table-wrap table { min-width: 820px; }
.board-layout th { font-size: 11px; }
.board-layout td { padding-top: 14px; padding-bottom: 14px; vertical-align: top; }
.board-layout td:last-child { min-width: 145px; }
.board-layout td:last-child button { min-width: 115px; color: var(--blue); border-color: #cbd8ee; white-space: nowrap; }
.board-layout td:last-child button.primary { color: white; border-color: var(--blue); }
.batch-name { display: block; max-width: 42ch; color: var(--ink); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.batch-meta { display: block; max-width: 52ch; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.7; overflow-wrap: anywhere; }
.stage-badges { display: flex; flex-wrap: wrap; gap: 5px; max-width: 265px; }
.stage-badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; color: #2454b1; background: var(--blue-pale); font-size: 11px; line-height: 1.5; white-space: nowrap; }
.stage-badge.warning { color: #96500f; background: var(--amber-pale); }
.stage-badge.good { color: #1e704e; background: var(--green-pale); }
.stage-badge.muted { color: #607084; background: #eef1f5; }
.board-empty { padding: 37px 20px; color: var(--muted); text-align: center; }
.board-empty h2, .board-empty h3 { margin: 0 0 8px; font-size: 15px; }
.board-empty p { max-width: 52ch; margin: 0 auto 14px; font-size: 12px; }
.board-aside { display: grid; align-content: start; gap: 17px; min-width: 0; }
.side-panel { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.side-panel p { font-size: 11px; }
.side-panel > :last-child { margin-bottom: 0; }
.side-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 13px; color: var(--ink); font-size: 14px; font-weight: 650; }
.side-heading h2, .side-heading h3 { margin: 0; font-size: 14px; }
.side-heading small { color: var(--muted); font-size: 10px; font-weight: 400; }
.attention-list { list-style: none; margin: 0; padding: 0; }
.attention-list li { padding: 12px 0; border-top: 1px solid #edf0f5; color: #506279; font-size: 11px; overflow-wrap: anywhere; }
.attention-list li:first-child { padding-top: 0; border-top: 0; }
.attention-list strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 12px; }
.attention-list p { margin: 0 0 8px; font-size: 11px; line-height: 1.8; }
.attention-list button, .side-panel > button { min-height: 29px; padding: 4px 8px; color: var(--blue); font-size: 11px; }
.workflow-help { color: #586c83; font-size: 11px; line-height: 1.9; }
.workflow-help ol, .workflow-help ul { margin: 0 0 13px; padding-left: 19px; }
.workflow-help li { margin-bottom: 7px; padding-left: 2px; }
.workflow-help p { margin-bottom: 8px; font-size: 11px; }
.board-footnote { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.board-footnote p { margin: 4px 0; }
#page[data-view="import"] > .panel:first-child { border-top: 3px solid #9eb8ec; }
#page[data-view="import"] #options { padding: 22px; }
#page[data-view="import"] #preview:not(:empty) { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
#page[data-view="import"] h2 { margin-bottom: 12px; }
#page[data-view="import"] .explicit-ack { margin-top: 15px; }
#page[data-view="import"] #generate { margin-top: 10px; }

@media (min-width: 1700px) {
  .content { padding: 27px 34px; }
  .board-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
  .side-panel { padding: 20px; }
  .batch-meta { font-size: 11px; }
}
@media (max-width: 1560px) {
  .board-layout { grid-template-columns: minmax(0, 1fr); }
  .board-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
}
@media (max-width: 1360px) {
  .content { padding: 22px 20px; }
  .timezone { display: none; }
  .flow-step + .flow-step { margin-left: 10px; padding-left: 10px; }
}
@media (max-width: 1100px) {
  .global-bar { gap: 12px; padding-right: 18px; }
  .global-status { font-size: 10px; }
  .user { gap: 8px; }
  .user strong { max-width: 110px; }
  .form-grid, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-strip { padding: 12px; }
  .flow-step { gap: 6px; font-size: 11px; }
  .flow-step small { display: none; }
  .flow-step strong, .flow-step b { font-size: 11px; }
  .board-toolbar { align-items: stretch; }
  .board-search { flex-basis: 100%; max-width: 460px; }
}
@media (max-width: 900px) {
  .workspace-shell { display: block; }
  .global-bar { gap: 12px; padding: 0 16px; }
  .brand { gap: 8px; font-size: 15px; }
  .global-status { display: none; }
  .mobile-menu { display: inline-flex; min-height: 34px; margin-left: auto; padding: 5px 10px; font-size: 12px; }
  .workspace-navigation { position: fixed; top: var(--topbar-height); left: 0; z-index: 50; width: 340px; max-width: calc(100vw - 38px); grid-template-columns: minmax(110px, .85fr) minmax(0, 1fr); visibility: hidden; pointer-events: none; transform: translateX(-105%); transition: transform .16s ease, visibility .16s ease; box-shadow: 10px 0 30px #172b401a; overscroll-behavior: contain; }
  body.menu-open { overflow: hidden; }
  body.menu-open .workspace-navigation { visibility: visible; pointer-events: auto; transform: none; }
  .menu-backdrop { position: fixed; inset: var(--topbar-height) 0 0; z-index: 45; width: 100%; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: #172b4059; }
  body.menu-open .menu-backdrop:not([hidden]) { display: block; }
  .menu-backdrop:hover:not(:disabled) { background: #172b4059; }
  .primary-nav, .secondary-nav { overflow-y: auto; overscroll-behavior: contain; }
  .nav-footer, .secondary-note { margin-top: 25px; }
  .content { padding: 21px 20px; }
  .heading h1 { font-size: 23px; }
  .heading-actions { gap: 7px; }
  .board-search { flex-basis: 310px; max-width: none; }
  .flow-step small { display: block; }
}
@media (max-width: 600px) {
  .global-bar { gap: 8px; padding: 0 12px; }
  .brand { gap: 7px; font-size: 14px; }
  .brand .brand-mark { width: 27px; height: 27px; font-size: 10px; }
  .brand small { font-size: 8px; }
  .mobile-menu { min-height: 32px; padding: 4px 8px; font-size: 11px; }
  .user { gap: 0; }
  .user strong { display: none; }
  .user button { min-height: 32px; padding: 4px 7px; font-size: 10px; }
  .primary-nav { padding-left: 9px; padding-right: 9px; }
  .primary-nav nav button { gap: 7px; padding-left: 8px; font-size: 12px; }
  .primary-nav nav button.selected::before { left: -9px; }
  .secondary-nav { padding-left: 10px; padding-right: 10px; }
  .secondary-heading { padding-left: 7px; padding-right: 7px; }
  .secondary-heading strong { font-size: 15px; }
  .secondary-nav nav button, #section-navigation button { padding-left: 8px; font-size: 12px; }
  .content { padding: 18px 14px 22px; }
  .breadcrumb { margin-bottom: 8px; font-size: 10px; }
  .heading { flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
  .heading h1 { font-size: 22px; }
  .page-description { font-size: 11px; }
  .heading-actions { justify-content: flex-start; padding: 0; }
  .heading-actions button { min-height: 33px; padding: 5px 9px; font-size: 11px; }
  .panel { padding: 16px; margin-bottom: 15px; }
  .panel .panel { padding: 14px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  input, select, textarea { min-height: 38px; }
  .tools input { flex-basis: 180px; }
  .actions { gap: 8px; margin-top: 16px; }
  .explicit-ack { width: 100%; }
  .subnav button { padding: 5px 8px; font-size: 11px; }
  .cards { gap: 10px; }
  .card { padding: 14px; }
  .card strong { font-size: 24px; }
  .work-summary { gap: 11px 18px; }
  .summary-item { font-size: 11px; }
  .summary-item strong { font-size: 19px; }
  .flow-strip { flex-wrap: wrap; gap: 10px 14px; padding: 12px; }
  .flow-step { flex: 1 1 calc(50% - 14px); }
  .flow-step + .flow-step { margin: 0; padding: 0; border: 0; }
  .flow-step small { font-size: 10px; }
  .board-toolbar { gap: 10px; }
  .board-filter { gap: 3px; }
  .board-filter button[data-filter] { padding: 5px 7px; font-size: 11px; }
  .board-search { flex-basis: 100%; }
  .board-search input { min-height: 36px; }
  .board-layout { gap: 14px; }
  .board-aside { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .side-panel { padding: 16px; }
  .board-layout .table-wrap table { min-width: 780px; }
  .board-layout td { padding-top: 12px; padding-bottom: 12px; }
  #board-table .table-wrap { overflow: visible; }
  #board-table table { display: block; width: 100%; min-width: 0; }
  #board-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  #board-table tbody { display: block; }
  #board-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
  }
  #board-table tbody tr:last-child { border-bottom: 0; }
  #board-table td { display: block; min-width: 0; padding: 0; border: 0; }
  #board-table td:nth-child(1) { grid-column: 1 / -1; }
  #board-table td:nth-child(2), #board-table td:nth-child(4) { display: none; }
  #board-table td:nth-child(3) { grid-column: 1; }
  #board-table td:nth-child(5) { grid-column: 2; align-self: end; justify-self: end; }
  #board-table .batch-name, #board-table .batch-meta { max-width: 100%; }
  #board-table .stage-badges { max-width: 100%; gap: 5px; }
  #board-table .stage-badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  #board-table td:nth-child(5) button { min-width: 0; max-width: 125px; min-height: 34px; padding: 7px 9px; white-space: normal; overflow-wrap: anywhere; }
  .box-scan .tools { display: grid; grid-template-columns: minmax(0, 1fr); }
  .box-scan .tools input, .box-scan .tools select { width: 100%; max-width: none; }
  .box-scan .tools button { justify-self: start; }
  .login form { padding: 27px 24px; }
  #page[data-view="import"] #options { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .global-bar, .workspace-navigation, .menu-backdrop, .skip-link, .heading-actions, .board-toolbar { display: none !important; }
  .workspace-shell { display: block; }
  body, .content { background: white; }
  .content { padding: 0; }
  .panel, .side-panel, .table-wrap { break-inside: avoid; }
  .table-wrap { overflow: visible; }
  table, .board-layout .table-wrap table { min-width: 0; }
}

/* Pending batches: recoverable deletion. */
.pending-row-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
button.pending-danger,.board-layout td:last-child button.pending-danger{color:#b42332;border-color:#e8bac0;background:#fff;min-width:58px}
button.pending-danger:hover:not(:disabled),.board-layout td:last-child button.pending-danger:hover:not(:disabled){background:#fff3f4;border-color:#b42332}
.pending-row-actions button:disabled{opacity:.45;cursor:not-allowed}
.board-delete-note{font-size:12px;color:var(--muted);margin:14px 0 0}
.pending-dialog{padding:0;border:1px solid var(--line);border-radius:12px;width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;color:var(--ink);box-shadow:0 20px 70px #20324e33}
.pending-dialog::backdrop{background:#172c4859}
.pending-dialog-head,.pending-dialog-foot{padding:18px 22px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.pending-dialog-head{border-bottom:1px solid var(--line)}
.pending-dialog-head h2{margin:0;font-size:18px}
.pending-dialog-body{padding:20px 22px;display:grid;gap:16px}
.pending-dialog-body p{margin:0;line-height:1.6}
.pending-batch-name{padding:12px;background:#f5f7fb;border:1px solid var(--line);border-radius:6px;font-weight:600;overflow-wrap:anywhere}
.pending-dialog-body label{display:grid;gap:8px;font-size:13px;font-weight:600}
.pending-dialog-body textarea{width:100%;min-height:74px;box-sizing:border-box;border:1px solid var(--line);border-radius:6px;padding:10px;font:inherit;resize:vertical}
.pending-dialog-foot{justify-content:flex-end;border-top:1px solid var(--line)}
.pending-dialog-status:empty{display:none}
.pending-dialog-status,.pending-blocked{color:#b42332;font-size:13px}
@media(max-width:700px){.pending-row-actions{gap:6px;flex-direction:column;align-items:stretch}.pending-dialog-head,.pending-dialog-foot{padding:16px}.pending-dialog-body{padding:18px 16px}}
