:root {
  --faos-canvas: #f7f8fc;
  --faos-surface: #fff;
  --faos-sidebar: #fafbfe;
  --faos-primary: #2c3953;
  --faos-primary-deep: #28344d;
  --faos-primary-text: #d6deeb;
  --faos-primary-muted: #aebcd2;
  --faos-subtle: #f7f8fc;
  --faos-hover: #eef1f6;
  --faos-active: #eef0ff;
  --faos-border: #e4e8f0;
  --faos-border-strong: #d5dce8;
  --faos-text: #202938;
  --faos-text-secondary: #536174;
  --faos-text-tertiary: #7b8798;
  --faos-accent: #6269df;
  --faos-accent-strong: #454cae;
  --faos-accent-soft: #eef0ff;
  --faos-danger: #b6404a;
  --faos-danger-soft: #fff0f1;
  --faos-warning: #9b6417;
  --faos-warning-soft: #fff6e7;
  --faos-success: #287957;
  --faos-success-soft: #eaf7f0;
  --faos-topbar-height: 56px;
  --faos-primary-width: 102px;
  --faos-secondary-width: 196px;
  --faos-sidebar-width: calc(var(--faos-primary-width) + var(--faos-secondary-width));
  --faos-inspector-width: 560px;
  --faos-radius: 8px;
  --faos-font-body: 13px;
  --faos-font-meta: 12px;
  --faos-font-control: 13px;
  --faos-font-title: 20px;
  --navy: var(--faos-text);
  --ink: var(--faos-text);
  --muted: var(--faos-text-secondary);
  --canvas: var(--faos-canvas);
  --surface: var(--faos-surface);
  --line: var(--faos-border);
  --blue: var(--faos-accent);
  --blue-soft: var(--faos-accent-soft);
  --linear-sidebar: var(--faos-sidebar);
  --linear-rail: #fbfbfa;
  --linear-hover: var(--faos-hover);
  --linear-active: var(--faos-active);
  --linear-text: var(--faos-text);
  --linear-muted: var(--faos-text-secondary);
  --shadow: 0 12px 34px rgba(42, 40, 34, .1);
  --radius: var(--faos-radius);
}

html,
body {
  max-width: 100%;
  color: var(--faos-text);
  background: var(--faos-canvas);
}

.application {
  min-height: 100dvh;
  background: var(--faos-surface);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  height: var(--faos-topbar-height);
  min-height: var(--faos-topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--faos-border);
  background: rgba(255, 255, 255, .96);
  box-shadow: none;
  backdrop-filter: blur(12px);
  flex-wrap: nowrap;
  align-content: center;
}

.topbar-start,
.topbar-end,
.history-controls,
.review-environment-context {
  display: flex;
  min-width: 0;
  align-items: center;
}

.topbar-start { flex: 0 0 auto; gap: 7px; }
.topbar-end { flex: 0 1 auto; justify-content: flex-end; gap: 5px; }
.history-controls { gap: 1px; }

.history-controls .icon-button,
.topbar .icon-button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: var(--faos-text-tertiary);
  background: transparent;
  font-size: 14px;
}

.history-controls .icon-button:hover,
.topbar .icon-button:hover {
  color: var(--faos-text);
  background: var(--faos-hover);
}

.topbar .wordmark {
  gap: 7px;
  color: var(--faos-text);
  font-size: 13px;
  font-weight: 650;
}

.topbar .brand-mark.small {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #fff;
  background: var(--faos-accent);
  box-shadow: none;
  font-size:12px;
}

.topbar .global-search {
  flex: 1 1 320px;
  max-width: 500px;
  min-width: 180px;
  height: 32px;
  min-height: 32px;
  margin: 0 auto;
  padding: 0 7px 0 10px;
  border: 1px solid var(--faos-border);
  border-radius: 6px;
  color: var(--faos-text-tertiary);
  background: var(--faos-subtle);
  box-shadow: none;
}

.topbar .global-search:focus-within {
  border-color: #bbb9ee;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(93, 91, 215, .1);
}

.topbar .global-search input {
  color: var(--faos-text);
  font-size: var(--faos-font-control);
}

.global-search-key {
  min-width: 34px;
  padding: 3px 5px;
  border: 0;
  border-radius: 4px;
  color: var(--faos-text-tertiary);
  background: #ecece9;
  font-size: var(--faos-font-meta);
}

.review-environment-context { flex: 0 1 auto; gap: 5px; }

.local-review-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 5px;
  color: #69664f;
  background: #f4f1df;
  font-size: var(--faos-font-meta);
  font-weight: 650;
  white-space: nowrap;
}

.local-review-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b8555;
}

.review-progress-link {
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--faos-text-secondary);
  font-size: var(--faos-font-meta);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.review-progress-link:hover {
  color: var(--faos-text);
  background: var(--faos-hover);
}

.review-environment-context .organization-context-control,
.review-environment-context .workspace-control {
  flex: 0 1 112px;
  max-width: 112px;
}

.review-environment-context label,
.review-environment-context .context-control-label { display: none; }

.review-environment-context select {
  width: 100%;
  min-height: 28px;
  padding: 3px 20px 3px 6px;
  border: 0;
  border-radius: 5px;
  color: var(--faos-text-secondary);
  background: transparent;
  box-shadow: none;
  font-size: var(--faos-font-control);
  font-weight: 520;
  text-overflow: ellipsis;
}

.review-environment-context select:hover { background: var(--faos-hover); }

#review-identity {
  max-width: 92px;
  overflow: hidden;
  color: var(--faos-text-tertiary);
  font-size:12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-action {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--faos-text-secondary);
  background: transparent;
  box-shadow: none;
  font-size:12px;
  font-weight: 560;
}

.topbar-action:hover {
  border-color: transparent;
  color: var(--faos-text);
  background: var(--faos-hover);
}

.topbar-action[aria-label="新建任务"] {
  color: #fff;
  background: var(--faos-accent);
}

