:root {
  --ui-primary: #8b0012;
  --ui-primary-hover: #6f1924;
  --ui-primary-soft: #fdf2f4;
  --ui-accent: #008b79;
  --ui-accent-soft: #eaf8f5;
  --ui-bg: #f7f8f9;
  --ui-surface: #ffffff;
  --ui-border: #d9dde3;
  --ui-border-soft: #e8ebef;
  --ui-text: #111827;
  --ui-muted: #64748b;
  --ui-radius: 6px;
  --admin-primary: var(--ui-primary);
  --admin-primary-hover: var(--ui-primary-hover);
  --admin-primary-soft: var(--ui-primary-soft);
  --five-blue: var(--ui-primary);
  --five-teal: var(--ui-accent);
  --agent-blue-text: #530c16;
  --agent-blue-bg: rgba(139, 0, 18, .045);
  --agent-blue-bg-strong: rgba(139, 0, 18, .075);
  --agent-blue-border: rgba(139, 0, 18, .2);
  --agent-blue-border-strong: rgba(139, 0, 18, .48);
  --text-bg-blue: var(--ui-primary);
  --text-bg-blue-hover: var(--ui-primary-hover);
  --text-bg-border: rgba(139, 0, 18, .48);
  --text-bg-shadow: 0 1px 2px rgba(17, 24, 39, .08);
}
body { background: var(--ui-bg); }
.canvas { background: var(--ui-bg); }
.module-view h1,
.agent-original-mode .agent-conversation-pane .chat-agent-head h1,
.five-hero h1 { font-size: 24px; letter-spacing: 0; }
.panel,
.stat,
.module-card,
.brief-card,
.board-card,
.approval-card,
.chat-agent-card,
.agent-card,
.five-stage-head,
.five-panel,
.five-stepper,
.five-portal-band,
.admin-unified-page .foundation-panel,
.admin-unified-page .user-org-panel,
.admin-unified-page .user-org-tree,
.admin-unified-page .system-admin-nav-shell {
  border-radius: var(--ui-radius);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}
