/* 设置页：左导航 + 右侧两区（模型 / 摘要）。复用 models.css 的表格与表单外观。 */

.st-layout {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 32px 56px;
  align-items: start;
}

/* ---- 左侧分区导航 ---- */
.st-nav {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.st-nav-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-2);
}
.st-nav-item:hover { background: var(--surface-2); }
.st-nav-item.is-active {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand-ink);
}
.st-nav-icon { font-size: 16px; line-height: 1.2; }
.st-nav-item strong { display: block; font-size: 13.5px; }
.st-nav-item em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 11.5px;
  color: var(--ink-4);
}
.st-nav-item.is-active em { color: var(--brand); }

/* ---- 右侧面板 ---- */
.st-main { min-width: 0; }
.st-panel { display: none; }
.st-panel.is-active { display: block; }

.st-panel-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.st-panel-hd h2 { margin: 0 0 4px; font-size: 17px; color: var(--ink); }
.st-sub { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink-3); max-width: 720px; }
.st-sub strong { color: var(--ink-2); }

.st-current {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.st-current-label { font-size: 12px; color: var(--ink-3); }
.st-current-value { font-family: var(--mono); font-size: 13.5px; color: var(--ink); font-weight: 600; }

.st-alert {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn);
  font-size: 13px;
  line-height: 1.6;
}
.st-alert strong { color: #7c4106; }

/* 表格里的开关与单选 */
.st-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); cursor: pointer; }
.st-toggle input { accent-color: var(--brand); width: 15px; height: 15px; }
.st-inuse { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; }
.st-inuse input { accent-color: var(--brand); }
.st-inuse.is-disabled { color: var(--ink-4); cursor: not-allowed; }

/* 说明区：把「多个启用 + 单选生效」讲清楚 */
.st-facts {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.st-facts > div { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; }
.st-facts dt { font-size: 12.5px; color: var(--ink-3); }
.st-facts dd { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* ---- 摘要配置 ---- */
.st-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--sh-1);
}
.st-switch { font-size: 13.5px; color: var(--ink-2); }

.st-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.st-field:last-child { margin-bottom: 0; }
.st-field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.st-field select,
.st-field input[type="number"],
.st-field input[type="text"] {
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  font-family: inherit;
}
.st-field select:focus,
.st-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }

.st-inline { display: flex; gap: 10px; }
.st-inline select { flex: 0 0 190px; }
.st-inline input { flex: 1; min-width: 0; }

.st-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.st-options .st-field { margin-bottom: 0; }
.st-options .mm-hint { font-size: 11.5px; }

.st-pipeline { display: flex; flex-direction: column; gap: 6px; }
.st-pipeline label { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.st-pipeline em { font-style: normal; color: var(--ink-4); font-size: 11.5px; }

.st-source { display: flex; align-items: center; gap: 8px; }
.st-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.st-save-state { font-size: 12.5px; color: var(--ink-4); }
.st-save-state.is-ok { color: var(--ok); }
.st-save-state.is-fail { color: var(--danger); }

@media (max-width: 900px) {
  .st-layout { grid-template-columns: 1fr; padding: 16px 18px 48px; }
  .st-nav { position: static; flex-direction: row; }
  .st-facts > div { grid-template-columns: 1fr; gap: 4px; }
}
