.staff {
  --staff-ink: #171d32;
  --staff-muted: #59637b;
  --staff-blue: #2332d5;
  --staff-blue-wash: #edf0ff;
  --staff-edge: #dbe0ea;
  --staff-surface: #fff;
  --staff-canvas: #f4f6fa;
  --staff-gutter: clamp(1rem, 2vw, 2.25rem);
  min-height: 100vh; background: var(--staff-canvas); color: var(--staff-ink);
}
.staff [hidden] { display: none; }
.staff-header { padding: .65rem var(--staff-gutter); min-height: 59px; background: var(--staff-ink); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; }
.staff-identity, .staff-tools { display: flex; align-items: center; gap: .75rem; }
.staff-header img { display: block; width: 88px; height: auto; filter: brightness(0) invert(1); }
.staff-identity span { color: #e1e7fb; padding-left: .75rem; border-left: 1px solid #52607f; font-size: .8rem; font-weight: 650; }
.staff-tools a { color: #e1e7fb; font-size: .82rem; font-weight: 650; text-underline-offset: .2em; }
.staff .staff-tools button { color: #fff; background: #252e4c; border-color: #495576; font-size: .82rem; }
.staff .staff-tools button:hover:not(:disabled) { background: #34416b; }
.staff .staff-tools :focus-visible { outline-color: #aeb9ff; }
.staff-refresh-icon { margin-inline-end: .35rem; font-size: 1rem; line-height: 1; }
.staff-sign-in { max-width: 980px; margin: clamp(1.25rem, 8vw, 7rem) auto; display: grid; grid-template-columns: 1fr .9fr; overflow: hidden; border: 1px solid #d8d5cf; border-radius: .5rem; background: white; }
.staff-sign-in-copy { padding: clamp(1.5rem, 5vw, 4rem); }
.staff-sign-in-copy p { max-width: 34ch; }
.staff-winter { min-height: 210px; background: #dbe4ff url('/assets/winter.webp') center / cover no-repeat; }
.staff h1 { line-height: .98; margin: 0; font-size: clamp(2.3rem, 4vw, 3.65rem); }
.staff h2 { margin: 0; line-height: 1.05; font-size: clamp(1.6rem, 2.4vw, 2rem); }
.staff button, .staff input, .staff select { min-height: 2.35rem; padding: .38rem .65rem; border: 1px solid var(--staff-edge); border-radius: .44rem; background-color: var(--staff-surface); color: var(--staff-ink); font: inherit; }
.staff select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, #4a546e 50%), linear-gradient(135deg, #4a546e 50%, transparent 50%); background-position: right 17px center, right 12px center; background-size: 5px 5px; background-repeat: no-repeat; }
.staff button { font-weight: 700; cursor: pointer; }
.staff button:enabled:hover { border-color: #adb9d1; }
.staff .staff-sign-in-copy button { margin-top: .85rem; background: #2332d5; color: white; border-color: #2332d5; }
.staff button:disabled { opacity: .55; cursor: default; }
.staff :focus-visible { outline: 3px solid #2332d5; outline-offset: 3px; }
.staff-board { width: 100%; padding: 0 var(--staff-gutter) 2rem; margin: 0 auto; }
.staff-actions, .staff-pages { display: flex; align-items: center; gap: .6rem .9rem; flex-wrap: wrap; justify-content: space-between; }
.staff-actions a { color: #1b28ae; font-weight: 700; }
.staff-view-nav { display: flex; gap: clamp(.35rem, 1vw, 1rem); margin: 0 calc(-1 * var(--staff-gutter)); padding: 0 var(--staff-gutter); overflow: auto; scrollbar-width: thin; background: white; border-bottom: 1px solid var(--staff-edge); }
.staff .staff-view-nav button { flex: none; min-height: 2.75rem; padding: .45rem .7rem; border: 0; border-radius: 0; border-bottom: 3px solid transparent; color: var(--staff-muted); background: transparent; white-space: nowrap; font-size: .84rem; }
.staff .staff-view-nav button:hover, .staff .staff-view-nav button[aria-pressed="true"] { color: #1c2caf; }
.staff .staff-view-nav button[aria-pressed="true"] { border-bottom-color: var(--staff-blue); background: #f5f6ff; }
.staff .staff-view-nav button:focus-visible { outline-offset: -4px; }
.staff-source { font-size: .83rem; color: var(--staff-muted); margin: .32rem 0 0; }
.staff .forecast { margin: 0 0 1rem; }
.forecast summary { padding: .68rem 1rem; font-weight: 700; cursor: pointer; }
.forecast summary::marker { color: #1b28ae; }
.forecast .ledger-status { margin: 0 0 .65rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.staff-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1rem 0; background: white; border: 1px solid var(--staff-edge); border-radius: .65rem; }
.staff-totals > div { padding: .75rem 1rem; border-right: 1px solid var(--staff-edge); min-width: 0; }
.staff-totals > div:last-child { border-right: 0; }
.staff-totals dt { color: var(--staff-muted); font-size: .85rem; font-weight: 620; }
.staff-totals dd { margin: .3rem 0 0; color: var(--staff-ink); font-size: clamp(1.4rem, 2.7vw, 2.2rem); font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; overflow-wrap: anywhere; }
.staff-alert { padding: .65rem 1rem; background: #fff4d7; border-left: 3px solid #9c5c00; }
.staff-ledger { border: 1px solid var(--staff-edge); border-radius: .65rem; background: white; }
.ledger-status { font-size: .875rem; padding: 0 1rem; color: #53545a; }
.staff-table-scroll { overflow-x: auto; }
.staff table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: .875rem; }
.staff table th, .staff table td { padding: .5rem .9rem; border-bottom: 1px solid #e5e1da; text-align: left; }
.staff table thead { background: #f0f3f9; }
.staff table button { border: 0; background: none; min-height: 2rem; padding: 0; color: #1b28ae; text-decoration: underline; }
.staff-pages { padding: .7rem 1rem; justify-content: center; }
.staff dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(100%, 490px); max-width: none; height: 100%; max-height: none; border: 0; padding: 1.25rem; }
.staff dialog::backdrop { background: #1c234c70; }
.staff dialog header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid #2332d5; }
.staff dialog dl > div { display: grid; grid-template-columns: 9rem 1fr; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid #e5e1da; }
.staff dialog dd { margin: 0; overflow-wrap: anywhere; }
.staff dialog ul { padding-left: 1.2rem; overflow-wrap: anywhere; }
.staff .impact-drawer { width: min(100%, 560px); padding: 0 1.25rem 1.25rem; }
.impact-drawer header { position: sticky; top: 0; z-index: 1; background: #fff; padding-top: 1.25rem; }
.impact-drawer header h2 { margin-top: .3rem; }
.impact-drawer .drawer-status { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem; margin-top: 1rem; }
.staff-outlook-covered { color: #1f6346; }
.staff-outlook-short, .staff-outlook-review { color: #804606; }
.staff-outlook-unmodeled { color: #555d71; }
.staff .staff-impact-items { list-style: none; padding-left: 0; }
.staff-impact-items > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(5rem, 8rem); gap: .75rem; padding: .75rem 0; border-top: 1px solid #e5e1da; }
.staff-impact-items > li > div:last-child { text-align: right; }
.staff-impact-items small, #scenario-skus small { display: block; color: #53545a; margin-top: .22rem; }
.impact-exposure { background: #e4eaff; color: #182396; border-radius: .3rem; padding: .7rem .8rem; display: grid; grid-template-columns: 1fr auto; gap: .3rem .6rem; font-size: .9rem; }
.impact-exposure meter { grid-column: 1 / -1; width: 100%; }
.staff-ledger h3 { margin: 0; line-height: 1.25; font-size: 1.05rem; }
.staff-totals small { display: block; min-height: 1em; margin-top: .25rem; color: #31366d; }
#scenario-skus input { width: 6rem; text-align: right; }
.scenario-timeline { margin: 0 0 1.1rem; padding: 1rem; }
.scenario-timeline ol { list-style: none; padding: 0; margin: .7rem 0 0; }
.scenario-timeline li { display: grid; grid-template-columns: 8rem minmax(0, 1fr) 3.2rem; align-items: center; gap: .4rem .75rem; font-size: .9rem; padding: .25rem 0; }
.scenario-timeline strong { text-align: right; }
.scenario-timeline meter { width: 100%; height: 1rem; }
.scenario-timeline meter::-webkit-meter-optimum-value { background: #2332d5; }
.scenario-timeline meter::-moz-meter-bar { background: #2332d5; }
.staff-email-window { background: #f0efec; padding: .75rem; }
.staff-email-window iframe { display: block; width: 100%; max-width: 820px; height: 75vh; min-height: 480px; margin: auto; border: 1px solid #d8d5cf; background: #fff; }
.staff-email-window .staff-email-phone { max-width: 390px; }
@media (max-width: 740px) {
  .staff-sign-in { margin-inline: 1rem; grid-template-columns: 1fr; }
  .staff-totals { grid-template-columns: 1fr 1fr; }
  .staff-totals > div { border-bottom: 1px solid #c9d3fa; }
  .scenario-timeline li { grid-template-columns: 6.6rem minmax(0, 1fr) 2.4rem; gap: .4rem; }
}

.ops-inline { display: flex; flex-wrap: wrap; align-items: end; gap: .45rem; }
.ops-table td { white-space: normal; vertical-align: top; }
.ops-table td small { display: block; margin: .12rem 0 .32rem; }
.ops-table td details { margin-top: .45rem; }
.ops-table td button + button { margin-left: .45rem; }
.ops-warning { color: #784909; }
.ops-assignment { padding: .85rem; margin-block: 1rem; background: #f1f3fc; border-radius: .4rem; }
.ops-assignment form { display: grid; gap: .6rem; }
.ops-assignment textarea { font: inherit; padding: .45rem; border: 1px solid #c8c8ca; border-radius: .25rem; resize: vertical; }
.ops-assignment button { justify-self: start; }
.ops-timeline { list-style: none; padding: .45rem 0 0 .9rem; border-left: 2px solid #d7dcf1; }
.ops-timeline li { padding: 0 0 .65rem .15rem; }
.ops-timeline li[data-verified="true"] { color: #215933; }
.ops-timeline small { display: block; color: #53545a; }

.email-draft-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.email-draft-options label { display: flex; gap: .55rem; align-items: flex-start; padding: .65rem .75rem; border: 1px solid #d8d5cf; border-radius: .35rem; cursor: pointer; }
.email-draft-options label:has(input:checked) { border-color: #2332d5; background: #e4eaff; }
.staff .email-draft-options input { accent-color: #2332d5; margin: .25rem 0 0; min-height: auto; flex: none; }
.email-draft-options small { display: block; color: #53545a; overflow-wrap: anywhere; }
.email-draft-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.email-draft-actions p { margin: 0; }
@media (max-width: 550px) {
  .email-draft-options { grid-template-columns: minmax(0, 1fr); }
}

.queue-title, .queue-heading, .queue-meta { display: flex; align-items: center; justify-content: space-between; gap: .65rem 1rem; flex-wrap: wrap; }
.queue-title { margin-top: 1.25rem; align-items: end; }
.queue-title h1 { max-width: none; }
.queue-meta { justify-content: start; }
.queue-freshness { display: inline-flex; gap: .42rem; align-items: center; color: var(--staff-muted); font-size: .78rem; font-weight: 620; }
.queue-freshness::before { content: ""; background: #408a65; border-radius: 50%; width: .45rem; height: .45rem; flex: none; }
.queue-freshness[data-stale="true"]::before { background: #b97528; }
.staff #view-ski-forecast { min-height: 2rem; font-size: .79rem; }
.queue-totals { overflow: hidden; }
.queue-totals > div { padding: .95rem 1rem; }
.queue-totals .metric-value { background: var(--staff-blue-wash); }
.queue-totals .metric-value dd { color: #1d2da5; }
.queue-totals dt { display: flex; align-items: center; gap: .45rem; }
.metric-mark { position: relative; display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; flex: none; color: #2d42ad; border-radius: .3rem; background: #edf0ff; font-size: .77rem; font-weight: 800; }
.metric-orders::before { content: ""; width: .54rem; height: .65rem; border: 1.5px solid currentColor; border-radius: .1rem; }
.metric-orders::after { content: ""; position: absolute; width: .32rem; height: .22rem; border-block: 1px solid currentColor; }
.metric-customers::before { content: ""; position: absolute; width: .34rem; height: .34rem; border: 1.3px solid currentColor; border-radius: 50%; top: .22rem; }
.metric-customers::after { content: ""; position: absolute; width: .62rem; height: .33rem; border: 1.3px solid currentColor; border-radius: .35rem .35rem .1rem .1rem; bottom: .2rem; }
.metric-units::before { content: ""; width: .55rem; height: .55rem; border: 1.5px solid currentColor; transform: rotate(45deg); }
.metric-money { background: #dfe5ff; }

.queue-ledger-top { padding: 1rem 1rem .85rem; }
.queue-heading h2 { font-size: 1.6rem; }
.queue-heading .staff-source { font-size: .79rem; }
.queue-match-count { padding: .25rem .55rem; border-radius: .32rem; background: var(--staff-blue-wash); color: #223499; font-size: .77rem; font-weight: 700; }
.queue-breakdown { margin-top: .78rem; }
.queue-distribution { display: flex; gap: 2px; height: .26rem; border-radius: .3rem; overflow: hidden; background: #e7ebf4; }
.queue-distribution span { background: var(--queue-accent); min-width: 1px; }
.queue-tone-0 { --queue-accent: #358460; --queue-tint: #e9f6ee; --queue-text: #205840; }
.queue-tone-1 { --queue-accent: #5368d7; --queue-tint: #edf0ff; --queue-text: #253b9c; }
.queue-tone-2 { --queue-accent: #8856bb; --queue-tint: #f3ecfc; --queue-text: #623290; }
.queue-tone-3 { --queue-accent: #b17731; --queue-tint: #fdf3e4; --queue-text: #784b16; }
.queue-actions { display: flex; gap: .42rem; flex-wrap: wrap; margin-top: .62rem; }
.staff .queue-filter { display: inline-flex; align-items: center; gap: .45rem; min-height: 2rem; padding: .26rem .55rem; border-color: var(--staff-edge); border-radius: .4rem; font-size: .77rem; font-weight: 650; color: var(--staff-ink); }
.queue-filter-short { display: none; }
.queue-filter-label { display: inline-flex; align-items: center; gap: .3rem; }
.queue-filter[class*="queue-tone-"] .queue-filter-label::before, .queue-action-chip::before { content: ""; width: .38rem; height: .38rem; border-radius: 50%; flex: none; background: var(--queue-accent); }
.queue-filter strong { color: var(--queue-text, #344164); font-variant-numeric: tabular-nums; }
.staff .queue-filter[aria-pressed="true"] { border-color: var(--queue-accent, var(--staff-blue)); background: var(--queue-tint, var(--staff-blue-wash)); color: var(--queue-text, #223499); }
.queue-search-tools { display: grid; grid-template-columns: minmax(10rem, 1.65fr) repeat(3, minmax(0, 1fr)) auto; gap: .6rem; align-items: end; margin-top: .85rem; }
.queue-search-tools:has(#reset-queue-filters[hidden]) { grid-template-columns: minmax(10rem, 1.65fr) repeat(3, minmax(0, 1fr)); }
.queue-advanced-filters { display: contents; }
.staff #toggle-queue-filters { display: none; }
.queue-search-tools label { display: grid; gap: .23rem; min-width: 0; font-size: .75rem; color: var(--staff-muted); font-weight: 690; }
.queue-search-tools input, .queue-search-tools select { display: block; min-width: 0; width: 100%; font-size: .83rem; font-weight: 580; }
.queue-search-input { position: relative; min-width: 0; }
.queue-search-input::before, .queue-search-input::after { position: absolute; content: ""; pointer-events: none; }
.queue-search-input::before { top: .74rem; left: .77rem; width: .55rem; height: .55rem; border: 1.5px solid #65718c; border-radius: 50%; }
.queue-search-input::after { top: 1.31rem; left: 1.29rem; width: .32rem; border-top: 1.5px solid #65718c; transform: rotate(45deg); }
.queue-search-tools input { padding-left: 2rem; }
.staff #reset-queue-filters { font-size: .81rem; }
.queue-table-scroll { max-height: clamp(24rem, 62dvh, 50rem); overflow: auto; border-block: 1px solid var(--staff-edge); scrollbar-color: #b6c0d4 #eef1f7; }
.staff .queue-table { table-layout: fixed; font-size: .83rem; color: var(--staff-ink); }
.staff .queue-table th, .staff .queue-table td { white-space: normal; vertical-align: middle; padding: .49rem .58rem; border-color: #e6eaf2; }
.staff .queue-table th { position: sticky; top: 0; z-index: 1; background: #edf1f8; color: #3b4763; font-size: .75rem; line-height: 1.2; font-weight: 760; box-shadow: inset 0 -1px var(--staff-edge); }
.staff .queue-table .queue-rank { width: 5%; text-align: center; }
.queue-table .queue-customer { width: 16%; }
.queue-table .queue-items { width: 19%; }
.queue-table .queue-action { width: 16%; }
.queue-table .queue-outlook { width: 12%; }
.queue-table .queue-value { width: 13%; }
.queue-table .queue-history { width: 10%; }
.queue-table .queue-age { width: 9%; }
.staff .queue-table .queue-value, .staff .queue-table .queue-age { text-align: right; padding-right: .8rem; }
.queue-row:nth-child(even) { background: #f9faff; }
.queue-row:hover, .queue-row:focus-within { background: #f0f3ff; }
.queue-rank-number { display: inline-grid; place-items: center; min-width: 1.7rem; min-height: 1.45rem; padding-inline: .2rem; border-radius: .3rem; background: #e9eef7; color: #4a5976; font-size: .75rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.staff .queue-order-link { max-width: 100%; min-height: auto; text-align: left; color: #22379f; text-decoration: none; font-size: .84rem; font-weight: 750; overflow-wrap: anywhere; }
.staff .queue-order-link:hover { text-decoration: underline; text-underline-offset: .18em; }
.queue-table td small { display: block; margin-top: .15rem; color: var(--staff-muted); font-size: .72rem; line-height: 1.25; overflow-wrap: anywhere; }
.queue-table td strong { font-weight: 720; }
.queue-item-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-order-number, .queue-value, .queue-age { font-variant-numeric: tabular-nums; }
.queue-table td .queue-match-warning { color: #86561b; font-weight: 720; }
.queue-action-chip { display: inline-flex; align-items: center; gap: .33rem; border-radius: .33rem; padding: .19rem .4rem; color: var(--queue-text); background: var(--queue-tint); line-height: 1.28; font-size: .73rem; }
.queue-table .queue-value strong { color: #243391; }
.queue-value-meter { display: block; height: .36rem; width: min(100%, 5.5rem); margin: .18rem 0 0 auto; }
.queue-value-meter::-webkit-meter-bar { background: #e7ebf6; border: 0; }
.queue-value-meter::-webkit-meter-optimum-value { background: #6679d9; }
.queue-value-meter::-moz-meter-bar { background: #6679d9; }
.queue-footer { display: flex; align-items: center; justify-content: space-between; gap: .55rem 1rem; padding: .64rem 1rem; flex-wrap: wrap; }
.queue-result-status, #backorder-page-number { margin: 0; font-size: .8rem; color: var(--staff-muted); font-variant-numeric: tabular-nums; }
.staff #backorder-pages { padding: 0; }
#backorder-pages button { min-height: 2rem; font-size: .77rem; }

.staff:has(dialog[open]) { overflow: hidden; }
.staff .impact-drawer { padding-inline: 1.2rem; border-left: 1px solid var(--staff-edge); box-shadow: -1rem 0 3rem #15214b24; }
.staff .impact-drawer header { margin-inline: -1.2rem; padding: 1.1rem 1.2rem .9rem; background: #f3f5ff; border-bottom: 1px solid #d4ddf5; }
.impact-drawer header h2 { overflow-wrap: anywhere; }
.impact-drawer header button { min-height: 2rem; color: #293b8f; font-size: .8rem; }
.impact-drawer .drawer-status .staff-source { margin: 0; }
.impact-drawer .drawer-status strong { font-size: .85rem; }
.impact-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 1px; border-radius: .45rem; background: var(--staff-edge); overflow: hidden; }
.staff dialog .impact-summary > div { display: block; border: 0; padding: .62rem .7rem; background: white; }
.impact-summary dt { font-size: .72rem; color: var(--staff-muted); }
.impact-summary dd { margin-top: .17rem; font-weight: 740; font-variant-numeric: tabular-nums; color: var(--staff-ink); font-size: .89rem; }
.impact-exposure meter::-webkit-meter-bar { background: #cdd7fa; border: 0; }
.impact-exposure meter::-webkit-meter-optimum-value { background: #5266c8; }
.impact-exposure meter::-moz-meter-bar { background: #5266c8; }
.impact-products { margin-top: 1rem; }
.impact-products h3 { margin: 0; }
.impact-products ul { margin: .48rem 0 .7rem; }
.impact-products li { border-color: var(--staff-edge); }
.impact-drawer .ops-assignment { border: 1px solid #d8e0f7; }
.impact-drawer .ops-assignment h3 { margin: 0; }
.impact-drawer .ops-assignment p { font-size: .82rem; color: var(--staff-muted); margin: .4rem 0 .7rem; }
.impact-drawer #impact-batch { background: var(--staff-blue); color: #fff; border-color: var(--staff-blue); }

@media (max-width: 1050px) {
  .queue-search-tools, .queue-search-tools:has(#reset-queue-filters[hidden]) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .queue-table-scroll { max-height: none; overflow: visible; }
  .staff .queue-table, .queue-table tbody { display: block; }
  .queue-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .staff .queue-table .queue-row {
    position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start;
    grid-template-areas: "customer customer customer" "items items items" "action action outlook" "value history age";
    gap: .55rem .5rem; padding: .75rem .85rem; border-bottom: 1px solid var(--staff-edge);
  }
  .staff .queue-table .queue-row:last-child { border-bottom: 0; }
  .staff .queue-table td { display: block; min-width: 0; width: auto; padding: 0; border: 0; text-align: left; }
  .staff .queue-table td.queue-rank { position: absolute; top: .77rem; left: .85rem; width: auto; }
  .staff .queue-table .queue-customer { grid-area: customer; min-height: 1.65rem; padding-left: 3.05rem; }
  .staff .queue-table .queue-items { grid-area: items; }
  .staff .queue-table .queue-action { grid-area: action; }
  .staff .queue-table .queue-outlook { grid-area: outlook; }
  .staff .queue-table .queue-value { grid-area: value; }
  .staff .queue-table .queue-history { grid-area: history; }
  .staff .queue-table .queue-age { grid-area: age; }
  .staff .queue-table td:is(.queue-value, .queue-age) { text-align: left; padding-right: 0; }
  .queue-table :is(.queue-value, .queue-history, .queue-age)::before { content: attr(data-label); display: block; margin-bottom: .15rem; color: var(--staff-muted); font-size: .67rem; line-height: 1.2; }
  .queue-table .queue-value-meter { margin-left: 0; }
}
@media (max-width: 680px) {
  .staff-header { gap: .45rem; }
  .staff-header img { width: 71px; }
  .staff-identity span, .staff-refresh-label { display: none; }
  .staff-tools { gap: .42rem; }
  .staff-tools a { font-size: .75rem; }
  .staff .staff-tools button { min-height: 2rem; padding-inline: .48rem; }
  .staff-refresh-icon { margin: 0; }
  .queue-title { margin-top: .85rem; }
  .queue-totals { margin: .78rem 0; }
  .queue-totals > div { padding: .52rem .58rem; }
  .queue-totals > div:nth-child(2) { border-right: 0; }
  .queue-totals > div:nth-child(n + 3) { border-bottom: 0; }
  .queue-totals dt { font-size: .74rem; gap: .29rem; }
  .queue-totals dd { font-size: clamp(1.22rem, 5vw, 1.7rem); }
  .queue-totals small { font-size: .69rem; }
  .queue-ledger-top { padding: .65rem .72rem; }
  .queue-heading .staff-source { display: none; }
  .queue-breakdown { margin-top: .52rem; }
  .queue-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .24rem; margin-top: .44rem; }
  .staff .queue-filter { display: grid; gap: 0; min-width: 0; padding: .25rem .09rem; text-align: center; font-size: .67rem; }
  .queue-filter-label { display: none; }
  .queue-filter-short { display: inline; }
  .queue-filter strong { font-size: .77rem; line-height: 1.2; }
  .queue-search-tools, .queue-search-tools:has(#reset-queue-filters[hidden]) { grid-template-columns: minmax(0, 1fr) auto; margin-top: .62rem; }
  .staff #toggle-queue-filters { display: block; font-size: .81rem; }
  .staff #toggle-queue-filters[aria-expanded="true"] { background: var(--staff-blue-wash); color: #233499; }
  .queue-advanced-filters { display: none; }
  .queue-advanced-filters[data-open="true"] { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  #reset-queue-filters { grid-column: 1 / -1; justify-self: start; }
  .queue-footer { padding-inline: .72rem; }
  .impact-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.staff-view-nav { position: sticky; top: 0; z-index: 4; }
.workspace-heading, .workspace-card-header, .workspace-actions { display: flex; align-items: center; gap: .65rem 1rem; flex-wrap: wrap; }
.workspace-heading, .workspace-card-header { justify-content: space-between; }
.workspace-heading { align-items: end; margin: 1.25rem 0 1rem; }
.workspace-heading h1 { max-width: none; }
.workspace-heading > *, .workspace-card-header > * { min-width: 0; max-width: 100%; }
.workspace-actions { gap: .45rem; }
.staff .workspace-actions button, .staff .workspace-toolbar button { font-size: .82rem; }
.staff .staff-primary { background: var(--staff-blue); color: white; border-color: var(--staff-blue); }
.staff .staff-primary:enabled:hover { background: #1927b9; border-color: #1927b9; }
.workspace-totals { margin: 0 0 1rem; }
.workspace-totals .workspace-highlight { background: var(--staff-blue-wash); border-radius: .65rem 0 0 .65rem; }
.workspace-totals .workspace-highlight dd { color: #1d2da5; }
#scenario-change[data-direction="gain"] { color: #205840; }
#scenario-change[data-direction="loss"] { color: #784b16; }
.workspace-card { margin: 0 0 1rem; min-width: 0; }
.workspace-card-header { padding: .85rem 1rem; border-bottom: 1px solid var(--staff-edge); }
.workspace-card-header h2 { margin: 0; font-size: 1.6rem; overflow-wrap: anywhere; }
.workspace-card-header .staff-source { font-size: .78rem; }
.workspace-card-header h2[tabindex], .forecast summary { scroll-margin-top: 4rem; }
.workspace-card-section { padding: .82rem 1rem; }
.workspace-card-section h3 { margin: 0; }
.workspace-card-section .staff-source { font-size: .78rem; }
.workspace-badge { display: inline-flex; align-items: center; gap: .32rem; padding: .2rem .48rem; border-radius: .34rem; background: #edf0ff; color: #26378f; font-size: .74rem; font-weight: 720; line-height: 1.28; }
.workspace-badge[data-tone="warning"] { background: #fdf3e4; color: #784b16; }
.workspace-badge[data-tone="verified"] { background: #e9f6ee; color: #205840; }
.workspace-empty { padding: .9rem 1rem; margin: 0; color: var(--staff-muted); font-size: .87rem; }
.workspace-empty h2 { color: var(--staff-ink); font-size: 1.55rem; }
.workspace-empty p { margin: .38rem 0 0; }
.workspace-feedback { color: #475579; font-size: .8rem; font-weight: 620; }
.workspace-feedback:not(:empty) { padding: .55rem 1rem; margin: 0; }
.workspace-feedback:empty { margin: 0; }
.workspace-toolbar { display: flex; align-items: end; gap: .5rem .7rem; flex-wrap: wrap; padding: .7rem 1rem; }
.workspace-toolbar > *, .workspace-toolbar .ops-inline > * { min-width: 0; max-width: 100%; }
.workspace-toolbar label { display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; color: var(--staff-muted); font-size: .75rem; font-weight: 690; }
.workspace-toolbar :is(input, select) { min-width: 0; max-width: 100%; font-size: .84rem; color: var(--staff-ink); }
.workspace-toolbar-bottom { border-top: 1px solid var(--staff-edge); }
.workspace-toolbar-bottom .workspace-feedback { align-self: center; padding: 0; }
.workspace-table { max-height: 32rem; border-block: 1px solid var(--staff-edge); scrollbar-color: #b6c0d4 #eef1f7; }
.staff .workspace-table table { min-width: 36rem; font-size: .82rem; }
.staff .workspace-table th { position: sticky; top: 0; z-index: 1; background: #edf1f8; color: #3b4763; font-size: .75rem; }
.staff .workspace-table :is(th, td) { padding: .48rem .7rem; border-color: #e6eaf2; }
.workspace-table tbody tr:last-child td { border-bottom: 0; }
.workspace-table tbody td { overflow-wrap: anywhere; }
.workspace-table tbody tr:nth-child(even) { background: #f9faff; }
.workspace-table .workspace-baseline td { color: #1d2da5; background: #f1f4ff; font-variant-numeric: tabular-nums; }

.planning-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(15rem, 1fr); align-items: start; gap: 1rem; }
.planning-aside { min-width: 0; }
.staff .planning-aside .scenario-timeline { padding: 0; }
.planning-aside .scenario-timeline ol { margin: 0; padding: .55rem 1rem; }
.planning-aside .scenario-timeline li { grid-template-columns: 7.25rem minmax(0, 1fr) 2.5rem; gap: .5rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
.planning-aside .scenario-timeline meter { height: .65rem; }
.staff #compare-scenario, .staff #scenario-sku { width: min(100%, 32rem); }
.workspace-list { list-style: none; margin: .4rem 0 0; padding: 0; max-height: 13rem; overflow: auto; }
.workspace-list li { display: flex; align-items: center; justify-content: space-between; gap: .45rem; border-top: 1px solid var(--staff-edge); padding: .4rem .15rem; overflow-wrap: anywhere; font-size: .8rem; }
.workspace-list li > * { min-width: 0; }
.workspace-list small { display: block; color: var(--staff-muted); font-size: .73rem; }
.staff .workspace-list button { min-height: 1.7rem; padding: 0; border: 0; color: #22379f; background: transparent; }
.staff .workspace-list button:hover { text-decoration: underline; }
.marginal-list { margin: 0; padding: 0 .9rem; counter-reset: inventory-rank; }
.marginal-list li { counter-increment: inventory-rank; justify-content: start; }
.marginal-list li::before { content: counter(inventory-rank); display: inline-grid; flex: 0 0 1.3rem; place-items: center; border-radius: .27rem; background: var(--staff-blue-wash); color: #26378f; font-size: .72rem; font-weight: 700; }
.marginal-list li:first-child { border-top: 0; }
.marginal-gain { margin-inline-start: auto; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.marginal-gain strong { color: #22379f; }

.communications-layout, .outreach-layout { display: grid; grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr); align-items: start; gap: 1rem; }
.email-reader { overflow: hidden; }
.email-reader .workspace-card-header { background: #f0f3fb; }
.email-subject-label { margin: 0 0 .15rem; font-size: .74rem; color: var(--staff-muted); font-weight: 650; }
.email-reader .workspace-card-header h2 { font: 750 1rem/1.4 system-ui, sans-serif; }
.email-reader .staff-email-window { background: #e9edf5; }
.email-reader iframe { border-color: var(--staff-edge); border-radius: .25rem; }
.staff .email-controls-panel .email-drafts { border: 0; margin: 0; padding: .8rem 1rem 1rem; }
.email-controls-panel .email-drafts legend { padding: .15rem 0 0; font: 750 .85rem/1.2 system-ui, sans-serif; }
.email-controls-panel .email-draft-options { grid-template-columns: minmax(0, 1fr); }
.email-controls-panel .workspace-toolbar { border-bottom: 1px solid var(--staff-edge); }
.email-controls-panel .email-draft-actions { display: grid; }
.email-controls-panel .email-draft-actions button { justify-self: start; font-size: .82rem; }

.outreach-main { min-width: 0; }
.outreach-sidebar .workspace-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); }
.outreach-sidebar .workspace-toolbar button { justify-self: start; }
.outreach-sidebar :is(input, select) { width: 100%; }
.outreach-new { border-top: 1px solid var(--staff-edge); }
.outreach-new summary { cursor: pointer; padding: .7rem 1rem; font-size: .89rem; color: #22379f; font-weight: 740; }
.outreach-new p { margin: 0; }
.outreach-editors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--staff-edge); }
.outreach-editors form + form { border-left: 1px solid var(--staff-edge); }
.batch-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; background: #f5f7fc; border-bottom: 1px solid var(--staff-edge); }
.batch-totals > div { padding: .5rem .85rem; border-right: 1px solid var(--staff-edge); }
.batch-totals > div:last-child { border-right: 0; }
.batch-totals dt { font-size: .75rem; color: var(--staff-muted); }
.batch-totals dd { margin: .08rem 0 0; color: #1d2da5; font-size: 1.2rem; font-weight: 750; font-variant-numeric: tabular-nums; }
#batch-state:not(:empty) { background: var(--staff-blue-wash); border: 1px solid var(--staff-edge); border-radius: .4rem; margin: 0 0 .7rem; }
#batch-empty .workspace-empty { padding: 1.35rem 1rem; }
#batch-rows ul { margin: .25rem 0; padding-left: 1.2rem; }
#batch-rows summary { cursor: pointer; color: #26378f; }
.staff #case-detail > h3 { margin: 1rem 0 .45rem; }
.staff #case-detail > .ops-timeline { margin-top: .5rem; }

@media (max-width: 1050px) {
  .planning-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .planning-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
}
@media (max-width: 820px) {
  .communications-layout, .outreach-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 680px) {
  .workspace-heading { margin: .9rem 0 .7rem; }
  .workspace-card-header, .workspace-card-section { padding: .7rem .72rem; }
  .workspace-toolbar, .workspace-empty { padding-inline: .72rem; }
  .workspace-heading .staff-source { overflow-wrap: anywhere; }
  .workspace-totals .workspace-highlight { border-radius: .65rem 0 0 0; }
  .workspace-totals > div:nth-child(2) { border-right: 0; }
  .workspace-totals > div:nth-child(n+3) { border-bottom: 0; }
  .workspace-totals dd { font-size: clamp(1.15rem, 5vw, 1.6rem); }
  .planning-aside, .outreach-editors { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .outreach-editors form + form { border-left: 0; border-top: 1px solid var(--staff-edge); }
  .batch-totals > div { padding: .4rem .48rem; }
  .batch-totals dt { font-size: .68rem; }
  .staff-email-window { padding: .45rem; }
}

@media (max-width: 680px) {
  .workspace-responsive { max-height: none; overflow: visible; }
  .staff .workspace-responsive table, .workspace-responsive tbody { display: block; min-width: 0; }
  .workspace-responsive thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .workspace-responsive tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .65rem; padding: .7rem .72rem; border-bottom: 1px solid var(--staff-edge); }
  .workspace-responsive tbody tr:last-child { border-bottom: 0; }
  .staff .workspace-responsive td { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; }
  .staff .workspace-responsive td:first-child { grid-column: 1 / -1; font-weight: 720; color: #23378d; }
  .workspace-responsive td[data-label]::before { content: attr(data-label); display: block; margin-bottom: .1rem; font-size: .7rem; color: var(--staff-muted); }
  .staff .workspace-responsive .workspace-baseline { background: #f1f4ff; }
  .staff .workspace-responsive td.workspace-no-action { display: none; }
  .staff #batch-rows td:last-child { grid-column: 1 / -1; }
  .staff #batch-rows td button { min-height: 2rem; text-align: left; white-space: normal; }
}
