
:root {
  --bg: #f8fafc;
  --panel: rgba(255, 255, 255, 0.75);
  --ink: #1e293b;
  --muted: #64748b;
  --soft: #f1f5f9;
  --line: rgba(0, 0, 0, 0.05);
  --blue: #1f4dff;
  --cyan: #0ea5e9;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
  --glass-shadow: 0 12px 32px rgba(31, 77, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  color: var(--ink);
  background-color: var(--bg);
  background-image: 
    linear-gradient(rgba(31, 77, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 77, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}


button,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.simple-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(620px, 1fr) 310px;
  grid-template-rows: 72px 1fr 42px;
}

.topbar {
  grid-column: 1 / 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 0 22px;
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px rgba(58, 99, 255, 0.24);
}

/* Task Meta removed */

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 18px;
}

.primary-button,
.ghost-button {
  min-height: 40px;
  border-radius: 13px;
  padding: 0 17px;
  border: 1px solid var(--line);
  font-weight: 800;
}

.primary-button {
  color: white;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(58, 99, 255, 0.22);
}

.ghost-button {
  color: #586477;
  background: white;
}

.sidebar,
.statusbar {
  background: rgba(255, 255, 255, 0.9);
}

.sidebar {
  grid-row: 2 / 4;
  border-right: 1px solid var(--line);
  padding: 20px 16px;
}

.sidebar-label {
  margin: 8px 0 12px;
  color: #9ca6b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr 10px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  margin-bottom: 9px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: #5a6678;
  background: transparent;
  text-align: left;
}

.nav-item.active {
  color: #2448d9;
  border-color: #cbd7ff;
  background: #eef3ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

.nav-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: #f3f6fb;
  font-weight: 900;
}

.nav-item.active .nav-icon {
  background: white;
}

.nav-item strong,
.nav-item small {
  display: block;
}

.nav-item small {
  margin-top: 3px;
  color: #9aa4b5;
}

.nav-item i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c7cfdb;
}

.nav-item.active i,
.nav-item.done i {
  background: var(--green);
}

.flow-card {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
}

.flow-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-card li {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  color: #7a8496;
}

.flow-card li span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cfd6e1;
}

.flow-card li.done span {
  background: var(--green);
}

.flow-card li.active {
  color: var(--blue);
  font-weight: 900;
}

.flow-card li.active span {
  border: 3px solid #c9d5ff;
  background: var(--blue);
}

.progress-meter {
  height: 9px;
  margin: 14px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebf4;
}

.progress-meter b {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.flow-card small {
  color: #8c96a7;
  line-height: 1.7;
}

.workspace {
  grid-column: 2;
  grid-row: 2;
  padding: 24px;
  overflow: auto;
}

.view {
  display: none;
  animation: rise 0.24s ease both;
}

.view.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-panel {
  min-height: 180px;
  padding: 34px;
  border-radius: 30px;
  color: white;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(135deg, #16213d, #11687b);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 11px;
  color: #65d8e6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.hero-panel h1,
.section-heading h1 {
  max-width: 860px;
  margin: 0;
  font-size: 34px;
  line-height: 1.26;
}

.hero-panel p:not(.eyebrow),
.section-heading p:not(.eyebrow) {
  max-width: 760px;
  color: #6e798b;
  font-size: 16px;
  line-height: 1.8;
}

.hero-panel p:not(.eyebrow) {
  color: #c6d6e6;
}

.setup-grid,
.agent-grid,
.timeline,
.file-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.run-form,
.run-status-card,
.recent-run-panel,
.template-panel,
.preference-panel,
.run-command-panel,
.run-issue-panel,
.run-log-panel,
.topic-gate-panel {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.run-form {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 16px;
  padding: 20px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field--wide {
  grid-row: span 2;
}

.form-field label {
  color: #7b8496;
  font-weight: 900;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: #fbfcff;
}

.form-field input {
  height: 48px;
  padding: 0 14px;
}

.platform-choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.platform-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: #5f6b7e;
  background: #fbfcff;
  font-weight: 900;
}

.platform-choice input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.platform-choice.is-selected {
  color: var(--blue);
  border-color: #cbd7ff;
  background: #eef3ff;
}

.form-field select,
.form-field textarea {
  padding: 12px;
}

.run-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.run-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.template-panel,
.preference-panel {
  padding: 18px 20px;
}

.scenario-template-list,
.agent-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.scenario-template-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.scenario-template-card.is-selected {
  border-color: var(--blue);
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.12);
}

.scenario-template-card strong,
.scenario-template-card small {
  display: block;
}

.scenario-template-card small {
  margin-top: 6px;
  color: #738095;
}

.template-market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.template-market-toolbar select {
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--ink);
  background: #fff;
}

.template-market-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.template-market-list {
  display: grid;
  gap: 12px;
}

.template-market-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.template-market-card.is-selected,
.template-market-card.is-focused {
  border-color: var(--blue);
  box-shadow: 0 18px 40px rgba(29, 78, 216, 0.13);
}

.template-market-card span,
.template-detail-kicker {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  color: #2457c5;
  background: #e9f0ff;
  font-size: 12px;
  font-weight: 700;
}

.template-market-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
}

.template-market-card p {
  margin: 8px 0 0;
  color: #59667a;
  line-height: 1.65;
}

.template-detail-panel {
  position: sticky;
  top: 20px;
  border: 1px solid rgba(29, 78, 216, 0.16);
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 246, 255, 0.92)),
    #fff;
  box-shadow: 0 20px 48px rgba(29, 78, 216, 0.12);
}

.template-detail-panel h2 {
  margin: 12px 0 8px;
}

.template-detail-panel p {
  color: #58667b;
  line-height: 1.7;
}

.template-detail-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.template-detail-block strong {
  display: block;
  margin-bottom: 8px;
}

.template-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-chip-row span {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  color: #1e40af;
  background: #eff6ff;
  font-size: 13px;
}

.template-detail-panel .primary-button {
  width: 100%;
  margin-top: 18px;
}

