:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --ink: #172033;
  --muted: #67758a;
  --line: #dbe3ee;
  --navy: #0f2040;
  --blue: #1652a3;
  --teal: #0a8c7c;
  --teal-soft: #e5f4f1;
  --red: #b03010;
  --red-soft: #fceeea;
  --violet: #5e30a0;
  --violet-soft: #f0e9fb;
  --gold: #b87400;
  --gold-soft: #fff4de;
  --shadow: 0 18px 50px rgba(24, 38, 63, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

.sidebar {
  width: 300px;
  min-height: 100vh;
  padding: 22px;
  background: #101d32;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(10, 140, 124, 0.22);
  border-radius: 8px;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 17px;
}

.brand p,
.sidebar label,
.side-panel .panel-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 0 10px;
  cursor: pointer;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.icon {
  width: 22px;
  text-align: center;
  color: #9ecfc9;
}

.side-panel {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(158, 207, 201, 0.28);
  background: rgba(10, 140, 124, 0.16);
  border-radius: 8px;
}

.project-card strong {
  color: white;
  line-height: 1.35;
}

.project-card span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.side-panel label {
  display: grid;
  gap: 6px;
}

.project-status {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.project-status div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.project-status span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.project-status strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1.4;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 11px;
  outline: none;
}

.side-panel input,
.side-panel textarea {
  color: white;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.app {
  flex: 1;
  min-width: 0;
  padding: 24px;
  overflow: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar h2 {
  margin: 2px 0 0;
  font-size: 24px;
  color: var(--navy);
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.status-strip,
.control-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status.online {
  color: var(--teal);
  border-color: #a8d6cf;
  background: var(--teal-soft);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.workspace-grid {
  grid-template-columns: minmax(390px, 0.9fr) minmax(560px, 1.1fr);
}

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

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
  color: var(--navy);
}

.timer {
  min-width: 72px;
  text-align: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-weight: 800;
  color: var(--navy);
}

.recorder {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  margin-bottom: 14px;
}

.recorder p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.round-btn {
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  cursor: pointer;
}

.round-btn span {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  display: block;
}

.round-btn.recording span {
  border-radius: 4px;
}

.progress-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #a8d6cf;
  background: var(--teal-soft);
  border-radius: 8px;
  margin-bottom: 12px;
}

.progress-card strong {
  display: block;
  margin-top: 2px;
  color: var(--teal);
  font-size: 16px;
}

.progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(10, 140, 124, 0.16);
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--teal);
  transition: width 0.2s ease;
}

.guide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.interview-guide {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  margin-bottom: 14px;
  overflow: hidden;
}

.guide-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
}

.guide-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
}

.guide-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.guide-list {
  display: grid;
  max-height: 420px;
  overflow: auto;
}

.selected-guide-summary {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #eef6ff;
}

.selected-guide-summary.done {
  background: var(--teal-soft);
}

.selected-guide-summary > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.selected-guide-summary.done > span {
  background: var(--teal);
}

.selected-guide-summary strong {
  display: block;
  color: var(--navy);
  line-height: 1.35;
}

.selected-guide-summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.guide-field {
  display: grid;
  gap: 5px;
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: white;
  text-align: left;
  padding: 12px;
}

button.guide-field {
  cursor: pointer;
}

.guide-field.active,
button.guide-field:hover {
  background: #f4f8fe;
  box-shadow: inset 3px 0 0 var(--blue);
}

.guide-field strong {
  color: var(--blue);
  font-size: 13px;
}

.guide-field span {
  color: #30415d;
  font-size: 12px;
  line-height: 1.5;
}

.guide-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
  padding: 11px 12px;
  cursor: pointer;
}

.guide-item:last-child {
  border-bottom: none;
}

.guide-item:hover {
  background: #f5f8fb;
}

.guide-item.active {
  background: #eef6ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.guide-item.done {
  background: var(--teal-soft);
}

