:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #f9fafb;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --line-strong: #d1d1d6;
  --accent: #ff7900;
  --accent-strong: #d65f00;
  --accent-soft: #fff1e2;
  --accent-2: #0f766e;
  --red: #c24135;
  --amber: #b7791f;
  --green: #2f7d46;
  --nav: #fbfbfd;
  --nav-2: #fff3e7;
  --paper: #fbfaf7;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px rgba(0, 0, 0, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.heatmap-pill.green {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.heatmap-pill.yellow {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.heatmap-pill.red {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.map-node.heatmap-green {
  box-shadow: inset 4px 0 0 #22c55e;
}

.map-node.heatmap-yellow {
  box-shadow: inset 4px 0 0 #f97316;
}

.map-node.heatmap-red {
  box-shadow: inset 4px 0 0 #ef4444;
}

.form-designer-shell.fullscreen {
  position: fixed;
  inset: 72px 24px 24px 24px;
  z-index: 50;
  overflow: auto;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.form-designer-shell {
  min-width: 0;
}

.form-designer-canvas {
  transform: scale(var(--form-zoom, 1));
  transform-origin: top left;
  width: calc(100% / var(--form-zoom, 1));
  min-height: 560px;
}

.form-designer-shell .table-scroll {
  max-height: 62vh;
}

.form-design-layout {
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.form-design-layout.list-collapsed {
  grid-template-columns: minmax(150px, 170px) minmax(0, 1fr);
}

.form-design-layout.list-collapsed .form-list-panel .process-row div,
.form-design-layout.list-collapsed .form-list-panel .status {
  display: none;
}

.form-design-layout.list-collapsed .form-list-panel {
  padding: 12px;
}

.form-designer-shell .compact-table th,
.form-designer-shell .compact-table td {
  min-width: 104px;
  padding: 8px;
}

.form-designer-shell .compact-table th:first-child,
.form-designer-shell .compact-table td:first-child,
.form-designer-shell .compact-table th:nth-child(2),
.form-designer-shell .compact-table td:nth-child(2) {
  min-width: 138px;
}

.form-designer-shell .compact-table .input.compact,
.form-designer-shell .compact-table .select.compact-select,
.form-designer-shell .compact-table .compact-multi {
  font-size: 12px;
  min-height: 30px;
}

.search-detail-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.search-detail-grid {
  gap: 10px;
  margin-top: 12px;
}

.mini-card {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.mini-card strong {
  display: block;
  font-size: 13px;
  word-break: break-word;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px;
  background: #f5f5f7;
}

.auth-panel {
  width: min(1080px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-brand {
  margin-bottom: 24px;
}

.auth-brand .brand-logo-frame {
  width: 230px;
  max-width: 230px;
  min-height: 46px;
  padding: 7px 9px;
  background: #fff;
}

.auth-brand .brand-logo {
  max-width: 205px;
  max-height: 34px;
}

.auth-brand .brand-title {
  color: var(--ink);
}

.auth-brand .brand-subtitle {
  color: var(--muted);
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  gap: 28px;
}

.auth-title {
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 100vh;
  transition: grid-template-columns .18s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px 1fr;
}

.sidebar {
  background: var(--nav);
  color: var(--ink);
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
}

.brand {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 26px;
}

.brand-mini {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  place-items: center;
  font-weight: 850;
  font-size: 20px;
}

.brand-logo-frame {
  width: 178px;
  max-width: 178px;
  min-height: 34px;
  display: flex;
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 178px;
  max-height: 26px;
  height: auto;
  object-fit: contain;
}

.brand-title {
  max-width: 178px;
  font-size: 15px;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.35;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 11px;
  color: #8d9aaa;
}

.brand-publisher {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.sidebar-toggle {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #424245;
  font-size: 12px;
}

.sidebar-toggle span {
  font-size: 16px;
  line-height: 1;
}

.nav-section,
.nav-section-toggle {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 850;
  color: #424245;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nav-section-toggle {
  width: 100%;
  min-height: 28px;
  padding: 0 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  background: transparent;
  text-align: left;
  border-radius: 6px;
}

.nav-section-toggle:hover,
.nav-section-toggle.active {
  background: rgba(255, 121, 0, 0.08);
  color: #565659;
}

.nav-section-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.nav-section-count {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.nav-section-caret {
  font-size: 14px;
  color: #a1a1a6;
}

.nav-section-items.collapsed {
  display: none;
}

.nav-button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #424245;
  background: transparent;
  padding: 9px 10px;
  margin: 3px 0;
  border-radius: 6px;
  text-align: left;
  font-size: 13px;
}

.nav-button:hover,
.nav-button.active {
  background: var(--nav-2);
  color: var(--ink);
}

.nav-icon {
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
  color: #6e6e73;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.sidebar-collapsed .sidebar {
  padding: 18px 10px;
  overflow-x: hidden;
}

.sidebar-collapsed .brand {
  justify-items: center;
  margin-bottom: 12px;
}

.sidebar-collapsed .brand-mini {
  display: grid;
}

.sidebar-collapsed .brand-logo-frame,
.sidebar-collapsed .brand-title,
.sidebar-collapsed .brand-subtitle,
.sidebar-collapsed .brand-publisher,
.sidebar-collapsed .panel-note,
.sidebar-collapsed .footer-nav-section,
.sidebar-collapsed .nav-section-text,
.sidebar-collapsed .nav-section-count,
.sidebar-collapsed .nav-section-caret,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-toggle strong {
  display: none;
}

.sidebar-collapsed .nav-section-toggle {
  min-height: 8px;
  margin: 8px 8px 4px;
  padding: 0;
  border-top: 1px solid var(--line);
}

.sidebar-collapsed .nav-button {
  min-height: 40px;
  justify-content: center;
  padding: 9px 0;
  gap: 0;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: rgba(251, 251, 253, 0.84);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.page-title {
  font-size: 20px;
  font-weight: 700;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.page-title-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.page-title-link::before {
  content: "‹";
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 20px;
  line-height: 1;
}

.page-title-link:hover {
  color: var(--accent-strong);
}

.page-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.user-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  max-width: min(780px, 60vw);
}

.user-tools .button,
.user-tools .select,
.user-tools .input {
  flex: 0 0 auto;
}

.user-tools .input {
  width: min(220px, 24vw);
}

.user-tools .compact-select {
  width: auto;
  min-width: 150px;
}

.content {
  padding: 26px 32px 52px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel.pad {
  padding: 20px;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
}

.panel-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.inline-details {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.inline-details summary {
  cursor: pointer;
  color: var(--accent);
  list-style-position: inside;
}

.metric {
  padding: 18px;
  border-left: 4px solid var(--accent);
}

.metric-action {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.metric-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.metric .value {
  font-size: 30px;
  font-weight: 780;
  margin-bottom: 4px;
}

.metric .label {
  font-size: 13px;
  color: var(--muted);
}

.metric .hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.mini-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 13px;
  background: #fff;
}

.mini-metric strong {
  font-size: 18px;
}

.score-list {
  display: grid;
  gap: 12px;
}

.score-row {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.score-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.score-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f0f2;
}

.score-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.score-fill.green {
  background: var(--green);
}

.score-fill.amber {
  background: var(--amber);
}

.score-fill.red {
  background: var(--red);
}

.process-map {
  display: grid;
  gap: 10px;
}

.map-band {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px;
}

.map-band-title {
  font-weight: 760;
  margin-bottom: 8px;
}

.map-node-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-node {
  width: 220px;
  min-height: 88px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 10px;
  background: #f8fafc;
}

.map-node span,
.map-node small {
  display: block;
  margin-top: 4px;
}

.map-node small {
  color: var(--muted);
}

.stage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stage-pill.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.optimization-home-steps,
.optimization-roadmap-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.optimization-home-step,
.optimization-roadmap-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.optimization-home-step strong,
.optimization-roadmap-step strong {
  color: var(--accent);
  font-size: 13px;
}

.optimization-home-step span,
.optimization-roadmap-step span {
  font-size: 12px;
  font-weight: 700;
}

.optimization-home-step small {
  color: var(--muted);
}

.optimization-home-step.active,
.optimization-roadmap-step.current {
  border-color: var(--accent);
  background: #fff7ed;
}

.optimization-roadmap {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.optimization-roadmap-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.optimization-roadmap-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.optimization-roadmap-step.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.lifecycle-line {
  display: grid;
  grid-template-columns: repeat(10, minmax(92px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.lifecycle-step {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 6px;
  align-content: start;
  color: inherit;
  text-align: left;
}

.lifecycle-step strong {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 12px;
}

.lifecycle-step.completed {
  background: #e7f5eb;
  border-color: #b7dbc3;
}

.lifecycle-step.completed strong {
  background: var(--green);
  color: #fff;
}

.lifecycle-step.active {
  background: var(--accent-soft);
  border-color: #ffd2aa;
}

.lifecycle-step.active strong {
  background: var(--accent);
  color: #fff;
}

.lifecycle-step span {
  font-size: 12px;
  font-weight: 700;
}

.lifecycle-step small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.compact-empty {
  min-height: 88px;
  padding: 20px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button {
  background: #1d1d1f;
  color: #fff;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 13px;
  min-height: 36px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.button.secondary {
  background: #f5f5f7;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.accent {
  background: var(--accent);
}

.button.warn {
  background: var(--amber);
}

.button.danger {
  background: var(--red);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button:not(:disabled):hover {
  transform: translateY(-1px);
}

.compact-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}

.context-return {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.notice.ok {
  background: #e7f5eb;
  color: var(--green);
}

.notice.warn {
  background: #fff7e6;
  color: #925d14;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
}

.input,
.textarea {
  -webkit-appearance: none;
  appearance: none;
}

.select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, #6e6e73 50%),
    linear-gradient(135deg, #6e6e73 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 10px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.select[multiple],
.select[size] {
  padding-right: 10px;
  background-image: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 3px solid rgba(255, 121, 0, 0.2);
  border-color: var(--accent);
}

.textarea {
  min-height: 74px;
  resize: vertical;
  line-height: 1.55;
}

.input.compact {
  min-height: 30px;
  padding: 5px 8px;
}

.select.compact {
  min-height: 30px;
  padding: 5px 8px;
}

.compact-select {
  min-height: 30px;
  padding: 5px 8px;
}

.inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 0.8fr);
  gap: 8px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  row-gap: 8px;
}

.primary-action-strip {
  justify-content: flex-end;
}

.release-code-panel .section-title {
  margin-top: 14px;
}

.release-code-panel .template-link {
  min-height: 84px;
}

.release-lineage-grid {
  margin-top: 8px;
}

.release-lineage-card .toolbar {
  margin-bottom: 6px;
  gap: 6px;
}

.release-lineage-card strong {
  font-size: 13px;
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 148px;
}

.table .approval-actions .button {
  min-width: 58px;
  text-align: center;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  margin: 8px 0 12px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.label {
  font-size: 12px;
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  table-layout: auto;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.table th {
  color: var(--muted);
  font-weight: 700;
  background: var(--panel-2);
}

.table tbody tr:hover td {
  background: #fbfbfd;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #475467;
  font-size: 12px;
  white-space: nowrap;
}

.status.published,
.status.confirmed {
  background: #e7f5eb;
  color: var(--green);
}

.status.draft,
.status.revision {
  background: #fff4df;
  color: var(--amber);
}

.status.review,
.status.approved,
.status.prepare_release {
  background: var(--accent-soft);
  color: var(--accent);
}

.status.added {
  background: #e7f5eb;
  color: var(--green);
}

.status.changed {
  background: #fff4df;
  color: var(--amber);
}

.status.removed {
  background: #fdecea;
  color: var(--red);
}

.split {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.split.wide-left {
  grid-template-columns: 430px minmax(0, 1fr);
}

.tree {
  font-size: 13px;
}

.tree-node {
  padding: 7px 8px;
  border-left: 2px solid var(--line);
  margin: 2px 0 2px 10px;
}

.tree-node strong {
  display: inline-block;
  min-width: 30px;
  color: var(--accent);
}

.process-list {
  display: grid;
  gap: 10px;
}

.process-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

button.process-row {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.process-mainline {
  align-items: center;
}

.process-mainline .small {
  display: block;
  margin-top: 4px;
}

.process-row:hover {
  border-color: var(--accent);
}

.process-row.selected {
  border-color: var(--accent);
  background: #fff8f1;
}

.discussion-list {
  display: grid;
  gap: 14px;
}

.discussion-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.position-group-list {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.position-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.designer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.diagram-designer {
  grid-template-columns: minmax(0, 1fr);
}

.diagram-designer #node-panel {
  width: 100%;
}

.designer.locked {
  opacity: 0.78;
}

.diagram-workbench {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 10px;
}

.diagram-workbench.locked {
  opacity: 0.78;
}

.diagram-left-rail {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding-right: 2px;
}

.diagram-left-rail .diagram-hint {
  margin: 0;
  display: grid;
  gap: 6px;
}

.diagram-left-rail .diagram-hint span {
  border-radius: 7px;
  padding: 6px 8px;
  line-height: 1.35;
}

.diagram-left-rail .diagram-stencil-panel,
.diagram-left-rail .lane-editor,
.diagram-left-rail .object-palette {
  margin: 0;
  padding: 7px;
}

.diagram-left-rail .compact-toolbar {
  gap: 8px;
}

.diagram-left-rail .compact-toolbar .panel-note {
  display: none;
}

.diagram-left-rail .row-actions {
  gap: 4px;
}

.diagram-left-rail .stencil-group {
  margin-top: 8px;
}

.diagram-left-rail .stencil-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.diagram-left-rail .stencil-card {
  min-height: 46px;
  padding: 2px;
  gap: 1px;
  border-radius: 7px;
}

.diagram-left-rail .stencil-preview {
  width: 48px;
  height: 28px;
  transform: none;
}

.diagram-left-rail .stencil-preview svg {
  width: 48px;
  height: 28px;
}

.diagram-left-rail .stencil-card strong {
  font-size: 9px;
  line-height: 1.08;
  max-width: 92px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diagram-left-rail .stencil-card small {
  display: none;
}

.diagram-left-rail .lane-editor-grid {
  gap: 6px;
}

.diagram-left-rail .lane-editor-row {
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}

.diagram-left-rail .object-palette-grid {
  grid-template-columns: 1fr;
}

.diagram-left-rail .compact-object-chip-row {
  max-height: 82px;
}

.diagram-header-toolbar {
  align-items: flex-start;
}

.diagram-header-toolbar > div:first-child {
  flex: 1 1 360px;
}

.diagram-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 880px;
}

.diagram-header-actions .compact-select {
  width: 138px;
}

.diagram-main-stage {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.diagram-main-stage .diagram-designer {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.diagram-main-stage #node-panel {
  padding: 12px;
  font-size: 12px;
}

.diagram-node-detail-panel {
  margin-top: 0;
}

.diagram-sync-panel {
  margin-top: 0;
  background: #fffdf8;
}

@media (min-width: 1180px) {
  .diagram-node-detail-panel {
    display: grid;
    grid-template-columns: 1.05fr 1fr 1fr;
    gap: 8px 12px;
    align-items: start;
  }

  .diagram-node-detail-panel .panel-title,
  .diagram-node-detail-panel > .notice,
  .diagram-node-detail-panel > .empty,
  .diagram-node-detail-panel > .panel-note,
  .diagram-node-detail-panel > .standard-list,
  .diagram-node-detail-panel > .edge-table {
    grid-column: 1 / -1;
  }

  .diagram-node-detail-panel .section-title,
  .diagram-node-detail-panel .row-actions,
  .diagram-node-detail-panel .panel-subsection {
    grid-column: span 1;
  }
}

.diagram-main-stage #node-panel .panel-title {
  font-size: 14px;
  margin-bottom: 7px;
}

.diagram-main-stage #node-panel .field {
  gap: 4px;
  margin-bottom: 8px;
}

.diagram-main-stage #node-panel .label {
  font-size: 11px;
  line-height: 1.2;
}

.diagram-main-stage #node-panel .input,
.diagram-main-stage #node-panel .select,
.diagram-main-stage #node-panel .textarea {
  min-height: 30px;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 12px;
  line-height: 1.35;
}

.diagram-main-stage #node-panel .textarea {
  min-height: 52px;
}

.diagram-main-stage #node-panel .select[multiple],
.diagram-main-stage #node-panel .select[size] {
  min-height: 70px;
}

.diagram-main-stage #node-panel .notice,
.diagram-main-stage #node-panel .small,
.diagram-main-stage #node-panel .check-line {
  font-size: 11px;
  line-height: 1.35;
}

.diagram-main-stage #node-panel .check-line {
  gap: 6px;
  margin: 5px 0 8px;
}

.diagram-main-stage #node-panel .button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.diagram-page-bar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.diagram-page-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, auto) minmax(300px, auto) minmax(430px, 1fr);
  gap: 7px;
  align-items: center;
}

.diagram-page-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.diagram-canvas-tools,
.diagram-output-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.diagram-output-tools {
  justify-content: flex-end;
}

.diagram-output-tools .compact-button {
  padding-left: 7px;
  padding-right: 7px;
}

.diagram-output-tools .button[data-diagram-secondary="visualQa"] {
  gap: 6px;
}

.diagram-page-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 2px;
}

.diagram-zoom-pill {
  min-width: 48px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.diagram-zoom-scope {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.diagram-page-tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.diagram-page-tab em {
  border-radius: 999px;
  background: #fff1e2;
  color: #9a4b00;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 2px 6px;
}

.diagram-page-tab strong {
  font-size: 12px;
}

.diagram-page-tab span {
  color: var(--muted);
  font-size: 11px;
}

.diagram-page-tab:hover,
.diagram-page-tab.active {
  border-color: var(--accent);
  background: #fff8f1;
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.1);
}

.diagram-page-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.diagram-page-corner-mark {
  pointer-events: none;
}

.document-design-toolbar {
  align-items: flex-start;
}

.document-design-actions {
  flex: 1 1 720px;
}

.diagram-secondary-backdrop {
  align-items: start;
  padding-top: 7vh;
}

.diagram-secondary-card {
  width: min(980px, calc(100vw - 44px));
  max-height: 86vh;
  overflow: auto;
  padding: 16px;
}

.diagram-secondary-body {
  margin-top: 12px;
}

.diagram-secondary-body .lane-editor,
.diagram-secondary-body .diagram-visual-qa-panel {
  margin: 0;
  border-radius: 8px;
}

.diagram-secondary-body .lane-editor-grid {
  max-height: 58vh;
  overflow: auto;
}

.diagram-qa-action-row {
  margin-top: 10px;
  justify-content: flex-end;
}

.step-confirm-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  justify-content: space-between;
}

.professional-focus-list {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.professional-focus-list strong {
  font-size: 12px;
  color: var(--ink);
}

.professional-detail-drawer > details {
  margin-top: 10px;
}

.canvas-wrap {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  min-height: 540px;
  max-height: calc(100vh - 260px);
}

.diagram-svg {
  width: 1180px;
  height: 520px;
  display: block;
  background: #fbf8f1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform-origin: 0 0;
}

.diagram-lane-label,
.diagram-lane-title {
  cursor: ns-resize;
}

.diagram-lane-title text {
  pointer-events: none;
}

.diagram-lane.drop-target .diagram-lane-label {
  stroke: var(--accent);
  stroke-width: 1.8;
  fill: #fff8f1;
}

.diagram-lane.drop-target > rect:first-child {
  stroke: var(--accent);
  stroke-width: 1.4;
}

.diagram-resize-tools {
  pointer-events: all;
  filter: drop-shadow(0 3px 6px rgba(16, 24, 40, 0.18));
}

.diagram-resize-outline {
  fill: none;
  stroke: #ff7900;
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
  pointer-events: none;
}

.diagram-resize-handle {
  fill: #ffffff;
  stroke: #ff7900;
  stroke-width: 1.4;
}

.diagram-resize-edge {
  fill: transparent;
  stroke: none;
}

.diagram-resize-handle[data-resize-handle="n"],
.diagram-resize-handle[data-resize-handle="s"],
.diagram-resize-edge-n,
.diagram-resize-edge-s {
  cursor: ns-resize;
}

.diagram-resize-handle[data-resize-handle="e"],
.diagram-resize-handle[data-resize-handle="w"],
.diagram-resize-edge-e,
.diagram-resize-edge-w {
  cursor: ew-resize;
}

.diagram-resize-handle[data-resize-handle="nw"],
.diagram-resize-handle[data-resize-handle="se"] {
  cursor: nwse-resize;
}

.diagram-resize-handle[data-resize-handle="ne"],
.diagram-resize-handle[data-resize-handle="sw"] {
  cursor: nesw-resize;
}

.diagram-resize-handle:hover {
  fill: #fff8f1;
  stroke-width: 2;
}

.object-palette {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.diagram-stencil-panel,
.lane-editor {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.diagram-stencil-panel.locked,
.lane-editor.locked {
  opacity: 0.72;
}

.compact-toolbar {
  align-items: flex-start;
}

.stencil-group {
  margin-top: 10px;
}

.stencil-group-title {
  margin-bottom: 6px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.stencil-group-title::-webkit-details-marker {
  display: none;
}

.stencil-group-title span {
  min-width: 22px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  font-size: 10px;
}

.stencil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 6px;
}

.stencil-card {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  cursor: grab;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.stencil-card:hover,
.stencil-card.selected {
  border-color: var(--accent);
  background: #fff8f1;
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.12);
}

.stencil-card strong {
  font-size: 12px;
}

.stencil-card small {
  color: var(--muted);
  font-size: 11px;
}

.stencil-preview {
  width: 64px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ff7900;
  overflow: visible;
}

.stencil-preview svg {
  width: 64px;
  height: 42px;
  display: block;
  overflow: visible;
  font-family: var(--font);
}

.stencil-preview span {
  display: block;
  width: 42px;
  height: 24px;
  border: 2px solid #ff7900;
  background: #fff;
}

.stencil-preview.task span,
.stencil-preview.userTask span,
.stencil-preview.serviceTask span,
.stencil-preview.scriptTask span {
  width: 48px;
  height: 30px;
  border: 1.8px solid #17202b;
  border-radius: 8px;
  background: #ffffff;
  position: relative;
}

.stencil-preview.task span::before,
.stencil-preview.userTask span::before,
.stencil-preview.serviceTask span::before,
.stencil-preview.scriptTask span::before {
  content: "001";
  position: absolute;
  left: 0;
  right: 0;
  top: 2px;
  color: #17202b;
  font-size: 8px;
  font-weight: 900;
  line-height: 10px;
  text-align: center;
}

.stencil-preview.task span::after,
.stencil-preview.userTask span::after,
.stencil-preview.serviceTask span::after,
.stencil-preview.scriptTask span::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: 11px;
  border-top: 1px dashed #17202b;
}

.stencil-preview.start span,
.stencil-preview.end span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.stencil-preview.end span {
  border-color: #c24135;
  background: #fff5f4;
}

.stencil-preview.gateway span {
  width: 30px;
  height: 30px;
  transform: rotate(45deg);
  background: #fff7e6;
}

.stencil-preview.connector span {
  width: 46px;
  height: 0;
  border: 0;
  border-top: 3px solid #667085;
  background: transparent;
  position: relative;
}

.stencil-preview.connector span::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -6px;
  border-left: 9px solid #667085;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.stencil-preview.jump span {
  width: 38px;
  height: 24px;
  border-color: #7c3aed;
  border-radius: 14px;
  background: transparent;
}

.stencil-preview.inputInfo span {
  border-color: #0f766e;
  background: #f8fafc;
  clip-path: polygon(0 18%, 78% 18%, 100% 50%, 78% 82%, 0 82%);
}

.stencil-preview.collaboration span {
  width: 46px;
  height: 26px;
  border-color: #475467;
  border-style: dashed;
  border-radius: 7px;
  background: #f8fafc;
}

.stencil-preview.pageConnector span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border-color: #7c3aed;
  background: #fff;
}

.stencil-preview.kcpMarker span {
  width: 34px;
  height: 16px;
  border-color: #d71920;
  background: #d71920;
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 82% 50%, 100% 100%, 0 100%);
}

.stencil-preview.kcpMarker span::after {
  content: "KCP";
  display: block;
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}

.stencil-preview.subprocess span {
  border-style: double;
  background: #fff8f1;
}

.stencil-preview.document span {
  border-color: #667085;
  clip-path: polygon(0 0, 78% 0, 100% 25%, 100% 100%, 0 100%);
}

.stencil-preview.data span {
  border-color: #0f766e;
  background: #edf7f4;
  transform: skewX(-12deg);
}

.stencil-preview.systemInterface span {
  border-color: #16803c;
  background: #f0fdf4;
}

.stencil-preview.fileIcon span,
.stencil-preview.multiFile span,
.stencil-preview.folderIcon span,
.stencil-preview.personIcon span,
.stencil-preview.phoneIcon span,
.stencil-preview.faxIcon span,
.stencil-preview.emailIcon span,
.stencil-preview.printIcon span,
.stencil-preview.freightIcon span,
.stencil-preview.airFreightIcon span,
.stencil-preview.goodsIcon span,
.stencil-preview.infoSystemIcon span,
.stencil-preview.timeCycle span {
  border-color: #667085;
  background: #fff;
}

.stencil-preview.fileIcon span,
.stencil-preview.multiFile span {
  width: 30px;
  height: 28px;
  clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 0 100%);
}

.stencil-preview.folderIcon span {
  width: 42px;
  height: 24px;
  background: #fff7e6;
  clip-path: polygon(0 25%, 35% 25%, 42% 0, 100% 0, 100% 100%, 0 100%);
}

.stencil-preview.personIcon span {
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 45% 45%;
  background: #fff1e2;
  border-color: #d65f00;
}

.stencil-preview.emailIcon span {
  width: 42px;
  height: 26px;
}

.stencil-preview.faxIcon span {
  width: 44px;
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(#fff 0 30%, #f8fafc 30% 100%);
}

.stencil-preview.freightIcon span,
.stencil-preview.airFreightIcon span,
.stencil-preview.goodsIcon span {
  width: 44px;
  height: 24px;
  background: #fff7e6;
}

.stencil-preview.infoSystemIcon span {
  width: 44px;
  height: 26px;
  border-color: #16803c;
  border-radius: 4px;
  background: #f0fdf4;
}

.stencil-preview.timeCycle span {
  width: 46px;
  height: 18px;
  border-radius: 999px;
}

.stencil-preview.processInterface span {
  border-color: #475467;
  clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%);
}

.stencil-preview.annotation span {
  border-style: dashed;
  border-color: #d6a11d;
  background: #fffdf5;
}

.stencil-preview.orgUnit span {
  border-color: #d65f00;
  background: #fff1e2;
}

.stencil-preview.epcFunction span {
  border-color: #b7791f;
  background: #fff7e6;
  border-radius: 0;
}

.stencil-preview.epcEvent span {
  border-color: #d65f00;
  background: #fff8f1;
  clip-path: polygon(18% 0, 82% 0, 100% 50%, 82% 100%, 18% 100%, 0 50%);
}

.lane-editor-grid {
  display: grid;
  gap: 8px;
}

.lane-editor-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(180px, 260px) auto auto;
  gap: 8px;
  align-items: center;
}

.object-palette-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.object-palette.locked {
  opacity: 0.72;
}

.object-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.compact-object-group {
  margin-top: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
}

.object-palette-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.2;
}

.object-palette-heading span {
  min-width: 20px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.object-palette-note {
  min-height: 14px;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.compact-object-chip-row {
  gap: 4px;
  margin-top: 6px;
  max-height: 112px;
  overflow: auto;
  align-content: flex-start;
}

.object-chip {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 3px 6px;
  max-width: 176px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
  cursor: grab;
}

.object-chip-type {
  flex: 0 0 auto;
  min-width: 28px;
  padding: 1px 4px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.object-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.object-chip.selected {
  border-color: var(--accent);
  background: #fff1e2;
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.14);
}

.validation-bar {
  min-height: 42px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.validation-bar strong {
  margin-right: 8px;
}

.validation-bar span,
.validation-chip,
.check-item {
  border-radius: 999px;
  padding: 4px 8px;
}

.validation-chip {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.validation-bar .ok,
.check-item.pass {
  background: #e7f5eb;
  color: var(--green);
}

.validation-bar .bad,
.validation-chip.bad,
.check-item.fail {
  background: #fdecea;
  color: var(--red);
}

.diagram-node {
  cursor: move;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.diagram-node rect,
.diagram-node circle,
.diagram-node path {
  filter: drop-shadow(0 4px 7px rgba(16, 24, 40, 0.12));
}

.diagram-node.selected rect,
.diagram-node.selected circle,
.diagram-node.selected path {
  stroke: var(--accent);
  stroke-width: 1.7;
}

.diagram-node.lovem-marker.selected rect,
.diagram-node.lovem-marker.selected circle,
.diagram-node.lovem-marker.selected path {
  stroke-width: 1.6;
}

.diagram-node.selected .kcp-badge path {
  stroke: #9f1239;
}

.diagram-backdrop-node rect,
.diagram-backdrop-node path {
  filter: none;
}

.diagram-node-tools {
  cursor: pointer;
  pointer-events: all;
  filter: drop-shadow(0 4px 8px rgba(16, 24, 40, 0.18));
}

.diagram-node-tools:hover rect {
  fill: #b42318;
}

.diagram-node-quick-tools {
  pointer-events: all;
  filter: drop-shadow(0 7px 14px rgba(16, 24, 40, .16));
}

.diagram-node-quick-bg {
  fill: rgba(255, 255, 255, .96);
  stroke: #ffd2aa;
  stroke-width: 1;
}

.diagram-node-quick-button {
  cursor: pointer;
}

.diagram-node-quick-button rect {
  fill: #fff8f1;
  stroke: #ffd2aa;
  stroke-width: 1;
}

.diagram-node-quick-button text {
  fill: #8a4b0f;
  font-weight: 900;
  pointer-events: none;
}

.diagram-node-quick-button:hover rect {
  fill: #ff7900;
  stroke: #ff7900;
}

.diagram-node-quick-button:hover text {
  fill: #fff;
}

.diagram-node-quick-button.danger rect {
  fill: #fff1f0;
  stroke: #f5b5b0;
}

.diagram-node-quick-button.danger text {
  fill: #b42318;
}

.diagram-node-quick-button.danger:hover rect {
  fill: #b42318;
  stroke: #b42318;
}

.diagram-node-quick-button.danger:hover text {
  fill: #fff;
}

.diagram-edge {
  fill: none;
  stroke: #667085;
  stroke-width: 1.7;
}

.diagram-edge-group {
  cursor: pointer;
  pointer-events: all;
}

.diagram-edge-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 13;
  pointer-events: stroke;
}

.diagram-edge-group.selected .diagram-edge {
  stroke: var(--accent);
  stroke-width: 2.4;
  filter: drop-shadow(0 3px 6px rgba(255, 121, 0, 0.25));
}

.diagram-edge-segment-handle {
  pointer-events: all;
  opacity: 1;
}

.diagram-edge-segment-handle.horizontal {
  cursor: ns-resize;
}

.diagram-edge-segment-handle.vertical {
  cursor: ew-resize;
}

.diagram-edge-segment-hit {
  fill: rgba(255, 121, 0, 0.01);
  stroke: none;
}

.diagram-edge-segment-guide {
  fill: none;
  stroke: rgba(255, 121, 0, 0.82);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 7 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease, stroke-width 0.12s ease;
}

.diagram-edge-group:hover .diagram-edge-segment-guide,
.diagram-edge-group.selected .diagram-edge-segment-guide {
  stroke: rgba(255, 121, 0, 0.82);
  stroke-width: 5;
  stroke-dasharray: 7 5;
  opacity: 1;
}

.diagram-edge-endpoint-handle {
  cursor: grab;
  pointer-events: all;
}

.diagram-edge-endpoint-handle:active {
  cursor: grabbing;
}

.diagram-edge-endpoint-hit {
  fill: rgba(255, 121, 0, 0.02);
  stroke: none;
}

.diagram-edge-endpoint-dot {
  fill: #fff;
  stroke: var(--accent);
  stroke-width: 1.8;
  filter: drop-shadow(0 2px 5px rgba(16, 24, 40, .18));
}

.diagram-edge-endpoint-candidate {
  fill: rgba(255, 121, 0, .14);
  stroke: var(--accent);
  stroke-width: 1.8;
  pointer-events: none;
}

.diagram-edge-label {
  pointer-events: all;
  cursor: text;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
}

.diagram-edge-tools {
  pointer-events: all;
  cursor: default;
  filter: drop-shadow(0 5px 12px rgba(16, 24, 40, 0.18));
}

.diagram-edge-tools > rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: #ff7900;
  stroke-width: 1.2;
}

.diagram-edge-tool-button {
  cursor: pointer;
}

.diagram-edge-tool-button rect {
  fill: #fff1e2;
  stroke: #ffd2aa;
  stroke-width: 1;
}

.diagram-edge-tool-button text {
  fill: #9a4b00;
  font-weight: 800;
  pointer-events: none;
}

.diagram-edge-tool-button.danger rect {
  fill: #fdecea;
  stroke: #f5b5b0;
}

.diagram-edge-tool-button.danger text {
  fill: #b42318;
}

.diagram-snap-guide {
  stroke: var(--accent);
  stroke-width: 1.1;
  stroke-dasharray: 6 4;
  pointer-events: none;
  opacity: 0.72;
}

.diagram-connection-preview {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 5;
  pointer-events: none;
}

.diagram-connection-preview.endpoint {
  stroke-width: 2.2;
  stroke-dasharray: 8 5;
}

.diagram-port-group {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.diagram-port-group.selected,
.diagram-svg.connecting .diagram-port-group {
  opacity: 1;
  pointer-events: all;
}

.diagram-port-target {
  cursor: crosshair;
  pointer-events: all;
}

.diagram-port-hit-area {
  fill: rgba(215, 25, 32, 0.01);
  stroke: none;
}

.diagram-port {
  fill: #fff;
  stroke: #d71920;
  stroke-width: 2;
  cursor: crosshair;
  touch-action: none;
  filter: drop-shadow(0 2px 5px rgba(16, 24, 40, 0.18));
}

.diagram-port:hover {
  fill: #d71920;
  stroke: #d71920;
}

.diagram-svg.connecting .diagram-port {
  stroke-width: 2.4;
}

.diagram-subprocess-jump {
  cursor: pointer;
  pointer-events: all;
}

.governance-visual-board {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 12px;
  margin-top: 14px;
  align-items: stretch;
}

.governance-visual-board.compact {
  grid-template-columns: 150px minmax(0, 1fr) minmax(220px, 0.8fr);
}

.governance-score-dial {
  min-height: 146px;
  border: 1px solid #ffd2aa;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, #fff 0 46px, transparent 47px),
    conic-gradient(from -90deg, #2f7d46 0 68%, #ffb547 68% 86%, #c24135 86% 100%);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 12px;
}

.governance-score-dial strong {
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
}

.governance-score-dial span {
  font-size: 13px;
  font-weight: 800;
}

.governance-score-dial small {
  max-width: 130px;
  color: var(--muted);
  line-height: 1.35;
}

.governance-traffic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.governance-traffic-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.governance-traffic-card span {
  color: var(--muted);
  font-size: 12px;
}

.governance-traffic-card strong {
  font-size: 26px;
}

.governance-traffic-card.green {
  border-color: #b7dbc3;
  background: #f0fdf4;
}

.governance-traffic-card.amber {
  border-color: #ffd2aa;
  background: #fff7e6;
}

.governance-traffic-card.red {
  border-color: #f5b5b0;
  background: #fdecea;
}

.governance-next-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.diagram-subprocess-jump rect {
  fill: #fff8f1;
  stroke: #ff7900;
  stroke-width: 1;
}

.diagram-subprocess-jump text {
  fill: #9a4b00;
  font-size: 7px;
  font-weight: 900;
  pointer-events: none;
}

.diagram-subprocess-jump:not(.linked) {
  opacity: .74;
}

.diagram-inline-editor {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: stretch;
  pointer-events: all;
}

.diagram-inline-title-input {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 2px 5px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 4px 12px rgba(16, 24, 40, .16);
}

.diagram-context-menu,
.diagram-lane-context-menu {
  position: absolute;
  z-index: 5;
  min-width: 156px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
  display: grid;
  gap: 4px;
}

.diagram-context-menu button,
.diagram-lane-context-menu button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 7px 8px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.diagram-context-menu button:hover,
.diagram-lane-context-menu button:hover {
  background: #fff8f1;
  color: var(--accent);
}

.diagram-context-menu button.danger:hover,
.diagram-lane-context-menu button.danger:hover {
  background: #fff1f0;
  color: var(--red);
}

.diagram-node-context-menu {
  min-width: 132px;
}

.diagram-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.diagram-hint span {
  border: 1px solid #ffd2aa;
  background: #fff8f1;
  color: #6b3b0b;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.diagram-hint.locked {
  opacity: 0.65;
}

.landscape-canvas {
  margin-top: 12px;
  background: #fff;
}

.landscape-node {
  cursor: pointer;
}

.landscape-node rect {
  filter: drop-shadow(0 4px 7px rgba(16, 24, 40, 0.1));
}

.process-map-rule-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.process-map-rule {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.process-map-rule strong {
  color: var(--accent);
  font-size: 18px;
}

.process-map-rule span {
  font-weight: 800;
}

.process-map-rule small,
.process-map-muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.process-map-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.process-map-governance-panel {
  background: linear-gradient(180deg, #fffaf5 0%, #ffffff 72%);
}

.process-map-reuse-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.process-map-reuse-strip span {
  border: 1px solid #ffd2aa;
  border-radius: 8px;
  background: #fff8f1;
  color: #6b3b0b;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.process-interface-panorama {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.interface-panorama-board {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.interface-flow-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 180px) minmax(160px, 1fr);
  align-items: center;
  gap: 8px;
}

.interface-process-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.interface-process-card strong,
.interface-process-card span {
  display: block;
}

.interface-process-card strong {
  color: var(--accent);
  font-size: 12px;
}

.interface-arrow {
  height: 2px;
  background: var(--accent);
  position: relative;
  text-align: center;
}

.interface-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
  border-left: 8px solid var(--accent);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.interface-arrow span {
  position: relative;
  top: -11px;
  display: inline-block;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  padding: 0 6px;
}

.process-map-l1-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
  padding: 13px;
  text-align: left;
  display: grid;
  gap: 8px;
  min-height: 180px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.process-map-l1-card:hover,
.process-map-l1-card.active {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(255, 121, 0, 0.12);
  transform: translateY(-1px);
}

.process-map-code {
  width: fit-content;
  border-radius: 999px;
  background: #fff1e2;
  color: #9a4b00;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.process-map-l1-card strong {
  font-size: 16px;
}

.process-map-l1-card small {
  color: var(--muted);
}

.process-map-l2-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.process-map-l2-strip span {
  border: 1px solid #ffd2aa;
  background: #fff8f1;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: #6b3b0b;
}

.company-l2-flow-map {
  margin-top: 12px;
  border: 1px solid #e5e5e7;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.company-l2-map-header {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e5e7;
  background: #fffaf5;
  color: #6b3b0b;
}

.company-l2-map-header span,
.company-l2-map-header strong {
  font-size: 12px;
  font-weight: 900;
}

.company-l2-map-header small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.company-l2-map-board {
  display: grid;
  gap: 0;
}

.company-l2-map-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid #f0f0f2;
  background: #fff;
}

.company-l2-map-row:last-child {
  border-bottom: 0;
}

.company-l2-map-row.active {
  background: linear-gradient(90deg, #fff8f1 0%, #fff 34%);
}

.company-l2-map-l1,
.company-l2-process-box {
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
}

.company-l2-map-l1 {
  border: 1px solid #ffb36b;
  background: #fff8f1;
  padding: 10px;
  display: grid;
  gap: 5px;
  align-content: start;
}

.company-l2-map-l1 span {
  color: #9a4b00;
  font-size: 12px;
  font-weight: 900;
}

.company-l2-map-l1 strong {
  color: #1d1d1f;
  font-size: 14px;
}

.company-l2-map-l1 small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.company-l2-map-l2-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.company-l2-process-box {
  min-height: 78px;
  border: 1px solid #d0d5dd;
  background: #fff;
  padding: 8px 9px;
  display: grid;
  gap: 4px;
  align-content: start;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.company-l2-process-box.published {
  border-color: #ffb36b;
  background: #fffaf5;
}

.company-l2-process-box.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 121, 0, 0.16), 0 8px 18px rgba(255, 121, 0, 0.12);
}

.company-l2-process-box.pending {
  background: #f8fafc;
  color: #667085;
}

.company-l2-process-box:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(255, 121, 0, 0.12);
  transform: translateY(-1px);
}

.company-l2-process-box span {
  color: #9a4b00;
  font-size: 11px;
  font-weight: 900;
}

.company-l2-process-box strong {
  color: #17202b;
  font-size: 13px;
  line-height: 1.25;
}

.company-l2-process-box small,
.company-l2-map-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.company-l2-map-empty {
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.process-l3-map-panel {
  scroll-margin-top: 12px;
}

.process-l3-map-board {
  display: grid;
  grid-template-columns: 172px 184px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
}

.process-l3-map-root {
  position: relative;
  border: 1px solid #ffb36b;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff1e2 0%, #fff 100%);
  padding: 12px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.process-l3-map-root.secondary {
  border-color: #d0d5dd;
  background: #fff;
}

.process-l3-map-root::after,
.process-l3-map-root.secondary::after {
  content: "";
  position: absolute;
  right: -13px;
  top: 50%;
  width: 13px;
  border-top: 1px solid #d0d5dd;
}

.process-l3-map-root span,
.process-l3-map-box span {
  color: #9a4b00;
  font-size: 11px;
  font-weight: 900;
}

.process-l3-map-root strong {
  font-size: 15px;
  line-height: 1.25;
}

.process-l3-map-root small,
.process-l3-map-box small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.process-l3-map-flow {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 10px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid #e5e5e7;
  border-radius: 8px;
  background: #fbfbfd;
}

.process-l3-map-box {
  position: relative;
  min-height: 84px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 4px;
  align-content: start;
  text-align: left;
}

.process-l3-map-box:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -11px;
  top: 50%;
  width: 10px;
  border-top: 1px solid #d0d5dd;
}

.process-l3-map-box.published {
  border-color: #ffb36b;
  background: #fffaf5;
  cursor: pointer;
}

.process-l3-map-box.pending {
  background: #f8fafc;
  color: #667085;
}

.process-l3-map-box.published:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(255, 121, 0, 0.12);
  transform: translateY(-1px);
}

.process-l3-map-box strong {
  color: #17202b;
  font-size: 13px;
  line-height: 1.25;
}

.process-keyboard-map {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.process-keyboard-l1 {
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff1e2 0%, #fff 100%);
  padding: 16px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.process-keyboard-l1 span {
  color: #9a4b00;
  font-weight: 900;
}

.process-keyboard-l1 strong {
  font-size: 18px;
}

.process-keyboard-l1 small {
  color: var(--muted);
}

.process-keyboard-l2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.process-keyboard-l2-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 10px;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.04);
}

.process-keyboard-l2-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  display: grid;
  gap: 3px;
}

.process-keyboard-l2-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.process-keyboard-l2-head strong {
  font-size: 15px;
}

.process-keyboard-l2-head small {
  color: var(--muted);
  font-size: 12px;
}

.process-keyboard-l3-list,
.process-keyboard-processes {
  display: grid;
  gap: 7px;
}

.process-keyboard-l3-row {
  display: grid;
  gap: 6px;
}

.process-keyboard-l3-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.process-file-map-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  display: grid;
  gap: 3px;
  text-align: left;
}

.process-file-map-button:hover {
  border-color: var(--accent);
  background: #fffaf5;
}

.process-file-map-button span {
  font-size: 13px;
  font-weight: 800;
}

.process-file-map-button small {
  color: var(--muted);
  font-size: 11px;
}

.process-file-map-button.draft {
  opacity: 0.72;
  cursor: default;
}

.landscape-audience-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.it-acceptance-panel {
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 72%);
}

.it-acceptance-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
  display: grid;
  gap: 5px;
}

.it-acceptance-card.ok {
  border-color: #b9e6c9;
  background: #f7fff9;
}

.it-acceptance-card.warn {
  border-color: #ffd2aa;
  background: #fffaf5;
}

.it-acceptance-card strong {
  font-size: 13px;
}

.it-acceptance-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.landscape-audience-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 6px;
  min-height: 110px;
}

.landscape-audience-card strong {
  font-size: 14px;
}

.landscape-audience-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.o2c-map {
  display: grid;
  gap: 14px;
}

.o2c-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(154px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
}

.o2c-node {
  position: relative;
  border: 1px solid #ffd2aa;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf5 0%, #fff 100%);
  padding: 13px 12px 12px;
  min-height: 160px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.o2c-node::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 12px;
  height: 1px;
  background: var(--accent);
}

.o2c-node:last-child::after {
  display: none;
}

.o2c-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.o2c-node small {
  color: var(--muted);
  font-size: 12px;
}

.o2c-side {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.o2c-side > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.o2c-side span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.workbench-step-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(132px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.workbench-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 132px;
  padding: 12px;
  display: grid;
  gap: 7px;
  align-content: start;
  text-align: left;
  transition: border-color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.workbench-step:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(255, 121, 0, 0.08);
}

.workbench-step span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workbench-step.completed {
  border-color: #b7dbc3;
  background: #f4fbf6;
}

.workbench-step.completed span {
  background: var(--green);
  color: #fff;
}

.workbench-step.active {
  border-color: #ffd2aa;
  background: var(--accent-soft);
}

.workbench-step.active span {
  background: var(--accent);
  color: #fff;
}

.workbench-step small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.process-full-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.process-full-tree {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  max-height: 560px;
  overflow: auto;
}

.process-full-node {
  border-left: 2px solid #ffd2aa;
  margin-left: 8px;
  padding: 8px 0 8px 12px;
}

.process-full-node.depth-0 {
  margin-left: 0;
  border-left-color: var(--accent);
}

.process-full-node-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff8f1;
  border-radius: 8px;
  padding: 8px 10px;
}

.process-full-node-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.process-full-process {
  width: calc(100% - 10px);
  margin: 6px 0 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  display: grid;
  gap: 3px;
}

.process-full-process:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(255, 121, 0, 0.08);
}

.process-full-process small {
  color: var(--muted);
}

.template-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.template-chip {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  background: #f2f4f7;
  color: var(--muted);
}

.template-chip.ready {
  background: #e7f5eb;
  color: var(--green);
}

.template-chip.missing {
  background: #fff1e2;
  color: #b45309;
}

@media (max-width: 1100px) {
  .process-full-layout {
    grid-template-columns: 1fr;
  }
}

.modeling-diagnostics {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.definition-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  margin: 12px 0 16px;
}

.definition-header > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-2);
}

.definition-header strong {
  display: block;
  margin-top: 4px;
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.definition-textarea {
  min-height: 96px;
}

.definition-checks {
  margin-top: 14px;
}

.lifecycle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lifecycle-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-2);
  min-height: 118px;
}

.lifecycle .lifecycle-step strong {
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  place-items: initial;
  border-radius: 0;
}

.lifecycle .lifecycle-step .small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.6;
}

.standard-list {
  display: grid;
  gap: 10px;
  line-height: 1.55;
}

.module-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.module-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.bridge-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px;
}