.roadmap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.roadmap-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.roadmap-item {
  position: relative;
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.roadmap-item span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.roadmap-item strong {
  display: block;
  margin-bottom: 6px;
}

.roadmap-item p {
  margin: 0;
  color: #5c697d;
  line-height: 1.7;
}

.roadmap-item--risk {
  background: linear-gradient(135deg, #fff, #fff7ed);
  border-color: rgba(245, 158, 11, 0.24);
}

.roadmap-item--migration {
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
  border-color: rgba(22, 163, 74, 0.24);
}

.roadmap-item--gate {
  background: linear-gradient(135deg, #ffffff, #fef2f2);
  border-color: rgba(220, 38, 38, 0.2);
}

.roadmap-item--gate span {
  color: #b91c1c;
}

.muted-text {
  color: #738095;
}

.empty-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.empty-file-guide {
  margin: 16px 0;
  border: 1px dashed rgba(29, 78, 216, 0.32);
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.9));
}

.empty-file-guide strong {
  display: block;
  margin-bottom: 8px;
}

.empty-file-guide p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.simple-qa-status {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  border: 1px solid rgba(29, 78, 216, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: #1e40af;
  background: rgba(239, 246, 255, 0.94);
  font-size: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.preference-panel textarea,
.agent-editor-card textarea,
.agent-editor-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
}

.preference-panel .ghost-button {
  margin-top: 10px;
}

.agent-editor {
  margin-bottom: 18px;
}

.agent-editor-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.agent-editor-card small {
  display: block;
  margin-top: 5px;
  color: #738095;
  line-height: 1.5;
}

.run-status-card {
  padding: 18px 20px;
}

.primary-next-action {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: 18px;
  color: white;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 30px rgba(58, 99, 255, 0.2);
  font-weight: 900;
}

.recent-run-panel,
.run-command-panel,
.run-issue-panel,
.run-log-panel,
.topic-gate-panel {
  padding: 18px 20px;
}

.run-command-panel {
  border-color: #cbd7ff;
  background:
    radial-gradient(circle at 95% 5%, rgba(18, 185, 200, 0.18), transparent 24%),
    linear-gradient(135deg, #ffffff, #f2f6ff);
}

.run-command-panel .section-mini-heading {
  align-items: flex-start;
}

.run-command-panel p {
  max-width: 860px;
  margin: 0;
  color: #526074;
  font-size: 17px;
  line-height: 1.8;
}

.command-state {
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  color: #3454df;
  background: #eaf0ff;
}

.command-state--blocked {
  color: #b86900;
  background: #fff1cf;
}

.command-state--delivered,
.command-state--preview {
  color: #138852;
  background: #e8f8ef;
}

.command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.run-issue-panel {
  display: none;
}

.run-issue-panel.has-issues {
  display: block;
  border-color: #f0c57a;
  background: #fffaf0;
}

.run-issue-panel.is-warning-only {
  border-color: #d9e2f3;
  background: #f8fbff;
}

.run-issue-list {
  display: grid;
  gap: 10px;
}

.run-issue-list p {
  margin: 0;
  color: #7b8496;
  line-height: 1.7;
}

.run-issue-item {
  padding: 14px 16px;
  border: 1px solid #f2d39a;
  border-radius: 16px;
  background: white;
}

.run-issue-panel.is-warning-only .run-issue-item {
  border-color: #dfe8f5;
}

.run-issue-panel.is-warning-only .run-issue-item strong {
  color: #3154ec;
}

.run-issue-item strong {
  display: block;
  color: #a95f00;
}

.run-issue-item p,
.run-issue-item small {
  display: block;
  margin: 7px 0 0;
  color: #6f5c41;
  line-height: 1.7;
}

.issue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.issue-actions button {
  border: 1px solid #e2e9f4;
  border-radius: 11px;
  padding: 8px 11px;
  color: #3154ec;
  background: #f5f8ff;
  font-weight: 800;
}

.section-mini-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.section-mini-heading strong {
  font-size: 18px;
}

.section-mini-heading span {
  color: #7b8496;
  font-weight: 800;
}

.text-button {
  border: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 900;
}

.recent-run-list,
.run-log-list,
.topic-choice-list {
  display: grid;
  gap: 10px;
}

.recent-run-tools {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 10px;
  margin-bottom: 12px;
}

.recent-run-tools input,
.recent-run-tools select,
.preview-toolbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfcff;
}

.recent-run-list p,
.run-log-list p,
.topic-choice-list p {
  margin: 0;
  color: #7b8496;
  line-height: 1.7;
}

.recent-run-item,
.run-log-item {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
  text-align: left;
}

.topic-choice-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #465266;
  background: #fbfcff;
  text-align: left;
}

.topic-gate-panel {
  opacity: 0.78;
}

.topic-gate-panel.is-important {
  opacity: 1;
  border-color: #a9baff;
  background:
    radial-gradient(circle at 100% 0%, rgba(58, 99, 255, 0.12), transparent 24%),
    var(--panel);
}

.topic-choice-item strong {
  font-size: 17px;
  line-height: 1.5;
}

.topic-choice-item small {
  color: #7c8798;
  line-height: 1.7;
}

.topic-choice-item small b {
  color: #4a5568;
}

.topic-choice-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dfe8f5;
  border-radius: 16px;
  color: #66738a;
  background: #f8fbff;
  line-height: 1.6;
}

.topic-choice-item.is-selected {
  border-color: #9fb4ff;
  background: #eef3ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

.recent-run-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.recent-run-item strong,
.recent-run-item small,
.run-log-item strong,
.run-log-item small {
  display: block;
}

.recent-run-item small,
.run-log-item small {
  color: #8792a4;
}

.run-status-running {
  color: var(--blue);
}

.run-status-waiting_gate {
  color: var(--orange);
}

.run-status-done {
  color: var(--green);
}

.run-status-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.run-status-card p {
  margin: 0;
  color: #6f7a8c;
  line-height: 1.7;
}

.setup-card,
.agent-card,
.timeline-card,
.file-card,
.preview-panel,
.chat-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.setup-card,
.agent-card,
.timeline-card,
.file-card {
  padding: 22px;
}

.setup-card.selected {
  border-color: #b7c7ff;
  background: #f2f6ff;
}

.setup-card span,
.agent-card span,
.file-card span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--blue);
  background: #edf2ff;
  font-size: 12px;
  font-weight: 900;
}

.setup-card h2,
.agent-card h2,
.file-card h2 {
  margin: 16px 0 9px;
}

.setup-card p,
.agent-card p,
.timeline-card p,
.file-card p {
  margin: 0;
  color: #738095;
  line-height: 1.8;
}

.section-heading {
  padding: 8px 4px 4px;
}

.section-heading .eyebrow {
  color: var(--blue);
}

.timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.progress-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.timeline-card {
  min-height: 150px;
  border-top: 5px solid #ccd5e2;
}

.timeline-card.done {
  border-top-color: var(--green);
}

.timeline-card.active {
  border-color: #b7c7ff;
  border-top-color: var(--blue);
  background: #f5f8ff;
}

.timeline-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 20px;
}

.run-log-panel {
  color: #6d788b;
}

.run-log-panel summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.run-log-panel summary::-webkit-details-marker {
  display: none;
}

.run-log-panel summary strong {
  font-size: 18px;
}

.run-log-panel summary span {
  color: #7b8496;
  font-weight: 800;
}

.run-log-panel[open] .run-log-list {
  margin-top: 14px;
}