.guide-check {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.guide-item.active .guide-check {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
}

.guide-item.done .guide-check {
  color: white;
  border-color: var(--teal);
  background: var(--teal);
}

.guide-item strong {
  display: block;
  font-size: 13px;
  color: var(--navy);
  line-height: 1.35;
}

.guide-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.btn {
  min-height: 36px;
  border: 1px solid var(--line);
  background: white;
  color: var(--navy);
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.btn:hover,
.round-btn:hover {
  filter: brightness(0.97);
}

.field-block {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

#transcript {
  min-height: 260px;
  color: #243145;
}

.active-question {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(260px, 1.15fr);
  gap: 14px;
  align-items: start;
  border: 1px solid #aabfe8;
  background: #ebf1fb;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}

.question-block h4,
.active-question h4 {
  margin: 3px 0 6px;
  color: var(--blue);
  font-size: 16px;
}

.question-block p,
.active-question p {
  margin: 0;
  color: #30415d;
  line-height: 1.55;
}

.active-question ul {
  margin: 0;
  padding-left: 18px;
  color: #30415d;
  line-height: 1.55;
}

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

.outline-grid div {
  border: 1px solid #c9d8f0;
  background: white;
  border-radius: 8px;
  padding: 10px;
}

.outline-grid strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
}

.outline-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.node-index-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.node-index-list div {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c9d8f0;
  background: white;
  border-radius: 8px;
  padding: 8px;
}

.node-index-list span {
  width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--navy);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.node-index-list strong {
  color: var(--navy);
  font-size: 13px;
}

.flow-compare {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.board-section {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.board-section:first-of-type {
  margin-top: 0;
}

.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.board-head h4 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 16px;
}

.board-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.process-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 13px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.process-card:hover {
  border-color: #aabfe8;
  box-shadow: 0 10px 30px rgba(22, 82, 163, 0.1);
  transform: translateY(-1px);
}

.process-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 82, 163, 0.12);
}

.process-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.card-actions {
  display: flex;
  gap: 6px;
}

.process-card-head span {
  display: inline-flex;
  min-width: 34px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: white;
  background: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.mini-edit {
  min-height: 28px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--blue);
  border-radius: 7px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.mini-edit.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: #edb4a8;
}

.process-card h4 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.process-card .owner {
  margin: 3px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.node-fields {
  display: grid;
  gap: 8px;
}

.node-fields div {
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.node-fields strong {
  display: block;
  color: var(--blue);
  font-size: 12px;
  margin-bottom: 3px;
}

.node-fields p {
  margin: 0;
  color: #30415d;
  font-size: 12px;
  line-height: 1.48;
}

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

.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.summary-card span {
  display: block;
  color: var(--teal);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--navy);
}

.summary-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ai-flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 10px;
}

.hidden {
  display: none !important;
}

.ai-draft-empty {
  min-height: 116px;
  display: grid;
  place-items: center;
  border: 1px dashed #aabfe8;
  border-radius: 8px;
  background: #f4f8fe;
  color: var(--muted);
  text-align: center;
  padding: 18px;
  font-weight: 700;
}

.ai-flow-card {
  min-height: 106px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.ai-flow-card span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ai-flow-card h4 {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.35;
}

.ai-flow-card p,
.ai-flow-card small {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.ai-flow-card.ai-auto {
  border-color: var(--teal);
  background: var(--teal);
}

.ai-flow-card.ai-auto h4,
.ai-flow-card.ai-auto p,
.ai-flow-card.ai-auto small,
.ai-flow-card.ai-auto span,
.ai-flow-card.new h4,
.ai-flow-card.new p,
.ai-flow-card.new small,
.ai-flow-card.new span {
  color: white;
}

.ai-flow-card.ai-assist {
  border-color: var(--blue);
}

.ai-flow-card.ai-assist h4 {
  color: var(--blue);
}

.ai-flow-card.external {
  border-style: dashed;
  background: #f3f5f8;
}

.ai-flow-card.new {
  border-color: var(--gold);
  background: var(--gold);
}

.next-step-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #9ecfc9;
  border-radius: 8px;
  background: rgba(230, 244, 242, 0.96);
  backdrop-filter: blur(6px);
}

.next-step-bar strong {
  color: var(--teal);
  font-size: 15px;
}

.next-step-bar p {
  margin: 3px 0 0;
  color: #365c59;
  font-size: 12px;
}

.flow-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: stretch;
  min-height: 96px;
  border-bottom: 1px solid var(--line);
}

.flow-row:last-child {
  border-bottom: none;
  background: #fbfdff;
}

.flow-tag {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  border-right: 1px solid var(--line);
}

.flow-tag.muted {
  background: #f0f3f7;
  color: var(--muted);
}

.flow-tag.ai {
  color: var(--teal);
  background: var(--teal-soft);
}

.flow-track {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  overflow-x: auto;
}

.node {
  flex: 0 0 108px;
  min-height: 68px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: white;
}

.node strong {
  display: block;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.35;
}

.node span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.node.ai-auto {
  border-color: var(--teal);
  background: var(--teal);
}

.node.ai-auto strong,
.node.ai-auto span {
  color: white;
}

.node.ai-assist {
  border-color: var(--blue);
}

.node.ai-assist strong {
  color: var(--blue);
}

.node.external {
  border-style: dashed;
  background: #f3f5f8;
}

.node.new {
  border-color: var(--gold);
  background: var(--gold);
}

.node.new strong,
.node.new span {
  color: white;
}

.node.gap {
  border-style: dashed;
  border-color: #edb4a8;
  background: var(--red-soft);
}

.diagnosis-tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0 12px;
  overflow-x: auto;
}