.topbar-action[aria-label="新建任务"]:hover { color: #fff; background: var(--faos-accent-strong); }
.topbar-action[aria-label="收件箱"] > span:first-child { color: var(--faos-danger); font-size:12px; }
.user-menu-slot { position: relative; flex: 0 0 auto; }

.user-menu-button {
  min-height: 30px;
  max-width: 150px;
  padding: 2px 5px;
  border: 0;
  border-radius: 5px;
  color: var(--faos-text-secondary);
  background: transparent;
}

.user-menu-button:hover { background: var(--faos-hover); }

.user-avatar {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  color: #fff;
  background: #7b7972;
  font-size:12px;
}

.lc-message-button {
  width: 30px;
  justify-content: center;
  padding-inline: 4px;
  border: 0;
  color: var(--faos-text-secondary);
  background: transparent;
}

.lc-message-button .lc-message-label { display: none; }

.workspace {
  display: flex;
  min-width: 0;
  min-height: calc(100dvh - var(--faos-topbar-height));
  align-items: stretch;
  background: var(--faos-surface);
}

.sidebar {
  position: sticky;
  top: var(--faos-topbar-height);
  align-self: flex-start;
  display: flex;
  width: var(--faos-sidebar-width);
  height: calc(100dvh - var(--faos-topbar-height));
  flex: 0 0 var(--faos-sidebar-width);
  flex-direction: row;
  overflow: hidden;
  padding: 0;
  border-right: 1px solid var(--faos-border);
  color: var(--faos-text-secondary);
  background: var(--faos-sidebar);
  transform: none;
  box-shadow: none;
  transition: none;
}

.sidebar-backdrop,
.mobile-only { display: none; }

.primary-rail {
  display: flex;
  width: var(--faos-primary-width);
  min-width: var(--faos-primary-width);
  height: 100%;
  flex-direction: column;
  padding: 12px 8px 10px;
  color: var(--faos-primary-text);
  background: linear-gradient(180deg, var(--faos-primary) 0%, var(--faos-primary-deep) 100%);
}

.primary-brand {
  display: grid;
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid rgba(214, 222, 235, .22);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 18px;
  font-weight: 760;
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
}

.primary-navigation {
  display: grid;
  gap: 3px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.primary-navigation::-webkit-scrollbar { display: none; }

.primary-nav-item {
  display: grid;
  width: 100%;
  min-height: 58px;
  place-items: center;
  gap: 4px;
  padding: 7px 4px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--faos-primary-muted);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 590;
  line-height: 1.2;
  text-align: center;
}

.primary-nav-item:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.primary-nav-item.is-active { border-color: rgba(255, 255, 255, .12); color: #fff; background: rgba(255, 255, 255, .14); box-shadow: 0 8px 20px rgba(12, 20, 38, .12); }
.primary-icon { display: block; color: inherit; font-size: 15px; line-height: 1; }
.primary-label { display: block; color: inherit; }
.primary-admin { min-height: 47px; margin-top: auto; padding-top: 11px; border-top: 1px solid rgba(214, 222, 235, .14); border-radius: 0; }
.primary-admin:hover,
.primary-admin.is-active { border-top-color: rgba(214, 222, 235, .14); border-right-color: transparent; border-bottom-color: transparent; border-left-color: transparent; background: rgba(255, 255, 255, .07); box-shadow: none; }

.secondary-rail {
  display: flex;
  width: var(--faos-secondary-width);
  min-width: var(--faos-secondary-width);
  height: 100%;
  flex-direction: column;
  overflow-y: auto;
  padding: 15px 9px 12px;
  border-right: 1px solid rgba(213, 220, 232, .7);
  background: linear-gradient(180deg, #fafbfe 0%, #f7f8fc 100%);
  box-shadow: inset -8px 0 20px rgba(35, 44, 61, .025);
  scrollbar-color: #d5dce8 transparent;
  scrollbar-width: thin;
}

.secondary-nav-group { min-height: min-content; }
.secondary-nav-group[hidden] { display: none; }
.secondary-heading { display: grid; gap: 4px; padding: 3px 10px 14px; }
.secondary-heading span { color: var(--faos-text-tertiary); font-size: 12px; font-weight: 650; letter-spacing: .055em; }
.secondary-heading strong { color: var(--faos-text); font-size: 16px; font-weight: 680; letter-spacing: -.015em; }
.secondary-navigation { display: grid; gap: 4px; }

.secondary-rail .nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--faos-text-secondary);
  background: transparent;
  box-shadow: none;
  font-size: var(--faos-font-body);
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
}

.secondary-rail .nav-item > span:first-child {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secondary-rail .nav-item:hover { color: var(--faos-text); background: #eceef4; }

.secondary-rail .nav-item.is-active {
  border-color: rgba(102, 112, 141, .11);
  color: var(--faos-accent-strong);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 16px rgba(34, 44, 61, .06);
  font-weight: 650;
}

.secondary-rail .nav-item.is-active::before { position: absolute; top: 10px; bottom: 10px; left: 3px; width: 3px; border-radius: 2px; background: var(--faos-accent); content: ""; }
.sidebar-unread { min-width: 20px; padding: 2px 6px; border-radius: 10px; color: #fff; background: var(--faos-danger); font-size: 12px; line-height: 16px; text-align: center; }

.sidebar-note {
  display: grid;
  gap: 2px;
  margin: auto 7px 0;
  padding: 12px 3px 2px;
  border: 0;
  border-top: 1px solid var(--faos-border);
  border-radius: 0;
  color: var(--faos-text-tertiary);
  font-size: 12px;
}

.sidebar-note small { color: var(--faos-text-tertiary); font-size: 12px; }

.main-content {
  width: min(100%, 1380px);
  min-width: 0;
  flex: 1 1 auto;
  margin: 0 auto;
  padding: 18px 26px 48px;
  color: var(--faos-text);
  background: var(--faos-surface);
  container-type: inline-size;
}

.main-content small { font-size: var(--faos-font-meta); }

.main-content > .page-head,
.main-content .platform-page-head {
  display: flex;
  min-height: 54px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--faos-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.main-content > .page-head h1,
.main-content .platform-page-head h1 {
  margin: 0;
  color: var(--faos-text);
  font-size: var(--faos-font-title);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.35;
}

.main-content > .page-head .eyebrow,
.main-content .platform-eyebrow {
  display: block;
  margin: 0 0 4px;
  color: var(--faos-text-tertiary);
  font-size: var(--faos-font-meta);
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: none;
}

.main-content > .page-head p:not(.eyebrow),
.main-content .platform-page-head p {
  max-width: 820px;
  margin: 3px 0 0;
  color: var(--faos-text-secondary);
  font-size: var(--faos-font-body);
  line-height: 1.55;
}

.main-content .page-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.main-content .button,
.main-content .secondary-button { min-height: 30px; padding: 5px 9px; border-radius: 5px; box-shadow: none; font-size: var(--faos-font-control); font-weight: 600; }
.main-content .button { border-color: var(--faos-accent); color: #fff; background: var(--faos-accent); }
.main-content .button:hover { border-color: var(--faos-accent-strong); background: var(--faos-accent-strong); }
.main-content .secondary-button { border-color: var(--faos-border-strong); color: var(--faos-text-secondary); background: #fff; }
.main-content .secondary-button:hover { color: var(--faos-text); background: var(--faos-subtle); }
.main-content .text-button { padding: 3px; color: var(--faos-accent-strong); font-size: var(--faos-font-control); }
.main-content .card { border-color: var(--faos-border); border-radius: var(--faos-radius); background: #fff; box-shadow: none; }
.main-content .card-pad { padding: 13px 14px; }
.main-content .card h2 { font-size: 14px; }
.main-content .card h3 { font-size: var(--faos-font-body); }
.main-content .my-work-content,
.main-content .stack { gap: 10px; }
.main-content .my-work-content {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
.main-content [data-lac-mount],
.main-content .decision-desk { min-width: 0; max-width: 100%; }
.main-content .my-work-grid,
.main-content .my-work-lower-grid,
.main-content .dashboard-grid,
.main-content .card-grid.two,
.main-content .split-grid,
.main-content .collaboration-grid { gap: 10px; }
.main-content .section-head { gap: 10px; margin-bottom: 8px; }
.main-content .section-head p { margin-top: 2px; color: var(--faos-text-secondary); font-size: var(--faos-font-body); line-height: 1.5; }

.main-content .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-color: var(--faos-border);
  border-radius: 6px;
  box-shadow: none;
}

.main-content table { border-collapse: collapse; }
.main-content th { padding: 8px 10px; color: var(--faos-text-tertiary); background: #fafaf8; font-size: var(--faos-font-meta); font-weight: 600; line-height: 1.4; text-align: left; }
.main-content td { padding: 10px; border-color: #eeede9; color: var(--faos-text-secondary); font-size: var(--faos-font-body); line-height: 1.55; vertical-align: middle; }
.main-content tbody tr:hover td { background: #fbfbf9; }
.main-content td strong { color: var(--faos-text); }
.main-content td small { display: block; margin-top: 3px; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); line-height: 1.5; }
.main-content input,
.main-content select,
.main-content textarea { padding: 6px 8px; border-color: var(--faos-border-strong); border-radius: 5px; color: var(--faos-text); background: #fff; box-shadow: none; font-size: var(--faos-font-control); }
.main-content textarea { min-height: 72px; }
.main-content .status-pill { padding: 2px 6px; border-radius: 4px; font-size: var(--faos-font-meta); }

/* Inbox keeps the source queue and selected evidence in one continuous surface. */
.intake-tabs {
  display: flex;
  gap: 16px;
  margin: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--faos-border);
}

.intake-tabs .tab-button {
  flex: 0 0 auto;
  padding: 8px 0 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--faos-text-tertiary);
  background: transparent;
  font-size: var(--faos-font-meta);
  font-weight: 520;
}

.intake-tabs .tab-button.is-active,
.intake-tabs .tab-button[aria-selected="true"] {
  border-bottom-color: var(--faos-accent);
  color: var(--faos-text);
  font-weight: 620;
}

.inbox-v3-ingress {
  margin: 8px 0 10px;
  padding: 12px;
  border-color: var(--faos-border-strong);
  box-shadow: none;
}

.inbox-v3-ingress .section-head { align-items: flex-start; }
.inbox-v3-ingress .section-head .eyebrow { margin-top: 0; }
.inbox-v3-ingress .section-head p { margin-block: 2px 0; }
.inbox-v3-ingress-grid { display: grid; grid-template-columns: minmax(180px, .62fr) minmax(260px, 1.38fr); gap: 9px; }
.inbox-v3-dropzone {
  display: grid;
  min-height: 92px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 9px;
  border: 1px dashed var(--faos-border-strong);
  border-radius: 6px;
  color: var(--faos-text-secondary);
  background: #fafaf8;
  text-align: center;
}
.inbox-v3-dropzone.is-dragging,
.inbox-v3-dropzone:focus-visible { border-color: var(--faos-accent); background: var(--faos-active); }
.inbox-v3-dropzone > span { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.inbox-v3-dropzone > label { margin-top: 3px; cursor: pointer; }
.inbox-v3-dropzone > input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.inbox-v3-paste-zone textarea { min-height: 74px; max-height: 150px; resize: vertical; }
.inbox-v3-paste-zone small { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); line-height: 1.4; }
.inbox-v3-upload-queue { margin-top: 7px; padding: 6px 8px; border: 1px solid var(--faos-border); border-radius: 5px; background: #fcfcfa; }
.inbox-v3-upload-queue > p { margin: 0; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.inbox-v3-upload-queue ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.inbox-v3-upload-queue li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inbox-v3-upload-queue li span,
.inbox-v3-upload-queue li strong,
.inbox-v3-upload-queue li small { display: block; min-width: 0; overflow-wrap: anywhere; }
.inbox-v3-upload-queue li small { margin-top: 1px; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.inbox-v3-ingress-actions { display: flex; align-items: end; justify-content: flex-end; gap: 9px; margin-top: 7px; }
.inbox-v3-ingress-actions .field { min-width: 260px; }
.inbox-v3-ingress-actions .button { min-height: 32px; }

.inbox-work-surface {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(0, 1.45fr) minmax(245px, .86fr);
  align-items: start;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--faos-border);
  border-radius: 7px;
  background: #fff;
}

.inbox-swipe-hint { display: none; }

.inbox-v3-queue {
  display: grid;
  align-content: start;
  min-width: 0;
  max-height: min(780px, calc(100vh - 148px));
  overflow: auto;
  border-right: 1px solid var(--faos-border);
  background: #fafaf8;
}

.inbox-v3-queue > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 11px;
  border-bottom: 1px solid var(--faos-border);
}

.inbox-v3-queue > header span,
.inbox-v3-queue > header small {
  display: block;
  color: var(--faos-text-tertiary);
  font-size: var(--faos-font-meta);
}

.inbox-v3-queue > header strong {
  display: block;
  margin-top: 2px;
  color: var(--faos-text);
  font-size: var(--faos-font-body);
}

.inbox-v3-filter-group {
  padding: 9px 10px;
  border-bottom: 1px solid var(--faos-border);
}

.inbox-v3-filter-group h2 {
  margin: 0 0 6px;
  color: var(--faos-text-tertiary);
  font-size: var(--faos-font-meta);
  font-weight: 650;
}

.inbox-v3-channel-filters,
.inbox-v3-domain-filters {
  display: grid;
  gap: 4px;
}

.inbox-v3-filter-button,
.inbox-v3-domain-button {
  width: 100%;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--faos-text-secondary);
  background: transparent;
  text-align: left;
}

.inbox-v3-filter-button strong,
.inbox-v3-filter-button small {
  display: block;
}

.inbox-v3-filter-button strong { color: inherit; font-size: var(--faos-font-control); }
.inbox-v3-filter-button small { margin-top: 1px; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); line-height: 1.35; }
.inbox-v3-filter-button:hover:not(:disabled),
.inbox-v3-domain-button:hover { background: var(--faos-hover); }
.inbox-v3-filter-button.is-active,
.inbox-v3-domain-button.is-active { border-color: var(--faos-border-strong); color: var(--faos-text); background: var(--faos-active); }
.inbox-v3-filter-button:disabled { opacity: .68; }

.inbox-v3-domain-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inbox-v3-domain-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: var(--faos-font-meta);
}

.inbox-v3-domain-button span {
  min-width: 17px;
  padding: 1px 4px;
  border-radius: 8px;
  background: rgba(42, 40, 34, .07);
  text-align: center;
}

.inbox-v3-advanced { margin: 0; padding: 0 10px 9px; border-top: 0; border-bottom: 1px solid var(--faos-border); }
.inbox-v3-advanced > summary { padding-block: 9px; }
.inbox-v3-advanced .form-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; }
.inbox-v3-advanced .secondary-button { width: 100%; margin-top: 7px; }

.inbox-v3-list {
  display: grid;
  align-content: start;
}

.inbox-v3-list > button {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 0;
  border-bottom: 1px solid var(--faos-border);
  color: var(--faos-text-secondary);
  background: transparent;
  text-align: left;
}

.inbox-v3-list > button:hover {
  background: var(--faos-hover);
}

.inbox-v3-list > button.is-selected {
  color: var(--faos-text);
  background: var(--faos-active);
  box-shadow: inset 2px 0 var(--faos-accent);
}

.inbox-v3-list > button strong,
.inbox-v3-list > button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-v3-list > button strong {
  color: inherit;
  font-size:12px;
  font-weight: 620;
}

.inbox-v3-list > button small {
  color: var(--faos-text-tertiary);
  font-size:12px;
}

.inbox-v3-evidence,
.inbox-v3-actions {
  min-width: 0;
  margin: 0;
  padding: 12px;
}

.inbox-v3-evidence {
  border-right: 1px solid var(--faos-border);
  background: #fff;
}

.inbox-v3-actions {
  background: #fcfcfa;
}

.inbox-v3-pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.inbox-v3-pane-head .eyebrow { margin: 0 0 3px; color: var(--faos-text-tertiary); }
.inbox-v3-pane-head h2 { margin: 0; color: var(--faos-text); font-size: 14px; }
.inbox-v3-pane-head p { margin: 3px 0 0; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.inbox-v3-domain-tag { max-width: 230px; padding: 4px 6px; border-radius: 4px; color: var(--faos-text-secondary); background: var(--faos-hover); font-size: var(--faos-font-meta); line-height: 1.35; }

.inbox-v3-empty-pane {
  display: grid;
  min-height: 220px;
  align-content: center;
  justify-items: center;
  color: var(--faos-text-tertiary);
  text-align: center;
}

.inbox-v3-empty-pane strong { color: var(--faos-text); }
.inbox-v3-empty-pane span { margin-top: 5px; font-size: var(--faos-font-meta); }
.inbox-v3-actions .intake-status-stack { justify-content: flex-start; margin-bottom: 9px; }

.inbox-v3-next-action {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--faos-border);
  border-left: 3px solid var(--faos-accent);
  border-radius: 5px;
  background: #fff;
}

.inbox-v3-next-action span,
.inbox-v3-next-action small { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.inbox-v3-next-action strong { color: var(--faos-text); font-size: var(--faos-font-body); line-height: 1.45; }
.inbox-v3-action-section,
.inbox-v3-safety-summary { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--faos-border); }
.inbox-v3-action-section h3,
.inbox-v3-safety-summary h3 { margin: 0 0 7px; color: var(--faos-text); font-size: var(--faos-font-control); }
.inbox-v3-primary-actions { display: grid; gap: 6px; }
.inbox-v3-primary-actions > button { width: 100%; justify-content: center; }
.inbox-v3-safety-summary dl { display: grid; gap: 5px; margin: 0; }
.inbox-v3-safety-summary dl > div { display: flex; justify-content: space-between; gap: 8px; }
.inbox-v3-safety-summary dt { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.inbox-v3-safety-summary dd { margin: 0; color: var(--faos-text-secondary); font-size: var(--faos-font-meta); text-align: right; }
.inbox-v3-action-stack { display: grid; gap: 7px; margin-top: 11px; }
.inbox-v3-action-stack form { padding: 8px; border: 1px solid var(--faos-border); border-radius: 5px; background: #fff; }
.inbox-v3-action-stack .text-button { padding-inline: 0; }
.inbox-v3-archive { width: 100%; margin-top: 9px; text-align: left; }

.inbox-work-surface .intake-record {
  border: 0;
  border-radius: 0;
}

.inbox-work-surface .intake-facts {
  gap: 0;
  overflow: hidden;
  border-top: 1px solid var(--faos-border);
  border-bottom: 1px solid var(--faos-border);
}

.inbox-work-surface .intake-facts > div {
  padding: 9px 10px;
  border-right: 1px solid var(--faos-border);
  border-radius: 0;
  background: transparent;
}

.inbox-work-surface .intake-facts > div:last-child {
  border-right: 0;
}

.ws-pages { display: flex; gap: 15px; margin: 0 0 14px; overflow-x: auto; border-bottom: 1px solid var(--faos-border); }
.ws-pages button { flex: 0 0 auto; padding: 8px 0 7px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--faos-text-tertiary); background: transparent; font-size:12px; }
.ws-pages button[aria-current="page"] { border-bottom-color: var(--faos-accent); color: var(--faos-text); font-weight: 620; }
.main-content .ws-offstage { display: none; }
.ws-secondary-collapsed { display: none; }
.secondary-disclosure { margin: 8px 0 12px; }

/* V0.98 / interface design V0.2: one visible final-page surface with one clear tab row. */
.r96-final-tabs {
  position: sticky;
  top: var(--faos-topbar-height);
  z-index: 32;
  display: flex;
  min-height: 42px;
  align-items: end;
  gap: 24px;
  margin: -2px 0 16px;
  padding: 0 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--faos-border);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 7px 10px -12px rgba(32, 41, 56, .55);
  backdrop-filter: blur(12px);
  scrollbar-width: none;
}
.r96-final-tabs::-webkit-scrollbar { display: none; }
.r96-final-tabs button {
  flex: 0 0 auto;
  min-height: 41px;
  padding: 10px 1px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--faos-text-tertiary);
  background: transparent;
  font-size: 13px;
  font-weight: 520;
  white-space: nowrap;
}
.r96-final-tabs button:hover { color: var(--faos-text); background: transparent; }
.r96-final-tabs button[aria-selected="true"] {
  border-bottom-color: var(--faos-accent);
  color: var(--faos-text);
  font-weight: 680;
}
.r96-final-tabs button:focus-visible { outline: 2px solid var(--faos-accent); outline-offset: -3px; }

/* A final-page tab is the whole work surface, not an anchor into a long page. */
.main-content[data-final-page-tab] [data-final-surface] { display: none; }
.main-content[data-final-page-tab="requirements-list"] [data-final-surface~="requirements-list"],
.main-content[data-final-page-tab="customer-list"] [data-final-surface~="customer-list"],
.main-content[data-final-page-tab="customer-create"] [data-final-surface~="customer-create"],
.main-content[data-final-page-tab="customer-profile"] [data-final-surface~="customer-profile"],
.main-content[data-final-page-tab="customer-contacts"] [data-final-surface~="customer-contacts"],
.main-content[data-final-page-tab="customer-opportunities"] [data-final-surface~="customer-opportunities"],
.main-content[data-final-page-tab="supply-products"] [data-final-surface~="supply-products"],
.main-content[data-final-page-tab="supplier-capabilities"] [data-final-surface~="supplier-capabilities"],
.main-content[data-final-page-tab="capability-create"] [data-final-surface~="capability-create"],
.main-content[data-final-page-tab="observation-create"] [data-final-surface~="observation-create"],
.main-content[data-final-page-tab="scorecard-create"] [data-final-surface~="scorecard-create"],
.main-content[data-final-page-tab="finished-style-prices"] [data-final-surface~="finished-style-prices"],
.main-content[data-final-page-tab="material-prices-history"] [data-final-surface~="material-prices-history"],
.main-content[data-final-page-tab="cost-templates"] [data-final-surface~="cost-templates"],
.main-content[data-final-page-tab="product-costs"] [data-final-surface~="product-costs"],
.main-content[data-final-page-tab="cost-template-create"] [data-final-surface~="cost-template-create"],
.main-content[data-final-page-tab="product-cost-create"] [data-final-surface~="product-cost-create"],
.main-content[data-final-page-tab="product-list"] [data-final-surface~="product-list"],
.main-content[data-final-page-tab="product-create"] [data-final-surface~="product-create"],
.main-content[data-final-page-tab="technical-detail"] [data-final-surface~="technical-detail"],
.main-content[data-final-page-tab="readiness"] [data-final-surface~="readiness"],
.main-content[data-final-page-tab="file-list"] [data-final-surface~="file-list"],
.main-content[data-final-page-tab="file-review"] [data-final-surface~="file-review"],
.main-content[data-final-page-tab="cobuild-create"] [data-final-surface~="cobuild-create"],
.main-content[data-final-page-tab="cobuild-review"] [data-final-surface~="cobuild-review"],
.main-content[data-final-page-tab="dashboard-overview"] [data-final-surface~="dashboard-overview"],
.main-content[data-final-page-tab="dashboard-profits"] [data-final-surface~="dashboard-profits"],
.main-content[data-final-page-tab="dashboard-orders"] [data-final-surface~="dashboard-orders"],
.main-content[data-final-page-tab="sample-list"] [data-final-surface~="sample-list"],
.main-content[data-final-page-tab="sample-create"] [data-final-surface~="sample-create"],
.main-content[data-final-page-tab="sample-feedback"] [data-final-surface~="sample-feedback"],
.main-content[data-final-page-tab="sample-readiness"] [data-final-surface~="sample-readiness"],
.main-content[data-final-page-tab="requirements-create"] [data-final-surface~="requirements-create"],
.main-content[data-final-page-tab="interactions-list"] [data-final-surface~="interactions-list"],
.main-content[data-final-page-tab="interactions-create"] [data-final-surface~="interactions-create"],
.main-content[data-final-page-tab="quotes-list"] [data-final-surface~="quotes-list"],
.main-content[data-final-page-tab="quotes-create"] [data-final-surface~="quotes-create"],
.main-content[data-final-page-tab="handoff-overview"] [data-final-surface~="handoff-overview"],
.main-content[data-final-page-tab="po-list"] [data-final-surface~="po-list"],
.main-content[data-final-page-tab="po-upload"] [data-final-surface~="po-upload"],
.main-content[data-final-page-tab="orders-list"] [data-final-surface~="orders-list"],
.main-content[data-final-page-tab="timeline-list"] [data-final-surface~="timeline-list"],
.main-content[data-final-page-tab="daily"] [data-final-surface~="daily"],
.main-content[data-final-page-tab="overview"] [data-final-surface~="overview"],
.main-content[data-final-page-tab="quantities"] [data-final-surface~="quantities"],
.main-content[data-final-page-tab="plans"] [data-final-surface~="plans"] { display: block; }

/* Price history is a complete work page: three records plus pagination fit in
   the viewport, while additional records move to numbered pages. */
.main-content:is([data-final-page-tab="finished-style-prices"], [data-final-page-tab="material-prices-history"]) {
  box-sizing: border-box;
  height: calc(100dvh - var(--faos-topbar-height));
  overflow: hidden;
  padding-bottom: 0;
}
.main-content:is([data-final-page-tab="finished-style-prices"], [data-final-page-tab="material-prices-history"]) > .r96-final-tabs {
  margin-bottom: 12px;
}

/* Production nodes use the same fixed third-level slot and expose only one
   complete work surface at a time. */
.main-content[data-final-page-tab="current"] [data-final-surface~="current"],
.main-content[data-final-page-tab="materials"] [data-final-surface~="materials"],
.main-content[data-final-page-tab="nodes-map"] [data-final-surface~="nodes-map"],
.main-content[data-final-page-tab="risk"] [data-final-surface~="risk"],
.main-content[data-final-page-tab="records"] [data-final-surface~="records"] { display: block; }

.main-content[data-workspace-active-page="requirements"] .sales-customer-detail > .section-head,
.main-content[data-workspace-active-page="quotes"] .sales-customer-detail > .section-head,
.main-content[data-workspace-active-page="handoff"] .sales-customer-detail > .section-head { margin-bottom: 10px; padding: 9px 12px; border: 1px solid var(--faos-border); border-radius: 7px; background: #fbfbfc; }
.main-content[data-workspace-active-page="requirements"] .sales-customer-detail > [data-workpage="requirements"],
.main-content[data-workspace-active-page="quotes"] .sales-customer-detail > [data-workpage="quotes"],
.main-content[data-workspace-active-page="handoff"] .sales-customer-detail > [data-workpage="handoff"] { margin: 0; }
.main-content [data-final-surface].card { margin-top: 0; border-radius: 8px; box-shadow: none; }
.sales-record-pagination { margin-top: 10px; }
.quote-tier-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--faos-text-tertiary); font-size: 12px; }
.r96-next-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--faos-border-strong); border-radius: 8px; background: var(--faos-accent-soft); }
.r96-next-action > div { display: grid; gap: 3px; }
.r96-next-action span,
.r96-next-action small { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.r96-next-action strong { color: var(--faos-text); font-size: 15px; }
.main-content [data-final-surface$="-create"] form > .form-grid,
.main-content [data-final-surface="po-upload"] form > .form-grid { gap: 7px 9px; }
.main-content [data-final-surface$="-create"] form > .form-grid > .field.full,
.main-content [data-final-surface="po-upload"] form > .form-grid > .field.full { grid-column: auto; }
.main-content [data-final-surface$="-create"] form > .form-grid > .field.full:has(input[type="checkbox"]),
.main-content [data-final-surface="po-upload"] form > .form-grid > .field.full:has(input[type="checkbox"]) { grid-column: 1 / -1; }
.main-content [data-final-surface$="-create"] textarea { min-height: 50px; }
.main-content [data-final-surface$="-create"] .field,
.main-content [data-final-surface="po-upload"] .field { gap: 3px; }
.main-content [data-final-surface$="-create"] .form-actions,
.main-content [data-final-surface="po-upload"] .form-actions { margin-top: 8px; }

.r96-task-workspace { min-width: 0; }
.r96-task-workspace > .work-panel {
  margin: 0;
  padding: 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.r96-task-workspace > .work-panel > [data-task-surface] > .section-head,
.r96-task-create > .section-head { margin-bottom: 12px; }
.r96-task-workspace .task-table-filter-form { border-color: var(--faos-border); background: #fbfbfc; }
.r96-task-workspace .task-table-table-wrap { max-height: none; border: 1px solid var(--faos-border); border-radius: 7px; }
.r96-task-workspace [data-task-surface="tools"] { max-width: 980px; }
.r96-task-workspace .task-table-support-grid { margin-top: 0; }
.r96-task-workspace .task-table-bulk-form { margin-top: 14px; }
.task-table-pagination { margin-top: 10px; }

.main-content[data-workspace-active-page="tasks"][data-final-page-tab="list"] #quick-create-task,
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="list"] [data-local-handoffs],
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="list"] [data-task-surface="tools"],
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="create"] #my-tasks,
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="create"] [data-local-handoffs],
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="handoffs"] [data-workpage="tasks"],
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="tools"] #quick-create-task,
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="tools"] [data-local-handoffs],
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="tools"] [data-task-surface="list"] { display: none; }
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="create"] #quick-create-task,
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="tools"] [data-task-surface="tools"] { display: block; }
.main-content[data-workspace-active-page="tasks"][data-final-page-tab="handoffs"] [data-local-handoffs] .handoff-register { margin-top: 0; }

