/* Page-specific layouts use the shared typography, palette and controls from styles.css. */
.nav-symbol { width: 20px; font-size: 20px; text-align: center; }
.mobile-master-nav, #mobile-scroll-top { display: none; }
.small-button { min-height: 34px; padding: 6px 10px; font-size: var(--text-label); }
.section-error { margin: 0 22px 18px; padding: 12px 14px; border: 1px solid #f0c6be; border-radius: 7px; background: #fff4f1; color: #9e322a; font-size: 13px; line-height: 1.8; }
.section-empty { padding: 40px 22px; color: var(--muted); text-align: center; font-size: 14px; }
.route-selector { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px 18px; padding: 0 22px 20px; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.route-selector label { display: grid; gap: 8px; color: #40536f; font-size: 12px; font-weight: 600; }
.route-selector input, .route-selector select { height: 42px; width: 100%; min-width: 0; padding: 0 12px; border: 1px solid #cfd9e8; border-radius: 7px; background: #fff; color: #263b58; font-size: 13px; font-weight: 400; }
.route-selector .search-field { min-width: 0; }
.route-selector .search-field input { padding-left: 38px; }
.route-selector small { grid-column: 1/-1; color: var(--muted); font-size: 12px; font-weight: 400; }
.route-context { margin: 0 22px 18px; padding: 11px 13px; border: 1px solid #dce7ff; border-radius: 7px; background: #f3f7ff; color: #355788; font-size: 13px; line-height: 1.7; }
.route-context:empty { display: none; }
.route-table { min-width: 930px; }
.route-table select { width: 100%; min-width: 250px; max-width: 380px; height: 42px; font-size: 13px; }
.route-table input { height: 42px; width: 100%; min-width: 130px; padding: 0 11px; border: 1px solid #cfd9e8; border-radius: 7px; background: #fff; color: #263b58; font-size: 14px; }
.route-table input[type=number] { width: 145px; font-variant-numeric: tabular-nums; }
.route-table td { vertical-align: middle; }
.route-table td:first-child { color: #53698b; font-size: var(--text-body); font-weight: 400; font-variant-numeric: tabular-nums; }
.route-table .row-actions { padding-top: 0; }
.repeat-label { display: inline-block; margin-top: 6px; padding: 2px 7px; border: 1px solid #cbdcfc; border-radius: 5px; color: #2856b0; background: #edf3ff; font-size: 11px; font-weight: 650; }
.route-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 22px; border-top: 1px solid var(--line); background: #fbfcff; }
.route-bottom > span { color: #405878; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dirty-note { display: inline-flex; align-items: center; gap: 6px; color: #936009; font-size: 11px; white-space: nowrap; }
.dirty-note::before { content: ''; width: 6px; height: 6px; background: #ce8c18; border-radius: 50%; }
.process-edit-note { margin: 22px 0 0; padding: 12px; border: 1px solid #dce7ff; border-radius: 7px; background: #f3f7ff; font-size: 12px; }
.route-saving { opacity: .7; pointer-events: none; }
#route-confirm-dialog .modal-body p + p, #process-delete-dialog .modal-body p + p { margin-top: 12px; }
#process-rows .process-usage { display: inline-block; padding: 3px 8px; color: #425a81; background: #f0f4fa; border: 1px solid #dce5f0; border-radius: 5px; font-size: 12px; font-variant-numeric: tabular-nums; }

.route-table select, .route-table input, .route-table td:first-child { font-size: 14px; font-weight: 400; color: #273a54; }
.inventory-current { margin: 0 22px 18px; color: #405878; font-size: 13px; line-height: 1.7; }
.inventory-fields { display: grid; grid-template-columns: minmax(220px,1fr) 2fr; gap: 16px; padding: 0 22px 20px; }
.inventory-template-card { margin-bottom: 24px; }
.inventory-template-card .list-heading { gap: 16px; }
.inventory-template-help { padding: 0 22px 18px; color: #405878; font-size: 13px; line-height: 1.8; }
.inventory-template-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; padding: 0 22px 20px; align-items: end; }
.inventory-template-filters label { display: grid; min-width: 0; gap: 8px; color: #40536f; font-size: 12px; font-weight: 600; }
.inventory-template-filters select, .inventory-template-filters input { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #cfd9e8; border-radius: 7px; background: #fff; color: #263b58; font-size: 13px; }
.inventory-template-filters .inventory-template-search { grid-column: span 3; }
.inventory-template-summary { padding: 14px 22px; border-top: 1px solid var(--line); background: #f4f7fd; color: #355788; font-size: 13px; line-height: 1.8; }
.inventory-template-card .section-error { margin-top: 16px; }
.production-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.production-date-bar p { font-size: 13px; line-height: 1.7; color: #405878; }
.production-grid-filters { padding-bottom: 20px; }
.production-grid-scroll { max-height: none; }
.production-grid-table, .stock-table {
  --matrix-base-width: 540px;
  --matrix-process-width: 104px;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-body);
}
.production-grid-table { min-width: calc(var(--matrix-base-width) + var(--process-count, 5) * var(--matrix-process-width)); }
.production-grid-table th { position: sticky; top: 0; z-index: 2; background: #f4f7fc; }
.production-grid-table th:nth-child(5), .production-grid-table td:nth-child(5) { position: sticky; left: 0; min-width: 220px; z-index: 1; background: white; border-right: 1px solid #dbe4f5; }
.production-grid-table th:nth-child(5) { z-index: 3; background: #f4f7fc; }
.production-grid-identity strong, .production-grid-identity span, .production-grid-identity small { display: block; }
.production-grid-identity strong { font-size: var(--text-body); font-weight: 600; white-space: normal; max-width: 290px; line-height: 1.5; }
.production-grid-identity span { margin-top: 4px; font-size: var(--text-label); color: #405878; }
.production-grid-identity small { margin-top: 4px; font-size: var(--text-meta); color: #245fe5; }
.production-grid-cell input { width: 100%; min-width: 95px; height: 40px; border: 1px solid #c5d3ed; border-radius: 6px; padding: 0 9px; text-align: right; font-size: 15px; color: #15396a; background: #fff; font-variant-numeric: tabular-nums; }
.production-grid-cell input::placeholder { color: #6d7d93; }
.production-grid-cell input.is-edited { border-color: #245fe5; background: #eef4ff; font-weight: 600; }
.production-grid-cell > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
.production-grid-cell small { font-size: 10px; color: #607089; }
.production-cell-note { padding: 2px 0; font-size: 11px; }
.production-grid-na { text-align: center; background: #f8fafc; color: #8b99ac; }
.production-grid-warning { white-space: normal; min-width: 250px; color: #9a4d10; }
.production-footer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.production-note-dialog { max-width: 520px; }
.production-note-dialog textarea { display: block; width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #c5d3ed; border-radius: 7px; font: inherit; resize: vertical; }
.production-note-help { margin-top: 12px; color: #607089; font-size: 12px; }

.production-entry-fields { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 0 22px 20px; }
.production-entry-fields label { display: grid; gap: 8px; min-width: 0; color: #40536f; font-size: 12px; font-weight: 600; }
.production-entry-fields input, .production-entry-fields select { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #cfd9e8; border-radius: 7px; background: #fff; color: #263b58; font-size: 13px; }
.production-model-select { grid-column: 1/-1; }
.production-guide { padding: 0 22px 18px; font-size: 13px; color: #405878; line-height: 1.8; }
#prod-context { white-space: pre-line; }
.production-entry-table { min-width: 780px; }
.production-entry-table input { width: 100%; min-width: 180px; height: 42px; padding: 0 12px; border: 1px solid #cfd9e8; border-radius: 7px; background: #fff; color: #263b58; font-size: 14px; }
.production-entry-table input[type=number] { max-width: 220px; text-align: right; font-variant-numeric: tabular-nums; }
.production-preview-card { margin-top: 24px; }
.production-preview-table { min-width: 900px; table-layout: fixed; white-space: normal; }
.production-preview-table th:nth-child(1) { width: 12%; }
.production-preview-table th:nth-child(2) { width: 17%; }
.production-preview-table th:nth-child(3) { width: 12%; }
.production-preview-table th:nth-child(4) { width: 14%; }
.production-preview-table th:nth-child(5) { width: 26%; }
.production-preview-table th:nth-child(6) { width: 19%; }
.production-preview-table td:first-child { white-space: nowrap; }
.production-wrap { white-space: pre-line; line-height: 1.8; }
.production-page-error { margin: 20px 0 0; }
.inventory-fields label, .inventory-history-filters label { display: flex; flex-direction: column; gap: 7px; color: #40536f; font-size: 12px; font-weight: 600; }
.inventory-fields label .optional { font-size: 12px; }
.inventory-fields input, .inventory-history-filters input[type=date] { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #cfd9e8; border-radius: 7px; background: #fff; color: #263b58; font-size: 13px; }
.inventory-table { min-width: 650px; }
.inventory-table input { width: 160px; height: 40px; padding: 0 12px; border: 1px solid #cfd9e8; border-radius: 7px; background: #fff; color: #263b58; font-size: 14px; text-align: right; }
.inventory-history-card { margin-top: 24px; }
.inventory-history-filters { align-items: flex-end; flex-wrap: wrap; }
.inventory-history-filters .search-field { min-width: 240px; }
.inventory-history-dialog { width: min(900px,calc(100vw - 32px)); }
.inventory-detail-context { white-space: pre-line; line-height: 1.9; margin-bottom: 20px; color: #40536f; }
.inventory-upload-guide { padding: 0 22px 20px; color: #405878; font-size: 13px; line-height: 1.8; }
.inventory-upload-guide p + p { margin-top: 6px; }
.inventory-upload-file { display: flex; align-items: flex-end; gap: 16px; padding: 0 22px 22px; }
.inventory-upload-file label { display: grid; flex: 1; gap: 8px; min-width: 0; color: #40536f; font-size: 12px; font-weight: 600; }
.inventory-upload-file input { width: 100%; padding: 10px; border: 1px solid #cfd9e8; border-radius: 7px; background: #f7f9fd; color: #263b58; }
.inventory-upload-file input::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 1px solid #cfd9e8; border-radius: 5px; background: #fff; color: #263b58; cursor: pointer; }
.inventory-upload-errors { max-height: 360px; overflow: auto; border-top: 1px solid var(--line); }
.inventory-row-error { white-space: pre-line; color: #9e322a; line-height: 1.8; }
.inventory-validation { border-top: 1px solid var(--line); }
.inventory-validation > p { padding: 18px 22px; color: #215a43; background: #eff9f3; font-size: 14px; line-height: 1.8; }
.inventory-upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-top: 1px solid var(--line); background: #fbfcff; }
.inventory-upload-footer > span { color: #405878; font-size: 13px; line-height: 1.7; }
.inventory-upload-footer button { flex-shrink: 0; }

/* Shared list layout: search, classification filters, reset; refresh stays at top right. */
.page-filters.filters { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 9px; padding: 3px var(--card-padding) 20px; margin-top: -3px; overflow-x: auto; scrollbar-width: thin; }
.page-filters .search-field { flex: 1 1 auto; min-width: 160px; }
.page-filters .search-field input { height: var(--control-height); padding: 0 38px; font-size: var(--text-body); font-weight: 400; }
.page-filters.filters > select { flex: 0 1 140px; width: 140px; min-width: 116px; height: var(--control-height); padding: 0 12px 0 11px; font-size: var(--text-body); font-weight: 400; }
.page-filters .filter-reset { flex: 0 0 auto; height: var(--control-height); min-width: 76px; padding: 0 14px; font-size: var(--text-label); }
.page-filters label { display: grid; gap: 7px; min-width: 0; color: #40536f; font-size: var(--text-label); font-weight: 600; }
.page-filters label input { height: var(--control-height); padding: 0 11px; border: 1px solid var(--control-line); border-radius: var(--control-radius); background: var(--surface); color: var(--ink); font-family: inherit; font-size: var(--text-body); font-weight: 400; }
.inventory-template-filters.page-filters { display: flex; grid-template-columns: none; }
.inventory-template-filters.page-filters .search-field input { padding-left: 38px; }
.inventory-history-filters.page-filters .search-field { min-width: 160px; }
.inventory-history-filters.page-filters label { flex: 0 1 155px; }
.route-selector.page-filters { display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-end; }
.route-selector.page-filters > label { flex: 1 1 250px; }
.route-selector.page-filters > small { flex: 1 0 100%; }
.list-heading > div:last-child { gap: 9px; }
.list-refresh { min-height: 34px; padding: 7px 9px; font-size: var(--text-label); }
.list-refresh svg { width: 15px; height: 15px; flex-shrink: 0; }
/* Compact production matrix; previously saved notes remain in the data. */
.production-grid-cell { display: flex; justify-content: center; }
.production-grid-cell input { width: 78px; min-width: 0; max-width: 100%; height: 32px; padding: 0 8px; text-align: center; font-size: 14px; }
.production-grid-cell input::-webkit-inner-spin-button, .production-grid-cell input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.production-grid-cell input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.production-grid-identity strong { font-size: var(--text-body); line-height: 1.5; }
.production-grid-identity span, .production-grid-identity small { margin-top: 3px; }
.production-heading-actions { display: flex; align-items: center; gap: 9px; }
.production-order-dialog { width: min(680px,calc(100vw - 32px)); }
.inventory-bulk-dialog.history-list-dialog { width: min(1320px,calc(100vw - 32px)); }
.history-list-dialog .inventory-history-card { margin: 0; }
.history-list-dialog table { min-width: 1100px; }
.production-order-list { padding: 0; margin: 16px 0 0; list-style: none; }
.production-order-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #e2e9f4; }
.production-order-rank { width: 30px; flex-shrink: 0; color: #647b9c; text-align: center; font-size: 13px; }
.production-order-identity { flex: 1; min-width: 0; }
.production-order-identity strong, .production-order-identity span { display: block; overflow-wrap: anywhere; }
.production-order-identity strong { font-size: 14px; }
.production-order-identity span { margin-top: 4px; color: var(--muted); font-size: var(--text-label); }
#prod-order-status, .part-order-status { margin: 12px 0 0; color: #62799a; font-size: 12px; }
 .page-filters.filters .search-field { flex-basis: auto; } 

.page-filters > button { height: 42px; }
.route-selector.page-filters > .search-field { flex: 1 1 250px; }
.route-selector.page-filters > select { flex: 1 1 300px; width: auto; }

/* Quiet, shared contextual help for page, section, and field instructions. */
.help-source { display: none !important; }
.help-heading, .help-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.help-heading h1, .help-heading h2 { margin: 0; min-width: 0; }
.help-button { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; min-width: 20px; padding: 0; border: 1px solid #c5d3e9; border-radius: 50%; background: #f5f8ff; color: #55739e; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1; cursor: help; vertical-align: middle; flex-shrink: 0; }
.help-button:hover, .help-button[aria-expanded=true] { color: #245fe5; border-color: #91b1ed; background: #eaf1ff; }
.help-button:focus-visible { outline: 2px solid #245fe5; outline-offset: 3px; }
.help-tooltip { position: fixed; z-index: 10000; width: max-content; max-width: min(400px,calc(100vw - 24px)); padding: 14px 16px; border: 1px solid #cbd9ee; border-radius: 9px; background: #fff; color: #293f5e; box-shadow: 0 8px 28px #172d5426; font-size: var(--text-label); font-weight: 400; line-height: 1.75; white-space: normal; overflow-y: auto; overflow-wrap: anywhere; }
.help-tooltip p { margin: 0; white-space: pre-line; }
.help-tooltip p + p { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e7edf7; }
.help-tooltip[hidden] { display: none; }
.inventory-upload-footer > span:empty { display: none; }
.inventory-upload-footer:has(> span:empty), .inventory-upload-footer:has(> span.help-source) { justify-content: flex-end; }
.page-heading .help-heading { gap: 10px; }
.page-heading .help-button { width: 22px; height: 22px; min-width: 22px; font-size: 13px; }
.form-grid .help-label { display: inline-flex; }
.help-button { font-style: normal; }
.dialog-footer:has(> .help-source) { justify-content: flex-end; }
/* Compact desktop navigation rail, with an explicit expansion control. */
.sidebar-toggle { display: flex; align-items: center; justify-content: center; gap: 9px; height: 36px; min-height: 36px; margin: 18px 0 12px; border: 1px solid #3b4f70; border-radius: 7px; background: #1b2b45; color: #dce7f8; font-size: 12px; }
.sidebar-toggle:hover { background: #2b4062; color: #fff; }
.sidebar-toggle svg { width: 17px; height: 17px; }
.sidebar-expanded .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar nav {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #627b9f #111e35;
}
@supports selector(::-webkit-scrollbar) {
  @media (forced-colors: none) {
    .sidebar nav { scrollbar-width: auto; scrollbar-color: auto; }
    .sidebar nav::-webkit-scrollbar { width: 8px; }
    .sidebar nav::-webkit-scrollbar-thumb {
      background: #627b9f;
      border: 1px solid #111e35;
      border-radius: 999px;
    }
    .sidebar nav::-webkit-scrollbar-thumb:hover { background: #829bc0; }
    .sidebar nav::-webkit-scrollbar-button { display: none; }
  }
}

  body { --sidebar: 72px; }
  body.sidebar-expanded { --sidebar: 244px; }
  body:not(.sidebar-expanded) .sidebar { padding: 24px 12px 18px; }
  body:not(.sidebar-expanded) .brand { padding: 0; justify-content: center; }
  body:not(.sidebar-expanded) .brand > span, body:not(.sidebar-expanded) .nav-text, body:not(.sidebar-expanded) .sidebar-toggle span, body:not(.sidebar-expanded) .master-nav > summary > span, body:not(.sidebar-expanded) .nav-chevron, body:not(.sidebar-expanded) .sidebar-bottom > div { display: none; }
  body:not(.sidebar-expanded) .brand img { width: 48px; height: 48px; }
  body:not(.sidebar-expanded) .sidebar nav a, body:not(.sidebar-expanded) .sidebar .master-nav > summary { justify-content: center; gap: 0; padding: 11px 0; min-height: 44px; font-size: 0; }
  body:not(.sidebar-expanded) .sidebar .master-subnav { margin: 5px 0 10px; padding: 0; border: 0; }
  body:not(.sidebar-expanded) .sidebar-bottom { justify-content: center; gap: 7px; padding-top: 14px; }
  body:not(.sidebar-expanded) .sidebar-bottom .status-dot { margin: 0; }

/* Inventory import uses the same explicit popup entry point as product imports. */
#inventory-page > .inventory-history-card { margin-top: 0; }
.inventory-bulk-dialog { width: min(1180px,calc(100vw - 32px)); }
.inventory-bulk-dialog[open] { display: flex; flex-direction: column; }
.inventory-bulk-dialog > .modal-body { overflow-y: auto; min-height: 0; background: #f6f8fc; }
.inventory-bulk-dialog .inventory-template-card { margin-bottom: 18px; }
.inventory-bulk-dialog .bulk-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: bulk; }
.bulk-steps li { counter-increment: bulk; display: flex; align-items: center; gap: 7px; font-size: 13px; color: #405878; }
.bulk-steps li::before { content: counter(bulk); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e5edff; color: #245fe5; font-size: 12px; font-weight: 600; }
.bulk-steps li + li::after { content: ''; }

/* A compact rail shows only top-level destinations, rather than an unlabeled full tree. */

  body:not(.sidebar-expanded) .sidebar .master-subnav { display: none; }
  body:not(.sidebar-expanded) .sidebar .master-nav[data-active=true] > summary { background: #2861df; color: #fff; }
  body:not(.sidebar-expanded) .sidebar nav > a { margin-top: 12px; }

.sidebar-menu-hint { position: fixed; z-index: 60; padding: 8px 12px; border: 1px solid #344b70; border-radius: 7px; background: #1b2b45; color: #fff; box-shadow: 0 5px 18px #10213b26; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; pointer-events: none; }
.sidebar-menu-hint[hidden] { display: none; }

/* The compact master menu floats beside the rail without resizing the workspace. */
.sidebar-master-flyout { position: fixed; z-index: 70; width: 212px; max-width: calc(100vw - 96px); max-height: calc(100vh - 16px); overflow-y: auto; padding: 8px; border: 1px solid #d6e0f0; border-radius: 10px; background: #fff; color: #243b5c; box-shadow: 0 10px 32px #172d5429; }
.sidebar-flyout-heading { padding: 7px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid #e7edf7; font-size: 12px; font-weight: 700; color: #637b9b; }
.sidebar-master-flyout a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px; border-radius: 7px; color: #304968; text-decoration: none; font-size: 14px; font-weight: 600; }
.sidebar-master-flyout a svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-master-flyout a:hover { background: #f0f5ff; color: #245fe5; }
.sidebar-master-flyout a.nav-active { background: #eaf1ff; color: #245fe5; }
.sidebar-master-flyout a:focus-visible { outline: 2px solid #245fe5; outline-offset: -2px; }
.sidebar-flyout-section { padding: 8px 10px 3px; color: #637b9b; font-size: 12px; font-weight: 600; }

/* Burnout inventory has its own destinations and a nested master-data group. */
.sidebar .burnout-nav > .master-subnav { margin-left: 12px; padding-left: 8px; }
.sidebar .burnout-base-nav > .master-subnav { margin: 3px 0 6px 12px; padding-left: 7px; }
.sidebar .burnout-nav .master-subnav a { min-height: 36px; padding: 8px 6px; gap: 6px; }
.sidebar .burnout-nav .master-subnav a svg { width: 16px; height: 16px; }
.sidebar .burnout-base-nav .master-subnav a { font-size: 12px; }
.burnout-base-nav > summary { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 8px 6px; border-radius: 7px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: #c5d2e7; }
.burnout-base-nav > summary::-webkit-details-marker { display: none; }
.burnout-base-nav > summary svg { width: 16px; height: 16px; }
.burnout-base-nav > summary .nav-chevron { width: 12px; height: 12px; transform: none; }
.burnout-base-nav[open] > summary .nav-chevron { transform: rotate(90deg); }
.burnout-base-nav > summary:hover { background: #243552; color: #fff; }
.burnout-base-nav[data-active=true] > summary { color: #fff; }

/* Current stock shares list/filter controls with the master and production pages. */
.stock-date-bar, .production-date-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 var(--card-padding) 18px; padding: 0; color: #304968; font-size: var(--text-label); }
.stock-date-bar label, .production-date-bar label { font-weight: 600; }
.stock-date-bar input, .production-date-bar input { width: 132px; height: var(--control-height); min-height: var(--control-height); padding: 0 10px; border: 1px solid var(--control-line); border-radius: var(--control-radius); background: var(--surface); color: var(--ink); font-family: inherit; font-size: var(--text-body); font-weight: 400; }
.date-navigation { display: inline-flex; align-items: center; gap: 4px; min-width: 0; vertical-align: middle; }
.date-navigation > input[type=date] { flex: 0 0 132px; width: 132px; min-width: 0; }
.date-navigation-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: var(--control-height); padding: 0; border: 1px solid var(--control-line); border-radius: var(--control-radius); background: var(--surface); color: #355680; }
.date-navigation-button svg { width: 16px; height: 16px; }
.date-navigation-button:hover:enabled { border-color: #9bb7e8; background: var(--primary-soft); color: var(--primary); }
.inventory-history-filters.page-filters label:has(.date-navigation) { flex-basis: 204px; }
.stock-date-status { color: #557095; font-size: 12px; }
.stock-table { min-width: calc(var(--matrix-base-width) + var(--process-count, 6) * var(--matrix-process-width) + 278px); }
.stock-table th:nth-child(5), .stock-table td:nth-child(5) { position: sticky; left: 0; min-width: 200px; max-width: 260px; background: #fff; border-right: 1px solid #dbe4f5; z-index: 1; }
.stock-table th:nth-child(5) { background: #f4f7fc; z-index: 2; }
.stock-identity-info { cursor: help; }
.stock-identity-heading { display: flex; align-items: center; gap: 5px; }
.stock-identity-heading strong { min-width: 0; }
.stock-identity-heading .stock-info-button { width: 14px; height: 14px; min-width: 14px; font-size: 9px; cursor: help; }
.stock-table .stock-quantity { min-width: 85px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.stock-total { font-weight: 700; background: #f6f9ff; }
.stock-table tfoot th:nth-child(n), .stock-table tfoot td:nth-child(n) { position: static; left: auto; min-width: 0; max-width: none; background: #edf3ff; border-top: 2px solid #b8cbed; border-right: 0; font-weight: 700; }
.stock-table tfoot th { text-align: center; vertical-align: middle; font-size: 18px; white-space: normal; }
.stock-table tfoot small { display: block; margin-top: 4px; color: #577296; font-size: 12px; font-weight: 500; }
.stock-table tfoot td.stock-negative { color: #be3030; background: #fff0ee; }
.stock-scroll-sentinel { height: 1px; }
.stock-negative { color: #be3030; font-weight: 700; background: #fff3f1; }
.stock-status { display: inline-block; padding: 4px 7px; border-radius: 5px; background: #fff3de; color: #875310; font-size: 12px; white-space: nowrap; }
.stock-status-ok { background: #eaf4ef; color: #226645; }
.stock-status-negative { background: #fff0ee; color: #b82f2f; }
.stock-detail-status, .stock-detail-finished { font-size: 13px; line-height: 1.8; color: #405878; }
#stock-detail .stock-quantity { text-align: right; font-variant-numeric: tabular-nums; }

.inventory-status { display: inline-block; padding: 4px 7px; border-radius: 5px; background: #eaf4ef; color: #226645; font-size: 12px; white-space: nowrap; }
.inventory-status-deleted { background: #edf0f5; color: #58667c; }
.inventory-delete-effect { padding: 12px 14px; border: 1px solid #d4e0f5; border-radius: 7px; background: #f4f7ff; color: #304968; font-size: 14px; line-height: 1.7; }
#inventory-delete-dialog { width: min(620px,calc(100vw - 32px)); }
#inventory-history-rows .row-actions { min-width: 94px; }

.stock-column-kind { display: block; margin-top: 4px; color: #405878; font-size: 12px; font-weight: 500; line-height: 1.4; }

/* Page-specific forms and matrices use the same type scale and control treatment. */
.route-selector label, .inventory-template-filters label, .production-entry-fields label,
.inventory-fields label, .inventory-history-filters label, .inventory-upload-file label { font-size: var(--text-label); }
.route-selector input, .route-selector select, .route-table input, .route-table select,
.inventory-template-filters input, .inventory-template-filters select,
.production-entry-fields input, .production-entry-fields select, .production-entry-table input,
.inventory-fields input, .inventory-history-filters input[type=date], .inventory-table input {
  height: var(--control-height);
  border-color: var(--control-line);
  border-radius: var(--control-radius);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--text-body);
  font-weight: 400;
}
.production-grid-cell input { height: 34px; font-size: var(--text-body); border-color: var(--control-line); border-radius: var(--control-radius); color: var(--ink); }
.production-grid-cell input.is-edited { border-color: var(--primary); background: var(--primary-soft); color: #15396a; }
.inventory-upload-file input { font-size: var(--text-body); border-color: var(--control-line); }
.inventory-upload-file input::file-selector-button { font: inherit; font-size: var(--text-label); }
.inventory-template-summary, .route-context, .inventory-detail-context,
.stock-detail-status, .stock-detail-finished { font-size: var(--text-label); line-height: 1.75; }
.inventory-status, .stock-status { font-size: var(--text-meta); font-weight: 500; line-height: 1.5; padding: 4px 8px; }
.route-bottom, .inventory-upload-footer { padding: 16px var(--card-padding); }
.route-context, .inventory-current { margin-inline: var(--card-padding); }
.stock-table th:first-child, .stock-table td:first-child { padding-left: var(--card-padding); }
.stock-table th:last-child, .stock-table td:last-child { padding-right: var(--card-padding); }
.stock-table td:nth-child(n+6) { text-align: center; }

/* Identical identity columns, heading height and row rhythm in both operational tables. */
.production-grid-table thead th, .stock-table thead th {
  height: 66px;
  padding: 10px 12px;
  border-block: 1px solid var(--line);
  font-size: var(--text-label);
  line-height: 1.5;
  vertical-align: middle;
}
.production-grid-table tbody td, .stock-table tbody td {
  height: 64px;
  padding: 10px 12px;
  font-size: var(--text-body);
  line-height: 1.5;
  vertical-align: middle;
}
.production-grid-table thead th:nth-child(-n+4), .stock-table thead th:nth-child(-n+4) { width: 80px; min-width: 80px; }
.production-grid-table th:nth-child(5), .production-grid-table td:nth-child(5),
.stock-table th:nth-child(5), .stock-table td:nth-child(5) { width: 220px; min-width: 220px; max-width: 220px; }
.production-grid-table thead th:nth-child(n+6), .stock-table thead th:nth-child(n+6) { text-align: center; }
.production-grid-table th:first-child, .production-grid-table td:first-child,
.stock-table th:first-child, .stock-table td:first-child { padding-left: var(--card-padding); }
.production-grid-table th:last-child, .production-grid-table td:last-child,
.stock-table th:last-child, .stock-table td:last-child { padding-right: var(--card-padding); }
.production-grid-table th:last-child, .production-grid-table td:last-child { padding-right: 12px; }
.stock-table thead th:nth-last-child(3) { width: 110px; }
.stock-table thead th:nth-last-child(2) { width: 92px; }
.stock-table thead th:last-child { width: 76px; }
.editor-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  min-height: 74px;
  padding: 16px var(--card-padding);
  border-top: 1px solid var(--line);
  background: #fbfcff;
}
.editor-footer-context { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; min-width: 0; }
.editor-footer-context > span { font-size: var(--text-label); font-weight: 400; color: var(--muted); }
.editor-footer-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.editor-footer-actions .primary { min-width: 76px; }
.shipment-grid-table { width: 720px; min-width: 720px; }
.shipment-grid-table thead > tr:first-child > th[colspan] { width: 180px; padding-inline: 4px; }
.shipment-grid-table input[aria-invalid=true] { border-color: #c53d36; background: #fff4f1; }
#ship-draft-summary { color: var(--muted); font-size: var(--text-label); }
#ship-history-dialog .inventory-history-card { min-width: 1100px; }
#ship-excel-dialog .modal-body > .list-card { min-width: 1000px; }

/* One compact pair of saved/new columns beneath each process heading. */
#prod-manual .production-grid-table { --matrix-process-width: 120px; }
.paired-entry-table thead > tr:first-child > th { height: 36px; padding-block: 7px; }
.paired-entry-table thead > tr:first-child > th[rowspan] { height: 68px; }
.paired-entry-table .production-process-heading { border-left: 1px solid var(--line); }
.paired-entry-table thead .production-input-subhead > th { top: 36px; left: auto; z-index: 2; width: auto; min-width: 0; max-width: none; height: 30px; padding: 5px 4px; border-top: 0; border-right: 0; font-size: var(--text-meta); font-weight: 400; text-align: center; white-space: nowrap; }
.paired-entry-table .production-subhead-saved { border-left: 1px solid var(--line); color: #526885; background: #f1f4f9; }
.paired-entry-table .production-subhead-new { color: #204d96; background: #edf3ff; }
.paired-entry-table tbody .production-existing-value, .paired-entry-table tbody .production-new-value { padding: 8px 4px; text-align: center; font-variant-numeric: tabular-nums; }
.paired-entry-table tbody .production-existing-value { border-left: 1px solid var(--line); background: #fafbfd; color: #284f88; font-size: var(--text-body); font-weight: 600; }
.paired-entry-table tbody .production-existing-value.is-unregistered { color: #8a96a7; font-weight: 400; }
.paired-entry-table .production-grid-cell input { width: 52px; height: 30px; padding: 0 4px; font-size: var(--text-body); }
.shipment-grid-table thead > tr > th:last-child,
.shipment-grid-table tbody > tr > td:last-child { border-right: 1px solid var(--line); }

/* Main lists share the page's vertical scrolling; dialogs retain their own viewport. */
.table-container.continuous-list { max-height: none; overflow: auto; overscroll-behavior-y: auto; overflow-anchor: none; }
dialog .table-container.continuous-list { max-height: 480px; overscroll-behavior: contain; }
.continuous-list thead th { position: sticky; top: 0; z-index: 2; background: #f4f7fc; }
.continuous-list + .section-empty[hidden] { display: none; }
.pagination > [hidden] { display: none !important; }

/* Read-only shipment readiness: quantities are allocated once across shared parts. */
.progress-toolbar { display: flex; align-items: center; gap: 14px; }
.progress-view-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f4f7fc; }
.progress-view-switch button { min-width: 52px; height: 30px; padding: 0 10px; border: 0; border-radius: 4px; color: #526885; background: transparent; font-size: var(--text-label); }
.progress-view-switch button[aria-pressed=true] { color: #204d96; background: white; font-weight: 600; box-shadow: 0 1px 4px #1b37641a; }
.progress-dates { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin: 0 var(--card-padding) 18px; }
.progress-dates label { display: flex; flex-direction: column; gap: 7px; color: #304968; font-size: var(--text-label); font-weight: 600; }
.progress-dates input[type=date] { height: var(--control-height); padding: 0 10px; border: 1px solid var(--control-line); border-radius: var(--control-radius); color: var(--ink); background: var(--surface); font-size: var(--text-body); font-weight: 400; }
.progress-period { display: flex; align-items: flex-end; gap: 10px; }
.progress-range-mark { align-self: flex-end; line-height: var(--control-height); color: var(--muted); }
.progress-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin: 0 var(--card-padding) 16px; color: #364d6a; font-size: var(--text-label); }
.progress-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.progress-legend i { width: 26px; height: 18px; border: 1px solid #24364b16; border-radius: 2px; }
.progress-scroll { max-height: none; overflow: auto; overscroll-behavior-y: auto; }
.progress-matrix { --progress-identity-width: 230px; width: calc(var(--progress-identity-width) + 54px + var(--progress-days,7) * var(--progress-day-width,124px)); table-layout: fixed; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.progress-matrix.is-weekly { --progress-identity-width: 190px; width: 100%; min-width: calc(var(--progress-identity-width) + 54px + var(--progress-weeks,8) * 90px); }
.progress-matrix.is-weekly thead th { height: 56px; }
.progress-matrix.is-weekly thead th > strong { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.progress-matrix.is-weekly thead th > span { display: block; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; color: #526885; font-size: var(--text-meta); font-weight: 400; }
.progress-matrix thead th { position: sticky; top: 0; z-index: 3; height: 40px; padding: 6px 8px; text-align: center; background: #f4f7fc; border-right: 1px solid var(--line); }
.progress-matrix thead > tr:first-child > th:first-child { left: 0; z-index: 4; width: var(--progress-identity-width); text-align: left; padding-left: var(--card-padding); }
.progress-matrix thead > tr:first-child > th:nth-child(2) { left: var(--progress-identity-width); z-index: 4; width: 54px; }
.progress-matrix thead .progress-day-head > th { height: 24px; top: 56px; padding: 0; color: #526885; font-size: 11px; font-weight: 400; }
.progress-matrix, #progress-detail { --progress-saturday-shade: #dce9ff; --progress-sunday-shade: #fbe1e1; }
.progress-matrix thead th.is-saturday, .progress-matrix tbody td.is-saturday, #progress-detail .is-saturday { background-color: var(--progress-saturday-shade); }
.progress-matrix thead th.is-sunday, .progress-matrix tbody td.is-sunday, #progress-detail .is-sunday { background-color: var(--progress-sunday-shade); }
.progress-matrix .progress-week-end { border-right-color: #bdcce2; }
.progress-matrix tbody td, .progress-matrix tbody th { height: 34px; padding: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: middle; text-align: center; }
.progress-matrix tbody .progress-identity { position: sticky; left: 0; z-index: 2; width: var(--progress-identity-width); min-width: var(--progress-identity-width); padding: 10px var(--card-padding); text-align: left; background: white; border-bottom-width: 2px; }
.progress-identity > strong, .progress-identity > span, .progress-identity > small { display: block; }
.progress-identity > strong { font-weight: 600; font-size: var(--text-body); }
.progress-identity > span { margin-top: 2px; font-size: var(--text-label); color: #395a83; }
.progress-identity > small { margin-top: 4px; font-size: var(--text-meta); color: var(--muted); }
.progress-matrix tbody .progress-row-label { position: sticky; left: var(--progress-identity-width); z-index: 2; width: 54px; background: #f6f8fc; color: #415977; font-size: var(--text-label); font-weight: 400; }
.progress-matrix tbody .progress-plan-value { background: #e3edf9; color: #234c80; font-weight: 600; }
.progress-matrix .progress-stock-row td, .progress-matrix .progress-stock-row th { border-bottom-width: 2px; }
.progress-matrix tbody .progress-no-plan { background: white; color: #9aa6b6; font-weight: 400; }
.progress-stock-strip { display: grid; width: 100%; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 0; color: #203652; background: transparent; }
.progress-stock-strip:hover { box-shadow: inset 0 0 0 2px #6b91c8; }
.progress-stock-strip:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.progress-stock-number { display: flex; align-items: center; justify-content: center; min-width: 0; height: 34px; padding: 0 3px; border-right: 1px solid #fff9; font-size: var(--text-body); font-weight: 500; white-space: nowrap; }
.progress-stock-number:last-child { border-right: 0; }
.progress-matrix.is-weekly .progress-stock-number { overflow: hidden; padding-inline: 0; font-size: 12px; }
.progress-stock-run { border-inline: 1px solid #c8d6e9; }
.progress-stock-track { display: grid; width: 100%; height: 34px; }
.progress-stock-band { display: flex; align-items: center; justify-content: center; min-width: 0; height: 34px; padding: 0; border: 0; border-right: 1px solid #fff9; border-radius: 0; color: #203652; font-size: var(--text-body); font-weight: 500; white-space: nowrap; }
.progress-stock-band:last-child { border-right: 0; }
.progress-stock-band[data-kind=allocation] { border-right: 1px solid #aebfd7; }
.progress-stock-band:hover { box-shadow: inset 0 0 0 2px #6b91c8; }
.progress-stock-band:focus-visible { outline-offset: -3px; }
.progress-matrix.is-weekly .progress-stock-band { font-size: 12px; }
.process-color-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.process-color-controls input[type=color] { width: 52px; height: 42px; padding: 4px; border: 1px solid var(--control-line); border-radius: 6px; background: white; cursor: pointer; }
.process-color-controls #process-color-code { width: 112px; margin: 0; font-variant-numeric: tabular-nums; }
.process-color-preview { display: flex; align-items: center; justify-content: center; width: 78px; height: 34px; border: 1px solid #24364b22; border-radius: 4px; font-size: 14px; }
.process-color-presets { display: flex; gap: 9px; margin-top: -8px; }
.process-color-preset { width: 28px; height: 28px; padding: 0; border: 1px solid #24364b44; border-radius: 5px; }
.process-color-preset:hover { outline: 2px solid #6b91c8; outline-offset: 2px; }
.process-color-value { display: inline-flex; align-items: center; gap: 9px; }
.process-color-swatch { display: inline-block; width: 28px; height: 20px; border: 1px solid #24364b33; border-radius: 3px; }
.progress-matrix.is-weekly .progress-plan-value { overflow: hidden; font-size: 12px; }
.progress-matrix.is-weekly .progress-stock-value.progress-no-plan { font-size: 11px; color: #b0bac8; }
#progress-error { margin: 0 var(--card-padding) 18px; }
#progress-detail-days h3 { margin: 22px 0 10px; font-size: var(--text-section); }

.route-effective-fields { display:flex; flex-wrap:wrap; align-items:end; gap:12px 18px; padding:0 var(--card-padding) 20px; }
.route-effective-fields label { display:flex; flex-direction:column; gap:6px; font-size:var(--text-label); }
.route-effective-fields .route-reason { flex:1; min-width:240px; max-width:520px; }
.route-effective-fields input[type=text] { width:100%; }
.route-effective-fields input { height:var(--control-height); padding:0 12px; border:1px solid var(--control-line); border-radius:var(--control-radius); font:inherit; font-size:var(--text-body); color:var(--ink); background:var(--surface); }
.route-effective-fields input[type=date] { width:132px; padding:0 10px; }
#route-effective-note { font-size:var(--text-meta); color:var(--muted); padding-bottom:10px; }
.route-history-entry { padding:14px 0; border-bottom:1px solid var(--line); }
.route-history-entry summary { cursor:pointer; font-weight:600; }
.route-history-entry p { color:var(--muted); font-size:var(--text-label); margin:10px 0; }
body:has(#burnout-products-page:not([hidden])) { min-width: 0; }
main:has(#burnout-products-page:not([hidden])) { padding-inline: clamp(12px, 2.5vw, 36px); }
#burnout-products-page .page-heading,
#burnout-products-page .page-actions,
#burnout-products-page .filters { flex-wrap: wrap; }
#burnout-products-page .filters { overflow: visible; }
#burnout-products-page .search-field { flex: 1 1 240px; min-width: 0; }
.burnout-product-table { min-width: 0; table-layout: fixed; white-space: normal; overflow-wrap: anywhere; }
.burnout-product-table :is(th, td) { padding-inline: clamp(3px, .5vw, 9px); }
.burnout-product-table :is(th, td):first-child { padding-inline-start: clamp(6px, .8vw, 14px); }
.burnout-product-table :is(th, td):last-child { padding-inline-end: clamp(6px, .8vw, 14px); }
.burnout-product-table th:nth-child(1) { width: 4%; }
.burnout-product-table th:nth-child(2),
.burnout-product-table th:nth-child(8) { width: 7%; }
.burnout-product-table th:nth-child(3),
.burnout-product-table th:nth-child(10),
.burnout-product-table th:nth-child(12),
.burnout-product-table th:nth-child(13) { width: 6%; }
.burnout-product-table th:nth-child(4),
.burnout-product-table th:nth-child(6),
.burnout-product-table th:nth-child(7) { width: 9%; }
.burnout-product-table th:nth-child(5) { width: 5%; }
.burnout-product-table th:nth-child(9) { width: 10%; }
.burnout-product-table .action-col { width: clamp(60px, 10%, 112px); }
.burnout-product-table .row-actions { flex-wrap: wrap; gap: 4px; }
.burnout-product-table .row-actions .small-button { max-width: 100%; padding-inline: 6px; white-space: normal; }
.burnout-shape-button { width: min(62px, 100%); padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.burnout-shape-button img { display: block; width: 100%; aspect-ratio: 60 / 44; object-fit: contain; }
.burnout-photo-dialog { width: min(700px, calc(100vw - 32px)); }
.burnout-photo-dialog img {
  display: block;
  width: 100%;
  max-height: min(460px, 55dvh);
  margin: auto;
  object-fit: contain;
}
.burnout-part-number { font-weight: 600; }
.burnout-number { text-align: right; }
.burnout-category-filters { display: flex; align-items: center; gap: 10px; padding: 0 var(--card-padding) 14px; }
.burnout-category-filters > span { flex-shrink: 0; color: var(--muted); font-size: var(--text-label); }
.burnout-category-buttons { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.burnout-category-buttons button { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.burnout-category-buttons button[aria-pressed=true] { background: #eaf1ff; border-color: #9ab8f1; color: #204d96; font-weight: 650; }
#burnout-import-details:empty { display: none; }
.burnout-review-dialog { width: min(760px, calc(100vw - 32px)); }
.burnout-review-dialog .modal-body > p:first-child { margin-top: 0; }
.burnout-review-dialog table { min-width: 480px; white-space: normal; overflow-wrap: anywhere; }
body:has(#burnout-opening-page:not([hidden])) { min-width: 0; }
main:has(#burnout-opening-page:not([hidden])) { padding-inline: clamp(12px, 2.5vw, 36px); }
#burnout-opening-page :is(.page-heading, .page-actions, .burnout-opening-filters) { flex-wrap: wrap; }
#burnout-opening-page .burnout-opening-filters .search-field { flex: 1 1 220px; min-width: 0; }
.burnout-opening-table { min-width: 0; white-space: normal; overflow-wrap: anywhere; table-layout: fixed; }
.burnout-opening-table th:first-child { width: 22%; }
.burnout-opening-table :is(th, td) { padding-inline: clamp(5px, .9vw, 14px); }
.burnout-opening-table td strong, .burnout-opening-table td small { display: block; }
#burnout-opening-import-details { max-height: 190px; overflow: auto; }
#burnout-opening-preview .table-container { max-height: 320px; }
#burnout-opening-delete-reason { display: block; width: 100%; }
@media (max-width: 520px) {
  #burnout-opening-history > .dialog-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  #burnout-opening-history > .dialog-heading .page-actions { display: contents; }
  #burnout-opening-history > .dialog-heading .close-button { grid-area: 1 / 2; }
  #burnout-opening-delete-all { grid-column: 1 / -1; justify-self: end; }
}

@media (max-width: 760px) {
  #mobile-scroll-top {
    position: fixed; z-index: 10;
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    display: grid; place-items: center; width: 44px; height: 44px;
    background: #203653; color: #fff; border: 1px solid #435d7d; border-radius: 12px;
    box-shadow: 0 2px 8px #172d5340;
  }
  body:has(dialog[open]) #mobile-scroll-top { display: none; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, body.sidebar-expanded {
    --sidebar: 0px;
    --card-padding: 12px;
    --dialog-padding: 14px;
    --text-title: 24px;
    min-width: 0;
  }
  .sidebar { display: none; }
  .topbar { min-height: 56px; padding: 8px 12px; gap: 8px; }
  .breadcrumb { min-width: 0; gap: 6px; font-size: 12px; overflow-wrap: anywhere; }
  .topbar-right { min-width: 0; }
  .user-menu-toggle { max-width: 38vw; }
  .mobile-master-nav:has(a[data-view]:not([hidden])) {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .mobile-master-nav .master-nav {
    flex: 1 0 100%;
    min-width: 0;
    border: 1px solid var(--control-line);
    border-radius: 8px;
    background: var(--surface-muted);
  }
  .mobile-master-nav :is(a, summary) {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--ink);
    font-size: var(--text-body);
    font-weight: 600;
    line-height: 1.35;
  }
  .mobile-master-nav :is(a, summary):focus-visible { outline-offset: -3px; }
  .mobile-master-nav > a, .mobile-master-nav .master-subnav > a {
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .mobile-master-nav .master-nav[data-active=true] > summary {
    background: #203653;
    color: white;
  }
  .mobile-master-nav .master-subnav { display: grid; gap: 6px; padding: 6px; }
  .mobile-master-nav .burnout-base-nav > summary { background: #e7eef8; color: var(--ink); }
  .mobile-master-nav .burnout-base-nav > .master-subnav {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 144px), 1fr));
    padding-inline: 0;
  }
  .mobile-master-nav .burnout-base-nav:not([open]) > .master-subnav,
  .mobile-master-nav .master-nav:not([open]) > .master-subnav { display: none; }
  .mobile-master-nav a.nav-active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
  }
  .mobile-master-nav svg { width: 17px; height: 17px; }
  main, main:has(#burnout-opening-page:not([hidden])), main:has(#burnout-products-page:not([hidden])) {
    padding: 16px 12px 22px;
  }
  .page-heading, .list-heading, .page-filters.filters, .route-bottom, .editor-footer { flex-wrap: wrap; }
  .page-heading { gap: 10px; margin-bottom: 16px; }
  .page-actions { flex-shrink: 1; }
  .filters .search-field, .page-filters.filters .search-field { flex: 1 1 100%; min-width: 0; }
  .page-filters.filters :is(input, select),
  main :is(input, select, textarea):not([type=checkbox],[type=radio]),
  .modal :is(input, select, textarea):not([type=checkbox],[type=radio]) { font-size: 16px; }
}