.btn.primary,
.dataset-page .btn.primary,
.five-btn.primary,
.v3-primary,
.admin-unified-page .btn.primary,
.admin-unified-page .btn.success {
  border-color: var(--ui-primary);
  background: var(--ui-primary);
  color: #fff;
  box-shadow: none;
}
.btn.primary:hover,
.dataset-page .btn.primary:hover,
.five-btn.primary:hover,
.v3-primary:hover,
.admin-unified-page .btn.primary:hover:not(:disabled),
.admin-unified-page .btn.success:hover:not(:disabled) {
  border-color: var(--ui-primary-hover);
  background: var(--ui-primary-hover);
}
.nav-item.active { color: var(--ui-primary); background: var(--ui-primary-soft); }
.nav-item.active::before { background: var(--ui-primary); }
.portal-link,
.user-org-link,
.five-link,
.five-table-action { color: var(--ui-primary); }
.agent-original-mode .agent-conversation-pane .chat-agent-grid {
  grid-template-columns: repeat(var(--agent-columns, 4), minmax(0, 1fr));
  gap: 10px;
}
.agent-original-mode .agent-conversation-pane .chat-agent-card {
  min-height: 96px;
  padding: 14px 15px;
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}
.agent-original-mode .agent-conversation-pane .chat-agent-card:hover,
.agent-original-mode .agent-conversation-pane .chat-agent-card.active {
  border-color: var(--ui-primary);
  background: var(--ui-primary-soft);
  box-shadow: 0 4px 12px rgba(83, 12, 22, .08);
}
.agent-pending-count {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 7px;
  padding: 1px 7px;
  border: 1px solid #e6b8be;
  border-radius: 10px;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
.five-loop-page[data-role] { --role-accent: var(--ui-primary); }
.five-loop-page[data-role="manager"] { --role-accent: #2563eb; }
.five-loop-page[data-role="subsidiary"] { --role-accent: var(--ui-accent); }
.five-loop-page .v3-stage-workflow {
  position: sticky;
  top: 0;
  z-index: 8;
  border: 1px solid var(--ui-border);
  border-left: 4px solid var(--role-accent, var(--ui-primary));
  border-radius: var(--ui-radius);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 4px 12px rgba(17, 24, 39, .06);
}
.v3-flow-node.active i {
  background: var(--role-accent, var(--ui-primary));
  box-shadow: 0 0 0 4px rgba(139, 0, 18, .09);
}
.five-portal-band.v3-current-work {
  --role-accent: var(--ui-primary);
  border-left-color: var(--role-accent);
}
.five-portal-band.v3-current-work[data-role="manager"] { --role-accent: #2563eb; }
.five-portal-band.v3-current-work[data-role="subsidiary"] { --role-accent: var(--ui-accent); }
.v3-current-work-head > div > small { color: var(--role-accent); font-weight: 700; }
.v3-current-work-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.v3-current-work-body > div { padding-right: 24px; }
.v3-current-work-body > div + div { padding-left: 24px; border-left: 1px solid var(--ui-border-soft); }
.v3-foundation-reference summary { display: inline-flex; align-items: center; gap: 7px; }
.v3-foundation-reference summary span {
  float: none;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f3f5;
  color: #667085;
  font-size: 10px;
}
.foundation-empty-guidance { padding: 30px 20px; text-align: center; }
.foundation-empty-guidance > i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--ui-accent-soft);
  color: var(--ui-accent);
  font-style: normal;
  font-weight: 800;
}
.foundation-empty-guidance h3 { margin: 0; color: var(--ui-text); font-size: 15px; }
.foundation-empty-guidance p {
  margin: 7px auto 14px;
  max-width: 520px;
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.6;
}
.foundation-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.foundation-empty-actions button {
  min-height: 32px;
  border: 1px solid var(--ui-border);
  border-radius: 5px;
  background: #fff;
  color: var(--ui-primary);
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.user-org-row-menu { position: relative; display: inline-block; }
.user-org-row-menu > summary {
  cursor: pointer;
  list-style: none;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 700;
}
.user-org-row-menu > summary::-webkit-details-marker { display: none; }
.user-org-row-menu[open] > div {
  position: absolute;
  top: 24px;
  right: 0;
  z-index: 15;
  min-width: 116px;
  padding: 5px;
  border: 1px solid var(--ui-border);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .14);
  display: grid;
}
.user-org-row-menu button {
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #344054;
  padding: 0 9px;
  text-align: left;
  font: inherit;
  font-size: 12px;
}
.user-org-row-menu button:hover { background: #f7f8f9; color: var(--ui-primary); }
.user-org-row-menu button.warn { color: #b42318; }
body.system-user-detail-open { overflow: hidden; }
.system-user-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1730;
  background: rgba(17, 24, 39, .28);
}
.system-user-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1731;
  width: min(980px, calc(100vw - 220px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
  border-left: 1px solid var(--ui-border);
  box-shadow: -18px 0 48px rgba(17, 24, 39, .2);
}
.system-user-detail-head {
  padding: 20px 64px 16px 22px;
  border-bottom: 1px solid var(--ui-border);
  position: relative;
}
.system-user-detail-head small { color: var(--ui-primary); font-weight: 700; }
.system-user-detail-head h2 { margin: 5px 0 3px; color: var(--ui-text); font-size: 22px; }
.system-user-detail-head p { margin: 0; color: var(--ui-muted); font-size: 12px; }
.system-user-detail-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ui-border);
  border-radius: 5px;
  background: #fff;
  color: #475467;
  font-size: 20px;
}
.system-user-detail-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 22px;
  background: var(--ui-bg);
  display: grid;
  align-content: start;
  gap: 16px;
}
.system-user-detail-body .user-org-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.system-user-detail-foot {
  padding: 12px 22px;
  border-top: 1px solid var(--ui-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 1180px) {
  .agent-original-mode .agent-conversation-pane .chat-agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-user-detail-drawer { width: calc(100vw - 76px); }
}
.portal-function-grid .module-card > .chip {
  align-self: flex-start;
  width: auto;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 11px;
}

.v3-primary.v3-secondary {
  border-color: #cfd5dd;
  background: #fff;
  color: #475467;
}
.v3-primary.v3-secondary:hover {
  border-color: #9ca3af;
  background: #f7f8f9;
  color: #111827;
}

/* UI consistency system v2 */
:root {
  --ui-content-max: 1320px;
  --ui-control-compact: 32px;
  --ui-control-regular: 36px;
  --ui-control-prominent: 40px;
}

.module-view:not(.wide-dashboard),
body.dste-agent-mode .agent-original-mode,
.agent-original-mode .agent-conversation-pane .chat-agent-picker {
  max-width: var(--ui-content-max);
}

.module-view h1,
.agent-original-mode .agent-conversation-pane .chat-agent-head h1,
.five-hero h1,
.admin-unified-page-head h1,
.admin-unified-page .user-org-head h1 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
}

