:root {
  --bg: #f3f6f7;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #637381;
  --line: #d5dee4;
  --field: #f9fbfc;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --accent: #9a3412;
  --danger: #b42318;
  --success: #027a48;
  --shadow: 0 18px 45px rgba(18, 38, 48, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(154, 52, 18, 0.06) 0 1px, transparent 1px 100%),
    var(--bg);
  background-size: 42px 42px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 2px 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

h2 {
  font-size: 17px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
  white-space: nowrap;
}

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.form-panel,
.scenario-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.form-panel {
  padding: 24px;
}

.scenario-panel {
  position: sticky;
  top: 24px;
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.alert + .section-head,
.section-head:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

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

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5dc;
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
}

.alert p {
  margin: 0;
}

.alert p + p {
  margin-top: 6px;
}

.alert.success {
  border: 1px solid rgba(2, 122, 72, 0.24);
  background: #ecfdf3;
  color: var(--success);
}

.alert.error {
  border: 1px solid rgba(180, 35, 24, 0.24);
  background: #fef3f2;
  color: var(--danger);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  border-color: #b8c4cc;
  background: #ffffff;
  color: #344054;
}

.scenario-title {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 800;
}

.scenario-panel ol {
  margin: 0;
  padding-left: 20px;
  color: #344054;
  line-height: 1.75;
}

.schema-box {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #243746;
  border-radius: 8px;
  background: #111827;
  color: #d1fae5;
}

.schema-box div {
  margin-bottom: 8px;
  color: #ffffff;
  font-weight: 800;
}

.schema-box p {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.schema-box p + p {
  margin-top: 10px;
}

.muted {
  color: #a7f3d0;
}

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

  .scenario-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding: 14px 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-panel,
  .scenario-panel {
    padding: 16px;
  }

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

  .actions {
    flex-direction: column-reverse;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
