/* ══ 设置页 ══════════════════════════════════════════
   独立页面，不再是控制台上那个弹窗。左边分区、右边内容，
   每一区自己保存自己的。外壳件（顶栏/提示条/对话框/输入框）
   共用 console.css，这里只写设置页自己的东西。 */

body { overflow: auto; }
.shell { height: auto; min-height: 100dvh; overflow: visible; }

.topbar .crumb {
  font-size: 12.5px; color: var(--muted); padding-left: 10px;
  border-left: 1px solid var(--border);
}

.setwrap {
  display: grid; grid-template-columns: 218px 1fr; gap: 0;
  max-width: 1100px; width: 100%; margin: 0 auto; align-items: start;
}

/* ── 左边分区 ── */
.setnav {
  position: sticky; top: 53px; align-self: start;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 10px 16px 0;
}
.setnav button {
  display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto;
  gap: 0 8px; align-items: center; text-align: left;
  padding: 9px 11px; border-radius: 10px; border: 1px solid transparent;
  background: none; cursor: pointer; color: var(--text-2); transition: background .15s, color .15s;
}
.setnav button:hover { background: var(--bg-2); }
.setnav button[aria-pressed="true"] {
  background: var(--surface); border-color: var(--border); color: var(--text);
  box-shadow: 0 1px 2px rgba(16,32,64,.05);
}
.setnav .i { grid-row: 1 / 3; display: grid; place-items: center; color: var(--muted); }
.setnav button[aria-pressed="true"] .i { color: var(--teal); }
.setnav b { font-size: 13px; font-weight: 650; }
.setnav i { font-size: 11px; color: var(--muted); font-style: normal; line-height: 1.4; }

/* ── 右边内容 ── */
.setmain { padding: 16px 0 60px; min-width: 0; }
.seth { padding: 6px 2px 14px; }
.seth h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.seth p {
  margin-top: 6px; font-size: 12.5px; line-height: 1.75; color: var(--muted);
  max-width: 68ch;
}
.seth p b { color: var(--text-2); font-weight: 600; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 16px; margin-bottom: 14px;
}
.card h3 {
  font-size: 13px; font-weight: 700; color: var(--text-2);
  padding: 14px 0 8px; letter-spacing: .01em;
}

/* 一行设置：左标签右内容，窄屏叠起来 */
.frow {
  display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: start;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.frow:last-of-type { border-bottom: 0; }
.frow[hidden] { display: none !important; }
.frow > label {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  padding-top: 9px; line-height: 1.4;
}
.fbody { min-width: 0; display: grid; gap: 6px; }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; font-weight: 400; }

.facts {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 0; border-top: 1px solid var(--border);
}
.facts .grow { flex: 1; }
.saved { font-size: 12px; color: var(--emerald); }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span {
  width: 38px; height: 22px; border-radius: 99px; background: var(--border-2);
  position: relative; flex: none; transition: background .2s;
}
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,32,64,.3);
  transition: transform .2s var(--ease);
}
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(13,148,136,.25); }
.switch i { font-size: 11.5px; color: var(--muted); font-style: normal; }

/* 步骤说明 */
.steps { margin: 0 0 10px; padding-left: 20px; }
.steps li { font-size: 12.5px; line-height: 1.9; color: var(--text-2); }
.steps b { font-weight: 650; color: var(--text); }
.card > .hint { padding-bottom: 14px; display: block; }
.card code { background: var(--bg-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* 上一轮 */
.lastrun { padding: 4px 0 14px; }
.lr-h { display: flex; align-items: baseline; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.lr-h b { font-size: 13px; color: var(--text); font-weight: 650; }
.lr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(94px, 1fr)); gap: 7px; }
.lr-grid > div {
  padding: 8px 10px; border-radius: 9px; background: var(--bg-2);
  border: 1px solid var(--border); display: grid; gap: 2px;
}
.lr-grid > div.on { background: rgba(13,148,136,.07); border-color: rgba(13,148,136,.25); }
.lr-grid span { font-size: 11px; color: var(--muted); }
.lr-grid b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lr-grid > div.on b { color: var(--teal); }
.lr-idle { font-size: 12.5px; color: var(--muted); }
.lr-bad  { font-size: 12.5px; color: var(--rose); }

/* 系统 */
.sysgrid { padding: 6px 0 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 24px; }
.sysrow {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px;
}
.sysrow span { color: var(--muted); }
.sysrow b { font-weight: 650; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .setwrap { grid-template-columns: 1fr; }
  .setnav {
    position: static; flex-direction: row; overflow-x: auto; padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .setnav button { grid-template-rows: auto; flex: none; }
  .setnav i { display: none; }
  .frow { grid-template-columns: 1fr; gap: 6px; }
  .frow > label { padding-top: 0; }
}