.tab {
  min-height: 34px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}

.table th {
  text-align: left;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.74);
  padding: 9px 10px;
  font-size: 12px;
}

.table td {
  padding: 10px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}

.table tr:nth-child(even) td {
  background: #fafbfd;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.confirmed {
  color: var(--teal);
  background: var(--teal-soft);
}

.pill.missing {
  color: var(--red);
  background: var(--red-soft);
}

.pill.unclear {
  color: var(--gold);
  background: var(--gold-soft);
}

.pill.human {
  color: var(--violet);
  background: var(--violet-soft);
}

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

.template-card,
.agent-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.template-card h4,
.agent-card h4 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 15px;
}

.template-card p,
.agent-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.kv {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.kv div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

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

.kv strong {
  font-weight: 600;
  line-height: 1.45;
}

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

.settings-layout .wide {
  grid-column: 1 / -1;
}

.settings-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.settings-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.settings-list span {
  color: var(--muted);
}

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

code {
  display: block;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f9fbfd;
  color: var(--blue);
  font-family: Consolas, "Courier New", monospace;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 32, 0.48);
}

.modal-dialog {
  position: relative;
  width: min(780px, 100%);
  max-height: min(820px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 28px 80px rgba(12, 20, 36, 0.24);
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 2px 0 0;
  color: var(--navy);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

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

.modal-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.modal-form label:nth-child(n + 3) {
  grid-column: 1 / -1;
}

.modal-form textarea {
  min-height: 82px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

  .sidebar {
    width: 100%;
    min-height: auto;
  }

  .workspace-grid,
  .settings-layout,
  .template-grid,
  .agent-grid,
  .process-card-grid,
  .diagnosis-summary,
  .ai-flow-grid,
  .active-question {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 14px;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .flow-row {
    grid-template-columns: 1fr;
  }

  .flow-tag {
    min-height: 34px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .guide-actions {
    grid-template-columns: 1fr;
  }

  .board-head,
  .next-step-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-form {
    grid-template-columns: 1fr;
  }

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

  .node-index-list {
    grid-template-columns: 1fr;
  }
}