.bridge-card strong {
  display: block;
  margin-bottom: 6px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.template-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  display: grid;
  gap: 6px;
}

.template-link.compact-link {
  padding: 10px;
  gap: 8px;
}

.details-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 12px;
}

.details-summary::-webkit-details-marker {
  display: none;
}

.details-summary::after {
  content: "展开/收起";
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.selected-template {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

.template-link span {
  color: var(--muted);
  font-size: 12px;
}

.template-link span.status.published,
.template-link span.status.confirmed {
  color: var(--green);
}

.template-link span.status.revision,
.template-link span.status.draft {
  color: var(--amber);
}

.template-link span.status.approved,
.template-link span.status.review {
  color: var(--accent);
}

.template-link span.status.removed {
  color: var(--red);
}

.maturity-radar-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 260px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  margin-top: 12px;
}

.maturity-radar-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.maturity-radar-legend span {
  width: 16px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.maturity-radar-legend .current {
  background: #d97706;
}

.maturity-radar-legend .benchmark {
  background: #0b2f5f;
}

.maturity-radar-legend .previous {
  background: #98a2b3;
}

.maturity-radar-svg {
  width: 260px;
  height: 260px;
}

.maturity-radar-grid line {
  stroke: #d0d5dd;
  stroke-width: 1;
}

.maturity-radar-grid text {
  fill: #667085;
  font-size: 9px;
  text-anchor: middle;
}

.maturity-radar-ring {
  fill: none;
  stroke: #e4e7ec;
  stroke-width: 1;
}

.maturity-radar-area {
  stroke-width: 2;
}

.maturity-radar-area.current {
  fill: rgba(217, 119, 6, 0.18);
  stroke: #d97706;
}

.maturity-radar-area.benchmark {
  fill: rgba(11, 47, 95, 0.08);
  stroke: #0b2f5f;
}

.maturity-radar-area.previous {
  fill: rgba(152, 162, 179, 0.12);
  stroke: #98a2b3;
}

.admin-template-grid {
  margin-top: 12px;
}

.admin-table-scroll {
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table-scroll .table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.kpi-manual-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.kpi-manual-chapter {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.kpi-manual-chapter h4 {
  margin: 0 0 6px;
}

.ops-list {
  display: grid;
  gap: 10px;
}

.ops-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-2);
}

.section-title {
  margin: 24px 0 12px;
  font-size: 16px;
  font-weight: 780;
}

.compact-title {
  margin-top: 16px;
  font-size: 14px;
}

.edge-table {
  margin-top: 8px;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  font-size: 12px;
}

.check-item span {
  font-weight: 800;
}

.diff-table td {
  max-width: 220px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll .table,
.admin-table-scroll .table {
  min-width: 760px;
}

.audit-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.audit-table {
  min-width: 760px;
}

.audit-table td:nth-child(2) {
  min-width: 240px;
}

.compact-multi {
  min-width: 170px;
  min-height: 104px;
  font-size: 12px;
}

.compact-textarea {
  min-height: 72px;
  margin-top: 6px;
  font-size: 12px;
}

.activity-doc-table {
  min-width: 1120px;
}

.activity-doc-table textarea {
  min-width: 190px;
}

.activity-doc-table input {
  min-width: 96px;
}

.connector-json {
  min-width: 220px;
  min-height: 116px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.empty {
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--line);
  background: #fff;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.pill.selected-pill {
  border-color: var(--accent);
  background: #fff7ed;
  color: var(--accent);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(29, 29, 31, 0.28);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  padding: 20px;
}

.modal-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: 0;
}

.modal-body {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.modal-body p {
  margin: 0;
}

.modal-help {
  color: var(--muted);
  margin-bottom: 10px !important;
}

.modal-field {
  width: 100%;
  min-height: 42px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.api-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #0f1720;
  color: #dbe7f3;
  padding: 12px;
  border-radius: 8px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.readiness-score {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 850;
  background: #fff4df;
  color: var(--amber);
  border: 1px solid #f0d299;
}

.readiness-score.ready {
  background: #e7f5eb;
  color: var(--green);
  border-color: #b9dfc5;
}

.readiness-score.needs_action {
  background: #fdecea;
  color: var(--red);
  border-color: #f2c5bf;
}

.readiness-summary,
.readiness-blockers,
.benchmark-list,
.quickstart-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.readiness-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.benchmark-item {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 12px;
}

.benchmark-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.benchmark-item strong {
  display: block;
}

.benchmark-item span {
  color: var(--muted);
  font-size: 12px;
}

.benchmark-item p {
  margin: 8px 0 0;
}

.quickstart-list div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-2);
}

.quickstart-list strong {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 12px;
}

.link-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13px;
}

.checkline input {
  accent-color: var(--accent);
}

:where(.grid, .toolbar, .row-actions, .user-tools, .score-row-head, .process-row) > * {
  min-width: 0;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar {
    background: #fbfbfd;
  }

  .modal-backdrop {
    background: rgba(245, 245, 247, 0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (forced-colors: active) {
  .button,
  .panel,
  .input,
  .select,
  .textarea,
  .status,
  .template-link {
    border: 1px solid CanvasText;
  }

  .button.accent,
  .button.secondary,
  .nav-button.active {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .diagram-left-rail {
    position: static;
    max-height: none;
  }

  .split,
  .split.wide-left,
  .designer,
  .diagram-workbench,
  .diagram-page-toolbar,
  .diagram-main-stage .diagram-designer,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .grid.cols-5,
  .doc-grid,
	  .definition-header,
	  .definition-grid,
	  .process-map-rule-row,
	  .process-keyboard-map,
	  .company-l2-map-header,
	  .company-l2-map-row,
	  .landscape-audience-grid,
  .o2c-side,
  .lifecycle,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    padding: 16px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .topbar {
    min-height: 64px;
    padding: 10px 14px;
  }

  .brand-logo-frame {
    width: 40px;
    height: 40px;
  }

  .brand-title {
    font-size: 16px;
  }

  .main {
    padding: 14px;
  }

  .panel.pad,
  .metric,
  .hero,
  .module-card,
  .bridge-card {
    padding: 14px;
  }

  .toolbar,
  .row-actions,
  .user-tools,
  .filter-bar {
    align-items: stretch;
  }

  .toolbar > *,
  .row-actions > *,
  .user-tools > *,
  .filter-bar > * {
    flex: 1 1 180px;
  }

  .button {
    justify-content: center;
    min-height: 38px;
  }

  .process-row,
  .template-link {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .brand-title {
    line-height: 1.25;
  }

  .main {
    padding: 10px;
  }

  .panel-title,
  .section-title {
    font-size: 16px;
  }

  .metric-value {
    font-size: 22px;
  }

  .button,
  .input,
  .select,
  .textarea {
    width: 100%;
  }

  .nav-button {
    min-height: 40px;
  }
}

.mini-board-column {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-2);
}

.mini-board-column > strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}
