@font-face {
  font-family: "ABC Monument Grotesk";
  src: url("./assets/fonts/ABCMonumentGrotesk-Medium-Trial.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ABC Monument Grotesk";
  src: url("./assets/fonts/ABCMonumentGrotesk-Heavy-Trial.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ABC Monument Grotesk";
  src: url("./assets/fonts/ABCMonumentGrotesk-MediumItalic-Trial.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "ABC Monument Grotesk";
  src: url("./assets/fonts/ABCMonumentGrotesk-HeavyItalic-Trial.otf") format("opentype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "ABC Monument Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  --off-white: #fffefa;
  --cool-grey: #f4f2f0;
  --warm-grey: #f2eee6;
  --sandstone: #d8cdb8;
  --black: #15130d;
  --steel-grey: #c3c8d3;
  --yellow: #ffe186;
  --dark-yellow: #f1c06f;
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: var(--black);
  --muted: #625f58;
  --line: var(--sandstone);
  --accent: var(--yellow);
  --green: #2e7d4f;
  --amber: #b7791f;
  --red: #c0392b;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
  outline-offset: 2px;
}

.topbar {
  min-height: 68px; display: flex; align-items: center; gap: 26px; padding: 0 28px;
  background: rgba(247,246,243,.97); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 11px; font-size: 13px; letter-spacing: .16em; font-weight: 700; }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .12em; margin-top: 2px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ink); font-size: 19px; }
nav { display: flex; align-self: stretch; margin-left: 10px; }
.nav-link { position: relative; border: 0; border-bottom: 2px solid transparent; background: none; padding: 0 15px; color: var(--muted); white-space: nowrap; }
.nav-link.active { color: var(--ink); border-bottom-color: var(--accent); }
.more-menu { position: relative; display: flex; align-items: stretch; }
.more-menu summary { list-style: none; display: flex; align-items: center; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary::after { content: "▾"; margin-left: 8px; font-size: 10px; }
.more-panel {
  position: absolute; top: calc(100% + 1px); right: 0; z-index: 40; min-width: 170px;
  display: grid; padding: 6px; border: 1px solid var(--black); background: var(--off-white);
}
.more-menu:not([open]) .more-panel { display: none; }
.more-link {
  min-height: 38px; display: flex; align-items: center; border: 0; background: transparent; color: var(--black);
  padding: 0 12px; text-align: left; font-weight: 800; text-decoration: none;
}
.more-link:hover,
.more-link.active { background: var(--yellow); }
.account-menu {
  position: relative;
  margin-left: auto;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.account-details { position: relative; height: 100%; display: flex; align-items: center; }
.account-trigger {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}
.account-trigger::-webkit-details-marker { display: none; }
.account-trigger::after { content: "▾"; color: var(--muted); font-size: 10px; }
.account-trigger span { font-weight: 800; }
.account-trigger b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.account-panel {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  z-index: 45;
  width: 230px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--black);
  background: #fff;
  box-shadow: 0 14px 35px rgba(21,19,13,.12);
}
.account-details:not([open]) .account-panel { display: none; }
.account-panel strong {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.account-panel button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--off-white);
  color: var(--black);
  text-align: left;
  padding: 0 10px;
  font-weight: 800;
}
.account-panel button.active {
  background: var(--yellow);
  border-color: var(--black);
}
.account-panel small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.badge { min-width: 19px; height: 19px; padding: 0 5px; display: inline-grid; place-items: center; margin-left: 5px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11px; }
.badge.alert { background: var(--red); }
.kpi-strip { margin-left: auto; padding: 10px 14px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 3px; font-size: 12px; white-space: nowrap; }
.kpi-strip[hidden] { display: none; }
.kpi-strip strong { color: var(--ink); font-weight: 650; }
.kpi-strip .risk { color: var(--amber); } .kpi-strip .late { color: var(--red); }

main { max-width: 1480px; margin: 0 auto; padding: 30px 30px 120px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
h1 { font-size: 32px; font-weight: 800; margin: 2px 0 5px; letter-spacing: -.02em; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.subtitle { color: var(--muted); margin: 0; font-size: 14px; }
.page-summary { display: flex; align-items: baseline; gap: 7px; color: var(--muted); }
.page-summary strong { color: var(--ink); font-size: 26px; font-weight: 800; }
.page-summary span { font-size: 12px; }
.primary, .secondary, .text-button {
  min-height: 40px; border-radius: 3px; padding: 0 16px; font-weight: 650; border: 1px solid transparent;
}
.primary { background: var(--accent); color: #fff; }
.primary:disabled { opacity: .42; cursor: not-allowed; }
.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.text-button { background: none; color: var(--accent); padding: 0 6px; }

.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; margin-right: auto; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 9px 13px; border-radius: 3px; }
.tab.active { background: #e8eee9; color: var(--accent); font-weight: 650; }
.field { min-height: 38px; border: 1px solid var(--line); background: #fff; padding: 0 11px; color: var(--ink); border-radius: 3px; }
.search { width: 190px; }
.workflow-rail {
  display: flex; align-items: center; gap: 14px; min-height: 42px; margin: 0 0 16px; padding: 7px 11px;
  overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 4px;
}
.workflow-label { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.workflow-rail .workflow-main { gap: 6px; }
.workflow-rail .workflow-step { gap: 5px; font-size: 11px; }
.workflow-rail .workflow-step b { width: 19px; height: 19px; font-size: 9px; }
.hold-explainer { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.hold-explainer .hold-pill { margin: 0 4px 0 0; padding: 3px 5px; font-style: normal; }
.stage-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.stage-tab {
  min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--muted); text-align: left;
}
.stage-tab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-tab b { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 12px; background: #f0efeb; color: var(--ink); font-size: 10px; }
.stage-tab.active { border-color: var(--accent); background: #eef3f0; color: var(--accent); font-weight: 700; }
.stage-tab.active b { background: var(--accent); color: #fff; }
.board-toolbar { padding: 9px; background: #efede8; border-radius: 4px; }
.board-toolbar .search { flex: 1; min-width: 210px; }
.archive-toolbar .search { flex: 1; max-width: 320px; }
.calendar-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.calendar-navigation { display: flex; align-items: center; gap: 7px; }
.calendar-navigation .secondary { min-height: 36px; }
.calendar-navigation strong { min-width: 150px; margin-left: 5px; font-size: 19px; font-weight: 800; }
.calendar-arrow { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 20px; }
.calendar-toolbar > .field { margin-left: auto; }
.calendar-key { display: flex; align-items: center; gap: 8px; }
.calendar-key span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.calendar-key span::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: #bbb7af; }
.calendar-key .kind-accepted::before { background: #86a596; }
.calendar-key .kind-production::before { background: var(--accent); }
.calendar-key .kind-ready::before { background: var(--ink); }
.calendar-key .kind-due::before { background: #9d8c6f; }
.calendar-key .kind-shipped::before { background: var(--green); }
.calendar-brief { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 0 0 12px; }
.calendar-brief span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid #d9d5cb; border-radius: 5px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; }
.calendar-brief b { color: var(--ink); font-size: 24px; font-weight: 800; }
.weekly-overview { display: grid; gap: 8px; }
.week-lane { border: 1px solid #d7d2c7; border-radius: 5px; background: #fff; }
.week-lane.current-week { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.week-lane.empty-week { opacity: .72; }
.week-lane-main {
  width: 100%; display: grid; grid-template-columns: 138px 70px 86px minmax(105px,.8fr) minmax(150px,1.1fr) auto; align-items: center; gap: 12px;
  min-height: 64px; padding: 10px 13px; border: 0; background: #fff; color: var(--ink); text-align: left;
}
.week-lane-main:hover { background: #fbfaf7; }
.week-lane.current-week .week-lane-main { background: #f5faf7; }
.week-index { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.week-index i { width: fit-content; padding: 2px 6px; border-radius: 999px; background: var(--accent); color: #fff; font-style: normal; letter-spacing: .04em; }
.week-index small { color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.week-total { display: grid; gap: 1px; }
.week-total strong { font-size: 26px; line-height: 1; font-weight: 800; }
.week-total small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.week-attention { width: fit-content; padding: 6px 9px; border-radius: 999px; background: #efede8; color: var(--muted); font-size: 10px; font-weight: 850; white-space: nowrap; }
.week-attention.late { background: #f4d8d5; color: #8f2f27; }
.week-attention.risk { background: #f5e8c7; color: #76560d; }
.week-attention.clear { background: #dceadf; color: #2e6f46; }
.week-signal { display: grid; gap: 3px; min-width: 0; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.week-signal small { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.week-signal.wide { color: var(--muted); }
.week-open { justify-self: end; color: var(--accent); font-size: 11px; font-weight: 850; white-space: nowrap; }
.week-section, .week-preview { display: grid; align-content: start; gap: 8px; min-width: 0; }
.week-section-label { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.week-day-strip { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 7px; }
.week-day-pill { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; min-width: 0; min-height: 54px; padding: 8px 9px; border: 1px solid #ddd8cd; border-radius: 5px; background: #fbfaf7; color: var(--ink); text-align: left; }
.week-day-pill:hover { border-color: #bfb49f; background: #f6f1e7; }
.week-day-pill span { grid-column: 1 / -1; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.week-day-pill strong { font-size: 20px; line-height: 1; }
.week-day-pill small { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.week-day-pill.today { border-color: var(--accent); background: #eaf1ed; box-shadow: inset 0 0 0 1px var(--accent); }
.week-day-pill.other-month { opacity: .5; }
.week-status-stack, .week-movement-stack { display: grid; gap: 6px; }
.week-status-stack span, .week-movement-stack span {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 34px; padding: 7px 10px; border: 1px solid #ddd8cd; border-radius: 5px; background: #fbfaf7; color: var(--muted); font-size: 10px; font-weight: 750;
}
.week-status-stack span.has-work { background: #fff; color: var(--ink); border-color: #cfc8ba; }
.week-status-stack b, .week-movement-stack b { color: var(--ink); font-size: 14px; }
.week-movement-stack .kind-production { border-color: #cfdcd5; background: #edf4f0; color: var(--accent); }
.week-movement-stack .kind-ready { background: var(--ink); color: #fff; }
.week-movement-stack .kind-ready b { color: #fff; }
.week-movement-stack .kind-due { background: #f7f3eb; color: #7c6d55; }
.week-movement-stack .kind-shipped { background: #e4efe8; color: var(--green); }
.week-preview div { display: flex; flex-wrap: wrap; gap: 5px; }
.week-preview div span { padding: 5px 7px; border-radius: 999px; background: #efede8; color: var(--muted); font-size: 10px; font-weight: 800; }
.calendar-shell { overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.calendar-grid { min-width: 840px; display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-grid.weekly { grid-auto-rows: auto; }
.calendar-weekday { padding: 9px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f2f0eb; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; text-align: center; }
.calendar-weekday:nth-child(7) { border-right: 0; }
.calendar-day { min-height: 128px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.calendar-grid.weekly .calendar-day { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.calendar-day:nth-child(7n + 14) { border-right: 0; }
.calendar-day.other-month { background: #faf9f6; }
.calendar-day.other-month .day-number, .calendar-day.other-month .calendar-event { opacity: .48; }
.day-number { width: 26px; height: 26px; margin: 0 0 4px auto; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 11px; }
.calendar-grid.weekly .day-number { margin: 0; }
.day-count { color: var(--muted); font-size: 9px; font-weight: 650; white-space: nowrap; }
.calendar-day.today .day-number { background: var(--accent); color: #fff; font-weight: 750; }
.day-events { display: grid; gap: 3px; }
.calendar-event {
  min-width: 0; min-height: 23px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px; padding: 3px 5px;
  overflow: hidden; border: 1px solid transparent; border-radius: 3px; background: #efede8; color: var(--ink); text-align: left;
}
.calendar-event span { font-size: 9px; font-weight: 750; white-space: nowrap; }
.calendar-event small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.kind-accepted { background: #e8eee9; color: var(--accent); }
.calendar-event.kind-production { background: var(--accent); color: #fff; }
.calendar-event.kind-production small { color: #d7e4de; }
.calendar-event.kind-ready { background: var(--ink); color: #fff; }
.calendar-event.kind-ready small { color: #d2d0cc; }
.calendar-event.kind-due { border-color: #c9c0b0; background: #f7f3eb; }
.calendar-event.kind-shipped { background: #e4efe8; color: var(--green); }
.more-events { min-height: 22px; padding: 2px 5px; border: 0; background: transparent; color: var(--accent); font-size: 9px; font-weight: 700; text-align: left; }
.calendar-modal-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.calendar-modal-summary > div { display: flex; align-items: center; gap: 8px; }
.calendar-modal-summary > strong { font-size: 12px; }
.calendar-order-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.calendar-order-facts span { display: grid; gap: 2px; padding: 9px 10px; background: #f5f3ee; font-size: 12px; font-weight: 650; }
.calendar-order-facts small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.calendar-order-timeline { display: grid; grid-template-columns: repeat(5,1fr); border: 1px solid var(--line); }
.calendar-order-timeline div { display: grid; gap: 3px; padding: 9px; border-right: 1px solid var(--line); }
.calendar-order-timeline div:last-child { border-right: 0; }
.calendar-order-timeline div.selected { background: #e8eee9; box-shadow: inset 0 -2px var(--accent); }
.calendar-order-timeline time { color: var(--muted); font-size: 9px; }
.calendar-order-timeline span { font-size: 10px; font-weight: 650; }
.modal-section-title { margin: 0 0 7px; color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.calendar-modal-item { display: grid; grid-template-columns: .85fr 1.25fr 44px .7fr .7fr .7fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.day-agenda { display: grid; gap: 6px; }
.day-agenda button { display: grid; grid-template-columns: 10px 85px 1fr auto; align-items: center; gap: 9px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; background: #fff; text-align: left; }
.day-agenda button > i { width: 8px; height: 24px; border-radius: 2px; background: #bbb7af; }
.day-agenda button > i.kind-production { background: var(--accent); }
.day-agenda button > i.kind-ready { background: var(--ink); }
.day-agenda button > i.kind-due { background: #9d8c6f; }
.day-agenda button > i.kind-shipped { background: var(--green); }
.day-agenda button span, .day-agenda button small { color: var(--muted); font-size: 10px; }
.week-order-list { display: grid; gap: 8px; }
.week-order-card {
  display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); text-align: left;
}
.week-order-card:hover { border-color: #c7bda7; background: #fbfaf7; }
.week-order-main, .week-order-meta, .week-order-events { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.week-order-main strong { min-width: 74px; font-size: 13px; }
.week-order-meta small { color: var(--muted); font-size: 10px; font-weight: 700; }
.week-event-chip { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: #efede8; color: var(--muted); font-size: 10px; font-weight: 700; }
.week-event-chip.kind-production { background: #edf4f0; color: var(--accent); }
.week-event-chip.kind-ready { background: var(--ink); color: #fff; }
.week-event-chip.kind-due { background: #f7f3eb; color: #7c6d55; }
.week-event-chip.kind-shipped { background: #e4efe8; color: var(--green); }
.week-order-items { color: var(--muted); font-size: 11px; }
.workflow-legend {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: -10px 0 20px;
  padding: 14px 16px; border: 1px solid var(--line); background: #fff; border-radius: 3px;
}
.workflow-main { display: flex; align-items: center; gap: 9px; }
.workflow-main > i { color: #aaa7a1; font-style: normal; }
.workflow-step { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.workflow-step b { width: 22px; height: 22px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; }
.workflow-step.current { color: var(--accent); font-weight: 700; }
.workflow-step.current b { color: #fff; background: var(--accent); border-color: var(--accent); }
.hold-lane { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.hold-pill { display: inline-block; margin: 3px 5px 3px 0; padding: 4px 7px; color: var(--ink); background: #e7e4de; border: 1px dashed #97938b; border-radius: 2px; font-size: 10px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.legend-popover { position: relative; z-index: 12; display: flex; justify-content: flex-end; margin-left: auto; }
.legend-trigger { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 3px; font-size: 11px; font-weight: 650; }
.legend-trigger span { margin-left: 3px; color: var(--accent); }
.legend-card {
  visibility: hidden; opacity: 0; position: absolute; top: 38px; right: 0; width: 285px;
  display: grid; grid-template-columns: 1fr; gap: 8px; padding: 15px;
  background: #fff; border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 14px 35px rgba(28,27,26,.14);
  transform: translateY(-4px); transition: opacity .12s ease, transform .12s ease; pointer-events: none;
}
.legend-card::before { content: ""; position: absolute; top: -6px; right: 22px; width: 10px; height: 10px; background: #fff; border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.legend-card strong { margin-top: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.legend-card > span { color: var(--muted); font-size: 11px; }
.legend-card .health { font-size: 12px; }
.legend-popover:hover .legend-card, .legend-popover:focus-within .legend-card, .legend-popover.open .legend-card { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
.selection-tools { min-height: 36px; display: flex; align-items: center; gap: 11px; margin: 0 0 8px; color: var(--muted); font-size: 11px; }
.selection-tools .secondary { min-height: 34px; padding: 0 12px; }

.table-shell { overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 950px; }
th { position: sticky; top: 0; z-index: 2; text-align: left; color: var(--muted); background: #fbfaf7; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; padding: 12px; border-bottom: 1px solid var(--line); }
td { padding: 13px 12px; min-height: 54px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tr.order-row { transition: background .12s ease; }
tr.order-row:hover { background: #fbfaf7; }
tr.order-row.selected { background: #edf3ef; }
.health-row-late td:first-child { box-shadow: inset 3px 0 var(--red); }
.health-row-at-risk td:first-child { box-shadow: inset 3px 0 var(--amber); }
.health-row-on-track td:first-child { box-shadow: inset 3px 0 var(--green); }
.check { width: 18px; height: 18px; accent-color: var(--accent); }
.order-id { font-weight: 750; letter-spacing: .02em; white-space: nowrap; }
.muted { color: var(--muted); }
.stale { color: var(--amber); font-weight: 650; }
.waiting-risk { color: var(--amber); } .waiting-late { color: var(--red); font-weight: 650; }
.status { display: inline-block; padding: 5px 8px; background: #f0efeb; border-radius: 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.note-count { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.shipment-progress { display: block; margin-top: 4px; color: var(--accent); font-size: 10px; font-weight: 700; }
.health { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; font-size: 12px; }
.health::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.health.on-track { color: var(--green); } .health.at-risk { color: var(--amber); } .health.late { color: var(--red); }
.promise { min-width: 275px; max-width: 360px; }
.promise-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 12px; }
.promise-top strong { font-size: 12px; }
.segments { position: relative; display: grid; grid-template-columns: repeat(8,1fr); gap: 3px; height: 8px; }
.segment { background: #e9e7e1; border-radius: 1px; }
.promise.on-track .segment.filled { background: var(--green); }
.promise.at-risk .segment.filled { background: var(--amber); }
.promise.late .segment.filled { background: var(--red); }
.marker { position: absolute; bottom: -7px; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid var(--ink); transform: translateX(-50%); }
.expand-button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; transition: transform .12s ease, background .12s ease; }
.expand-button:hover { background: #efede8; }
.expand-button.open { transform: rotate(90deg); color: var(--accent); }
.detail-row td { padding: 0; background: #fbfaf7; }
.details { padding: 0 28px 20px 40px; border-left: 3px solid var(--accent); }
.details h3 { margin: 0 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.detail-summary { display: flex; align-items: center; gap: 22px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.detail-identity { min-width: 120px; display: grid; gap: 2px; }
.detail-identity span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.detail-identity strong { font-size: 16px; }
.detail-badges { display: flex; align-items: center; gap: 8px; }
.detail-badges .status, .detail-badges .hold-pill { font-style: normal; }
.detail-summary dl { display: flex; align-items: center; gap: 24px; margin: 0 0 0 auto; }
.detail-summary dl div { display: grid; gap: 2px; }
.detail-summary dt { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.detail-summary dd { margin: 0; font-size: 12px; font-weight: 650; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr); gap: 28px; padding: 20px 0; }
.detail-section { min-width: 0; }
.detail-side { display: grid; align-content: start; gap: 22px; padding-left: 24px; border-left: 1px solid var(--line); }
.items-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.items-title h3 { margin-bottom: 0; }
.items-title .text-button { min-height: 30px; font-size: 11px; }
.item { display: grid; grid-template-columns: .8fr minmax(150px,1.2fr) 48px .65fr .65fr .65fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.item.split-item { grid-template-columns: 24px .8fr minmax(150px,1.2fr) 48px .65fr .65fr .65fr minmax(115px,auto); }
.item.item-head { padding: 9px 0 6px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.item.item-shipped { color: var(--muted); background: #f6f5f1; }
.item-state { display: grid; justify-items: start; gap: 3px; }
.item-state .status { font-style: normal; }
.item-state small { color: var(--muted); font-size: 9px; }
.item-selection-summary { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.milestone-list { display: grid; gap: 11px; }
.milestone { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 9px; align-items: center; }
.milestone:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 24px; width: 1px; height: 15px; background: var(--line); }
.milestone > i { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 700; }
.milestone.complete > i { border-color: var(--green); background: var(--green); color: #fff; }
.milestone.overdue > i { border-color: var(--red); color: var(--red); }

/* Calm operational overlays: brand-led, but not alarm coloured. */
.bulk-bar {
  background: var(--warm-grey);
  color: var(--black);
  border: 1px solid var(--sandstone);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(21,19,13,.18);
}

.bulk-bar .selection-count { color: var(--black); }
.bulk-bar .consequence { color: var(--muted); }
.bulk-bar .consequence.warning { color: var(--red); }

.bulk-secondary {
  background: var(--off-white);
  color: var(--black);
  border-color: var(--sandstone);
  border-radius: 8px;
}

.bulk-bar .primary {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--black);
  border-radius: 8px;
}

.modal {
  background: var(--off-white);
  border: 1px solid var(--sandstone);
  border-radius: 12px;
}

.modal-head,
.modal-foot {
  background: var(--warm-grey);
  border-color: var(--sandstone);
}

.modal-head h2 {
  color: var(--black);
  text-transform: none;
}

.modal-body { background: var(--off-white); }

.modal-order,
.week-order-card {
  background: color-mix(in srgb, var(--off-white) 72%, white);
  border-color: var(--sandstone);
}

.warning-note {
  background: color-mix(in srgb, var(--yellow) 34%, var(--off-white));
  color: var(--black);
  border-left-color: var(--dark-yellow);
}

.toast {
  background: var(--black);
  color: var(--yellow);
  border-radius: 8px;
}
.milestone div { display: grid; gap: 1px; }
.milestone strong { font-size: 11px; }
.milestone span { color: var(--muted); font-size: 10px; }
.notes-section h3 { display: flex; align-items: center; gap: 6px; }
.notes-section h3 b { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 10px; background: #e7e4de; color: var(--ink); font-size: 9px; }
.notes-list { display: grid; gap: 7px; }
.notes-list p { margin: 0; padding: 8px 10px; border-left: 2px solid var(--line); background: #fff; color: var(--ink); font-size: 11px; line-height: 1.45; }
.notes-list p strong { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 650; }
.notes-list p span { display: block; }
.empty-note { display: block; padding: 10px; border: 1px dashed var(--line); color: var(--muted); font-size: 11px; text-align: center; }
.actions { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.actions-label { margin-right: auto; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.actions button { width: auto; min-height: 36px; }
.action-hint { max-width: 170px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.empty { border: 1px solid var(--line); background: #fff; padding: 70px 24px; text-align: center; color: var(--muted); }

.bulk-bar {
  display: none; position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 130%);
  z-index: 30; min-width: 650px; max-width: calc(100% - 32px); padding: 13px 14px 13px 18px;
  background: var(--ink); color: #fff; box-shadow: 0 12px 35px rgba(0,0,0,.22); border-radius: 4px;
  align-items: center; gap: 18px;
}
.bulk-bar.visible { display: flex; transform: translate(-50%, 0); animation: rise .18s ease-out; }
.bulk-bar .selection-count { font-weight: 700; white-space: nowrap; }
.bulk-bar .consequence { color: #c9c7c2; font-size: 12px; flex: 1; }
.bulk-bar .consequence.warning { color: #f2b1a8; }
.bulk-secondary { min-height: 40px; padding: 0 14px; color: #fff; border: 1px solid #77736d; background: transparent; border-radius: 3px; font-weight: 650; white-space: nowrap; }
@keyframes rise { from { transform: translate(-50%, 130%); } }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 22px; background: rgba(28,27,26,.48); }
.modal { width: min(640px, 100%); max-height: min(820px, 92vh); overflow: auto; background: #fff; border-radius: 7px; box-shadow: 0 25px 70px rgba(0,0,0,.25); }
.modal-head, .modal-body, .modal-foot { padding: 20px 24px; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 24px; font-weight: 800; }
.modal-body { display: grid; gap: 16px; }
.modal-foot { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: #fff; }
.accept-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.accept-row strong { display: block; }
.warning-note { padding: 11px 13px; color: var(--amber); background: #fbf6eb; border-left: 3px solid var(--amber); font-size: 12px; }
.modal-order { padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: #fbfaf7; }
.production-date-field { display: grid; grid-template-columns: 1fr minmax(175px, 220px); align-items: center; gap: 14px; margin-top: 16px; color: var(--muted); font-size: 12px; font-weight: 650; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { color: var(--muted); font-size: 12px; }
.form-grid input { width: 100%; margin-top: 6px; }
.note-field { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
textarea.field { width: 100%; min-height: 64px; padding: 10px 11px; resize: vertical; line-height: 1.45; }
.transition-note { grid-column: 1 / -1; margin-top: 4px; }
.modal-order .transition-note { margin-top: 15px; }
.modal-note-order { padding: 10px 0; border-bottom: 1px solid var(--line); }
.form-error { margin: 0; color: var(--red); font-size: 12px; font-weight: 650; }
.shipment-items { display: grid; gap: 7px; padding: 10px 12px; background: var(--warm-grey); border: 1px solid var(--line); }
.shipment-items div { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.shipment-items span { color: var(--muted); }
.shipment-sticky-block {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  gap: 9px;
  margin: -22px -22px 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--sandstone);
  background: var(--off-white);
  box-shadow: 0 6px 14px rgba(21,19,13,.04);
}
.shipment-sticky-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.shipment-sticky-head strong {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.shipment-sticky-head span {
  color: var(--muted);
  font-size: 10px;
}
.shipment-fields {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.shipment-fields label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.shipment-fields input {
  min-height: 38px;
  margin-top: 5px;
  background: #fff;
  font-size: 12px;
}
.shipment-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}
.shipment-group strong { font-size: 13px; }
.shipment-group span,
.shipment-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}
.shipment-group-row td {
  background: var(--warm-grey);
}
.shipped-note {
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}
.toast { position: fixed; top: 92px; right: 24px; z-index: 80; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 3px; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: .16s ease; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .topbar { padding: 0 18px; gap: 10px; flex-wrap: wrap; }
  .brand { margin-right: auto; }
  .account-menu { margin-left: 0; }
  nav { order: 3; width: 100%; height: 44px; overflow: auto; margin: 0; }
  .kpi-strip { margin-left: 0; }
  main { padding: 24px 18px 110px; }
  .details { padding-left: 30px; }
  .detail-summary { flex-wrap: wrap; }
  .detail-summary dl { margin-left: 0; flex: 1 0 100%; justify-content: space-between; }
  .actions { flex-wrap: wrap; }
  .workflow-rail { overflow: auto; }
  .hold-explainer { display: none; }
  .calendar-toolbar { flex-wrap: wrap; }
  .calendar-toolbar > .field { margin-left: auto; }
  .calendar-key { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .topbar {
    min-height: 0; display: grid; grid-template-columns: auto 1fr; align-items: center;
    padding: 9px 14px 0; column-gap: 10px; row-gap: 5px;
  }
  .brand { margin: 0; }
  .brand-mark { width: 30px; height: 30px; font-size: 17px; }
  .brand small { font-size: 8px; }
  .account-menu { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
  .account-trigger { min-height: 34px; padding: 0 9px; }
  .account-trigger b { display: none; }
  .kpi-strip { grid-column: 2; grid-row: 1; width: auto; margin-left: auto; padding: 8px 9px; font-size: 10px; }
  nav { grid-column: 1 / -1; grid-row: 2; order: initial; width: 100%; height: 42px; margin: 0; }
  .nav-link { flex: 1 0 auto; padding: 0 12px; font-size: 12px; }
  main { padding: 20px 14px 100px; }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  h1 { font-size: 28px; }
  .page-summary { display: none; }
  .workflow-rail { min-height: 36px; margin-bottom: 12px; padding: 5px 8px; }
  .workflow-label { display: none; }
  .workflow-main { min-width: max-content !important; }
  .workflow-rail .workflow-step { font-size: 10px; }
  .stage-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(104px, 1fr); grid-template-columns: none; overflow-x: auto; padding-bottom: 2px; }
  .stage-tab { min-height: 42px; padding: 0 10px; }
  .board-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .board-toolbar .search { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .board-toolbar .field { width: 100%; min-width: 0; }
  .board-toolbar .legend-popover { margin-left: 0; justify-content: flex-start; }
  .clear-filters { justify-self: start; }
  .selection-tools { justify-content: space-between; }
  .selection-tools span { text-align: right; }
  .orders-table { min-width: 0; table-layout: fixed; }
  .orders-table th, .orders-table td { padding: 11px 6px; }
  .board-table th:nth-child(5), .board-table td:nth-child(5),
  .board-table th:nth-child(7), .board-table td:nth-child(7),
  .board-table th:nth-child(8), .board-table td:nth-child(8),
  .board-table th:nth-child(9), .board-table td:nth-child(9) { display: none; }
  .board-table th:nth-child(1), .board-table td:nth-child(1) { width: 30px; }
  .board-table th:nth-child(2), .board-table td:nth-child(2) { width: 34px; }
  .board-table th:nth-child(3), .board-table td:nth-child(3) { width: 72px; }
  .board-table th:nth-child(4), .board-table td:nth-child(4) { width: 78px; }
  .board-table th:nth-child(6), .board-table td:nth-child(6) { width: auto; }
  .new-orders-table th:nth-child(4), .new-orders-table td:nth-child(4),
  .new-orders-table th:nth-child(5), .new-orders-table td:nth-child(5) { display: none; }
  .new-orders-table th:nth-child(1), .new-orders-table td:nth-child(1) { width: 30px; }
  .new-orders-table th:nth-child(2), .new-orders-table td:nth-child(2) { width: 34px; }
  .new-orders-table th:nth-child(3), .new-orders-table td:nth-child(3) { width: 78px; }
  .new-orders-table th:nth-child(6), .new-orders-table td:nth-child(6) { width: 74px; }
  .new-orders-table th:nth-child(7), .new-orders-table td:nth-child(7) { width: auto; }
  .shipped-table th:nth-child(2), .shipped-table td:nth-child(2),
  .shipped-table th:nth-child(3), .shipped-table td:nth-child(3) { display: none; }
  .shipped-table th:nth-child(1), .shipped-table td:nth-child(1) { width: 82px; }
  .shipped-table th:nth-child(4), .shipped-table td:nth-child(4) { width: auto; }
  .shipped-table th:nth-child(5), .shipped-table td:nth-child(5) { width: 110px; }
  .activity-table th:nth-child(2), .activity-table td:nth-child(2),
  .activity-table th:nth-child(5), .activity-table td:nth-child(5) { display: none; }
  .promise { min-width: 0; width: 100%; }
  .promise-top { gap: 5px; font-size: 10px; }
  .promise-top strong { font-size: 10px; }
  .health { gap: 5px; font-size: 10px; }
  .details { padding: 0 14px 16px 18px; }
  .detail-summary { gap: 10px 16px; padding: 14px 0; }
  .detail-identity { min-width: 96px; }
  .detail-summary dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .detail-grid { grid-template-columns: 1fr; gap: 20px; padding: 16px 0; }
  .detail-side { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .actions-label { flex-basis: 100%; }
  .actions button { flex: 1; min-width: 130px; }
  .calendar-head { flex-direction: row; }
  .calendar-toolbar { display: grid; grid-template-columns: 1fr auto; }
  .calendar-navigation { min-width: 0; }
  .calendar-navigation strong { min-width: 0; font-size: 17px; }
  .calendar-toolbar > .field { max-width: 180px; margin-left: 0; }
  .calendar-key { grid-column: 1 / -1; overflow-x: auto; }
  .calendar-brief { grid-template-columns: repeat(2, 1fr); }
  .week-lane-main { grid-template-columns: 1fr auto; gap: 10px; }
  .week-index, .week-total, .week-attention, .week-signal, .week-open { min-width: 0; }
  .week-total, .week-attention { justify-self: end; }
  .week-signal { grid-column: 1 / -1; white-space: normal; }
  .week-signal.wide { display: none; }
  .week-open { grid-column: 2; grid-row: 3; align-self: end; }
  .calendar-grid { min-width: 840px; }
  .calendar-day { min-height: 116px; }
  .calendar-order-timeline { display: flex; overflow-x: auto; }
  .calendar-order-timeline div { min-width: 105px; }
  .calendar-modal-summary { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 680px) {
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head .primary { width: 100%; }
  .archive-toolbar .search { width: 100%; max-width: none; }
  .calendar-brief { grid-template-columns: 1fr 1fr; }
  .week-lane-main { grid-template-columns: 1fr; }
  .week-total, .week-attention, .week-open { justify-self: start; }
  .week-open { grid-column: auto; grid-row: auto; }
  .bulk-bar { min-width: 0; width: calc(100% - 24px); flex-wrap: wrap; bottom: 12px; }
  .bulk-bar .consequence { order: 3; flex-basis: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .shipment-sticky-block {
    margin: -18px -18px 14px;
    padding: 14px 18px;
  }
  .shipment-sticky-head {
    display: grid;
    gap: 4px;
  }
  .shipment-fields {
    grid-template-columns: 1fr;
  }
  .production-date-field { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Superba brand layer */
body {
  background: #ffffff;
  font-weight: 500;
  letter-spacing: -.01em;
}

.topbar {
  min-height: 76px;
  background: rgba(255,254,250,.96);
  border-bottom-color: var(--black);
  backdrop-filter: blur(10px);
}

.brand {
  gap: 16px;
  letter-spacing: .02em;
  font-weight: 800;
}

.brand-wordmark {
  width: 188px;
  max-width: 28vw;
  height: auto;
  display: block;
}

.brand > span {
  padding-left: 14px;
  border-left: 1px solid var(--black);
  color: var(--black);
  font-size: 11px;
  letter-spacing: .12em;
}

.brand-mark,
.brand small { display: none; }

.nav-link {
  min-height: 76px;
  border-bottom-width: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.nav-link.active {
  color: var(--black);
  border-bottom-color: var(--yellow);
}

.badge {
  border-radius: 0;
  background: var(--yellow);
  color: var(--black);
  font-size: 10px;
  font-weight: 800;
}

.badge.alert {
  background: var(--black);
  color: var(--yellow);
}

.kpi-strip {
  border-color: var(--black);
  border-radius: 0;
  background: var(--yellow);
  color: var(--black);
  font-size: 11px;
  font-weight: 800;
}

.kpi-strip strong,
.kpi-strip .risk,
.kpi-strip .late { color: var(--black); }

main { max-width: 1540px; }

h1,
.page-summary strong,
.calendar-navigation strong,
.calendar-brief b,
.week-total strong,
.modal-head h2 {
  font-family: "ABC Monument Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.055em;
}

h1 {
  font-size: clamp(34px, 4vw, 64px);
  line-height: .9;
  text-transform: uppercase;
}

.eyebrow,
.workflow-label,
.week-index,
.week-signal small,
.week-total small,
.week-section-label,
th,
.modal-section-title,
.actions-label,
.detail-identity span,
.detail-summary dt,
.item.item-head,
.calendar-order-facts small {
  color: var(--black);
  font-weight: 800;
  letter-spacing: .11em;
}

.subtitle {
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.primary,
.secondary,
.text-button,
.field,
.stage-tab,
.calendar-brief span,
.week-lane,
.workflow-rail,
.table-shell,
.modal,
.modal-order,
.week-order-card,
.legend-trigger,
.legend-card,
.empty,
.bulk-secondary {
  border-radius: 0;
}

.primary {
  background: var(--black);
  color: var(--yellow);
  border-color: var(--black);
  font-weight: 800;
}

.primary:hover { background: var(--yellow); color: var(--black); }

.secondary {
  background: var(--off-white);
  color: var(--black);
  border-color: var(--black);
  font-weight: 800;
}

.text-button {
  color: var(--black);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.field {
  background: var(--off-white);
  border-color: var(--sandstone);
}

.field:focus {
  border-color: var(--black);
}

.workflow-rail,
.table-shell,
.calendar-brief span,
.week-lane,
.modal,
.week-order-card,
.modal-order,
.empty,
.legend-card {
  background: var(--off-white);
  border-color: var(--sandstone);
  box-shadow: none;
}

.workflow-rail {
  border-top-color: var(--black);
}

.workflow-step b,
.milestone > i {
  border-radius: 0;
  border-color: var(--black);
}

.workflow-step.current,
.expand-button.open,
.shipment-progress,
.week-open { color: var(--black); }

.workflow-step.current b,
.stage-tab.active b,
.milestone.complete > i {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--black);
}

.hold-pill,
.status,
.note-count,
.week-attention,
.health {
  border-radius: 0;
  font-weight: 800;
}

.hold-pill {
  background: var(--warm-grey);
  border-color: var(--black);
}

.stage-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.stage-tab {
  background: var(--off-white);
  border-color: var(--sandstone);
  border-right: 0;
  min-width: 0;
}

.stage-tab:last-child { border-right: 1px solid var(--sandstone); }

.stage-tab b {
  border-radius: 0;
  background: var(--cool-grey);
}

.stage-tab.active {
  background: var(--black);
  border-color: var(--black);
  color: var(--yellow);
}

.stage-tab.active + .stage-tab { border-left-color: var(--black); }

.board-toolbar,
.calendar-toolbar {
  padding: 10px;
  background: var(--warm-grey);
  border: 1px solid var(--sandstone);
}

.calendar-brief {
  gap: 0;
  border: 1px solid var(--sandstone);
  border-bottom: 0;
}

.calendar-brief span {
  border: 0;
  border-right: 1px solid var(--sandstone);
  border-bottom: 1px solid var(--sandstone);
  background: var(--warm-grey);
}

.calendar-brief span:last-child { border-right: 0; }

.weekly-overview { gap: 0; border-top: 1px solid var(--black); }

.week-lane {
  border-width: 0 1px 1px;
  border-color: var(--sandstone);
}

.week-lane.current-week {
  border-color: var(--black);
  box-shadow: inset 5px 0 var(--yellow);
}

.week-lane-main {
  background: var(--off-white);
  min-height: 72px;
}

.week-lane-main:hover,
.week-lane.current-week .week-lane-main {
  background: var(--warm-grey);
}

.week-index i {
  border-radius: 0;
  background: var(--black);
  color: var(--yellow);
}

.week-attention {
  background: var(--cool-grey);
  color: var(--black);
}

.week-attention.late {
  background: var(--black);
  color: var(--yellow);
}

.week-attention.risk {
  background: var(--dark-yellow);
  color: var(--black);
}

.week-attention.clear {
  background: var(--steel-grey);
  color: var(--black);
}

th {
  background: var(--warm-grey);
  border-bottom-color: var(--black);
}

td { border-bottom-color: var(--sandstone); }

tr.order-row:hover td,
.week-order-card:hover {
  background: var(--warm-grey);
}

.status {
  background: var(--cool-grey);
  color: var(--black);
}

.health::before { border-radius: 0; }
.health.on-track { color: #4e7f5d; }
.health.at-risk { color: #9d741b; }
.health.late { color: var(--black); }
.health.late::before { background: var(--yellow); outline: 1px solid var(--black); }

.promise .segment {
  border-radius: 0;
  background: var(--cool-grey);
}

.promise.on-track .segment.filled { background: var(--steel-grey); }
.promise.at-risk .segment.filled { background: var(--dark-yellow); }
.promise.late .segment.filled { background: var(--black); }

.details {
  border-left-color: var(--black);
  background: color-mix(in srgb, var(--warm-grey) 44%, transparent);
}

.modal-backdrop { background: rgba(21,19,13,.62); }

.modal-head,
.modal-foot {
  border-color: var(--black);
  background: var(--off-white);
}

.modal-head h2 {
  text-transform: uppercase;
}

.warning-note {
  background: var(--yellow);
  border-left-color: var(--black);
  color: var(--black);
}

.calendar-order-timeline,
.calendar-order-facts span,
.shipment-items,
.notes-list p,
.empty-note {
  background: var(--warm-grey);
  border-color: var(--sandstone);
}

.calendar-order-timeline div.selected {
  background: var(--yellow);
  box-shadow: inset 0 -3px var(--black);
}

.week-event-chip,
.week-preview div span {
  border-radius: 0;
  background: var(--warm-grey);
  color: var(--black);
}

.week-event-chip.kind-production,
.calendar-event.kind-production { background: var(--yellow); color: var(--black); }
.week-event-chip.kind-ready,
.calendar-event.kind-ready { background: var(--black); color: var(--yellow); }
.week-event-chip.kind-due,
.calendar-event.kind-due { background: var(--dark-yellow); color: var(--black); }
.week-event-chip.kind-shipped,
.calendar-event.kind-shipped { background: var(--steel-grey); color: var(--black); }

.bulk-bar,
.toast {
  background: var(--black);
  color: var(--yellow);
  border-radius: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline-color: var(--yellow);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .brand-wordmark { width: 138px; max-width: 42vw; }
  .brand > span { font-size: 9px; padding-left: 9px; }
  .nav-link { min-height: 42px; }
}

/* Operational health colours: keep these semantic, not brand-yellow. */
.kpi-strip .risk { color: var(--amber); }
.kpi-strip .late { color: var(--red); }
.health-row-late td:first-child { box-shadow: inset 3px 0 var(--red); }
.health-row-at-risk td:first-child { box-shadow: inset 3px 0 var(--amber); }
.health-row-on-track td:first-child { box-shadow: inset 3px 0 var(--green); }
.waiting-risk,
.stale { color: var(--amber); }
.waiting-late { color: var(--red); }
.health.on-track { color: var(--green); }
.health.at-risk { color: var(--amber); }
.health.late { color: var(--red); }
.health.late::before { background: currentColor; outline: 0; }
.promise.on-track .segment.filled { background: var(--green); }
.promise.at-risk .segment.filled { background: var(--amber); }
.promise.late .segment.filled { background: var(--red); }
.week-attention.late { background: color-mix(in srgb, var(--red) 14%, white); color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 44%, white); }
.week-attention.risk { background: color-mix(in srgb, var(--amber) 18%, white); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 46%, white); }
.week-attention.clear { background: color-mix(in srgb, var(--green) 14%, white); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 42%, white); }
.milestone.complete > i { border-color: var(--green); background: var(--green); color: #fff; }
.milestone.overdue > i { border-color: var(--red); color: var(--red); }

/* Final light overlay treatment: keep actions readable and calm. */
.bulk-bar {
  background: #ffffff;
  color: var(--black);
  border: 1px solid var(--sandstone);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(21,19,13,.14);
}

.bulk-bar .selection-count {
  color: var(--black);
}

.bulk-bar .consequence {
  color: var(--muted);
}

.bulk-bar .consequence.warning {
  color: var(--red);
}

.bulk-secondary {
  background: var(--warm-grey);
  color: var(--black);
  border: 1px solid var(--sandstone);
  border-radius: 10px;
}

.bulk-bar .primary {
  background: var(--yellow);
  color: var(--black);
  border: 1px solid var(--dark-yellow);
  border-radius: 10px;
}

.modal-backdrop {
  background: rgba(21,19,13,.28);
}

.modal {
  background: #ffffff;
  color: var(--black);
  border: 1px solid var(--sandstone);
  border-radius: 14px;
}

.modal-head,
.modal-foot {
  background: #ffffff;
  border-color: var(--sandstone);
}

.workflow-rail .hold-lane {
  margin-left: auto;
  white-space: nowrap;
}

.modal-head h2 {
  color: var(--black);
  text-transform: none;
}

.modal-body {
  background: #ffffff;
}

.modal-order,
.calendar-order-facts span,
.calendar-order-timeline,
.shipment-items,
.notes-list p,
.empty-note {
  background: var(--warm-grey);
  border-color: var(--sandstone);
}

.warning-note {
  background: color-mix(in srgb, var(--yellow) 24%, white);
  color: var(--black);
  border-left-color: var(--dark-yellow);
}

.toast {
  background: #ffffff;
  color: var(--black);
  border: 1px solid var(--sandstone);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(21,19,13,.12);
}

/* Dashboard shell: left sidebar for expandable product areas. */
body {
  --sidebar-width: 286px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

body.sidebar-collapsed {
  --sidebar-width: 86px;
}

.topbar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
  padding: 28px 20px;
  background: #ffffff;
  border-right: 1px solid var(--black);
  border-bottom: 0;
  backdrop-filter: none;
}

.sidebar-toggle {
  position: absolute;
  top: 31px;
  right: -10px;
  z-index: 2;
  width: 20px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sandstone);
  border-left-color: #ffffff;
  border-radius: 0 999px 999px 0;
  background: #fff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 3px 0 10px rgba(21,19,13,.04);
  transition: width .14s ease, color .14s ease, border-color .14s ease;
}

.sidebar-toggle:hover {
  width: 24px;
  color: var(--black);
  border-color: var(--black);
  border-left-color: #ffffff;
  background: var(--off-white);
}

.brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  margin: 0;
}

.brand-wordmark {
  width: 198px;
  max-width: 100%;
}

.brand-favicon {
  width: 48px;
  height: 48px;
  object-fit: cover;
  display: none;
}

.brand > span {
  padding: 0;
  border-left: 0;
  color: var(--muted);
}

nav {
  display: block;
  align-self: stretch;
  margin: 0;
  width: auto;
  height: auto;
  overflow: visible;
}

.sidebar-section {
  display: grid;
  gap: 10px;
}

.sidebar-section-title {
  padding: 0 10px;
  color: var(--black);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sidebar-tree {
  display: grid;
  gap: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--sandstone);
}

.nav-link {
  min-height: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  border: 0;
  border-left: 4px solid transparent;
  border-bottom: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-link:hover,
.nav-link.active {
  background: var(--warm-grey);
  color: var(--black);
  border-left-color: var(--yellow);
}

.more-menu {
  display: grid;
  align-items: stretch;
}

.more-menu summary {
  min-height: 42px;
}

.more-panel {
  position: static;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 3px 0 6px 22px;
  border: 0;
  background: transparent;
}

.more-menu:not([open]) .more-panel {
  display: none;
}

.more-link {
  min-height: 34px;
  padding: 0 12px;
  border-left: 3px solid transparent;
  color: var(--muted);
  font-size: 12px;
}

.more-link:hover,
.more-link.active {
  background: var(--warm-grey);
  color: var(--black);
  border-left-color: var(--yellow);
}

.account-menu {
  margin: auto 0 0;
  align-self: stretch;
}

.account-details {
  height: auto;
  display: grid;
}

.account-trigger {
  width: 100%;
  justify-content: space-between;
  border-color: var(--sandstone);
}

.account-panel {
  left: 0;
  right: auto;
  bottom: calc(100% + 8px);
  top: auto;
  width: 100%;
}

body.sidebar-collapsed .topbar {
  align-items: center;
  gap: 18px;
  padding: 24px 14px;
}

body.sidebar-collapsed .brand {
  align-items: center;
}

body.sidebar-collapsed .brand-wordmark,
body.sidebar-collapsed .brand > span,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .account-trigger span,
body.sidebar-collapsed .account-trigger b {
  display: none;
}

body.sidebar-collapsed .brand-favicon {
  display: block;
}

body.sidebar-collapsed nav,
body.sidebar-collapsed .sidebar-section,
body.sidebar-collapsed .sidebar-tree,
body.sidebar-collapsed .account-menu,
body.sidebar-collapsed .account-details {
  width: 100%;
}

body.sidebar-collapsed .sidebar-tree {
  padding-left: 0;
  border-left: 0;
}

body.sidebar-collapsed .nav-link,
body.sidebar-collapsed .more-link {
  justify-content: center;
  padding: 0;
  border-left: 0;
  border-bottom: 3px solid transparent;
  font-size: 0;
}

body.sidebar-collapsed .nav-link::before,
body.sidebar-collapsed .more-link::before {
  content: attr(data-short);
  font-size: 11px;
  font-weight: 800;
}

body.sidebar-collapsed .nav-link:hover,
body.sidebar-collapsed .nav-link.active,
body.sidebar-collapsed .more-link:hover,
body.sidebar-collapsed .more-link.active {
  border-bottom-color: var(--yellow);
}

body.sidebar-collapsed .more-menu summary::after {
  display: none;
}

body.sidebar-collapsed .more-panel {
  padding: 4px 0 0;
}

body.sidebar-collapsed .account-trigger {
  min-height: 42px;
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed .account-trigger::before {
  content: "⚙";
  font-size: 16px;
}

body.sidebar-collapsed .account-trigger::after {
  display: none;
}

body.sidebar-collapsed .account-panel {
  left: calc(100% + 12px);
  right: auto;
  bottom: 0;
  width: 230px;
}

.kpi-strip {
  display: none;
}

main {
  grid-column: 2;
  max-width: none;
  width: 100%;
  padding: 38px clamp(24px, 4vw, 56px) 120px;
}

@media (max-width: 900px) {
  body {
    display: block;
  }

  body.sidebar-collapsed {
    --sidebar-width: 100%;
  }

  .topbar {
    position: sticky;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--black);
  }

  .sidebar-toggle {
    display: none;
  }

  body.sidebar-collapsed .topbar {
    align-items: stretch;
    padding: 16px;
  }

  body.sidebar-collapsed .brand-wordmark,
  body.sidebar-collapsed .brand > span,
  body.sidebar-collapsed .sidebar-section-title,
  body.sidebar-collapsed .account-trigger span,
  body.sidebar-collapsed .account-trigger b {
    display: initial;
  }

  body.sidebar-collapsed .brand-favicon {
    display: none;
  }

  body.sidebar-collapsed .nav-link,
  body.sidebar-collapsed .more-link {
    justify-content: flex-start;
    padding: 0 12px;
    font-size: 13px;
    border-left: 4px solid transparent;
    border-bottom: 0;
  }

  body.sidebar-collapsed .nav-link::before,
  body.sidebar-collapsed .more-link::before,
  body.sidebar-collapsed .account-trigger::before {
    content: none;
  }

  .brand {
    flex-direction: row;
    align-items: center;
  }

  .brand-wordmark {
    width: 150px;
  }

  nav {
    grid-column: 1 / -1;
    overflow-x: auto;
  }

  .sidebar-tree {
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, auto);
    overflow-x: auto;
  }

  .account-menu {
    margin: 0;
  }

  .account-panel {
    top: calc(100% + 8px);
    bottom: auto;
    left: auto;
    right: 0;
    width: 230px;
  }

  main {
    padding: 26px 18px 110px;
  }
}

.account-trigger {
  min-height: 44px;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--sandstone);
  background: #fff;
  color: var(--black);
}

.account-trigger span {
  font-size: 13px;
  line-height: 1;
}

.account-trigger b {
  min-width: 30px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--sandstone);
  background: var(--yellow);
  color: var(--black);
  font-size: 10px;
  letter-spacing: .06em;
}

.account-trigger::after {
  color: var(--black);
  transform: translateY(1px);
}

.account-panel {
  width: min(276px, calc(100vw - 32px));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--black);
  background: #fff;
  box-shadow: 0 18px 42px rgba(21, 19, 13, .16);
}

.account-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sandstone);
}

.account-panel-head span {
  color: var(--black);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-panel-head small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-align: right;
}

.settings-block {
  display: grid;
  gap: 7px;
}

.settings-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.idiom-symbol {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--black);
  background: var(--off-white);
  color: var(--black);
  font-size: 10px;
  letter-spacing: -.03em;
  text-transform: none;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.segmented-control button,
.language-chip,
.account-action {
  min-height: 34px;
  border: 1px solid var(--sandstone);
  background: var(--off-white);
  color: var(--black);
  font-size: 12px;
  font-weight: 800;
}

.segmented-control button {
  padding: 0 10px;
  text-align: left;
}

.segmented-control button.active,
.language-chip.active {
  border-color: var(--black);
  background: var(--yellow);
}

.language-block {
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
}

.language-block .settings-label {
  min-width: 0;
}

.language-switch {
  display: flex;
  gap: 5px;
}

.language-chip {
  min-width: 38px;
  padding: 0 8px;
  letter-spacing: .08em;
}

.language-chip span {
  display: block;
  transform: translateY(1px);
}

.account-action {
  width: 100%;
  min-height: 38px;
  background: var(--black);
  color: #fff;
}

.settings-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

body.sidebar-collapsed .account-trigger {
  width: 44px;
  min-height: 44px;
  padding: 0;
}

body.sidebar-collapsed .account-trigger b {
  display: none;
}

body.sidebar-collapsed .account-trigger::before {
  content: "⚙";
  font-size: 15px;
}

body.sidebar-collapsed .account-panel {
  left: calc(100% + 12px);
  right: auto;
  bottom: 0;
  width: 276px;
}

@media (max-width: 900px) {
  .account-panel {
    top: calc(100% + 8px);
    right: 0;
    bottom: auto;
    left: auto;
    width: min(276px, calc(100vw - 32px));
  }
}

body.auth-screen {
  display: block;
}

body.auth-screen .topbar {
  display: none;
}

body.auth-screen main {
  max-width: none;
  padding: 0;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  background: #fff;
}

.auth-card {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(28px, 6vw, 72px);
  border-right: 1px solid var(--sandstone);
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  line-height: .9;
  letter-spacing: -.05em;
}

.google-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--black);
  background: #fff;
  color: var(--black);
  font-weight: 800;
}

.google-button span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sandstone);
  border-radius: 50%;
  font-weight: 800;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--sandstone);
}

.auth-submit {
  min-height: 46px;
}

.auth-switch {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-side {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(32px, 7vw, 96px);
  background: var(--yellow);
}

.auth-side strong {
  font-size: clamp(52px, 8vw, 120px);
  line-height: .82;
  letter-spacing: -.07em;
}

.auth-side span {
  max-width: 540px;
  font-size: clamp(20px, 2.2vw, 34px);
  font-weight: 800;
  line-height: 1.05;
}

.auth-side ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--black);
  font-size: 13px;
  font-weight: 800;
}

.users-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.user-create-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--sandstone);
  background: var(--off-white);
}

.user-create-card h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.user-create-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.user-create-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.users-table-shell {
  min-width: 0;
}

@media (max-width: 900px) {
  .auth-page,
  .users-layout {
    grid-template-columns: 1fr;
  }

  .auth-card {
    border-right: 0;
    border-bottom: 1px solid var(--sandstone);
  }
}

.order-workspace {
  padding: 0 28px 18px 36px;
  border-left-color: var(--black);
  background: #fff;
}

.workspace-summary {
  align-items: flex-start;
  padding: 20px 0 18px;
}

.workspace-summary .detail-identity strong {
  font-size: 24px;
  letter-spacing: -.02em;
}

.order-workspace .detail-grid {
  grid-template-columns: minmax(420px, 1fr) minmax(340px, 430px);
  gap: 18px;
  padding: 18px 0;
}

.workspace-main {
  display: grid;
  gap: 14px;
}

.workspace-card,
.discussion-panel .notes-section {
  border: 1px solid var(--sandstone);
  background: var(--off-white);
}

.workspace-card {
  padding: 18px;
}

.milestone-card {
  display: grid;
  gap: 12px;
}

.milestone-card .milestone-list {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.milestone-card .milestone {
  align-items: start;
  padding: 10px;
  border: 1px solid var(--sandstone);
  background: #fff;
}

.milestone-card .milestone::after {
  display: none;
}

.discussion-panel {
  padding-left: 0;
  border-left: 0;
}

.discussion-panel .notes-section {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.discussion-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sandstone);
}

.discussion-head h3 {
  margin: 0 0 4px;
  color: var(--black);
}

.discussion-head p {
  max-width: 270px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.discussion-head b {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--black);
  background: var(--yellow);
  color: var(--black);
  font-size: 13px;
}

.notification-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.notification-strip span {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--sandstone);
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.chat-thread {
  max-height: 250px;
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.chat-message {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 9px;
  align-items: start;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--black);
  background: var(--warm-grey);
  color: var(--black);
  font-size: 10px;
  font-weight: 800;
}

.chat-message.latest .chat-avatar {
  background: var(--yellow);
}

.chat-bubble {
  padding: 10px 11px;
  border: 1px solid var(--sandstone);
  background: #fff;
}

.chat-bubble header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.chat-bubble strong {
  color: var(--black);
  font-size: 11px;
}

.chat-bubble time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.chat-bubble p {
  margin: 0;
  color: var(--black);
  font-size: 12px;
  line-height: 1.45;
}

.chat-bubble mark {
  padding: 1px 4px;
  background: var(--yellow);
  color: var(--black);
}

.discussion-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed var(--sandstone);
  background: #fff;
  text-align: center;
}

.discussion-empty strong {
  font-size: 12px;
}

.discussion-empty span {
  color: var(--muted);
  font-size: 11px;
}

.chat-composer {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--sandstone);
}

.chat-composer label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chat-composer textarea {
  min-height: 78px;
  resize: vertical;
  background: #fff;
}

.composer-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-footer span {
  margin-right: auto;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.composer-footer button {
  width: auto;
  min-height: 36px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .order-workspace .detail-grid {
    grid-template-columns: 1fr;
  }

  .milestone-card .milestone-list {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 700px) {
  .order-workspace {
    padding: 0 14px 16px 18px;
  }

  .notification-strip,
  .milestone-card .milestone-list {
    grid-template-columns: 1fr;
  }

  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .composer-footer button {
    width: 100%;
  }
}

/* Lean order details redesign */
.order-workspace {
  padding: 0 20px 16px;
  border-left-color: var(--sandstone);
  background: #fff;
}

.workspace-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--sandstone);
}

.workspace-summary .detail-identity {
  min-width: 0;
}

.workspace-summary .detail-identity strong {
  font-size: 20px;
}

.workspace-summary .detail-badges {
  gap: 6px;
}

.workspace-summary dl {
  grid-column: 1 / -1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  justify-self: stretch;
  gap: 10px;
  padding-top: 8px;
}

.workspace-summary dt {
  font-size: 8px;
}

.workspace-summary dd {
  font-size: 11px;
}

.order-workspace .detail-grid {
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px 0;
}

.workspace-main {
  gap: 12px;
}

.workspace-card,
.discussion-panel .notes-section {
  border: 0;
  background: transparent;
}

.workspace-card {
  padding: 0;
}

.workspace-card + .workspace-card {
  padding-top: 14px;
  border-top: 1px solid var(--sandstone);
}

.items-title {
  margin-bottom: 8px;
}

.items-title h3,
.milestone-card h3,
.discussion-head h3 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
}

.item {
  grid-template-columns: .8fr minmax(150px, 1.2fr) 48px .65fr .65fr .65fr auto;
  min-height: 36px;
  padding: 7px 0;
  font-size: 12px;
}

.item.split-item {
  grid-template-columns: 24px .8fr minmax(150px, 1.2fr) 48px .65fr .65fr .65fr minmax(115px, auto);
}

.item.item-head {
  min-height: 24px;
  padding: 4px 0;
  font-size: 8px;
}

.milestone-card {
  gap: 8px;
}

.milestone-card .milestone-list {
  display: flex;
  gap: 0;
}

.milestone-card .milestone {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 7px;
  padding: 0 10px 0 0;
  border: 0;
  background: transparent;
}

.milestone-card .milestone:not(:last-child) {
  border-right: 1px solid var(--sandstone);
  margin-right: 10px;
}

.milestone-card .milestone > i {
  width: 20px;
  height: 20px;
  border-radius: 0;
}

.milestone-card .milestone strong {
  font-size: 10px;
}

.milestone-card .milestone span {
  font-size: 9px;
}

.discussion-panel {
  padding: 14px 0 0;
  border-left: 0;
  border-top: 1px solid var(--sandstone);
}

.discussion-panel .notes-section {
  gap: 10px;
  padding: 0;
}

.discussion-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sandstone);
}

.discussion-head p {
  max-width: none;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.35;
}

.discussion-head b {
  min-width: 24px;
  height: 24px;
  border-color: var(--sandstone);
  background: var(--off-white);
  font-size: 11px;
}

.notification-strip {
  display: none;
}

.chat-thread {
  max-height: 150px;
  gap: 8px;
  padding-right: 0;
}

.chat-message {
  grid-template-columns: 24px 1fr;
  gap: 8px;
}

.chat-avatar {
  width: 24px;
  height: 24px;
  border-color: var(--sandstone);
  background: var(--off-white);
  font-size: 8px;
}

.chat-message.latest .chat-avatar {
  background: var(--yellow);
}

.chat-bubble {
  padding: 8px 0 8px 10px;
  border: 0;
  border-left: 2px solid var(--sandstone);
  background: transparent;
}

.chat-bubble header {
  margin-bottom: 3px;
}

.chat-bubble strong,
.chat-bubble p {
  font-size: 11px;
}

.chat-bubble time {
  font-size: 9px;
}

.discussion-empty {
  padding: 12px;
  background: var(--off-white);
}

.chat-composer {
  gap: 7px;
  padding-top: 10px;
}

.chat-composer label {
  display: none;
}

.chat-composer textarea {
  min-height: 54px;
  padding: 10px;
}

.composer-footer {
  gap: 8px;
}

.composer-footer span {
  font-size: 9px;
}

.composer-footer button {
  min-height: 34px;
  padding: 0 18px;
}

.order-workspace .actions {
  padding-top: 12px;
}

@media (max-width: 1100px) {
  .workspace-summary,
  .order-workspace .detail-grid {
    grid-template-columns: 1fr;
  }

  .workspace-summary dl {
    justify-self: stretch;
  }

  .discussion-panel {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--sandstone);
    padding-top: 14px;
  }

  .milestone-card .milestone-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .milestone-card .milestone:not(:last-child) {
    border-right: 0;
    margin-right: 0;
  }
}