.five-stage-head h2,
.admin-unified-page .foundation-panel-head h2,
.admin-unified-page .user-org-panel-head h2,
.admin-unified-panel-head h2 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0;
}

.btn {
  height: var(--ui-control-regular);
  min-height: var(--ui-control-regular);
  padding: 0 13px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
}

.five-btn {
  height: var(--ui-control-regular);
  min-height: var(--ui-control-regular);
  padding: 0 13px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.2;
}

.v3-primary,
.v3-secondary {
  height: var(--ui-control-prominent);
  min-height: var(--ui-control-prominent);
  padding: 0 14px;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.2;
}

.dataset-page .btn,
.admin-unified-page .btn {
  height: var(--ui-control-compact);
  min-height: var(--ui-control-compact);
  padding: 0 12px;
  border-radius: 5px;
  font-size: 12px;
}

.nav-item,
.role-switcher {
  border-radius: var(--ui-radius);
}

.status,
.system-status,
.five-status {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.five-table th,
.dataset-table th,
.user-org-table th {
  height: 40px;
  font-size: 12px;
}

.portal-work-tabs button.active {
  border-color: #d9a3aa;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.portal-quick-nav button:hover {
  border-color: #d9a3aa;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.dataset-tabs button:hover,
.dataset-tabs button.active,
.dataset-tabs-lite button:hover,
.dataset-tabs-lite button.active,
.user-org-tabs button:hover,
.user-org-tabs button.active {
  color: var(--ui-primary);
}

.dataset-tabs button.active,
.dataset-tabs-lite button.active {
  box-shadow: inset 0 -2px 0 var(--ui-primary);
}

.user-org-tabs button.active::after,
.system-nav-item.active::after,
.admin-unified-page .system-nav-item.active::after {
  background: var(--ui-primary);
}

.admin-unified-page .system-nav-item:hover,
.admin-unified-page .system-nav-item.active,
.system-nav-item:hover,
.system-nav-item.active {
  color: var(--ui-primary);
}

.admin-unified-page .system-section-subnav .system-nav-item:hover,
.admin-unified-page .system-section-subnav .system-nav-item.active,
.system-section-subnav .system-nav-item:hover,
.system-section-subnav .system-nav-item.active {
  border-color: var(--ui-border);
  background: #fff;
  color: var(--ui-primary);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .06);
}

.five-subtab.active,
.approval-queue-tabs button.active,
.approval-detail-tabs button.active {
  color: var(--ui-primary);
}

.approval-queue-tabs button.active .approval-tab-count {
  background: var(--ui-primary);
}

.dste-loop-stage:hover,
.dste-loop-stage.active {
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.dste-loop-stage.active::after {
  background: var(--ui-primary);
}

.dste-loop-stage > i {
  color: var(--ui-primary);
}

.dste-loop-stage.active > i {
  border-color: var(--ui-primary);
  background: var(--ui-primary);
}

.dste-loop-journey-detail,
.dste-loop-section-label {
  border-left-color: var(--ui-primary);
}

.dste-loop-journey-detail header span,
.dste-loop-section-label {
  color: var(--ui-primary);
}

.foundation-section-card.active,
.dataset-catalog button.active {
  border-color: #d9a3aa;
  background: var(--ui-primary-soft);
  box-shadow: inset 0 3px 0 rgba(139, 0, 18, .58), 0 4px 12px rgba(83, 12, 22, .07);
}

.user-org-node:hover,
.user-org-node.active,
.role-perm-role-card:hover,
.role-perm-role-card.active,
.process-template-card:hover,
.process-template-card.active,
.process-node-card:hover,
.process-node-card.active,
.process-flow-node:hover,
.process-flow-node.active,
.insight-module-card:hover,
.insight-module-card.active,
.insight-side-link:hover,
.insight-side-link.active,
.template-field-card:hover,
.template-field-card.active {
  border-color: #e1b4ba;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.user-org-node.active i,
.process-node-card i,
.process-flow-node > i,
.template-field-card i {
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.insight-closure-step.is-current {
  border-color: #d9a3aa;
  background: var(--ui-primary-soft);
  box-shadow: inset 0 0 0 1px rgba(139, 0, 18, .06);
}

.insight-closure-step.is-current i {
  background: var(--ui-primary);
  color: #fff;
}

.insight-ai-context button,
.approval-row-action,
.approval-filter-chip,
.agent-inline-action {
  color: var(--ui-primary);
}

.admin-unified-page input:focus,
.admin-unified-page select:focus,
.admin-unified-page textarea:focus,
.foundation-filter-grid input:focus,
.foundation-filter-grid select:focus,
.foundation-form-grid input:focus,
.foundation-form-grid select:focus,
.foundation-form-grid textarea:focus,
.five-field input:focus,
.five-field select:focus,
.five-field textarea:focus {
  outline: 0;
  border-color: #b86570;
  box-shadow: 0 0 0 3px rgba(139, 0, 18, .1);
}

button:focus-visible,
a:focus-visible,
[role="tab"]:focus-visible {
  outline: 2px solid rgba(139, 0, 18, .48);
  outline-offset: 2px;
}

.five-loop-page[data-role],
.five-portal-band.v3-current-work[data-role] {
  --role-accent-ring: rgba(139, 0, 18, .1);
}

.five-loop-page[data-role="manager"],
.five-portal-band.v3-current-work[data-role="manager"] {
  --role-accent-ring: rgba(37, 99, 235, .12);
}

.five-loop-page[data-role="subsidiary"],
.five-portal-band.v3-current-work[data-role="subsidiary"] {
  --role-accent-ring: rgba(0, 139, 121, .12);
}

.five-loop-page .v3-flow-node.active i,
.five-portal-band.v3-current-work .v3-flow-node.active i {
  box-shadow: 0 0 0 4px var(--role-accent-ring);
}

.five-drawer,
.system-user-detail-drawer {
  width: min(980px, calc(100vw - 220px));
  height: 100dvh;
  max-height: 100dvh;
}

body.dste-detail-drawer-open .dataset-page[data-dste-current-section] .insight-macro-shell > .dste-detail-drawer,
body.foundation-detail-drawer-open .dataset-page[data-foundation-current-section] .foundation-detail-drawer-host.foundation-detail-drawer,
body.foundation-detail-drawer-open .admin-unified-foundation .foundation-detail-drawer-host.foundation-detail-drawer,
body.approval-detail-drawer-open .approval-detail-drawer-host.approval-detail-drawer {
  width: min(980px, calc(100vw - 220px));
  height: 100dvh;
  max-height: 100dvh;
}

body.dste-detail-drawer-open .dataset-page[data-dste-current-section] .insight-macro-shell > .dste-detail-drawer,
body.foundation-detail-drawer-open .dataset-page[data-foundation-current-section] .foundation-detail-drawer-host.foundation-detail-drawer {
  padding: 0;
}

.dste-detail-drawer-close,
.foundation-detail-drawer-close,
.approval-detail-close,
.system-user-detail-close,
.agent-evidence-drawer-close {
  width: 34px;
  height: 34px;
  border-color: var(--ui-border);
  border-radius: 5px;
  background: #fff;
  color: #475467;
  box-shadow: none;
}

.dste-detail-drawer-close,
.foundation-detail-drawer-close {
  top: 16px;
  margin: 16px 16px -50px auto;
}

.dste-detail-drawer-close:hover,
.foundation-detail-drawer-close:hover,
.approval-detail-close:hover,
.system-user-detail-close:hover,
.agent-evidence-drawer-close:hover {
  border-color: #d9a3aa;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.dste-detail-drawer .user-org-panel-head,
.foundation-detail-drawer .foundation-panel-head,
.foundation-detail-drawer .user-org-panel-head {
  padding-right: 54px;
}

.five-drawer-head,
.system-user-detail-head,
.approval-detail-head {
  min-height: 76px;
  padding: 18px 64px 16px 22px;
}

.five-drawer-body,
.system-user-detail-body,
.approval-detail-body {
  padding: 18px 22px;
}

.five-drawer-foot,
.system-user-detail-foot,
.approval-detail-foot {
  min-height: 64px;
  padding: 12px 22px;
}

.agent-evidence-drawer {
  width: min(640px, 52vw);
}

body.dste-agent-mode .composer,
.composer {
  border-color: var(--ui-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .1);
}

.composer:focus-within {
  border-color: #b86570;
  background: #fff;
  color: var(--agent-blue-text);
  box-shadow: 0 0 0 3px rgba(139, 0, 18, .08), 0 8px 24px rgba(17, 24, 39, .1);
}

.composer.is-dragging {
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 3px rgba(139, 0, 18, .1), 0 8px 24px rgba(17, 24, 39, .1);
}

.chat-panel .bubble,
.message.user .bubble,
.message.result .bubble,
.message.streaming .bubble,
.agent-detail,
.agent-section,
.agent-example-card,
.agent-business-output,
.strategy-house,
.strategy-map,
.bsc-output {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .05);
}

.message.user .bubble {
  border-color: var(--ui-primary);
  background: var(--ui-primary);
  color: #fff;
}

.message.user .bubble * {
  color: inherit;
}

.message.result .bubble,
.message.streaming .bubble {
  border-color: var(--ui-border);
  background: #fff;
}

@media (max-width: 1180px) {
  .five-drawer,
  .system-user-detail-drawer,
  body.dste-detail-drawer-open .dataset-page[data-dste-current-section] .insight-macro-shell > .dste-detail-drawer,
  body.foundation-detail-drawer-open .dataset-page[data-foundation-current-section] .foundation-detail-drawer-host.foundation-detail-drawer,
  body.approval-detail-drawer-open .approval-detail-drawer-host.approval-detail-drawer {
    width: calc(100vw - 76px);
  }
}

/* Keep the compact demo identity control visible while the portal scrolls. */
body.show-role-switcher .workspace-toolbar {
  position: fixed;
  inset: 16px 40px auto auto;
  z-index: 42;
  display: flex;
  width: auto;
  height: 40px;
  align-items: center;
  padding: 3px 4px 3px 10px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 14px rgba(17, 24, 39, .08);
  backdrop-filter: blur(8px);
}

body.show-role-switcher .role-switcher-wrap {
  gap: 8px;
  height: 32px;
}

body.show-role-switcher .role-switcher {
  height: 32px;
}

body.show-role-switcher .canvas {
  padding-top: 76px;
}

body:not(.show-role-switcher) .workspace-toolbar {
  display: none !important;
}

body.five-drawer-open.show-role-switcher .workspace-toolbar,
body.dste-detail-drawer-open.show-role-switcher .workspace-toolbar,
body.foundation-detail-drawer-open.show-role-switcher .workspace-toolbar,
body.approval-detail-drawer-open.show-role-switcher .workspace-toolbar {
  z-index: 40;
}

@media (min-width: 901px) and (max-width: 1180px) {
  body.show-role-switcher .workspace-toolbar {
    right: 24px;
  }
}

/* Anchor demo identity to the portal page instead of the browser viewport. */
body.show-role-switcher .workspace-toolbar {
  position: absolute;
  inset: 16px 40px auto auto;
}

@media (min-width: 901px) and (max-width: 1180px) {
  body.show-role-switcher .workspace-toolbar {
    right: 24px;
  }
}

/* The portal shows only the identity label and select, without an outer box. */
body.show-role-switcher .workspace-toolbar {
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.show-role-switcher .role-switcher-wrap,
body.show-role-switcher .role-switcher {
  height: 34px;
}

/* Product-level DSTE navigation. */
.dste-product-tabs {
  overflow: hidden;
  border: 1px solid var(--ui-border, #d9dee7);
  border-radius: 6px;
  background: #fff;
}

.dste-product-tabs-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--ui-border, #d9dee7);
  background: #f7f8fa;
}

.dste-product-tabs-title,
.dste-product-tabs-location {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.dste-product-tabs-title span,
.dste-product-tabs-location span {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.dste-product-tabs-title strong,
.dste-product-tabs-location b {
  color: #1f2937;
  font-size: 13px;
}

.dste-product-tabs-title span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 4px;
  background: #8b0012;
  color: #fff;
}

.dste-product-tabs-location em {
  min-width: 42px;
  padding: 3px 7px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #475467;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.five-loop-page .dste-product-tabs .five-stepper {
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: #fff;
}

.five-loop-page .dste-product-tabs .five-step {
  min-height: 72px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 9px;
  row-gap: 3px;
  align-content: center;
  padding: 10px 13px;
  border: 0;
  border-right: 1px solid #e5e7eb;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: #fff;
  color: #475467;
  box-shadow: none;
  opacity: 1 !important;
}

.five-loop-page .dste-product-tabs .five-step:last-child {
  border-right: 0;
}

.five-loop-page .dste-product-tabs .five-step:hover:not(:disabled) {
  background: #fff8f8;
}

.five-loop-page .dste-product-tabs .five-step.active {
  border-bottom-color: #8b0012;
  background: #fff7f7;
  color: #710010;
  box-shadow: none;
}

.five-loop-page .dste-product-tabs .five-step.complete {
  background: #f7fbf9;
}

.five-loop-page .dste-product-tabs .five-step.locked {
  background: #fafafa !important;
  color: #667085;
}

.five-loop-page .dste-product-tabs .five-step-index {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  margin: 0;
  align-self: center;
  border-radius: 4px;
}

.five-loop-page .dste-product-tabs .five-step b {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-size: 13px;
  line-height: 1.3;
}

.five-loop-page .dste-product-tabs .five-step small {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  overflow: hidden;
  color: #667085;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dste-tab-state {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.dste-tab-state[data-state="current"] {
  border-color: #d8a5ad;
  background: #fff0f2;
  color: #8b0012;
}

.dste-tab-state[data-state="complete"] {
  border-color: #a7d8c1;
  background: #edf8f2;
  color: #137a50;
}

.dste-tab-state[data-state="locked"] {
  background: #f3f4f6;
  color: #667085;
}

.five-loop-page .dste-secondary-tabs {
  min-height: 34px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.dste-secondary-tabs-label {
  align-self: center;
  margin-right: 5px;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
}

.five-loop-page .dste-secondary-tabs .five-subtab {
  min-height: 34px;
  padding: 6px 10px 5px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #667085;
  box-shadow: none;
}

.five-loop-page .dste-secondary-tabs .five-subtab.active {
  border-bottom-color: #8b0012;
  background: transparent;
  color: #8b0012;
  box-shadow: none;
}

/* Safe business-role system management collaboration view. */
.business-system-page {
  display: grid;
  gap: 14px;
}

.business-system-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ui-border, #d9dee7);
}

.business-system-head > div:first-child > span {
  color: #8b0012;
  font-size: 11px;
  font-weight: 700;
}

.business-system-head h1 {
  margin: 5px 0 0;
  color: #1f2937;
  font-size: 24px;
}

.business-system-head p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
}

.business-system-head > div:last-child {
  min-width: 180px;
  padding: 10px 12px;
  border-left: 3px solid #8b0012;
  background: #fff8f8;
}

.business-system-head small,
.business-system-head em {
  display: block;
  color: #667085;
  font-size: 10px;
  font-style: normal;
}

.business-system-head b {
  display: block;
  margin: 3px 0;
  color: #8b0012;
  font-size: 14px;
}

.business-system-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--ui-border, #d9dee7);
}

.business-system-tabs button {
  min-width: 120px;
  height: 40px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #667085;
  font-weight: 700;
}

.business-system-tabs button:hover,
.business-system-tabs button.active {
  border-bottom-color: #8b0012;
  background: #fff7f7;
  color: #8b0012;
}

.business-system-body {
  display: grid;
  gap: 14px;
}

.business-system-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.business-system-panel {
  overflow: hidden;
  border: 1px solid var(--ui-border, #d9dee7);
  border-radius: 6px;
  background: #fff;
}

.business-system-panel-head {
  min-height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border-bottom: 1px solid #e5e7eb;
}

.business-system-panel-head h2 {
  margin: 0;
  color: #1f2937;
  font-size: 15px;
}

.business-system-panel-head p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 11px;
}

.business-system-kv,
.business-system-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.business-system-kv > div,
.business-system-summary > div {
  min-height: 82px;
  padding: 14px;
  border-right: 1px solid #e5e7eb;
}

.business-system-kv > div:last-child,
.business-system-summary > div:last-child {
  border-right: 0;
}

.business-system-kv small,
.business-system-summary small {
  display: block;
  color: #667085;
  font-size: 10px;
}

.business-system-kv b,
.business-system-summary b {
  display: block;
  margin-top: 6px;
  color: #1f2937;
  font-size: 14px;
}

.business-system-summary {
  overflow: hidden;
  border: 1px solid var(--ui-border, #d9dee7);
  border-radius: 6px;
  background: #fff;
}

.business-system-summary span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 10px;
}

.business-system-list {
  display: grid;
}

.business-system-list button {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 3px 10px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  text-align: left;
}

.business-system-list button:last-child {
  border-bottom: 0;
}

.business-system-list button:hover {
  background: #fafafa;
}

.business-system-list b {
  color: #1f2937;
  font-size: 12px;
}

.business-system-list button > span:not(.business-system-status) {
  grid-column: 1;
  color: #667085;
  font-size: 10px;
}

.business-system-list .business-system-status {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

.business-system-status {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #f7f8fa;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.business-system-status.green {
  border-color: #a7d8c1;
  background: #edf8f2;
  color: #137a50;
}

.business-system-status.amber {
  border-color: #e7cb89;
  background: #fff8e8;
  color: #8a5700;
}

.business-system-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 14px;
}

.business-system-flow > div {
  position: relative;
  min-height: 72px;
  padding: 0 20px 0 38px;
}

.business-system-flow > div:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 10px;
  right: 4px;
  color: #98a2b3;
}

.business-system-flow i {
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #8b0012;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.business-system-flow b,
.business-system-flow span {
  display: block;
}

.business-system-flow b {
  color: #1f2937;
  font-size: 12px;
}

.business-system-flow span {
  margin-top: 4px;
  color: #667085;
  font-size: 10px;
  line-height: 1.4;
}

.business-system-table {
  width: 100%;
  border-collapse: collapse;
}

.business-system-table th,
.business-system-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #475467;
  font-size: 11px;
  text-align: left;
}

.business-system-table th {
  background: #f7f8fa;
  color: #667085;
  font-weight: 700;
  white-space: nowrap;
}

.business-system-table td b,
.business-system-table td small {
  display: block;
}

.business-system-table td b {
  color: #1f2937;
  font-size: 12px;
}

.business-system-table td small {
  margin-top: 3px;
  color: #667085;
  font-size: 10px;
}

.business-system-table td button,
.business-system-search button {
  border: 0;
  background: transparent;
  color: #8b0012;
  font-weight: 700;
}

.business-system-search {
  display: flex;
  gap: 6px;
}

.business-system-search input {
  width: 220px;
  height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 0 9px;
}

.business-system-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: flex;
  justify-content: flex-end;
}

.business-system-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, .28);
}

