/* ==========================================================================
   开发与站长类工具共用样式（v3.52.0）
   只放这些页面共同需要的东西：结果统计条、行映射表、参数滑杆、两栏布局。
   页面独有的预览区样式仍写在各自 <style> 里，避免这个文件变成第二个 app.css。
   ========================================================================== */

/* ---------- 两栏 ---------- */
.dev-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 860px) { .dev-cols { grid-template-columns: 1fr; } }

/* ---------- 结果统计条 ---------- */
.stat-line {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 12.5px; color: var(--text-dim);
}
.stat-line b {
  color: var(--text); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- 参数行（滑杆 + 数值） ---------- */
.ctl {
  margin-bottom: 13px;
}
.ctl:last-child { margin-bottom: 0; }
.ctl > label {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; font-size: 12.5px; color: var(--text-dim); margin-bottom: 5px;
}
.ctl > label b {
  color: var(--text); font-family: var(--mono); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ctl input[type="range"] {
  width: 100%; accent-color: var(--accent); cursor: pointer;
}
.ctl-inline {
  display: flex; align-items: center; gap: 8px;
}
.ctl-inline input[type="number"],
.ctl-inline input[type="text"] {
  padding: 7px 10px; font-size: 12.5px; border-radius: 8px;
}
.ctl-unit { font-size: 12px; color: var(--text-faint); }

/* ---------- 行映射表 ---------- */
.map-wrap {
  max-height: 460px; overflow: auto;
  border: 1px solid var(--border); border-radius: 10px;
}
.map-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.map-table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-weight: 600; color: var(--text-dim);
  background: var(--panel-sunken);
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.map-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  vertical-align: top; line-height: 1.6;
}
.map-table tr:last-child td { border-bottom: none; }
.map-table td.n { color: var(--text-faint); font-family: var(--mono); white-space: nowrap; }
.map-table td.src,
.map-table td.out {
  font-family: var(--mono); font-size: 11.5px;
  word-break: break-all; min-width: 180px;
}
.map-table td.src { color: var(--text-dim); }
.map-table td.note { color: var(--text-dim); font-size: 11.5px; min-width: 150px; }
.map-table tr.manual td { background: var(--warn-soft); }
.map-table tr.manual td.note { color: var(--warn); }

/* ---------- 小标记 ---------- */
.dot-mark {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 5px; vertical-align: 1px;
}
.dot-mark.ok { background: var(--ok); }
.dot-mark.warn { background: var(--warn); }

/* ---------- 提示条 ---------- */
.note-box {
  padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--panel-sunken);
  font-size: 12.5px; color: var(--text-dim); line-height: 1.75;
}
.note-box.warn { border-left-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.note-box b { color: var(--text); }

/* ---------- 日志（WebSocket） ---------- */
.ws-log {
  height: 340px; overflow: auto; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel-sunken);
  font-family: var(--mono); font-size: 12px; line-height: 1.75;
}
.ws-log .line { display: flex; gap: 8px; padding: 2px 0; border-bottom: 1px dashed transparent; }
.ws-log .t { color: var(--text-faint); flex-shrink: 0; }
.ws-log .dir { flex-shrink: 0; font-weight: 700; width: 34px; }
.ws-log .dir.tx { color: var(--accent); }
.ws-log .dir.rx { color: var(--ok); }
.ws-log .dir.sys { color: var(--warn); }
.ws-log .body { word-break: break-all; white-space: pre-wrap; }
.ws-log .sys { color: var(--text-dim); }

/* ---------- 表格里的复选框列 ---------- */
.mini-check {
  width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer;
}

/* ---------- 虚线「加一条」按钮 ---------- */
.add-layer {
  width: 100%; margin-top: 4px; padding: 7px; font-size: 12.5px;
  border: 1px dashed var(--border-strong); border-radius: 8px;
  background: transparent; color: var(--text-dim); cursor: pointer;
}
.add-layer:hover { border-color: var(--accent); color: var(--accent); }

/* 换算阈值这类「数字 + 单位」的小输入 */
.ctl-inline input[type="number"],
.ctl-inline input[type="text"] { width: 110px; flex: 0 0 auto; }