/* Existing business tabs now share the same V0.1 visual grammar. */
.main-content :is(.ld-work-tabs, .fl-tabs, .lqwc-view-tabs, .lwl-view-tabs, .lai-qwen-view-tabs) {
  display: flex;
  min-height: 40px;
  align-items: end;
  gap: 22px;
  margin: 0 0 14px;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--faos-border);
  background: transparent;
  scrollbar-width: none;
}
.main-content :is(.ld-work-tabs, .fl-tabs, .lqwc-view-tabs, .lwl-view-tabs, .lai-qwen-view-tabs)::-webkit-scrollbar { display: none; }
.main-content :is(.ld-work-tabs, .fl-tabs, .lqwc-view-tabs, .lwl-view-tabs, .lai-qwen-view-tabs) > button {
  flex: 0 0 auto;
  min-height: 39px;
  padding: 9px 1px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--faos-text-tertiary);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 520;
  white-space: nowrap;
}
.main-content :is(.ld-work-tabs, .fl-tabs, .lqwc-view-tabs, .lwl-view-tabs, .lai-qwen-view-tabs) > button:hover { color: var(--faos-text); background: transparent; }
.main-content :is(.ld-work-tabs, .fl-tabs, .lqwc-view-tabs, .lwl-view-tabs, .lai-qwen-view-tabs) > :is(.is-active, .selected, [aria-current="page"], [aria-selected="true"]) {
  border-bottom-color: var(--faos-accent);
  color: var(--faos-text);
  background: transparent;
  font-weight: 680;
}

/* Page-level component tabs use the same top slot and stay visible while the
   current final page scrolls.  Entity-detail tabs and filters remain local. */
.main-content :is(.pr-queue-tabs, .fl-tabs, .lqwc-view-tabs, .lwl-view-tabs, .lai-qwen-view-tabs, .r96-order-toolbar > .ld-work-tabs) {
  position: sticky;
  top: var(--faos-topbar-height);
  z-index: 30;
  order: -1;
  padding-inline: 2px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 7px 10px -12px rgba(32, 41, 56, .55);
  backdrop-filter: blur(12px);
}

/* The AI workbench previously placed its page tabs below the hero and process
   strip.  Keep them first, then show the supporting context underneath. */
.main-content .lai-qwen-conversation-first { overflow: visible; }
.main-content .lai-qwen-conversation-first > .lai-qwen-view-tabs { order: -1; }
.main-content :is(.fl-root, .lqwc-workbench, .lwl-workbench) {
  display: flex;
  flex-direction: column;
}
.main-content :is(.lqwc-workbench, .lwl-workbench) { overflow: visible; }
#main-content[data-workspace-active-page="qwen"] #agent-workspaces > .lai-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
#main-content[data-workspace-active-page="qwen"] .lai-qwen-conversation-first { padding-top: 0; }

/* The order tab row becomes a first-class grid item; search and filters remain
   immediately below it and do not enlarge the fixed navigation strip. */