.business-system-drawer {
  position: relative;
  width: min(760px, 64vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -16px 0 42px rgba(15, 23, 42, .2);
}

.business-system-drawer header,
.business-system-drawer footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.business-system-drawer footer {
  justify-content: flex-end;
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
}

.business-system-drawer header small {
  color: #8b0012;
  font-weight: 700;
}

.business-system-drawer header h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.business-system-drawer header p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 11px;
}

.business-system-drawer header > button {
  width: 32px;
  height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  font-size: 20px;
}

.business-system-drawer-body {
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 20px;
}

.business-system-drawer-body label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}

.business-system-drawer-body input,
.business-system-drawer-body select,
.business-system-drawer-body textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 8px 10px;
  font: inherit;
}

.business-system-drawer-body textarea {
  min-height: 110px;
  resize: vertical;
}

.business-system-drawer-note {
  padding: 11px 12px;
  border-left: 3px solid #8b0012;
  background: #fff7f7;
  color: #667085;
  font-size: 11px;
  line-height: 1.5;
}

.business-system-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #e5e7eb;
}

.business-system-detail-grid > div {
  padding: 13px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.business-system-detail-grid small,
.business-system-detail-grid b {
  display: block;
}

.business-system-detail-grid small {
  color: #667085;
  font-size: 10px;
}

.business-system-detail-grid b {
  margin-top: 5px;
  color: #1f2937;
  font-size: 13px;
}

@media (max-width: 1280px) {
  .dste-product-tabs-location span,
  .five-loop-page .dste-product-tabs .five-step small,
  .dste-tab-state {
    display: none;
  }

  .five-loop-page .dste-product-tabs .five-step {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .business-system-grid.two {
    grid-template-columns: 1fr;
  }
}