.preview-layout {
  display: grid;
  grid-template-columns: 280px minmax(520px, 1fr) 360px;
  gap: 20px;
}

.review-output-sidebar {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.review-output-list {
  display: grid;
  gap: 10px;
}

.review-output-list p {
  margin: 0;
  color: #7b8496;
  line-height: 1.7;
}

.review-output-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #556174;
  background: #fbfcff;
  text-align: left;
}

.review-output-item span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #3154ec;
  background: #edf2ff;
  font-size: 12px;
  font-weight: 900;
}

.review-output-item strong {
  line-height: 1.45;
}

.review-output-item small {
  color: #8a95a7;
}

.review-output-item.is-active {
  border-color: #9fb4ff;
  background: #eef3ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

.preview-panel {
  overflow: hidden;
}

.review-output-meta {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.review-output-meta strong {
  font-size: 18px;
}

.review-output-meta span {
  color: #7b8496;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.review-empty-state {
  margin: 26px;
  padding: 28px;
  border: 1px dashed #cfd8e6;
  border-radius: 20px;
  color: #7b8496;
  background: #f8fafc;
}

.review-empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
}

.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}

.preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.platform-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  color: #7b8597;
  background: #f1f4f9;
  font-weight: 900;
}

.platform-tab.active {
  color: var(--blue);
  border-color: #cbd7ff;
  background: #eaf0ff;
}

.article-preview {
  padding: 30px 34px;
}

.article-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.article-head h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.35;
}

.word-count {
  flex: none;
  align-self: start;
  padding: 8px 13px;
  border: 1px solid #bfe8d1;
  border-radius: 999px;
  color: #14945a;
  background: #ebfaf2;
  font-weight: 900;
}

.article-preview p {
  color: #5f6b7e;
  font-size: 17px;
  line-height: 2;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0;
}

.tag {
  padding: 7px 11px;
  border-radius: 999px;
  color: #3454df;
  background: #edf1ff;
  font-weight: 800;
}

.platform-brief {
  margin-top: 24px;
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
}

.platform-brief strong {
  display: block;
  margin-bottom: 8px;
}

.chat-panel {
  padding: 20px;
}

.panel-heading h2 {
  margin: 0 0 8px;
}

.panel-heading p {
  color: #6f7a8d;
  line-height: 1.7;
}

#agent-chat-form {
  display: grid;
  gap: 12px;
}

#agent-chat-form label {
  color: #7d8798;
  font-weight: 900;
}

.scope-help {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-radius: 13px;
  color: #5f6b7e;
  background: #f6f8fc;
  font-size: 13px;
  line-height: 1.6;
}

#revision-scope,
#agent-message {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: #fbfcff;
}

#revision-scope {
  height: 42px;
  padding: 0 12px;
}

#agent-message {
  resize: vertical;
  min-height: 110px;
  padding: 13px;
  line-height: 1.7;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-prompts button {
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  color: #2b66b7;
  background: #edf6ff;
  font-size: 13px;
  font-weight: 800;
}

.version-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.version-box h3 {
  margin: 0 0 12px;
}

#adoption-action {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

#adoption-action p {
  margin: 0;
  color: #778295;
  line-height: 1.7;
}

#adoption-action button {
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  color: white;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  font-weight: 900;
}

.markdown-preview {
  overflow: auto;
  max-height: 680px;
  padding: 8px 2px;
  color: #344054;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.95;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
  margin: 1.7em 0 0.7em;
  color: #17233d;
  line-height: 1.45;
}

.markdown-preview h1 {
  margin-top: 0.35em;
  padding-bottom: 0.42em;
  border-bottom: 1px solid #e3e9f2;
  font-size: 28px;
}

.markdown-preview h2 {
  font-size: 23px;
}

.markdown-preview h3 {
  font-size: 19px;
}

.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
  font-size: 17px;
}

.markdown-preview p {
  margin: 0 0 1.05em;
  color: #344054;
  font-size: inherit;
  line-height: inherit;
}

.markdown-preview ul,
.markdown-preview ol {
  margin: 0 0 1.1em;
  padding-left: 1.7em;
}

.markdown-preview li + li {
  margin-top: 0.42em;
}

.markdown-preview blockquote {
  margin: 1.1em 0;
  padding: 0.3em 1em;
  border-left: 4px solid #9eb6ff;
  color: #5f6b7e;
  background: #f5f8ff;
}

.markdown-preview blockquote p {
  margin: 0;
  color: inherit;
}

.markdown-preview hr {
  height: 1px;
  margin: 1.8em 0;
  border: 0;
  background: #e1e8f1;
}

.markdown-preview a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-preview code {
  padding: 0.14em 0.38em;
  border-radius: 5px;
  color: #9a3412;
  background: #fff3ed;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

.markdown-preview .markdown-code {
  overflow: auto;
  margin: 1.2em 0;
  padding: 14px 16px;
  border-radius: 10px;
  color: #d9e4ff;
  background: #15213b;
  line-height: 1.7;
  white-space: pre;
}

.markdown-preview .markdown-code code {
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 13px;
}

.markdown-preview .markdown-empty {
  color: var(--muted);
}

.version-item {
  padding: 13px;
  margin-bottom: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfcff;
}

.version-item.is-selected {
  border-color: var(--blue);
  background: #f2f6ff;
}

.version-item strong {
  display: block;
}

.version-item small {
  color: #8994a6;
  line-height: 1.7;
}

.version-diff-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #cbd7ff;
  border-radius: 16px;
  background: #f8fbff;
}

.version-diff-panel p {
  margin: 6px 0;
  color: #647084;
  line-height: 1.6;
}

.version-diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.version-diff-grid section {
  min-width: 0;
}

.version-diff-grid pre {
  overflow: auto;
  max-height: 180px;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  white-space: pre-wrap;
  color: #334155;
  font-size: 12px;
  line-height: 1.6;
}

.file-list {
  display: grid;
  grid-template-columns: 1fr;
}

.file-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.file-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.delivery-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.delivery-package-panel {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.delivery-package-panel.is-ready {
  border-color: #9bd6b3;
  background: #f2fff7;
}

.delivery-package-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.delivery-package-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.delivery-package-grid strong {
  display: block;
  font-size: 22px;
}

.delivery-package-grid span,
.delivery-package-panel p,
.delivery-package-panel li {
  color: #647084;
  line-height: 1.7;
}

.delivery-package-panel ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.delivery-step {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcff;
}

.delivery-step span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #7b8496;
  background: #eef2f7;
  font-weight: 900;
}

.delivery-step.is-done {
  border-color: #bfe8d1;
  background: #f1fbf6;
}

.delivery-step.is-done span {
  color: white;
  background: var(--green);
}

.delivery-step small {
  color: #748095;
  line-height: 1.5;
}