.main-content .r96-order-register { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.main-content .r96-order-toolbar { display: contents; }
.main-content .r96-order-toolbar > .ld-work-tabs,
.main-content .r96-order-register > :is(.r96-order-actions, [data-orders-table], .r96-register-tools, p) { grid-column: 1 / -1; }
.main-content .r96-order-search { grid-column: 1; margin-bottom: 9px; }
.main-content .r96-order-filters { grid-column: 2; margin: 0 0 9px 12px; }
.ws-today-intro[data-role="老板"] { display: none; }
.ws-secondary-summary,
.desk-advanced,
.ws-activity { margin: 14px 0; border-top: 1px solid var(--faos-border); color: var(--faos-text-secondary); font-size:12px; }
.desk-advanced > summary,
.ws-activity > summary { padding: 10px 0; cursor: pointer; }

.main-content .metric-grid.work-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--faos-border);
  border-radius: 6px;
}

.main-content .work-summary-grid .metric-card { min-height: 58px; justify-content: center; gap: 1px; padding: 8px 12px; border: 0; border-right: 1px solid var(--faos-border); border-radius: 0; }
.main-content .work-summary-grid .metric-card:last-child { border-right: 0; }
.main-content .work-summary-grid .metric-label { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.main-content .work-summary-grid .metric-value { margin: 0; font-size: 18px; line-height: 1.25; }
.main-content .work-summary-grid .metric-note { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }

.business-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 14px;
  overflow: hidden;
  border-top: 1px solid var(--faos-border);
  border-bottom: 1px solid var(--faos-border);
  background: transparent;
}

.business-snapshot > button {
  display: grid;
  min-width: 0;
  min-height: 42px;
  grid-template-columns: minmax(112px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border: 0;
  border-right: 1px solid var(--faos-border);
  border-radius: 0;
  color: var(--faos-text-secondary);
  background: transparent;
  text-align: left;
}

.business-snapshot > button:last-child { border-right: 0; }
.business-snapshot > button:hover { background: var(--faos-hover); }
.business-snapshot > button.is-risk { box-shadow: inset 3px 0 0 #c86f55; background: #fffaf7; }
.business-snapshot > button > span { overflow: hidden; color: var(--faos-text-secondary); font-size: var(--faos-font-meta); text-overflow: ellipsis; white-space: nowrap; }
.business-snapshot > button > strong { color: var(--faos-text); font-size: 16px; font-weight: 650; white-space: nowrap; }
.business-snapshot > button > strong small { margin-left: 4px; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); font-weight: 500; }
.business-snapshot > button > em { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); font-style: normal; white-space: nowrap; }
.business-risk-marker { margin-left: 6px; color: #a84f39; font-size: var(--faos-font-meta); font-weight: 650; }
.business-finance-snapshot { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.business-finance-snapshot > button {
  min-height: 54px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "note note";
  row-gap: 3px;
}
.business-finance-snapshot > button > span { grid-area: label; }
.business-finance-snapshot > button > strong { grid-area: value; }
.business-finance-snapshot > button > em {
  grid-area: note;
  overflow: hidden;
  text-overflow: ellipsis;
}
.business-cash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 9px;
  overflow: hidden;
  border: 1px solid var(--faos-border);
  border-radius: 6px;
}
.business-cash-grid > button {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 9px 11px;
  border: 0;
  border-right: 1px solid var(--faos-border);
  border-radius: 0;
  color: var(--faos-text-secondary);
  background: transparent;
  text-align: left;
}
.business-cash-grid > button:last-child { border-right: 0; }
.business-cash-grid > button:hover { background: var(--faos-hover); }
.business-cash-grid span,
.business-cash-grid em { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); font-style: normal; }
.business-cash-grid strong { color: var(--faos-text); font-size: 17px; font-weight: 650; }
.business-cash-plan .notice { display: flex; gap: 7px; padding: 7px 9px; border-color: var(--faos-border); color: var(--faos-text-secondary); background: var(--faos-subtle); }
.business-cash-plan .notice strong { flex: 0 0 auto; color: var(--faos-text); }

.object-overview {
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--faos-border);
}

.object-overview > .section-head { margin-bottom: 10px; }
.object-focus-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--faos-border);
  border-radius: 6px;
  background: #fff;
}

.object-focus-strip > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 9px 11px;
  border-right: 1px solid var(--faos-border);
  border-bottom: 1px solid var(--faos-border);
}

.object-focus-strip > div:nth-child(3),
.object-focus-strip > div:last-child { border-right: 0; }
.object-focus-strip > div:nth-last-child(-n + 2) { border-bottom: 0; }
.object-focus-strip > .is-wide { grid-column: span 2; }
.object-focus-strip span { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.object-focus-strip strong { overflow-wrap: anywhere; color: var(--faos-text); font-size: var(--faos-font-body); font-weight: 620; }

.object-properties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0 0;
  border-top: 1px solid var(--faos-border);
}

.object-properties > div {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(105px, .42fr) minmax(0, 1fr);
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--faos-border);
}

