* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #1f2329;
  font-size: 14px;
  line-height: 1.6;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; background: #fff; border-bottom: 1px solid #e8eaed;
}
.header-right { display: flex; align-items: center; gap: 14px; }
.user-chip { font-size: 13px; color: #646a73; }
.user-chip strong { color: #1f2329; }
.role-tag { padding: 2px 8px; border-radius: 10px; font-size: 11px; background: #eef0f3; color: #646a73; margin-left: 6px; }
.role-admin { background: #fff4e6; color: #b35c00; }
.brand { display: flex; align-items: center; gap: 12px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #ff6a00; }
.brand-name { font-size: 17px; font-weight: 600; }
.brand-sub { font-size: 12px; color: #8a8f99; }
.mode-badge {
  padding: 6px 14px; border-radius: 16px; font-size: 12px;
  background: #fff4e6; color: #b35c00; border: 1px solid #ffd8a8;
}
.mode-badge.real { background: #e8f6ee; color: #17803c; border-color: #a9e0bd; }
.tabs {
  display: flex; gap: 4px; padding: 0 28px; background: #fff;
  border-bottom: 1px solid #e8eaed;
}
.tab {
  padding: 12px 20px; border: none; background: transparent; cursor: pointer;
  font-size: 14px; color: #646a73; border-bottom: 2px solid transparent;
}
.tab:hover { color: #1f2329; }
.tab.active { color: #ff6a00; border-bottom-color: #ff6a00; font-weight: 600; }
main { padding: 24px 28px; max-width: 1500px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.toolbar-left, .toolbar-right { display: flex; gap: 10px; align-items: center; }
.input {
  padding: 8px 12px; border: 1px solid #d9dce1; border-radius: 6px;
  background: #fff; font-size: 14px; color: #1f2329; font-family: inherit;
}
.input:focus { outline: none; border-color: #ff6a00; }
.btn {
  padding: 8px 16px; border: 1px solid #d9dce1; border-radius: 6px;
  background: #fff; color: #1f2329; cursor: pointer; font-size: 14px;
  text-decoration: none; display: inline-block; font-family: inherit;
}
.btn:hover { border-color: #ff6a00; color: #ff6a00; }
.btn.primary { background: #ff6a00; border-color: #ff6a00; color: #fff; }
.btn.primary:hover { background: #e85f00; color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.stat-row { display: flex; gap: 14px; margin-bottom: 16px; }
.stat {
  flex: 1; background: #fff; border: 1px solid #e8eaed; border-radius: 8px;
  padding: 14px 18px;
}
.stat-num { font-size: 24px; font-weight: 600; }
.stat-label { font-size: 12px; color: #8a8f99; }
.table-wrap { background: #fff; border: 1px solid #e8eaed; border-radius: 8px; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 11px 12px; background: #fafbfc;
  border-bottom: 1px solid #e8eaed; color: #646a73; font-weight: 500;
  position: sticky; top: 0; z-index: 1;
}
.table td { padding: 10px 12px; border-bottom: 1px solid #f0f1f3; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fff9f4; }
.status-online { color: #17803c; }
.status-offline { color: #8a8f99; }
.tag { padding: 2px 8px; border-radius: 10px; font-size: 11px; background: #f0f1f3; color: #646a73; }
.panel-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding: 14px 18px; background: #fff;
  border: 1px solid #e8eaed; border-radius: 8px;
}
.steps { display: flex; align-items: center; margin-bottom: 20px; }
.step { padding: 6px 14px; border-radius: 14px; background: #eceef1; color: #8a8f99; font-size: 12px; }
.step.active { background: #ff6a00; color: #fff; }
.step-line { width: 28px; height: 1px; background: #d9dce1; }
.change-layout, .task-layout { display: grid; grid-template-columns: 420px 1fr; gap: 20px; align-items: start; }
.task-layout { grid-template-columns: 380px 1fr; }
.card {
  background: #fff; border: 1px solid #e8eaed; border-radius: 8px;
  padding: 18px; margin-bottom: 18px;
}
.card h3 { font-size: 15px; margin-bottom: 14px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.card-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.field-label { display: block; margin: 12px 0 6px; font-size: 13px; color: #646a73; }
.field-label .input { display: block; width: 100%; margin-top: 6px; color: #1f2329; }
#changeField, #cfgMode { width: 100%; }
.hint { font-size: 12px; color: #8a8f99; margin: 8px 0; }
code { background: #f0f1f3; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.choice-row { display: flex; gap: 8px; margin-top: 8px; }
.choice { padding: 6px 12px; border: 1px solid #d9dce1; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; }
.choice.active { border-color: #ff6a00; color: #ff6a00; background: #fff4e6; }
.selected-list {
  max-height: 180px; overflow: auto; border: 1px solid #e8eaed;
  border-radius: 6px; padding: 8px;
}
.selected-item { padding: 5px 0; font-size: 12px; border-bottom: 1px solid #f0f1f3; }
.selected-item:last-child { border-bottom: none; }
.csv-area {
  width: 100%; min-height: 110px; padding: 10px; border: 1px solid #d9dce1;
  border-radius: 6px; font-family: monospace; font-size: 12px; margin-bottom: 10px;
  resize: vertical;
}
.empty { text-align: center; color: #a6abb4; padding: 30px 12px; }
.task-list { background: #fff; border: 1px solid #e8eaed; border-radius: 8px; overflow: hidden; }
.task-item { padding: 14px 16px; border-bottom: 1px solid #f0f1f3; cursor: pointer; }
.task-item:last-child { border-bottom: none; }
.task-item:hover, .task-item.active { background: #fff9f4; }
.task-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.task-id { font-size: 12px; color: #8a8f99; font-family: monospace; }
.task-state { padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.state-success { background: #e8f6ee; color: #17803c; }
.state-failed { background: #fdeaea; color: #c0392b; }
.state-running, .state-queued { background: #fff4e6; color: #b35c00; }
.state-draft { background: #eef0f3; color: #646a73; }
.task-meta { font-size: 12px; color: #8a8f99; }
.task-detail { background: #fff; border: 1px solid #e8eaed; border-radius: 8px; padding: 18px; min-height: 300px; }
.log-item { padding: 8px 0; border-bottom: 1px solid #f0f1f3; font-size: 12px; }
.log-time { color: #a6abb4; margin-right: 8px; font-family: monospace; }
.log-error { color: #c0392b; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.form-grid label { font-size: 13px; color: #646a73; }
.form-grid .input { display: block; width: 100%; margin-top: 6px; }
.alert {
  padding: 12px 14px; background: #fff8e6; border: 1px solid #ffe0a3;
  border-radius: 6px; font-size: 12px; color: #7a5b00; margin-bottom: 16px;
}
.settings-card { max-width: 780px; }
.code-block {
  margin-top: 12px; padding: 12px; background: #f5f6f8; border-radius: 6px;
  font-size: 12px; word-break: break-all; white-space: pre-wrap;
}
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: #1f2329; color: #fff; padding: 12px 22px; border-radius: 8px;
  font-size: 14px; opacity: 0; transition: all .25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.diff-old { color: #c0392b; text-decoration: line-through; }
.diff-new { color: #17803c; font-weight: 500; }
.tools-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.tools-layout .card { margin-bottom: 0; }
.tpl-item { padding: 12px; border: 1px solid #e8eaed; border-radius: 6px; margin-bottom: 10px; }
.tpl-name { font-weight: 500; margin-bottom: 4px; }
.tpl-meta { font-size: 12px; color: #8a8f99; }
.compliance-bad { background: #fdeaea; color: #c0392b; padding: 2px 6px; border-radius: 3px; }
.compliance-ok { color: #17803c; }
details summary { outline: none; }
.check-label { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: #646a73; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dash-grid .card { margin-bottom: 0; }
.chart-area { min-height: 180px; padding-top: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.bar-label { width: 80px; color: #646a73; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 20px; background: #f0f1f3; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: #ff8c3a; border-radius: 4px; min-width: 2px; }
.bar-value { width: 40px; color: #1f2329; }
.bar-fill.green { background: #52b57a; }
.bar-fill.gray { background: #a6abb4; }
.bar-fill.red { background: #e05a5a; }
.notice-item { padding: 8px 0; border-bottom: 1px solid #f0f1f3; font-size: 12px; }
.notice-time { color: #a6abb4; margin-right: 8px; }
.compare-table td, .compare-table th { min-width: 150px; vertical-align: top; }
.compare-diff { background: #fff4e6; }
.compare-label { font-weight: 500; color: #646a73; background: #fafbfc; white-space: nowrap; min-width: 100px; }
.toolbar-left .hint { margin-left: 12px; }