.file-summary-card {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.file-summary-card strong {
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.file-summary-card span {
  font-weight: 900;
}

.file-summary-card small {
  color: #7b8496;
  line-height: 1.5;
}

.file-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.file-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.file-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.file-actions button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  color: #596578;
  background: white;
  font-weight: 800;
}

.statusbar {
  grid-column: 3;
  grid-row: 2;
  border-left: 1px solid var(--line);
  padding: 20px 16px;
  overflow: auto;
}

.status-block {
  margin-bottom: 22px;
}

.status-block h2 {
  margin: 0 0 12px;
  color: #98a2b3;
  font-size: 13px;
  letter-spacing: 0.13em;
}

.confirm-item,
.active-agent,
.delivery-item {
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.confirm-item strong,
.confirm-item span {
  display: inline-block;
}

.confirm-item span {
  float: right;
  padding: 4px 8px;
  border-radius: 999px;
  color: #637083;
  background: #f1f4f8;
  font-size: 12px;
  font-weight: 900;
}

.confirm-item.done span {
  color: #169456;
  background: #e9f9f0;
}

.confirm-item.waiting {
  border-color: #f2cc7f;
  background: #fffaf0;
}

.confirm-item.waiting span {
  color: #be7600;
  background: #fff0ce;
}

.confirm-item p,
.active-agent p {
  clear: both;
  margin: 8px 0 0;
  color: #808b9d;
  font-size: 13px;
  line-height: 1.6;
}

.side-action-button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(58, 99, 255, 0.18);
}

.side-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.side-action-button--secondary {
  margin-top: 9px;
  color: #3154ec;
  border: 1px solid #cbd7ff;
  background: #eef3ff;
  box-shadow: none;
}

.active-agent {
  border-color: #cbd7ff;
  background: #eef3ff;
}

.active-agent strong {
  color: #3154ec;
}

.delivery-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.delivery-item strong {
  display: block;
}

.delivery-item small {
  color: #929bad;
}

.delivery-item b {
  color: var(--green);
}

.delivery-item.pending b {
  color: var(--orange);
}

.footer-note {
  grid-column: 2 / 4;
  grid-row: 3;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  color: #7d8798;
  background: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

@media (max-width: 1280px) {
  .simple-shell {
    grid-template-columns: 250px minmax(560px, 1fr);
  }

  .topbar {
    grid-template-columns: 250px 1fr;
  }

  .top-actions,
  .statusbar {
    display: none;
  }

  .workspace {
    grid-column: 2;
  }

  .footer-note {
    grid-column: 2;
  }

  .preview-layout {
    grid-template-columns: 1fr;
  }

  .template-market-layout,
  .roadmap-layout {
    grid-template-columns: 1fr;
  }

  .template-detail-panel {
    position: static;
  }
}

/* ============== 宣传化升级 v2 ============== */

/* Hero 区:渐变 + 步骤卡 */
.hero-panel {
  background: linear-gradient(135deg, #1f4dff 0%, #6f4dff 55%, #b54dff 100%);
  color: #fff;
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: 0 20px 40px -20px rgba(31, 77, 255, 0.45);
  position: relative;
  overflow: hidden;
  min-height: auto;
}
.hero-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 60%);
  pointer-events: none;
}
.hero-panel .eyebrow {
  letter-spacing: 2px;
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
}
.hero-panel h1 {
  font-size: 28px;
  margin: 4px 0 10px;
  font-weight: 700;
}
.hero-panel p:not(.eyebrow) {
  color: rgba(255,255,255,0.92);
  max-width: 680px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.hero-cta {
  background: #fff;
  color: #1f4dff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hero-cta:hover { transform: translateY(-1px); }
.hero-cta.ghost-button {
  background: rgba(255,255,255,0.16);
  color: #fff;
}
.hero-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.hero-step-card {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  padding: 14px 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(4px);
}
.hero-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: #1f4dff;
  font-weight: 700;
  font-size: 13px;
}
.hero-step-card strong { font-size: 14px; }
.hero-step-card small { color: rgba(255,255,255,0.85); font-size: 12px; line-height: 1.5; }
@media (max-width: 960px) {
  .hero-steps { grid-template-columns: repeat(2, 1fr); }
}

/* 平台徽章 */
.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #1f4dff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 8px;
  vertical-align: middle;
}

/* 智能体工位 */
.team-office {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.agent-desk {
  --desk-color: #1f4dff;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 20px -16px rgba(0,0,0,0.25);
  border: 1px solid #eef0f7;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.agent-desk:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -18px rgba(0,0,0,0.3);
}
.agent-desk::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--desk-color);
  border-radius: 14px 0 0 14px;
}
.agent-desk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.agent-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.agent-desk-head > div { flex: 1; }
.agent-desk-head strong { display: block; font-size: 14px; color: #1a1f36; }
.agent-desk-head small { color: #6b7280; font-size: 12px; }
.agent-desk-desc {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 12px;
}
.agent-desk-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px dashed #eef0f7;
  padding-top: 8px;
}
.agent-desk-foot small { color: #9ca3af; font-size: 11px; }
.agent-desk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* 工位状态徽章 */
.agent-status-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.agent-status-pill--waiting   { background: #f1f3f9; color: #6b7280; }
.agent-status-pill--working   { background: #fff7e6; color: #d97706; }
.agent-status-pill--confirm   { background: #fff1f1; color: #dc2626; }
.agent-status-pill--done      { background: #ecfdf5; color: #059669; }
.agent-status-pill--failed    { background: #fee2e2; color: #b91c1c; }

.agent-desk--working   { border-color: #fde2bf; }
.agent-desk--confirm   { border-color: #fecaca; }
.agent-desk--done      { border-color: #bbf7d0; }
.agent-desk--failed    { border-color: #fecaca; opacity: 0.92; }

.block-section {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  margin-top: 18px;
}
.block-section > h2 {
  font-size: 16px;
  margin: 0 0 12px;
  color: #1a1f36;
}

/* Glassmorphism Panels */
.run-form, .run-status-card, .recent-run-panel, .agent-dynamics-panel, .template-panel, .preference-panel, .run-command-panel, .run-issue-panel, .run-log-panel, .topic-gate-panel, .setup-card, .agent-card, .timeline-card, .file-card, .preview-panel, .review-output-sidebar {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.run-form:hover, .recent-run-panel:hover, .agent-dynamics-panel:hover {
  box-shadow: var(--glass-shadow);
  border-color: rgba(31, 77, 255, 0.1);
}

/* Stepper removed */

/* Dashboard Stats */
/* 删除了原有的 dashboard-stats 样式 */
.stat-card {
  padding: 20px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 48px 1fr auto;
  grid-template-areas: 
    "icon info trend"
    "foot foot foot";
  align-items: center;
}
.stat-icon {
  grid-area: icon;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.stat-info {
  grid-area: info;
  padding-left: 14px;
}
.stat-info h2 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.stat-info p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.stat-trend {
  grid-area: trend;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.stat-trend.up { background: #dcfce7; color: #059669; }
.stat-trend.neutral { background: #f1f5f9; color: #475569; }
.stat-foot {
  grid-area: foot;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-foot .dot {
  width: 6px; height: 6px; border-radius: 50%;
}

/* Dashboard Split */
.block-section--dashboard-split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

/* Wide Task Cards */
.recent-run-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding: 16px 20px !important;
  border-radius: 16px !important;
  border: 1px solid var(--line) !important;
  background: white !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.recent-run-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow) !important;
  border-color: rgba(31,77,255,0.2) !important;
}
.recent-run-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.recent-run-header strong { font-size: 16px; color: var(--ink); }
.recent-run-progress {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.recent-run-progress-bar {
  height: 100%;
  background: var(--blue);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.recent-run-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.recent-run-badges {
  display: flex;
  gap: 6px;
}
.run-badge {
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
}
.run-time { font-size: 12px; color: var(--muted); }

/* Agent Dynamics Timeline */
.agent-dynamics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dyn-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.dyn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  margin-top: 6px;
  flex-shrink: 0;
}
.dyn-content strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.dyn-content p {
  margin: 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}
.dyn-content small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
}

/* Global AI Assistant */
.ai-assistant-wrap {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-toggle-trigger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  border: none;
  box-shadow: 0 10px 24px rgba(31, 77, 255, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}
.ai-toggle-trigger:hover {
  transform: scale(1.05);
}
.ai-icon-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.5;
  animation: pulse 2s infinite;
  z-index: -1;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.ai-chat-window {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 400px;
  height: 600px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(31,77,255,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.ai-assistant-wrap.collapsed .ai-chat-window {
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  pointer-events: none;
}
.ai-assistant-wrap:not(.collapsed) .ai-toggle-trigger {
  transform: scale(0) !important;
  opacity: 0;
  pointer-events: none;
}

.chat-header {
  padding: 14px 20px;
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-task-binding {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.chat-close-btn {
  background: none; border: none; font-size: 24px; color: #94a3b8; cursor: pointer; padding: 0; line-height: 1;
}
.chat-close-btn:hover { color: #334155; }
.chat-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.chat-scroll-area .panel-heading {
  padding: 20px 20px 0;
}
.chat-scroll-area form {
  padding: 20px;
}
.ai-resizer {
  position: absolute;
  top: 0; left: 0;
  width: 15px; height: 15px;
  cursor: nwse-resize;
  z-index: 10;
}


/* Minimalist Sidebar */
.sidebar {
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--line);
}
.nav-item {
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 4px;
  grid-template-columns: 24px 1fr 10px;
  gap: 10px;
  border: none;
}
.nav-icon {
  width: 24px;
  height: 24px;
  font-size: 11px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.nav-item.active {
  background: rgba(31, 77, 255, 0.05);
  box-shadow: none;
  color: var(--blue);
}
.nav-item.active .nav-icon {
  background: var(--blue);
  color: white;
}
.nav-item strong {
  font-size: 14px;
  font-weight: 700;
}
.nav-item-link,
.top-link,
.system-entry-card {
  color: inherit;
  text-decoration: none;
}
.nav-item-link {
  display: grid;
  align-items: center;
  width: 100%;
}
.nav-item-link:hover {
  color: var(--blue);
  background: rgba(31, 77, 255, 0.05);
}
.nav-item small {
  display: none; /* Hide subtitles in sidebar for cleaner look */
}
.sidebar-label {
  letter-spacing: 1px;
  font-size: 11px;
  margin: 16px 0 8px 14px;
  color: #94a3b8;
}

.system-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.system-entry-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 14px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.system-entry-card:hover {
  transform: translateY(-2px);
  border-color: #b9c8ff;
}
.system-entry-card > span {
  grid-row: 1 / span 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}
.system-entry-card strong {
  color: var(--ink);
  font-size: 17px;
}
.system-entry-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.artifact-source {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.artifact-source--template {
  color: #b45309;
  border-color: #f6c453;
  background: #fff7df;
}
.artifact-source--ai {
  color: #047857;
  border-color: #86d7b0;
  background: #eafaf2;
}

.artifact-source--manual {
  color: #5b21b6;
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.preview-gate {
  margin: 0 24px 16px;
  padding: 14px 16px;
  border: 1px solid #f0a9a9;
  border-radius: 12px;
  background: #fff4f4;
  color: #9b1c1c;
  display: grid;
  gap: 8px;
}

.preview-gate-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.preview-gate-head b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 13px;
}

.preview-gate-issues {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
}

.preview-gate-issues li + li {
  margin-top: 4px;
}

.preview-gate-hint {
  margin: 0;
  font-size: 13px;
  color: #7f1d1d;
}

.preview-gate-actions {
  display: flex;
  justify-content: flex-end;
}

.direct-edit-panel {
  display: grid;
  gap: 14px;
  margin: 0 24px 24px;
  padding: 18px;
  border: 1px solid #cbd7ff;
  border-radius: 14px;
  background: #f8fbff;
}

.direct-edit-panel textarea {
  width: 100%;
  min-height: 360px;
  padding: 16px;
  border: 1px solid #d5dfeb;
  border-radius: 10px;
  color: var(--ink);
  background: white;
  font: 15px/1.8 "Microsoft YaHei", "PingFang SC", sans-serif;
  resize: vertical;
}

.direct-edit-check {
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 13px;
}

.direct-edit-check strong,
.direct-edit-check p {
  margin: 0;
}

.direct-edit-check p,
.direct-edit-check ul {
  margin: 6px 0 0;
}

.direct-edit-check.is-passed {
  border-color: #86d3a5;
  color: #11633a;
  background: #effaf3;
}

.direct-edit-check.is-blocked {
  border-color: #f0a6a6;
  color: #991b1b;
  background: #fff3f3;
}

.direct-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.operation-overview,
.platform-operation-card,
.operation-files-panel {
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.operation-overview {
  margin: 18px 0;
  padding: 18px;
}

.operation-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.operation-run-context {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #334155;
  background: #eef4ff;
  font-size: 13px;
}

.platform-selection-summary {
  margin: 8px 0 0;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
}

.platform-selection-summary.has-selection {
  color: #157347;
}

.operation-overview-grid article {
  padding: 16px;
  border: 1px solid #e1e8f1;
  border-radius: 10px;
  background: #f8fbff;
}

.operation-overview-grid strong,
.operation-overview-grid span {
  display: block;
}

.operation-overview-grid strong {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 24px;
}

.operation-overview-grid span {
  color: var(--muted);
  font-size: 13px;
}

.operation-next {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px 16px;
  margin-top: 14px;
  padding: 15px 16px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #eef4ff;
}

.operation-next > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.operation-next > strong {
  grid-row: 1;
  grid-column: 2;
}

.operation-next > p {
  grid-column: 1 / 3;
  margin: 0;
  color: #526074;
}

.operation-next > button {
  grid-column: 3;
  grid-row: 1 / 3;
}

.operation-batch-fill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #9cc2f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #eaf3ff 0%, #f4f9ff 100%);
}

.operation-batch-fill strong {
  display: block;
  color: #1f3350;
  font-size: 14px;
}

.operation-batch-fill p {
  margin: 4px 0 0;
  color: #5c6c85;
  font-size: 12px;
  line-height: 1.55;
  max-width: 42rem;
}

.platform-operation-list {
  display: grid;
  gap: 16px;
}

.platform-operation-card {
  padding: 20px;
}

.platform-operation-card.is-complete {
  border-color: #9bd6b3;
  background: #f5fff9;
}

.platform-operation-card.has-risk {
  border-color: #f1c36b;
  background: #fffaf0;
}

.platform-operation-card.is-focused {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.18);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.platform-operation-head,
.operation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.platform-operation-head > div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.platform-operation-head strong {
  font-size: 20px;
}

.operation-next-pill {
  padding: 7px 11px;
  border-radius: 999px;
  color: #3154ec;
  background: #edf2ff;
  font-size: 12px;
  font-weight: 900;
}

.operation-step-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.operation-step {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 2px 8px;
  padding: 10px;
  border: 1px solid #e1e8f1;
  border-radius: 9px;
  color: #526074;
  background: #fafcff;
  font-size: 13px;
  font-weight: 800;
}

.operation-step b {
  grid-row: 1 / 3;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #7b8798;
  background: #edf1f6;
}

.operation-step small {
  color: #94a0b2;
  font-weight: 600;
}

.operation-step.is-done {
  border-color: #bfe8d1;
  background: #f1fbf6;
}

.operation-step.is-done b {
  color: white;
  background: var(--green);
}

.operation-step.is-failed {
  border-color: #f1b7b3;
  background: #fff5f4;
}

.operation-step.is-failed b {
  color: white;
  background: var(--red);
}

.operation-step.is-running {
  border-color: #9cc2f0;
  background: #eaf3ff;
}

.operation-step.is-running b {
  color: #ffffff;
  background: #2f6fd0;
}

.operation-position {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid #d5e4f7;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  color: #1f3350;
}

.operation-position strong {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.operation-position span {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.operation-position em {
  color: #5c6c85;
  font-style: normal;
  font-size: 12px;
  line-height: 1.55;
}

.operation-position.is-running {
  border-color: #7eb0ef;
  background: linear-gradient(180deg, #eaf3ff 0%, #dcecff 100%);
  box-shadow: 0 0 0 1px rgba(47, 111, 208, 0.08);
}

.operation-position.is-risk {
  border-color: #f1b7b3;
  background: #fff5f4;
  color: #7f1d1d;
}

.operation-position.is-done {
  border-color: #bfe8d1;
  background: #f1fbf6;
}

.operation-position.is-wait {
  border-color: #e1e8f1;
  background: #fafcff;
  color: #526074;
}

.operation-inflight {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #9cc2f0;
  border-radius: 10px;
  background: #eaf3ff;
  color: #1f3350;
}

.operation-inflight strong {
  display: block;
  font-size: 15px;
}

.operation-inflight p {
  margin: 6px 0 0;
  color: #3d5270;
  font-size: 13px;
  line-height: 1.65;
}

.operation-inflight-foot {
  color: #2f6fd0 !important;
  font-weight: 700;
}

.operation-inflight-spin {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 3px solid #b7d2f5;
  border-top-color: #2f6fd0;
  border-radius: 50%;
  animation: operation-spin 0.8s linear infinite;
}

@keyframes operation-spin {
  to { transform: rotate(360deg); }
}

.platform-operation-card.is-inflight {
  border-color: #9cc2f0;
  box-shadow: 0 0 0 1px rgba(47, 111, 208, 0.12);
}

.operation-next-pill.is-running {
  color: #1d4ed8;
  background: #dbeafe;
}

.operation-remediation-steps {
  margin: 0;
  padding-left: 20px;
  line-height: 1.75;
}

.operation-asset-confirm-hint {
  margin: 6px 0 0;
  color: #5c6c85;
  font-size: 12px;
}

.operation-guidance,
.operation-message,
.operation-warning {
  margin: 8px 0;
  color: #526074;
  line-height: 1.7;
}

.operation-message,
.operation-warning {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f8fc;
  font-size: 13px;
}

.operation-warning {
  color: #9a5700;
  background: #fff0ce;
}

.operation-remediation {
  display: grid;
  gap: 9px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #f3b3ad;
  border-radius: 10px;
  color: #7f1d1d;
  background: #fff5f4;
}

.operation-remediation > strong,
.operation-remediation > p,
.operation-remediation > ul {
  margin: 0;
}

.operation-remediation > ul {
  padding-left: 20px;
  line-height: 1.7;
}

.operation-remediation > p {
  color: #8f3c34;
  font-size: 13px;
}

.operation-remediation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.operation-fill-chain {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  background: #f4f9ff;
}

.fill-chain-head {
  display: grid;
  gap: 2px;
}

.fill-chain-head strong {
  color: #1f3350;
  font-size: 14px;
}

.fill-chain-head span {
  color: #5c6c85;
  font-size: 12px;
}

.fill-chain-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fill-chain-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 2px 8px;
  padding: 9px 10px;
  border: 1px solid #dbe6f4;
  border-radius: 9px;
  background: #ffffff;
  color: #526074;
  font-size: 13px;
  font-weight: 700;
}

.fill-chain-step b {
  grid-row: 1 / 3;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #7b8798;
  background: #edf1f6;
  font-size: 13px;
}

.fill-chain-step small {
  color: #94a0b2;
  font-weight: 600;
}

.fill-chain-step.is-done {
  border-color: #bfe8d1;
  background: #f1fbf6;
}

.fill-chain-step.is-done b {
  color: #ffffff;
  background: var(--green);
}

.fill-chain-step.is-current {
  border-color: #9cc2f0;
  background: #eaf3ff;
}

.fill-chain-step.is-current b {
  color: #ffffff;
  background: #2f6fd0;
}

.fill-chain-step.is-running {
  border-color: #7eb0ef;
  background: #eaf3ff;
  box-shadow: 0 0 0 1px rgba(47, 111, 208, 0.12);
}

.fill-chain-step.is-running b {
  color: #ffffff;
  background: #2f6fd0;
  animation: operation-spin 1.2s linear infinite;
}

.fill-chain-step.is-failed {
  border-color: #f1b7b3;
  background: #fff5f4;
}

.fill-chain-step.is-failed b {
  color: #ffffff;
  background: var(--red);
}

.fill-chain-hint {
  margin: 0;
  color: #5c6c85;
  font-size: 12px;
  line-height: 1.6;
}

.operation-fields {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.operation-asset-preview {
  display: grid;
  grid-template-columns: minmax(160px, 280px) 1fr auto;
  align-items: center;
  gap: 16px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #f7faff;
}

.operation-asset-preview.is-approved {
  border-color: #9bd6b3;
  background: #f2fbf6;
}

.operation-asset-preview.is-rejected {
  border-color: #efb4ae;
  background: #fff5f4;
}

.operation-asset-media {
  overflow: hidden;
  border-radius: 9px;
  background: #071224;
}

.operation-asset-media img,
.operation-asset-media video {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.operation-asset-meta {
  display: grid;
  gap: 5px;
}

.operation-asset-meta span,
.operation-asset-meta small {
  color: var(--muted);
}

.operation-asset-facts {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
}

.operation-asset-facts > div {
  display: flex;
  gap: 8px;
  font-size: 12px;
}

.operation-asset-facts dt {
  flex: 0 0 68px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.operation-asset-facts dd {
  margin: 0;
  color: #334155;
  word-break: break-all;
}

.operation-asset-facts dd.is-ok { color: #157347; }
.operation-asset-facts dd.is-bad { color: #c0392b; }

.operation-asset-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.operation-asset-confirm {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff8e6;
  color: #7a5300;
  font-size: 12px;
  font-weight: 700;
}

.operation-asset-confirm.needs-attention {
  outline: 2px solid #f0b429;
  outline-offset: 1px;
}

.run-progress-publish {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d3ddec;
}

.run-progress-publish span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.run-progress-publish strong {
  color: #1d4ed8;
  font-size: 13px;
}

.run-progress-publish small {
  color: var(--muted);
  font-size: 11px;
}

.operation-asset-preview > a,
.operation-asset-actions > a,
.file-actions a {
  padding: 8px 10px;
  border: 1px solid #cbd7e8;
  border-radius: 8px;
  color: #3154ec;
  background: white;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.operation-fields label {
  display: grid;
  gap: 6px;
  color: #526074;
  font-size: 12px;
  font-weight: 800;
}

.operation-fields input,
.operation-fields textarea,
.operation-fields select {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  color: var(--ink);
  background: white;
  font: inherit;
}

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

.operation-feedback-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dce4ef;
}

.operation-feedback-head,
.operation-feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.operation-feedback-head strong {
  color: #1f3a68;
  font-size: 14px;
}

.operation-feedback-head span,
.operation-feedback-metrics,
.operation-feedback-loading {
  margin: 0;
  color: #627087;
  font-size: 12px;
}

.operation-feedback-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
}

.operation-feedback-error {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid #d97706;
  color: #9a3412;
  background: #fff7ed;
  font-size: 12px;
}

.operation-feedback-reject-field {
  margin-top: 2px;
}

.operation-feedback-actions {
  justify-content: flex-start;
}

.operation-actions {
  justify-content: flex-end;
  margin-top: 15px;
}

@media (max-width: 900px) {
  .operation-asset-preview {
    grid-template-columns: 1fr;
  }

  .operation-feedback-grid,
  .operation-metrics {
    grid-template-columns: 1fr;
  }
}

.operation-files-panel {
  margin-top: 20px;
  padding: 18px;
}

.operation-files-panel summary {
  cursor: pointer;
  color: #475569;
  font-weight: 900;
}

.operation-files-panel > p {
  color: var(--muted);
}

/* 中度删减版：保留现有视觉语言，压缩首页信息密度。 */
[hidden] {
  display: none !important;
}

.simple-shell {
  grid-template-columns: 248px minmax(720px, 1fr) 286px;
}

.topbar {
  grid-template-columns: 248px 1fr 286px;
}

.sidebar {
  padding: 16px 12px;
}

.nav-item {
  grid-template-columns: 34px 1fr 8px;
  gap: 9px;
  padding: 10px 11px;
  margin-bottom: 5px;
  border-radius: 12px;
}

.nav-icon {
  width: 34px;
  height: 34px;
}

.workspace {
  padding-top: 18px;
}

.hero-panel--showcase {
  min-height: 0;
  padding: 28px 32px;
  grid-template-columns: minmax(0, 1fr);
}

.hero-panel--showcase::after {
  width: 260px;
  height: 260px;
  opacity: 0.28;
}

.hero-panel--showcase h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: 30px;
}

.hero-panel--showcase .hero-sub {
  max-width: 760px;
  margin-bottom: 18px;
}

.hero-cta-row {
  margin-top: 0;
}

/* dashboard-stats removed */

.stat-card {
  min-height: 104px;
}

.block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.block-heading h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
.block-heading p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}


.run-form {
  gap: 14px;
}

.run-actions {
  align-items: center;
}

.run-actions .primary-button {
  min-width: 150px;
}

.advanced-settings {
  padding: 0;
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  background: #f8fafc;
}

.advanced-settings summary {
  padding: 12px 14px;
  color: #475569;
  font-weight: 800;
  cursor: pointer;
}

.advanced-settings[open] summary {
  border-bottom: 1px solid #dbe3f0;
}

.advanced-settings-body {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.advanced-settings-body textarea {
  width: 100%;
  min-height: 86px;
  padding: 11px 12px;
  border: 1px solid #d7dfeb;
  border-radius: 9px;
  color: var(--ink);
  background: white;
  resize: vertical;
}

.advanced-settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.recent-run-panel {
  width: 100%;
}

.statusbar {
  padding: 16px 12px;
}

.status-block {
  margin-bottom: 12px;
}

.footer-note {
  font-size: 12px;
}

.run-progress-overview {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #d8e2ff;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.run-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.run-progress-heading span {
  color: #526074;
  font-size: 13px;
  font-weight: 800;
}

.run-progress-heading strong {
  color: var(--blue);
  font-size: 20px;
}

.run-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecf5;
}

.run-progress-track b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.35s ease;
}

.run-progress-overview small,
.side-run-progress small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.5;
}

.side-run-progress {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbe4f5;
  border-radius: 8px;
  background: #f8fbff;
}

.side-run-progress .run-progress-heading strong {
  font-size: 17px;
}

.side-run-progress .run-progress-track {
  height: 7px;
}

@media (max-width: 1500px) {
  .simple-shell {
    grid-template-columns: 220px minmax(660px, 1fr) 260px;
  }

  .topbar {
    grid-template-columns: 220px 1fr 260px;
  }
}

@media (max-width: 900px) {
  .system-entry-grid {
    grid-template-columns: 1fr;
  }
}

/* 新版统一系统管理区 */
.system-view {
  padding-bottom: 28px;
}

.system-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.system-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.system-toolbar label,
.settings-key-form label {
  display: grid;
  gap: 6px;
  color: #526074;
  font-size: 12px;
  font-weight: 800;
}

.system-toolbar input,
.system-toolbar select,
.settings-key-form input,
.settings-key-form select,
.inline-auth-form input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.system-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.system-stat-grid article {
  min-height: 96px;
  padding: 17px 18px;
  border: 1px solid #dde5ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.system-stat-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.system-stat-grid strong {
  color: #14213d;
  font-size: 28px;
}

.knowledge-console-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
  min-height: 520px;
}

.knowledge-console-list,
.knowledge-console-detail,
.analytics-console-grid > section,
.system-table-section,
.settings-auth-strip,
.settings-key-form,
.settings-key-section {
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.knowledge-console-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 650px;
  overflow: auto;
  padding: 12px;
}

.knowledge-card-button {
  width: 100%;
  min-height: 86px;
  padding: 13px 14px;
  border: 1px solid #e0e7f0;
  border-radius: 7px;
  text-align: left;
  color: var(--ink);
  background: #fbfdff;
}

.knowledge-card-button:hover,
.knowledge-card-button.active {
  border-color: #8fb5ff;
  background: #eef5ff;
}

.knowledge-card-button strong,
.knowledge-card-button span,
.knowledge-card-button small {
  display: block;
}

.knowledge-card-button span {
  margin: 6px 0;
  color: #315da8;
  font-size: 12px;
  font-weight: 800;
}

.knowledge-card-button small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-console-detail {
  padding: 22px;
  overflow: auto;
}

.knowledge-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.knowledge-detail-meta span,
.system-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #315da8;
  background: #eaf2ff;
  font-size: 12px;
  font-weight: 800;
}

.knowledge-detail-content {
  color: #334155;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.analytics-console-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.analytics-console-grid > section,
.system-table-section,
.settings-key-section {
  padding: 16px;
}

.analytics-bar-list {
  display: grid;
  gap: 11px;
}

.analytics-bar-row {
  display: grid;
  grid-template-columns: 96px minmax(120px, 1fr) 42px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.analytics-bar-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}

.analytics-bar-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f4dff, #14b8a6);
}

.system-table-scroll {
  max-width: 100%;
  overflow: auto;
}

.system-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.system-table th,
.system-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e6ebf2;
  text-align: left;
  vertical-align: middle;
}

.system-table th {
  color: #526074;
  background: #f7f9fc;
  font-size: 12px;
}

.system-table td:first-child {
  min-width: 220px;
}

.system-table .ghost-button,
.system-table .primary-button,
.task-console-actions .ghost-button,
.settings-key-actions .ghost-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
}

.analytics-edit-row td {
  background: #f7fbff;
}

.analytics-inline-editor {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(90px, 0.5fr)) auto auto;
  gap: 8px;
}

.analytics-inline-editor input {
  min-width: 0;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid #d5dfeb;
  border-radius: 7px;
  font: inherit;
}

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

.task-console-item {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(150px, 0.7fr) minmax(120px, 0.6fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px 16px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.task-console-title strong,
.task-console-title small {
  display: block;
}

.task-console-title small,
.task-console-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.task-console-progress {
  min-width: 0;
}

.task-console-progress div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.task-console-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1f4dff;
}

.task-console-progress span {
  display: block;
  margin-bottom: 6px;
  color: #526074;
  font-size: 12px;
  font-weight: 800;
}

.settings-auth-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 15px 17px;
}

.settings-auth-strip p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.inline-auth-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
}

.settings-console-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(380px, 1.2fr);
  gap: 16px;
}

.settings-key-form {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 16px;
}

.settings-key-list {
  display: grid;
  gap: 9px;
}

.settings-key-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid #e0e7f0;
  border-radius: 7px;
  background: #fbfdff;
}

.settings-key-item strong,
.settings-key-item small {
  display: block;
}

.settings-key-item small {
  margin-top: 5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.settings-key-actions,
.task-console-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.system-empty-state,
.system-error-state {
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: #f8fafc;
}

.system-error-state {
  color: #b42318;
  border-color: #f2b8b5;
  background: #fff5f4;
}

@media (max-width: 1280px) {
  .system-toolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 200px) auto;
  }

  .task-console-item {
    grid-template-columns: minmax(230px, 1.2fr) minmax(130px, 0.7fr) auto;
  }

  .task-console-meta {
    display: none;
  }

  .analytics-inline-editor {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }

  .analytics-inline-editor input:first-child {
    grid-column: 1 / 4;
  }
}

/* 窄屏改为单列工作区，避免桌面侧栏和固定最小宽度导致横向滚动。 */
@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .simple-shell {
    display: block;
    min-width: 0;
  }

  .topbar {
    display: flex;
    min-height: 68px;
    padding: 12px 16px;
  }

  .top-actions {
    display: none;
  }

  .sidebar {
    position: relative;
    display: flex;
    max-width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar section {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
  }

  .sidebar-label,
  .sidebar .nav-item > span:nth-child(2),
  .sidebar .nav-item > i {
    display: none;
  }

  .sidebar .nav-item {
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
  }

  .sidebar .nav-icon {
    width: 30px;
    height: 30px;
  }

  .workspace {
    min-width: 0;
    padding: 16px 12px;
    overflow: visible;
  }

  .footer-note {
    display: block;
    min-height: 42px;
    padding: 11px 16px;
    text-align: center;
  }

  .operation-overview,
  .platform-operation-card {
    padding: 14px;
  }

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

  .operation-overview-grid article {
    padding: 12px;
  }

  .operation-next {
    grid-template-columns: 1fr;
  }

  .operation-next > strong,
  .operation-next > p,
  .operation-next > button {
    grid-column: 1;
    grid-row: auto;
  }

  .operation-next > button {
    width: 100%;
    margin-top: 4px;
  }

  .operation-step-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .platform-operation-head {
    align-items: flex-start;
  }

  .platform-operation-head strong {
    font-size: 18px;
  }

  .operation-next-pill {
    max-width: 150px;
    padding: 6px 8px;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .operation-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .operation-actions > button {
    width: 100%;
  }

  .ai-assistant-wrap {
    position: static;
    padding: 0 16px 16px;
  }

  .ai-toggle-trigger {
    width: 48px;
    height: 48px;
    margin-left: auto;
  }

  .ai-chat-window {
    position: fixed;
    right: 16px;
    bottom: 76px;
    width: min(340px, calc(100vw - 32px));
    height: min(600px, calc(100vh - 104px));
  }
}