.object-properties > div:nth-child(odd) { margin-right: 12px; }
.object-properties > div:nth-child(even) { margin-left: 12px; }
.object-properties dt { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.object-properties dd { margin: 0; overflow-wrap: anywhere; color: var(--faos-text); font-size: var(--faos-font-body); }

.context-rail {
  position: sticky;
  top: var(--faos-topbar-height);
  align-self: flex-start;
  display: none;
  width: var(--faos-inspector-width);
  height: calc(100dvh - var(--faos-topbar-height));
  flex: 0 0 var(--faos-inspector-width);
  flex-direction: column;
  overflow: hidden;
  padding: 12px 14px 16px;
  border-left: 1px solid var(--faos-border);
  color: var(--faos-text-secondary);
  background: #fbfbfa;
  box-shadow: none;
  font-size: var(--faos-font-body);
}

.context-rail-backdrop { display: none; }
.context-rail.is-open { display: flex; }
.context-rail[data-mode="advice"].is-open {
  position: fixed;
  top: var(--faos-topbar-height);
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(var(--faos-inspector-width), 94vw);
  height: calc(100dvh - var(--faos-topbar-height));
  min-height: calc(100dvh - var(--faos-topbar-height));
  max-height: calc(100dvh - var(--faos-topbar-height));
  padding: 0;
  border-left-color: #dfe4ee;
  background: #fff;
  box-shadow: -20px 0 50px rgba(31, 40, 58, .18);
}
.context-rail-backdrop:not([hidden]) {
  position: fixed;
  top: var(--faos-topbar-height);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 55;
  display: block;
  padding: 0;
  border: 0;
  background: rgba(31, 40, 58, .2);
  backdrop-filter: blur(1px);
}
.context-heading { display: flex; min-height: 30px; align-items: center; justify-content: space-between; color: var(--faos-text); font-size: var(--faos-font-body); font-weight: 650; }
.context-ai-heading { min-height: 58px; gap: 16px; padding: 10px 16px 9px 20px; border-bottom: 1px solid var(--faos-border); }
.context-ai-heading > div { display: grid; min-width: 0; gap: 2px; }
.context-ai-heading strong { color: var(--faos-text); font-size: 15px; font-weight: 680; }
.context-ai-heading small { max-width: 430px; overflow: hidden; color: var(--faos-text-tertiary); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.context-ai-close { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; padding: 0; border: 0; border-radius: 8px; color: var(--faos-text-secondary); background: transparent; font-size: 22px; font-weight: 400; line-height: 1; }
.context-ai-close:hover { color: var(--faos-text); background: var(--faos-hover); }
.context-close { display: inline-flex; color: var(--faos-text-tertiary); }
.context-page { margin: 3px 0 10px; padding: 10px 11px; border: 1px solid var(--faos-border); border-radius: 6px; background: #fff; }
.context-role { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.context-page h2 { margin: 5px 0 2px; color: var(--faos-text); font-size: 14px; line-height: 1.4; }
.context-page p { margin: 0; color: var(--faos-text-secondary); font-size: var(--faos-font-body); line-height: 1.5; }
.context-tabs { display: flex; gap: 13px; margin: 0 0 8px; border-bottom: 1px solid var(--faos-border); }
.context-tabs button { padding: 7px 0 6px; border: 0; border-bottom: 2px solid transparent; color: var(--faos-text-tertiary); background: transparent; font-size: var(--faos-font-meta); }
.context-tabs button[aria-selected="true"] { border-bottom-color: var(--faos-accent); color: var(--faos-text); font-weight: 620; }
.context-tool-scroll,
.composer-scroll { min-height: 0; flex: 1 1 auto; overflow-y: auto; scrollbar-color: #cfcdc7 transparent; scrollbar-width: thin; }
.context-properties { display: grid; margin: 0; }
.context-properties > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; padding: 8px 2px; border-bottom: 1px solid #eeede9; }
.context-properties dt { color: var(--faos-text-tertiary); }
.context-properties dd { margin: 0; color: var(--faos-text); overflow-wrap: anywhere; }
.context-checks { padding: 12px 2px 4px; }
.context-checks h3,
.context-tools h3,
.context-composer h3 { margin: 0 0 8px; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); font-weight: 620; }
.context-checks ol { margin: 0; padding-left: 17px; color: var(--faos-text-secondary); font-size: var(--faos-font-body); line-height: 1.7; }
.context-tools { padding: 10px 0; }
.context-tools button,
.context-prompt button,
.context-preference { display: flex; width: 100%; min-height: 30px; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0; padding: 6px 7px; border: 0; border-radius: 5px; color: var(--faos-text-secondary); background: transparent; font-size: var(--faos-font-body); text-align: left; }
.context-tools button:hover,
.context-prompt button:hover,
.context-preference:hover { color: var(--faos-text); background: var(--faos-hover); }
.context-composer { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; padding: 0; border: 0; }
.context-rail[data-mode="advice"] .composer-scroll { padding: 24px 24px 8px; }
.composer-star { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #dde2ec; border-radius: 11px; color: var(--faos-accent); background: linear-gradient(145deg, #fff 10%, #eef0ff 100%); box-shadow: 0 5px 16px rgba(69, 76, 174, .1); }
.composer-intro { display: flex; max-width: 430px; align-items: flex-start; gap: 12px; margin: 14px auto 10px; padding: 2px 0 4px; }
.composer-intro h3 { margin: 1px 0 5px; color: var(--faos-text); font-size: 18px; font-weight: 680; letter-spacing: -.02em; }
.composer-intro p { margin: 0; }
.composer-intro p,
.context-model-note { color: var(--faos-text-tertiary); font-size:12px; line-height: 1.55; }
.composer-presets { display: grid; max-width: 430px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px auto 12px; }
.composer-presets button { display: grid; gap: 3px; min-height: 60px; padding: 10px 12px; border: 1px solid #e1e5ed; border-radius: 12px; color: var(--faos-text-secondary); background: #fff; box-shadow: 0 3px 12px rgba(31, 40, 58, .035); font-size:12px; text-align: left; }
.composer-presets button:hover,
.composer-presets button[aria-pressed="true"] { border-color: #aeb4f2; color: var(--faos-text); background: var(--faos-accent-soft); }
.composer-presets button strong { font-size: 12px; font-weight: 650; }
.composer-presets button small { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.composer-plan-disclosure { max-width: 430px; margin: 0 auto 12px; color: var(--faos-text-tertiary); font-size: 12px; }
.composer-plan-disclosure > summary { padding: 6px 2px; cursor: pointer; }
.composer-plan-disclosure .context-ai-plan { margin-top: 4px; }
.composer-evidence { margin-bottom: 10px; padding: 10px; border: 1px solid var(--faos-border); border-radius: 6px; background: #fff; }
.composer-evidence p { margin: 4px 0; color: var(--faos-text); font-weight: 620; }
.composer-evidence small { color: var(--faos-text-tertiary); line-height: 1.5; }
.context-ai-plan { margin: 8px 0 10px; border: 1px solid var(--faos-border); border-radius: 7px; background: #fff; overflow: hidden; }
.context-ai-plan > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--faos-border); }
.context-ai-plan > header div { display: grid; gap: 2px; }
.context-ai-plan > header small { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.context-ai-plan > header strong { color: var(--faos-text); font-size: 12px; }
.context-ai-plan > header > span { padding: 3px 6px; border-radius: 999px; color: var(--faos-accent-strong); background: var(--faos-accent-soft); font-size: var(--faos-font-meta); white-space: nowrap; }
.context-ai-plan.is-page_rules > header > span,
.context-ai-plan.is-file_rules > header > span { color: var(--faos-text-secondary); background: var(--faos-hover); }
.context-ai-plan dl { display: grid; margin: 0; }
.context-ai-plan dl > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; padding: 6px 10px; border-bottom: 1px solid #eeede9; }
.context-ai-plan dt { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.context-ai-plan dd { margin: 0; color: var(--faos-text-secondary); font-size: var(--faos-font-meta); line-height: 1.45; overflow-wrap: anywhere; }
.context-ai-plan > p { margin: 0; padding: 8px 10px; color: var(--faos-text-tertiary); background: #fafaf8; font-size: var(--faos-font-meta); line-height: 1.5; }
.context-ai-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.context-ai-plan-grid section { padding: 8px 10px; }
.context-ai-plan-grid section + section { border-left: 1px solid var(--faos-border); }
.context-ai-plan-grid h4 { margin: 0 0 5px; color: var(--faos-text); font-size: var(--faos-font-meta); }
.context-ai-plan-grid ul { display: grid; gap: 4px; margin: 0; padding-left: 14px; color: var(--faos-text-secondary); font-size: var(--faos-font-meta); line-height: 1.45; }
.composer-file { max-width: 430px; margin: 4px auto 0; }
.composer-dropzone { display: grid; width: min(100%, 430px); gap: 3px; margin: 8px auto; padding: 12px 10px; border: 1px dashed var(--faos-border-strong); border-radius: 10px; color: var(--faos-text-secondary); background: #fbfcff; text-align: center; }
.composer-dropzone:hover,
.composer-dropzone.is-dragging { border-color: var(--faos-accent); color: var(--faos-accent-strong); background: var(--faos-accent-soft); }
.composer-dropzone span { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); line-height: 1.45; }
.composer-result { margin: 9px 0; border-top: 1px solid var(--faos-border); }
.composer-result summary { padding: 9px 0; color: var(--faos-text); font-weight: 620; cursor: pointer; }
.composer-result textarea { min-height: 150px; font-size: 12px; }
.composer-result .text-button { margin-top: 5px; }
.composer-result-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; padding-top: 4px; }
.composer-result-actions .text-button { min-height: 28px; padding: 4px 0; color: var(--faos-accent-strong); text-align: left; }
.composer-result-actions .text-button:disabled { color: var(--faos-text-tertiary); }
.composer-message { min-height: 18px; margin: 5px 0; color: var(--faos-text-secondary); font-size: var(--faos-font-meta); line-height: 1.45; overflow-wrap: anywhere; }
.context-v2-result { margin: 9px 0; border: 1px solid var(--faos-border); border-radius: 7px; background: #fff; overflow: hidden; }
.context-v2-result > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--faos-border); }
.context-v2-route { margin: 0; padding: 8px 10px; color: var(--faos-text-secondary); background: var(--faos-hover); font-size: var(--faos-font-meta); }
.context-v2-actual-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; padding: 8px 10px; border-top: 1px solid var(--faos-border); color: var(--faos-text-secondary); font-size: var(--faos-font-meta); }
.context-v2-actual-chain > strong { color: var(--faos-text); }
.context-v2-actual-chain > span { padding: 3px 6px; border-radius: 999px; background: var(--faos-accent-soft); }
.context-v2-actual-chain > details { width: 100%; }
.context-v2-actual-chain summary { color: var(--faos-accent-strong); cursor: pointer; }
.context-v2-actual-chain dl { display: grid; gap: 4px; margin: 7px 0 0; }
.context-v2-actual-chain dl > div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 7px; }
.context-v2-actual-chain dt { color: var(--faos-text-tertiary); }
.context-v2-actual-chain dd { margin: 0; overflow-wrap: anywhere; }
.context-v2-result > p:not(.context-v2-route) { margin: 8px 10px; font-size: var(--faos-font-meta); line-height: 1.5; }
.context-v2-section { padding: 8px 10px; border-top: 1px solid var(--faos-border); }
.context-v2-section h4 { margin: 0 0 5px; color: var(--faos-text); font-size: 12px; }
.context-v2-section h4 small { color: var(--faos-text-tertiary); }
.context-v2-section ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.context-v2-section li { padding-left: 8px; border-left: 2px solid var(--faos-border-strong); }
.context-v2-section li strong,
.context-v2-section li p,
.context-v2-section li small { display: block; margin: 0; overflow-wrap: anywhere; }
.context-v2-section li p { margin-top: 2px; color: var(--faos-text-secondary); font-size: var(--faos-font-meta); line-height: 1.45; }
.context-v2-section li small { margin-top: 2px; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.context-v2-result > footer { padding: 8px 10px; border-top: 1px solid var(--faos-border); color: var(--faos-text-tertiary); background: #fafaf8; font-size: var(--faos-font-meta); line-height: 1.5; }
.composer-footer { position: relative; margin-top: auto; padding: 12px 20px 10px; border-top: 1px solid var(--faos-border); background: rgba(250, 251, 254, .96); }
.composer-footer label,
.context-composer label { display: grid; gap: 5px; color: var(--faos-text-tertiary); font-size:12px; }
.context-composer .composer-footer textarea { min-height: 86px; max-height: 180px; padding: 13px 54px 36px 48px; border-color: #d8deea; border-radius: 16px; background: #fff; box-shadow: 0 7px 24px rgba(31, 40, 58, .09); font-size: 13px; line-height: 1.55; resize: vertical; }
.context-compose-actions { position: absolute; right: 30px; bottom: 51px; left: 30px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.context-compose-actions button { pointer-events: auto; }
.composer-attach,
.composer-send { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border-radius: 50%; font-size: 17px; line-height: 1; }
.composer-attach { border: 1px solid #d8deea; color: var(--faos-text-secondary); background: #fff; }
.composer-attach:hover { color: var(--faos-text); background: var(--faos-hover); }
.composer-send { border: 0; color: #fff; background: var(--faos-accent-strong); box-shadow: 0 5px 12px rgba(69, 76, 174, .22); }
.composer-send:disabled { color: #fff; background: #aeb5c3; box-shadow: none; }
.context-workbench-link { width: 100%; margin-top: 5px; padding: 5px 7px 0; border: 0; color: var(--faos-text-tertiary); background: transparent; font-size: var(--faos-font-meta); text-align: center; }
.context-workbench-link:hover { background: var(--faos-hover); }

.context-rail-toggle {
  position: fixed;
  right: 17px;
  bottom: 17px;
  z-index: 38;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--faos-border-strong);
  border-radius: 16px;
  color: var(--faos-text-secondary);
  background: #fff;
  box-shadow: 0 8px 24px rgba(42, 40, 34, .12);
  font-size:12px;
  font-weight: 620;
}

.application:has(.context-rail.is-open) .context-rail-toggle { display: none; }

/* Today is an action queue. The summary stays secondary and never becomes a KPI wall. */
.decision-desk { color: var(--faos-text); font-size: var(--faos-font-body); }
.desk-focus-bar {
  display: flex;
  min-height: 34px;
  align-items: center;
  margin: -3px 0 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--faos-border);
  scrollbar-width: none;
}
.desk-focus-bar::-webkit-scrollbar { display: none; }
.desk-focus-bar > button {
  display: inline-flex;
  min-width: max-content;
  align-items: baseline;
  gap: 5px;
  padding: 7px 10px;
  border: 0;
  border-right: 1px solid var(--faos-border);
  color: var(--faos-text-secondary);
  background: transparent;
  font-size:12px;
}
.desk-focus-bar > button:first-child { padding-left: 0; }
.desk-focus-bar > button:hover { color: var(--faos-text); }
.desk-focus-bar strong { color: var(--faos-text); font-size: 12px; font-variant-numeric: tabular-nums; }
.desk-focus-bar small { display: none; }
.desk-scope { display: flex; min-height: 30px; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 7px; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.desk-link { padding: 2px 0; border: 0; color: var(--faos-accent-strong); background: transparent; font-size: var(--faos-font-control); text-align: left; }
.desk-link:hover { text-decoration: underline; }

.desk-order-supervision {
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--faos-border);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}
.desk-order-supervision > header,
.decision-desk > article > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 7px; border: 0; }
.desk-kicker { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); font-weight: 620; }
.desk-order-supervision h2,
.decision-desk h2 { margin: 2px 0 0; color: var(--faos-text); font-size: 14px; font-weight: 630; }
.desk-order-supervision h2 small { display: inline-grid; min-width: 17px; height: 17px; margin-left: 4px; place-items: center; border-radius: 8px; color: var(--faos-text-secondary); background: var(--faos-hover); font-size:12px; vertical-align: 1px; }
.desk-header-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.desk-header-actions .button,
.desk-header-actions .secondary-button { min-height: 27px; padding: 4px 7px; font-size: var(--faos-font-control); }
.desk-order-filters { display: flex; align-items: center; gap: 13px; padding: 0 12px 6px; overflow-x: auto; border-bottom: 1px solid var(--faos-border); scrollbar-width: none; }
.desk-order-filters button { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; padding: 6px 0; border: 0; border-bottom: 2px solid transparent; color: var(--faos-text-tertiary); background: transparent; font-size: var(--faos-font-meta); }
.desk-order-filters button[aria-pressed="true"] { border-bottom-color: var(--faos-accent); color: var(--faos-text); font-weight: 620; }
.desk-order-filters button b { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; color: var(--faos-text-secondary); background: var(--faos-hover); font-size:12px; line-height: 16px; text-align: center; }
.desk-order-filters button i { width: 6px; height: 6px; border-radius: 50%; background: var(--faos-text-tertiary); }
.desk-order-filters button i.danger { background: var(--faos-danger); }
.desk-order-filters button i.warning { background: var(--faos-warning); }
.desk-order-filters button i.attention { background: var(--faos-accent); }
.desk-order-filters button i.success { background: var(--faos-success); }
.desk-order-filters > span { margin-left: auto; flex: 0 0 auto; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.desk-order-filters > span em { color: var(--faos-accent-strong); font-style: normal; font-weight: 700; }
.desk-orders-table { overflow: visible; border: 0; border-radius: 0; }
.desk-orders-table table { width: 100%; min-width: 0; table-layout: fixed; }
.desk-orders-table th:nth-child(1),
.desk-orders-table td:nth-child(1) { width: 24%; }
.desk-orders-table th:nth-child(2),
.desk-orders-table td:nth-child(2) { width: 13%; }
.desk-orders-table th:nth-child(3),
.desk-orders-table td:nth-child(3) { width: 33%; }
.desk-orders-table th:nth-child(4),
.desk-orders-table td:nth-child(4) { width: 18%; }
.desk-orders-table th:nth-child(5),
.desk-orders-table td:nth-child(5) { width: 12%; }
.desk-orders-table th { padding: 6px 8px; }
.desk-orders-table td { height: 48px; min-width: 0; padding: 5px 8px; overflow: hidden; vertical-align: middle; }
.desk-order-row { height: 48px; }
.desk-order-row td:first-child { border-left: 3px solid transparent; }
.desk-order-row.urgency-danger td:first-child { border-left-color: var(--faos-danger); }
.desk-order-row.urgency-warning td:first-child { border-left-color: #c68b3c; }
.desk-order-row.urgency-attention td:first-child { border-left-color: var(--faos-accent); }
.desk-order-row.urgency-verify td:first-child { border-left-color: #aaa79f; }
.desk-order-identity > div { display: flex; min-width: 0; align-items: center; gap: 5px; }
.desk-order-link { min-width: 0; padding: 0; overflow: hidden; border: 0; color: #4c4a72; background: transparent; font-size: var(--faos-font-body); font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.desk-order-link:hover { color: var(--faos-accent-strong); text-decoration: underline; }
.desk-urgency { display: inline-flex; flex: 0 0 auto; padding: 1px 5px; border-radius: 9px; font-size:12px; font-weight: 650; line-height: 16px; }
.desk-urgency.danger { color: #a83f45; background: var(--faos-danger-soft); }
.desk-urgency.warning { color: #8b5b1c; background: var(--faos-warning-soft); }
.desk-urgency.attention { color: #5551b4; background: var(--faos-accent-soft); }
.desk-urgency.verify { color: var(--faos-text-secondary); background: var(--faos-hover); }
.desk-urgency.success { color: var(--faos-success); background: var(--faos-success-soft); }
.desk-order-identity > small,
.desk-order-node > small { display: block; min-width: 0; margin-top: 2px; overflow: hidden; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); text-overflow: ellipsis; white-space: nowrap; }
.desk-queue-status { color: var(--faos-text-secondary); }
.desk-queue-status > strong,
.desk-queue-status > small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-queue-status > strong { color: var(--faos-text); font-size: var(--faos-font-meta); font-weight: 620; }
.desk-queue-status > small { margin-top: 2px; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.desk-queue-status .desk-progress-unknown { color: #8b5b1c; font-size: inherit; font-weight: 620; }
.desk-progress-title { display: flex; min-width: 0; align-items: center; gap: 5px; color: var(--faos-text-tertiary); font-size:12px; white-space: nowrap; }
.desk-progress-title strong { color: var(--faos-accent-strong); font-size: var(--faos-font-meta); font-weight: 680; }
.desk-progress-title b { font-size: inherit; font-weight: 620; }
.desk-progress-unknown { color: var(--faos-text-tertiary); }
.desk-workflow-track { display: grid; grid-template-columns: repeat(6, minmax(5px, 1fr)); gap: 3px; height: 4px; margin: 5px 0 0; }
.desk-workflow-track i { border-radius: 2px; background: #e9e8e4; }
.desk-workflow-track i.is-done { background: var(--faos-accent); }
.desk-order-node > b,
.desk-blocker > b,
.desk-next-action > b { display: block; min-width: 0; overflow: hidden; color: var(--faos-text); font-size: var(--faos-font-meta); font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.desk-blocker > b { color: var(--faos-text-secondary); }
.desk-blocker.has-blocker > b { color: #9f3e43; }
.desk-next-action { display: flex; min-width: 0; align-items: center; gap: 3px; margin-top: 3px; }
.desk-next-action > b { flex: 1 1 auto; }
.desk-next-action > span { flex: 0 0 auto; color: var(--faos-text-tertiary); font-size:12px; white-space: nowrap; }
.desk-responsibility { display: grid; min-width: 0; gap: 0; overflow: hidden; color: var(--faos-text-secondary); font-size: var(--faos-font-meta); }
.desk-responsibility span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-responsibility span:last-child::before { content: "→ "; color: var(--faos-text-tertiary); }
.desk-responsibility i { display: none; }
.desk-order-detail-link { margin-top: 0; padding: 0; border: 0; color: var(--faos-accent-strong); background: transparent; font-size: var(--faos-font-meta); white-space: nowrap; }
.desk-order-detail-link:hover { text-decoration: underline; }
.desk-order-empty td { height: 48px; color: var(--faos-text-tertiary); }
.desk-order-supervision > footer { display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px; border-top: 1px solid var(--faos-border); color: var(--faos-text-tertiary); background: #fafaf8; font-size: var(--faos-font-meta); line-height: 1.5; }

@media (min-width: 761px) {
  .desk-orders-table tr.desk-order-row,
  .desk-orders-table tr.desk-order-row > td { height: 44px; max-height: 44px; }
  .desk-orders-table tr.desk-order-row > td { padding-block: 3px; }
  .desk-order-identity > div,
  .desk-order-link,
  .desk-order-identity > small,
  .desk-queue-status > strong,
  .desk-queue-status > small,
  .desk-order-node > b,
  .desk-order-node > small,
  .desk-blocker > b,
  .desk-next-action,
  .desk-next-action > b,
  .desk-next-action > span,
  .desk-responsibility,
  .desk-order-detail-link { line-height: 14px; }
  .desk-order-identity > small,
  .desk-order-node > small,
  .desk-order-detail-link { margin-top: 0; }
}

.decision-desk { display: flex; flex-direction: column; }
.desk-tabs { position: sticky; top: var(--faos-topbar-height); z-index: 30; display: flex; order: -1; min-height: 40px; align-items: end; gap: 22px; margin: 0 0 14px; overflow-x: auto; border-bottom: 1px solid var(--faos-border); background: rgba(255,255,255,.96); box-shadow: 0 7px 10px -12px rgba(32,41,56,.55); backdrop-filter: blur(12px); }
.desk-tabs button { flex: 0 0 auto; padding: 8px 0 7px; border: 0; border-bottom: 2px solid transparent; color: var(--faos-text-tertiary); background: transparent; font-size: var(--faos-font-meta); }
.desk-tabs button[aria-selected="true"] { border-bottom-color: var(--faos-accent); color: var(--faos-text); font-weight: 620; }
.desk-tabs button > span { display: inline-grid; min-width: 18px; height: 18px; margin-left: 4px; place-items: center; border-radius: 9px; color: #315e50; background: #e8f2ee; font-size: 12px; font-weight: 650; }
.desk-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 2px; border-top: 1px solid var(--faos-border); color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.desk-pagination > div { display: flex; flex-wrap: wrap; gap: 4px; }
.desk-pagination button { min-width: 28px; height: 28px; padding: 0 8px; border: 1px solid var(--faos-border); border-radius: 6px; color: var(--faos-text-secondary); background: #fff; }
.desk-pagination button[aria-current="page"] { border-color: var(--faos-accent); color: var(--faos-accent); background: var(--faos-accent-soft); font-weight: 680; }
.desk-pagination button:disabled { opacity: .45; }
.desk-decision,
.desk-risk,
.desk-work { margin: 0 0 14px; overflow: hidden; border: 0; border-bottom: 1px solid var(--faos-border); border-radius: 0; background: #fff; }
.desk-review-guide { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--faos-border); color: var(--faos-text-secondary); background: #f7faf8; font-size: var(--faos-font-meta); }
.desk-review-queue td strong,
.desk-review-queue td small { display: block; }
.desk-review-queue td small { margin-top: 3px; color: var(--faos-text-tertiary); }
.desk-decision > div { padding: 9px 12px 12px; color: var(--faos-text-secondary); line-height: 1.65; }
.desk-empty-line { display: flex; min-height: 42px; flex-wrap: wrap; align-items: center; gap: 9px; padding: 9px 0; color: var(--faos-text-tertiary); font-size: var(--faos-font-body); }
.desk-empty-line > span { color: var(--faos-text); font-weight: 620; }
.desk-empty-line > p { flex: 1; margin: 0; }
.decision-desk table { width: 100%; font-size: var(--faos-font-body); }
.desk-task-detail { padding: 14px; border-top: 1px solid var(--faos-border); background: #fafaf8; }

/* Established work surfaces keep one title, one compact view bar and dense lists. */
.r96-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.r96-order-register { margin: 0; padding: 0; color: var(--faos-text); background: #fff; font-size: var(--faos-font-body); }
.main-content:has([data-local-orders-register]:not([hidden]):not(.ws-offstage)) > .ws-pages { display: none; }
.r96-order-actions,
.r96-order-toolbar,
.r96-table-foot,
.r96-register-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.r96-order-actions { margin: 0 0 12px; }
.r96-order-toolbar { margin: 0 0 9px; }
.r96-order-toolbar .ld-work-tabs { min-width: 0; flex: 1; margin: 0; padding: 0; overflow-x: auto; border: 0; }
.r96-order-toolbar .ld-work-tabs button { padding: 7px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--faos-text-tertiary); background: transparent; font-size: var(--faos-font-control); white-space: nowrap; }
.r96-order-toolbar .ld-work-tabs button.is-active { border-bottom-color: var(--faos-accent); color: var(--faos-text); }
.r96-order-search { min-width: 105px; flex: 0 1 180px; }
.r96-order-search input { width: 100%; height: 28px; min-height: 28px; }
.r96-order-filters { position: relative; flex: none; color: var(--faos-text-secondary); font-size: var(--faos-font-control); }
.r96-order-filters summary { padding: 7px 0; cursor: pointer; list-style: none; }
.r96-order-filters[open] > div { position: absolute; top: 100%; right: 0; z-index: 20; display: grid; width: 220px; gap: 9px; padding: 12px; border: 1px solid var(--faos-border); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.r96-orders-table table { width: 100%; min-width: 660px; text-align: left; }
.r96-orders-table td { height: 62px; }
.r96-progress { display: flex; align-items: center; gap: 7px; }
.r96-progress progress { width: 72px; height: 4px; }
.r96-table-foot,
.r96-register-tools { margin-top: 12px; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.r96-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--faos-border); color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.r96-pagination > div { display: flex; flex-wrap: wrap; gap: 4px; }
.r96-pagination button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid var(--faos-border-strong); border-radius: 8px; color: var(--faos-text-secondary); background: #fff; font-size: 12px; }
.r96-pagination button:hover:not(:disabled) { border-color: #aeb4f2; color: var(--faos-accent-strong); background: var(--faos-accent-soft); }
.r96-pagination button.is-active { border-color: var(--faos-accent); color: #fff; background: var(--faos-accent); }
.r96-pagination button:disabled { opacity: .42; }
.r96-register-tools { align-items: flex-start; padding-top: 12px; border-top: 1px solid var(--faos-border); }

.r96-style-register { margin: 0; min-width: 0; color: var(--faos-text); }
.r96-style-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  padding: 2px 0 11px;
  border-bottom: 1px solid var(--faos-border);
}
.r96-style-summary > div { display: flex; min-width: 0; align-items: baseline; gap: 8px; }
.r96-style-summary strong { font-size: 14px; font-weight: 650; }
.r96-style-summary span,
.r96-style-summary p { margin: 0; color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); }
.r96-style-list { min-width: 0; }
.r96-style-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 2.4fr) auto;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--faos-border);
}
.r96-style-identity { display: grid; min-width: 0; gap: 3px; }
.r96-style-identity small,
.r96-style-identity em,
.r96-style-facts dt,
.r96-style-stage span,
.r96-style-next span { color: var(--faos-text-tertiary); font-size: var(--faos-font-meta); font-style: normal; }
.r96-style-identity strong { overflow-wrap: anywhere; font-size: 14px; font-weight: 650; }
.r96-style-identity span,
.r96-style-facts dd { overflow-wrap: anywhere; font-size: var(--faos-font-body); }
.r96-style-facts { display: grid; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.r96-style-facts > div { min-width: 0; }
.r96-style-facts dt { margin-bottom: 3px; }
.r96-style-facts dd { display: grid; gap: 4px; margin: 0; color: var(--faos-text-secondary); }
.r96-style-facts dd > strong { color: var(--faos-text); font-weight: 620; }
.r96-style-next { grid-column: span 2; }
.r96-style-stage { display: grid; min-width: 0; grid-template-columns: minmax(48px, 1fr) auto; gap: 8px; align-items: center; }
.r96-style-stage progress { width: 100%; height: 5px; }
.r96-style-exception.is-critical dd,
.r96-style-exception.is-high dd,
.r96-style-exception.is-blocked dd { color: var(--faos-danger); }
.r96-style-exception.is-medium dd,
.r96-style-exception.is-missing dd { color: var(--faos-warning); }
.r96-style-exception.is-clear dd { color: var(--faos-success); }
.r96-style-action { padding-top: 17px; white-space: nowrap; }
.r96-style-empty,
.r96-style-error { display: grid; justify-items: start; gap: 8px; padding: 20px 0; color: var(--faos-text-secondary); font-size: var(--faos-font-body); }
.r96-style-error { color: var(--faos-danger); }

[data-local-sales-journey] > .lsj-workbench > .lsj-work-head,
.ld-professional > .ld-list-heading,
.main-content[data-workspace-active-page="progress"] .lop-root > .section-head { min-height: 28px; justify-content: flex-end; margin-top: -5px; padding: 0 0 7px; }
[data-local-sales-journey] > .lsj-workbench > .lsj-work-head > div:first-child,
.ld-professional > .ld-list-heading > div:first-child,
.main-content[data-workspace-active-page="progress"] .lop-root > .section-head > div:first-child { display: none; }
[data-local-sales-journey] .lsj-filters .selected,
[data-local-sales-journey] .lsj-detail-tabs .selected { border-bottom-color: var(--faos-accent); color: var(--faos-accent-strong); }
[data-local-sales-journey] .lsj-table tr.is-selected td { background: var(--faos-accent-soft); }

.main-content .governance-safety-banner { min-height: 44px; padding: 8px 10px; border-radius: 6px; box-shadow: none; }
.main-content .governance-safety-banner > div { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 7px 9px; width: 100%; }
.main-content .governance-safety-banner h2 { margin: 0; color: var(--faos-text); font-size:12px; }
.main-content .governance-safety-banner p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--faos-text-secondary); font-size:12px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* Order progress remains one continuous object surface, not a metric-card wall. */
.main-content[data-workspace-active-page="progress"] .lop-root {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.main-content[data-workspace-active-page="progress"] .lop-list {
  border-color: var(--faos-border);
  border-radius: 6px;
}

.main-content[data-workspace-active-page="progress"] .lop-row {
  padding: 11px 12px;
}

.main-content[data-workspace-active-page="progress"] .lop-row.is-selected {
  background: var(--faos-active);
  box-shadow: inset 2px 0 var(--faos-accent);
}

.main-content[data-workspace-active-page="progress"] .lop-detail {
  margin-top: 14px;
  padding-top: 14px;
}

.main-content[data-workspace-active-page="progress"] .lop-production-timeline {
  border-color: var(--faos-border);
  border-radius: 6px;
  background: #fbfbfa;
}

.main-content[data-workspace-active-page="progress"] .lop-production-timeline li strong { font-size:12px; }
.main-content[data-workspace-active-page="progress"] .lop-production-timeline li em,
.main-content[data-workspace-active-page="progress"] .lop-production-timeline > footer { font-size:12px; }

.main-content[data-workspace-active-page="progress"] .lop-progress-grid,
.main-content[data-workspace-active-page="progress"] .lop-date-grid,
.main-content[data-workspace-active-page="progress"] .lop-quantity-grid {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--faos-border);
  border-radius: 6px;
  background: #fff;
}

.main-content[data-workspace-active-page="progress"] .lop-progress-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.main-content[data-workspace-active-page="progress"] .lop-date-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.main-content[data-workspace-active-page="progress"] .lop-quantity-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.main-content[data-workspace-active-page="progress"] .lop-progress-grid > div,
.main-content[data-workspace-active-page="progress"] .lop-date,
.main-content[data-workspace-active-page="progress"] .lop-quantity-grid > div {
  gap: 5px;
  padding: 10px 11px;
  border: 0;
  border-right: 1px solid var(--faos-border);
  border-bottom: 1px solid var(--faos-border);
  border-radius: 0;
  background: transparent;
}

.main-content[data-workspace-active-page="progress"] .lop-progress-grid > div:nth-child(3n),
.main-content[data-workspace-active-page="progress"] .lop-date:nth-child(4n),
.main-content[data-workspace-active-page="progress"] .lop-quantity-grid > div:nth-child(4n) { border-right: 0; }

/* The former production page is now unified with delivery risk. */

@container (max-width: 900px) {
  .business-snapshot { grid-template-columns: minmax(0, 1fr); }
  .business-snapshot.business-finance-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-finance-snapshot > button:nth-child(odd) { border-right: 1px solid var(--faos-border); }
  .business-finance-snapshot > button:nth-child(2n) { border-right: 0; }
  .business-finance-snapshot > button:nth-last-child(-n + 2) { border-bottom: 0; }
  .business-snapshot > button { border-right: 0; border-bottom: 1px solid var(--faos-border); }
  .business-snapshot > button:last-child { border-bottom: 0; }
  .lop-row > span:nth-child(n + 2) {
    display: grid;
    min-width: 0;
    gap: 2px;
  }
  .lop-row > span:nth-child(n + 2)::before { color: var(--faos-text-tertiary); font-size:12px; }
  .lop-row > span:nth-child(2)::before { content: "合同交期"; }
  .lop-row > span:nth-child(3)::before { content: "供应商承诺"; }
  .lop-row > span:nth-child(4)::before { content: "本 PO 分配"; }
  .lop-row > span:nth-child(5)::before { content: "可发"; }
  .lop-row > span:nth-child(6)::before { content: "已发"; }
  .main-content[data-workspace-active-page="progress"] .lop-progress-grid,
  .main-content[data-workspace-active-page="progress"] .lop-date-grid,
  .main-content[data-workspace-active-page="progress"] .lop-quantity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-content[data-workspace-active-page="progress"] .lop-progress-grid > div:nth-child(3n),
  .main-content[data-workspace-active-page="progress"] .lop-quantity-grid > div:nth-child(4n) { border-right: 1px solid var(--faos-border); }
  .main-content[data-workspace-active-page="progress"] .lop-progress-grid > div:nth-child(2n),
  .main-content[data-workspace-active-page="progress"] .lop-quantity-grid > div:nth-child(2n) { border-right: 0; }
}

@container (max-width: 430px) {
  .main-content[data-workspace-active-page="progress"] .lop-progress-grid,
  .main-content[data-workspace-active-page="progress"] .lop-date-grid,
  .main-content[data-workspace-active-page="progress"] .lop-quantity-grid { grid-template-columns: minmax(0, 1fr); }
  .main-content[data-workspace-active-page="progress"] .lop-progress-grid > div,
  .main-content[data-workspace-active-page="progress"] .lop-date,
  .main-content[data-workspace-active-page="progress"] .lop-quantity-grid > div { border-right: 0; }
}

@container (max-width: 900px) {
  .my-work-grid,
  .my-work-lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .my-work-grid .risk-panel,
  .quick-create-panel { grid-column: 1 / -1; }
  .task-table-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (max-width: 620px) {
  .my-work-grid,
  .my-work-lower-grid,
  .card-grid.two,
  .dashboard-grid,
  .split-grid,
  .collaboration-grid,
  .governance-two-column,
  .governance-control-grid,
  .task-table-support-grid,
  .procurement-readiness { grid-template-columns: minmax(0, 1fr); }
  .task-table-filter-grid,
  .form-grid,
  .form-grid.three { grid-template-columns: minmax(0, 1fr); }
  .business-cash-grid,
  .business-snapshot.business-finance-snapshot { grid-template-columns: minmax(0, 1fr); }
  .business-cash-grid > button,
  .business-finance-snapshot > button { border-right: 0; border-bottom: 1px solid var(--faos-border); }
  .business-cash-grid > button:last-child,
  .business-finance-snapshot > button:last-child { border-bottom: 0; }
  .business-cash-plan .notice { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 1366px) {
  .main-content { padding-inline: 20px; }
  .topbar-action[aria-label="收件箱"] > span:last-child,
  .topbar-action[aria-label="打开当前页面 AI"] > span:last-child,
  #review-identity { display: none; }
  .review-environment-context .organization-context-control,
  .review-environment-context .workspace-control { flex-basis: 96px; max-width: 96px; }
}

@media (max-width: 1120px) {
  :root {
    --faos-primary-width: 96px;
    --faos-secondary-width: 180px;
  }
}

@media (max-width: 1180px) {
  .review-environment-context .organization-context-control,
  .review-environment-context .workspace-control { display: none; }
  .context-rail.is-open {
    position: fixed;
    top: var(--faos-topbar-height);
    right: 0;
    bottom: 0;
    z-index: 60;
    width: min(var(--faos-inspector-width), 94vw);
    height: calc(100dvh - var(--faos-topbar-height));
    min-height: calc(100dvh - var(--faos-topbar-height));
    max-height: calc(100dvh - var(--faos-topbar-height));
    box-shadow: -18px 0 42px rgba(42, 40, 34, .16);
  }
  .context-rail-backdrop:not([hidden]) {
    position: fixed;
    top: var(--faos-topbar-height);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 55;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(34, 33, 29, .28);
  }
  .application:has(.context-rail.is-open) .workspace { overflow: hidden; }
  .desk-orders-table th:nth-child(1),
  .desk-orders-table td:nth-child(1) { width: 30%; }
  .desk-orders-table th:nth-child(2),
  .desk-orders-table td:nth-child(2) { width: 12%; }
  .desk-orders-table th:nth-child(3),
  .desk-orders-table td:nth-child(3) { width: 32%; }
  .desk-orders-table th:nth-child(4),
  .desk-orders-table td:nth-child(4) { width: 18%; }
  .desk-orders-table th:nth-child(5),
  .desk-orders-table td:nth-child(5) { width: 8%; }
  .r96-style-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-work-surface { grid-template-columns: minmax(205px, .68fr) minmax(0, 1.32fr); }
  .inbox-v3-queue { grid-row: 1 / span 2; }
  .inbox-v3-evidence { grid-column: 2; border-right: 0; }
  .inbox-v3-actions { grid-column: 2; border-top: 1px solid var(--faos-border); }
}

@media (max-width: 900px) {
  .topbar { padding-inline: 9px; flex-wrap: nowrap; align-content: center; }
  .topbar-start,
  .topbar-end,
  .topbar .global-search { order: initial; }
  .topbar-end { margin-left: 0; }
  .history-controls,
  .local-review-status,
  .review-progress-link { display: none; }
  .topbar .global-search { max-width: none; }
  .main-content { width: 100%; padding: 15px 14px 48px; }
  .main-content .metric-grid.work-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-content .work-summary-grid .metric-card:nth-child(2) { border-right: 0; }
  .main-content .work-summary-grid .metric-card:nth-child(-n + 2) { border-bottom: 1px solid var(--faos-border); }
  .desk-order-filters > span { display: none; }
  .inbox-work-surface { grid-template-columns: 190px minmax(0, 1fr); }
  .inbox-v3-ingress-grid { grid-template-columns: minmax(170px, .58fr) minmax(240px, 1.42fr); }
  .business-snapshot { grid-template-columns: minmax(0, 1fr); }
  .business-snapshot > button { border-right: 0; border-bottom: 1px solid var(--faos-border); }
  .business-snapshot > button:last-child { border-bottom: 0; }
  .r96-order-toolbar { flex-wrap: wrap; }
  .r96-order-toolbar .ld-work-tabs { flex-basis: 100%; }
  .r96-style-row { grid-template-columns: minmax(0, 1fr) auto; }
  .r96-style-facts { grid-column: 1 / -1; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .sidebar {
    transform: none;
    box-shadow: none;
    transition: none;
  }

  .sidebar-backdrop,
  .sidebar-backdrop[hidden] { display: none; }
  .mobile-only { display: none; }
}

@media (min-width: 761px) and (max-width: 960px) {
  .desk-orders-table table,
  .desk-orders-table tbody { display: block; width: 100%; min-width: 0; }
  .desk-orders-table thead { display: none; }
  .desk-orders-table tr.desk-order-row {
    display: grid;
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    grid-template-columns: minmax(180px, 1.1fr) minmax(88px, .55fr) minmax(150px, .9fr) 54px;
    grid-template-areas:
      "identity status owner action"
      "control control control action";
    gap: 3px 9px;
    padding: 4px 8px;
    border-bottom: 1px solid var(--faos-border);
  }
  .desk-orders-table tr.desk-order-row > td {
    width: auto;
    height: auto;
    max-height: none;
    overflow: hidden;
    border: 0;
    padding: 0;
  }
  .desk-orders-table tr.desk-order-row > td:nth-child(1) { grid-area: identity; }
  .desk-orders-table tr.desk-order-row > td:nth-child(2) { grid-area: status; }
  .desk-orders-table tr.desk-order-row > td:nth-child(3) { grid-area: control; }
  .desk-orders-table tr.desk-order-row > td:nth-child(4) { grid-area: owner; }
  .desk-orders-table tr.desk-order-row > td:nth-child(5) { display: grid; grid-area: action; place-items: center end; }
  .desk-orders-table tr.desk-order-row > td:first-child { border-left: 3px solid transparent; padding-left: 4px; }
  .desk-orders-table tr.desk-order-row.urgency-danger > td:first-child { border-left-color: var(--faos-danger); }
  .desk-orders-table tr.desk-order-row.urgency-warning > td:first-child { border-left-color: #c68b3c; }
  .desk-orders-table tr.desk-order-row.urgency-attention > td:first-child { border-left-color: var(--faos-accent); }
  .desk-orders-table tr.desk-order-row.urgency-verify > td:first-child { border-left-color: #aaa79f; }
}

@media (max-width: 760px) {
  .topbar { gap: 6px; height: 48px; min-height: 48px; padding-inline: 9px; }
  .topbar-start { gap: 3px; }
  .topbar .wordmark > span:last-child { display: none; }
  .topbar .global-search { width: 0; min-width: 0; height: 30px; flex: 1 1 0; }
  .topbar .global-search input { width: 100%; min-width: 0; }
  .topbar-end { flex: 0 0 auto; }
  .global-search-key,
  .review-environment-context,
  .lc-message-button,
  .topbar-action[aria-label="收件箱"],
  .topbar-action[aria-label="打开当前页面 AI"] { display: none; }
  .topbar-action[aria-label="新建任务"] { width: 30px; justify-content: center; padding: 0; }
  .application:has(.context-rail-toggle:not([hidden])) .topbar-action[aria-label="新建任务"] { visibility: hidden; }
  .context-rail-toggle:not([hidden]) {
    top: 9px;
    right: 42px;
    bottom: auto;
    z-index: 41;
    width: 30px;
    min-height: 30px;
    justify-content: center;
    padding: 0;
    border-radius: 6px;
    box-shadow: none;
  }
  .topbar-action[aria-label="新建任务"] > span:last-child,
  .user-menu-button > span:not(.user-avatar) { display: none; }
  .user-menu-button { width: 28px; padding: 2px; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 70; width: min(82vw, 300px); height: 100dvh; flex-basis: auto; transform: translateX(-103%); box-shadow: 18px 0 38px rgba(42, 40, 34, .18); transition: transform .2s ease; }
  .secondary-rail { width: auto; min-width: 0; flex: 1 1 auto; }
  .sidebar.is-open { transform: translateX(0); }
  .application:has(#menu-toggle[aria-expanded="true"]) .topbar {
    z-index: 75;
    pointer-events: none;
    border-color: transparent;
    background: transparent;
  }
  .application:has(#menu-toggle[aria-expanded="true"]) .topbar > :not(.topbar-start),
  .application:has(#menu-toggle[aria-expanded="true"]) .topbar-start > :not(#menu-toggle) { visibility: hidden; }
  #menu-toggle[aria-expanded="true"] {
    position: fixed;
    top: 9px;
    left: calc(min(82vw, 300px) - 40px);
    z-index: 80;
    background: var(--faos-surface);
    box-shadow: 0 1px 6px rgba(42, 40, 34, .18);
    pointer-events: auto;
  }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 65; display: block; padding: 0; border: 0; background: rgba(34, 33, 29, .35); }
  .mobile-only { display: inline-grid; }
  .main-content { padding: 12px 10px 44px; }
  .main-content > .page-head,
  .main-content .platform-page-head { min-height: 0; flex-direction: column; gap: 9px; padding-bottom: 10px; }
  .main-content > .page-head h1,
  .main-content .platform-page-head h1 { font-size: 18px; }
  .main-content .page-actions { width: 100%; justify-content: flex-start; }
  .main-content .platform-page-head .page-actions > * { flex: 0 0 auto; }
  .global-search-results { position: fixed; top: 48px; right: 7px; left: 7px; max-height: calc(100dvh - 58px); }
  .desk-focus-bar { margin-inline: -2px; }
  .desk-order-supervision > header,
  .decision-desk > article > header,
  .desk-order-supervision > footer { align-items: flex-start; flex-direction: column; }
  .desk-order-supervision > header { padding: 10px; }
  .desk-header-actions { width: 100%; }
  .desk-order-filters { gap: 11px; padding-inline: 10px; }
  .desk-orders-table table,
  .desk-orders-table tbody { display: block; width: 100%; min-width: 0; }
  .desk-orders-table td:nth-child(1),
  .desk-orders-table td:nth-child(2),
  .desk-orders-table td:nth-child(3),
  .desk-orders-table td:nth-child(4),
  .desk-orders-table td:nth-child(5) { width: 100%; }
  .desk-orders-table thead { display: none; }
  .desk-orders-table tr {
    position: relative;
    display: grid;
    width: 100%;
    min-width: 0;
    height: auto;
    grid-template-columns: minmax(0, 1fr) minmax(142px, .78fr);
    grid-template-areas:
      "identity identity"
      "status owner"
      "control control";
    gap: 7px 12px;
    padding: 9px 10px 8px;
    border-bottom: 1px solid var(--faos-border);
  }
  .desk-orders-table td {
    display: grid;
    width: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
    border: 0;
    padding: 0;
  }
  .desk-orders-table td::before {
    color: var(--faos-text-tertiary);
    font-size:12px;
    font-weight: 620;
  }
  .desk-orders-table td:nth-child(1) { grid-area: identity; padding-right: 62px; }
  .desk-orders-table td:nth-child(1)::before,
  .desk-orders-table td:nth-child(5)::before { content: none; }
  .desk-orders-table td:nth-child(2) {
    grid-area: status;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas: "label primary" "label secondary";
  }
  .desk-orders-table td:nth-child(2)::before { grid-area: label; content: "状态"; }
  .desk-queue-status > strong { grid-area: primary; }
  .desk-queue-status > small { grid-area: secondary; margin-top: 1px; }
  .desk-orders-table td:nth-child(3) {
    grid-area: control;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas: "label blocker" "label next";
    padding-top: 6px;
    border-top: 1px solid #f0efec;
  }
  .desk-orders-table td:nth-child(3)::before { grid-area: label; content: "动作"; }
  .desk-order-control > .desk-blocker { grid-area: blocker; }
  .desk-order-control > .desk-next-action { grid-area: next; }
  .desk-orders-table td:nth-child(4) {
    grid-area: owner;
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .desk-orders-table td:nth-child(4)::before { content: "责任"; }
  .desk-orders-table td:nth-child(5) { position: absolute; top: 10px; right: 10px; width: auto; }
  .desk-order-link,
  .desk-order-identity > small,
  .desk-queue-status > strong,
  .desk-queue-status > small,
  .desk-blocker > b,
  .desk-next-action > b,
  .desk-next-action > span,
  .desk-responsibility,
  .desk-responsibility span { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .desk-next-action { flex-wrap: wrap; align-items: baseline; }
  .desk-responsibility { gap: 3px; }
  .desk-order-detail-link { min-height: 24px; padding: 2px 0; }
  .desk-order-empty td { display: block; min-height: 48px; grid-column: 1 / -1; }
  .desk-order-empty td::before { content: none; }
  .desk-order-supervision > footer span:last-child { display: none; }
  .desk-work .table-wrap,
  .desk-risk .table-wrap { overflow: visible; border: 0; }
  .desk-work table,
  .desk-work tbody,
  .desk-work tr,
  .desk-work td,
  .desk-risk table,
  .desk-risk tbody,
  .desk-risk tr,
  .desk-risk td { display: block; width: 100%; min-width: 0; }
  .desk-work thead,
  .desk-risk thead { display: none; }
  .desk-work tr,
  .desk-risk tr { padding: 7px 0; border-bottom: 1px solid var(--faos-border); }
  .desk-work td,
  .desk-risk td { padding: 5px 9px; border: 0; }
  .r96-order-actions,
  .r96-order-toolbar,
  .r96-table-foot,
  .r96-register-tools { align-items: stretch; flex-direction: column; }
  .r96-order-search { width: 100%; flex-basis: auto; }
  .r96-orders-table { overflow: visible; border: 0; }
  .r96-orders-table table,
  .r96-orders-table tbody,
  .r96-orders-table tr,
  .r96-orders-table td { display: block; width: 100%; min-width: 0; }
  .r96-orders-table thead { display: none; }
  .r96-orders-table tr { margin-bottom: 8px; overflow: hidden; border: 1px solid var(--faos-border); border-radius: 6px; background: #fff; }
  .r96-orders-table td {
    display: grid;
    grid-template-columns: 102px minmax(0, 1fr);
    min-height: 0;
    height: auto;
    gap: 8px;
    padding: 7px 9px;
    border: 0;
    border-bottom: 1px solid #efeeea;
  }
  .r96-orders-table td:last-child { border-bottom: 0; }
  .r96-orders-table td::before { color: var(--faos-text-tertiary); font-size:12px; font-weight: 600; }
  .r96-orders-table td:nth-child(1)::before { content: "订单 / 客户 PO"; }
  .r96-orders-table td:nth-child(2)::before { content: "款式 / 数量"; }
  .r96-orders-table td:nth-child(3)::before { content: "客户 / 供方"; }
  .r96-orders-table td:nth-child(4)::before { content: "合同 / 预计"; }
  .r96-orders-table td:nth-child(5)::before { content: "资料 / 状态"; }
  .r96-orders-table td:nth-child(6)::before { content: "动作"; }
  .r96-style-summary { align-items: flex-start; flex-direction: column; }
  .r96-style-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .r96-style-facts { grid-column: auto; }
  .r96-style-action { padding-top: 0; }
  .business-snapshot > button { grid-template-columns: minmax(0, 1fr) minmax(0, auto); }
  .business-snapshot > button > strong { max-width: 210px; overflow-wrap: anywhere; white-space: normal; text-align: right; }
  .business-snapshot > button > em { display: none; }
  .business-drilldown-table { overflow: visible; border: 0; }
  .business-drilldown-table table,
  .business-drilldown-table tbody,
  .business-drilldown-table tr,
  .business-drilldown-table td { display: block; width: 100%; min-width: 0; }
  .business-drilldown-table thead { display: none; }
  .business-drilldown-table tr {
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid var(--faos-border);
    border-radius: 6px;
    background: #fff;
  }
  .business-drilldown-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 9px;
    border: 0;
    border-bottom: 1px solid #efeeea;
  }
  .business-drilldown-table td:last-child { border-bottom: 0; }
  .business-drilldown-table td::before { color: var(--faos-text-tertiary); font-size:12px; font-weight: 600; }
  .business-drilldown-table td:nth-child(1)::before { content: "订单编号"; }
  .business-drilldown-table td:nth-child(2)::before { content: "客户"; }
  .business-drilldown-table td:nth-child(3)::before { content: "状态"; }
  .business-drilldown-table td:nth-child(4)::before { content: "动作"; }
  .main-content .governance-safety-banner > div { grid-template-columns: minmax(0, 1fr); }
  .inbox-v3-ingress .section-head { flex-direction: column; }
  .inbox-v3-ingress-grid { grid-template-columns: minmax(0, 1fr); }
  .inbox-v3-ingress-actions { align-items: stretch; flex-direction: column; }
  .inbox-v3-ingress-actions .field,
  .inbox-v3-ingress-actions .button { width: 100%; min-width: 0; }
  .inbox-work-surface { display: block; }
  .inbox-v3-queue { max-height: none; overflow: visible; border-right: 0; border-bottom: 1px solid var(--faos-border); }
  .inbox-v3-channel-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-v3-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 6px 8px 8px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }
  .inbox-v3-list::-webkit-scrollbar { display: none; }
  .inbox-v3-list > button {
    min-width: min(560px, calc(100vw - 48px));
    flex: 0 0 min(560px, calc(100vw - 48px));
    border: 1px solid var(--faos-border);
    border-radius: 5px;
    scroll-snap-align: start;
  }
  .inbox-v3-list > button.is-selected { box-shadow: inset 0 -2px var(--faos-accent); }
  .inbox-v3-evidence { border-right: 0; border-bottom: 1px solid var(--faos-border); }
  .inbox-work-surface .intake-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-work-surface .intake-facts > div:nth-child(2) { border-right: 0; }
  .inbox-work-surface .intake-facts > div:nth-child(-n + 2) { border-bottom: 1px solid var(--faos-border); }
  .object-focus-strip,
  .object-properties { grid-template-columns: minmax(0, 1fr); }
  .object-focus-strip > .is-wide { grid-column: auto; }
  .object-focus-strip > div { border-right: 0; border-bottom: 1px solid var(--faos-border); }
  .object-focus-strip > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--faos-border); }
  .object-focus-strip > div:last-child { border-bottom: 0; }
  .object-properties > div:nth-child(odd),
  .object-properties > div:nth-child(even) { margin-inline: 0; }
}

@media (max-width: 430px) {
  .topbar { padding-inline: 7px; }
  .topbar .brand-mark.small { width: 22px; height: 22px; }
  .main-content { padding-inline: 8px; }
  .main-content .button,
  .main-content .secondary-button { min-height: 29px; padding-inline: 7px; }
  .desk-scope > span { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .context-rail.is-open { width: 100vw; }
  .r96-style-facts { grid-template-columns: minmax(0, 1fr); }
  .r96-style-next { grid-column: auto; }
  .r96-style-stage { grid-template-columns: minmax(0, 1fr); }
}

/* The desktop app can have a narrow content pane. Keep registers as compact
   tables there; the earlier card conversion made five rows several screens tall. */
@media (min-width: 761px) and (max-width: 960px) {
  .main-content [data-final-surface$="-create"] form > .form-grid,
  .main-content [data-final-surface="po-upload"] form > .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-content [data-final-surface="quotes-create"] form > .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-content [data-final-surface="quotes-create"] .quote-tier-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 9px; }
  .r96-orders-table { overflow-x: auto; border: 1px solid var(--faos-border); }
  .r96-orders-table table { display: table; width: 100%; min-width: 660px; }
  .r96-orders-table thead { display: table-header-group; }
  .r96-orders-table tbody { display: table-row-group; }
  .r96-orders-table tr { display: table-row; margin: 0; border: 0; border-radius: 0; background: transparent; }
  .r96-orders-table th,
  .r96-orders-table td { display: table-cell; width: auto; min-width: 0; height: 56px; padding: 7px 8px; border-bottom: 1px solid var(--faos-border); }
  .r96-orders-table td::before { display: none; content: none; }
  .r96-style-row { grid-template-columns: minmax(135px, .8fr) minmax(250px, 1.8fr) auto; gap: 10px; padding: 9px 0; }
  .r96-style-facts { grid-column: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
  .r96-style-action { padding-top: 14px; }
}

@media (max-width: 900px) {
  [data-local-sales-journey],
  [data-local-sales-journey] .lsj-workbench { min-width: 0; max-width: 100%; }
  [data-local-sales-journey] .lsj-toolbar { flex-wrap: wrap; }
  [data-local-sales-journey] .lsj-toolbar input { width: min(240px, 100%); min-width: 0; }
  [data-local-sales-journey] .lsj-table-wrap { max-width: 100%; }
  .r96-next-action { align-items: stretch; flex-direction: column; }
  .r96-next-action .button { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  #faos-root *,
  #faos-root *::before,
  #faos-root *::after { scroll-behavior: auto; transition-duration: .01ms; }
}

#main-content:is([data-workspace-active-page="agents"],[data-workspace-active-page="runs"],[data-workspace-active-page="governance"]) #agent-workspaces {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#main-content:is([data-workspace-active-page="agents"],[data-workspace-active-page="runs"],[data-workspace-active-page="governance"]) #agent-workspaces > :is(h2,.empty-state) { display: none; }
#main-content:is([data-workspace-active-page="agents"],[data-workspace-active-page="runs"],[data-workspace-active-page="governance"]) #agent-workspaces > .lai-panel { margin: 0; padding: 0; border: 0; }
