/* ─────────────────────────────────────────────
   插件页面样式
   ─────────────────────────────────────────────

   只定义「插件页」独有的两块东西，其余一律复用全站既有类（.card / .page /
   .panel-head / .field-row / .muted）—— 插件页面必须长得像主程序的一部分，
   不能自己发明一套视觉语言。

   刻意保持极短：插件是运行期加载的，它们的界面不该引入第二套设计系统
   （那会让「统一设计语言」这条目标在第一次装插件时就破产）。
   ───────────────────────────────────────────── */

/* 页面顶部的状态摘要条：一行、带左边色条、可换行 */
.plugin-status {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-inset);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  /* 插件可能返回很长的摘要（JSON.stringify 兜底那条路），允许折行 */
  word-break: break-word;
}

.plugin-status[data-tone='ok'] {
  border-left-color: var(--ok);
  color: var(--text);
}

.plugin-status[data-tone='danger'] {
  border-left-color: var(--danger);
  color: var(--danger);
}

/* 每个 ui.sections 一项一张卡 */
.plugin-section {
  margin-bottom: 16px;
}

.plugin-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* 字段行：标签在上、控件在下（与设置页同一取向，窄屏不挤） */
.plugin-section .field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.plugin-section .field-label {
  font-size: 13px;
  color: var(--text-2);
}

/* switch 类型：标签与开关同一行 */
.plugin-section .field-switch {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.plugin-section .field-switch .field-label {
  margin: 0;
}

/* 输入控件吃满宽度（插件不知道页面多宽，交给容器决定） */
.plugin-section input[type='text'],
.plugin-section input[type='password'],
.plugin-section input[type='number'],
.plugin-section textarea,
.plugin-section select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--control-bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}

.plugin-section input:focus,
.plugin-section textarea:focus,
.plugin-section select:focus {
  outline: none;
  border-color: var(--primary);
}

.plugin-section textarea {
  min-height: 80px;
  resize: vertical;
  font-family: var(--font-mono);
}
