/* bot 中控 - 主应用布局 */

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 1fr 320px;
  grid-template-areas: "sidebar main" "sidebar output";
  height: calc(100vh - 56px);
  background: #f3f5f7;
}

.sidebar {
  grid-area: sidebar;
  background: #fff;
  border-right: 1px solid #e1e4e8;
  overflow-y: auto;
}
.main {
  grid-area: main;
  overflow: auto;
  padding: 20px;
}
.output {
  grid-area: output;
  background: #0f1419;
  color: #d4d4d4;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #2a3340;
}

/* 侧栏 */
.sidebar-header {
  padding: 10px 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f7fa;
  border-bottom: 1px solid #e1e4e8;
  position: sticky;
  top: 0;
  z-index: 1;
}
.skill-block { border-bottom: 1px solid #f0f2f5; }
.skill-header {
  padding: 8px 12px;
  font-weight: 600; color: #333;
  display: flex; gap: 6px; align-items: center;
  cursor: pointer; user-select: none;
  background: #fafbfc;
  text-decoration: none;
}
.skill-header:hover { background: #f0f3f7; }
.skill-toggle {
  display: inline-block; width: 14px; color: #888; font-size: 10px;
  transition: transform 0.15s;
}
.skill-name { flex: 1; font-size: 13.5px; }
.host-tag {
  background: #eef; color: #557;
  padding: 1px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 400;
}
.cmd-list { background: #fff; }
.cmd-item {
  padding: 6px 14px 6px 30px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  border-left: 3px solid transparent;
}
.cmd-item:hover { background: #f5f7fa; }
.cmd-item.active {
  background: #e0e9f7;
  color: #1a4d8f;
  font-weight: 600;
  border-left-color: #1a4d8f;
}
.cmd-mode {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #eee;
  color: #666;
}
.cmd-mode.grid { background: #ffe; color: #a60; }

.btn-icon {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 2px 6px;
  color: #666;
  font-size: 14px;
}
.btn-icon:hover { color: #000; background: #eee; border-radius: 3px; }

/* 主区 */
.placeholder-msg { padding: 60px; color: #999; font-size: 14px; text-align: center; }

.form-panel {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  max-width: 920px;
}
.form-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}
.form-title .muted { color: #999; font-weight: 400; }
.ui-mode-tag {
  margin-left: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  background: #def;
  color: #257;
}
.ui-mode-tag.grid { background: #ffe; color: #960; }

.form-table { display: table; width: 100%; }
.form-row { display: table-row; }
.form-label,
.form-input {
  display: table-cell;
  padding: 8px 12px 8px 0;
  vertical-align: top;
}
.form-label { width: 130px; font-weight: 500; padding-top: 14px; }
.form-row.has-error .form-label { color: #c00; }
.required { color: #c00; margin-left: 2px; }
.form-input input,
.form-input select,
.form-input textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d0d6df;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.form-input input:focus,
.form-input select:focus,
.form-input textarea:focus {
  outline: none;
  border-color: #4080ff;
  box-shadow: 0 0 0 2px rgba(64, 128, 255, 0.15);
}
.form-input input.invalid,
.form-input select.invalid,
.form-input textarea.invalid {
  border-color: #c00 !important;
  background: #fff5f5 !important;
}
.field-hint { font-size: 12px; color: #888; margin-top: 4px; }
.field-hint.error { color: #c00; font-weight: 500; }
.field-hint.info { color: #0a7d20; font-weight: 500; }
.precheck-summary {
  background: #eaf4ff; color: #1864ab; border: 1px solid #c8e0fa;
  padding: 8px 12px; border-radius: 4px; margin: 0 0 14px; font-size: 13px;
}
/* bot 粘贴模式 */
.paste-panel { margin: 0 0 14px; }
.paste-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin: 10px 0 6px;
}
.paste-input {
  width: 100%; padding: 10px 12px; box-sizing: border-box;
  border: 1px solid #d0d6df; border-radius: 4px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px; line-height: 1.7; resize: vertical;
}
.paste-input:focus {
  outline: none; border-color: #4080ff;
  box-shadow: 0 0 0 2px rgba(64, 128, 255, 0.15);
}
.paste-preview { margin-top: 10px; }
.paste-errors { list-style: none; padding: 0; margin: 6px 0; font-size: 13px; }
.paste-errors li.error { color: #c00; padding: 2px 0; }
.paste-errors li.error b { color: #a00; }
.paste-ok {
  background: #eafaef; color: #0a7d20; border: 1px solid #bce8c9;
  padding: 8px 12px; border-radius: 4px; font-size: 13px; margin-top: 6px;
}
.paste-ignored {
  background: #fffaeb; color: #7a5a00; border: 1px solid #f0deb0;
  padding: 6px 10px; border-radius: 4px; font-size: 12px; margin-top: 6px;
}
.paste-ignored code {
  background: #fff; border: 1px solid #e6d8b0; border-radius: 3px;
  padding: 1px 5px; margin: 0 3px;
}
.cmd-description {
  background: #fffaeb; color: #7a5a00; border-left: 3px solid #f5b400;
  padding: 8px 12px; border-radius: 3px; margin: -4px 0 14px; font-size: 13px;
  line-height: 1.5; white-space: pre-wrap;
}

/* 通知点击后的任务详情模态 */
.job-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
}
.job-modal {
  background: #fff; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  width: min(820px, 92vw); max-height: 88vh; display: flex; flex-direction: column;
  overflow: hidden;
}
.job-modal-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0; background: #f7fafc;
}
.job-modal-title { font-size: 15px; flex: 1; }
.job-modal-close { font-size: 18px; line-height: 1; }
.job-modal-loading, .job-modal-body { padding: 14px 16px; overflow-y: auto; }
.job-modal-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.job-modal-cmd {
  background: #f7fafc; padding: 8px 10px; border-radius: 4px; margin-bottom: 12px;
  font-size: 12px; word-break: break-all;
}
.job-modal-cmd code { background: transparent; padding: 0; }
.job-modal-log-wrap { margin-top: 12px; }
.job-modal-log {
  background: #1a202c; color: #e2e8f0; padding: 10px 12px; border-radius: 4px;
  max-height: 360px; overflow-y: auto; font-size: 12px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-all; margin: 6px 0 0;
}

/* register-group 面板的已登记群列表 */
.group-list-block {
  margin-top: 18px; padding: 12px; background: #f7fafc;
  border: 1px solid #e2e8f0; border-radius: 6px;
}
.group-list-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.group-list-title { font-weight: 600; font-size: 14px; }
.group-list-filter {
  flex: 1; max-width: 280px; padding: 4px 8px; font-size: 13px;
  border: 1px solid #cbd5e0; border-radius: 4px;
}
.group-list-table-wrap {
  max-height: 320px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 4px; background: #fff;
}
.group-list-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.group-list-table th, .group-list-table td {
  padding: 6px 10px; text-align: left; border-bottom: 1px solid #edf2f7;
}
.group-list-table th {
  position: sticky; top: 0; background: #edf2f7; font-weight: 600; color: #2d3748;
}
.group-list-table tbody tr:hover { background: #f7fafc; }
.group-list-table code { background: #edf2f7; padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* bind(渠道列表) 面板的全量绑定表 */
.binding-list-block {
  margin: 0 0 18px; padding: 12px; background: #f7fafc;
  border: 1px solid #e2e8f0; border-radius: 6px;
}
.binding-list-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.binding-list-title { font-weight: 600; font-size: 14px; }
.binding-list-filter {
  flex: 1; min-width: 240px; max-width: 360px; padding: 4px 8px; font-size: 13px;
  border: 1px solid #cbd5e0; border-radius: 4px;
}
.binding-list-table-wrap {
  max-height: 360px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 4px; background: #fff;
}
.binding-list-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.binding-list-table th, .binding-list-table td {
  padding: 6px 10px; text-align: left; border-bottom: 1px solid #edf2f7; vertical-align: top;
}
.binding-list-table th {
  position: sticky; top: 0; background: #edf2f7; font-weight: 600; color: #2d3748;
}
.binding-list-table tbody tr:hover { background: #f7fafc; }
.binding-list-table code { background: #edf2f7; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.binding-group-cell { min-width: 180px; }
.binding-group-name { font-weight: 500; }
.binding-link-cell {
  max-width: 340px; word-break: break-all; font-size: 12px;
}
.binding-link-cell a { color: #2b6cb0; }
.binding-del-btn {
  background: #fee; color: #c53030; border: 1px solid #fbb;
  padding: 4px 8px; border-radius: 3px; font-size: 14px;
}
.binding-del-btn:hover:not(:disabled) { background: #fbb; }

/* 开线历史查询面板 */
.history-block { margin-top: 10px; }
.history-search-bar {
  display: flex; align-items: flex-end; gap: 10px; padding: 14px;
  background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 14px;
}
.history-search-bar label { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.history-search-input {
  padding: 7px 10px; font-size: 14px; border: 1px solid #cbd5e0; border-radius: 4px;
}
.history-search-input:focus { border-color: #4299e1; outline: none; box-shadow: 0 0 0 2px rgba(66,153,225,0.2); }
.history-results { display: flex; flex-direction: column; gap: 10px; }
.history-card {
  background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #cbd5e0;
  border-radius: 4px; padding: 10px 14px;
}
.history-card.status-succeeded { border-left-color: #48bb78; }
.history-card.status-failed { border-left-color: #f56565; background: #fffafa; }
.history-card.status-running, .history-card.status-queued { border-left-color: #ed8936; }
.history-card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.history-card-params { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.history-code {
  background: #edf2f7; padding: 1px 6px; border-radius: 3px; font-size: 12px;
}
.history-card-detail { margin-top: 8px; }
.history-card-detail summary { cursor: pointer; }
.history-summary {
  margin: 6px 0 0; padding: 10px 12px; background: #1a202c; color: #e2e8f0;
  font-size: 12px; line-height: 1.5; border-radius: 4px;
  white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto;
}

.section-divider {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 4px 0 16px; padding: 10px 14px; background: #ebf5ff;
  border-left: 4px solid #4299e1; border-radius: 4px;
}
.section-divider-title { font-size: 15px; font-weight: 600; color: #2b6cb0; }

/* 侧栏底部"工具"区 */
.sidebar-section {
  margin-top: 14px; padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}
.sidebar-section-title {
  padding: 4px 12px; font-size: 13px; color: #718096; font-weight: 600;
  letter-spacing: 0.5px;
}
.sidebar-tool-link {
  display: block; padding: 8px 14px 8px 18px;
  font-size: 14px; color: #2d3748; text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar-tool-link:hover {
  background: #f7fafc; border-left-color: #4299e1; color: #2b6cb0;
}
.sidebar-tool-link.active {
  background: #ebf5ff; border-left-color: #3182ce; color: #2b6cb0; font-weight: 500;
}

.contact-ops {
  color: #cbd5e0; font-size: 13px; padding: 4px 10px;
  border-left: 1px solid rgba(255,255,255,0.15);
  border-right: 1px solid rgba(255,255,255,0.15);
  margin: 0 4px;
}
.contact-ops a { color: #63b3ed; text-decoration: none; }
.contact-ops a:hover { text-decoration: underline; }

/* 操作日志页 */
.audit-page { padding: 16px 20px; }

/* 修改密码页 */
.change-pwd-page { padding: 24px 28px; max-width: 480px; }
.change-pwd-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.change-pwd-header h2 { margin: 0; font-size: 20px; }
.change-pwd-form { display: flex; flex-direction: column; gap: 14px; }
.change-pwd-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.change-pwd-form input[type="password"] {
  padding: 8px 10px; font-size: 14px; border: 1px solid #cbd5e0; border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.change-pwd-form input[type="password"]:focus {
  border-color: #4299e1; outline: none; box-shadow: 0 0 0 2px rgba(66,153,225,0.2);
}
.change-pwd-actions { display: flex; gap: 10px; margin-top: 10px; }
.change-pwd-ok {
  padding: 10px 14px; background: #c6f6d5; color: #22543d; border-radius: 4px; margin-bottom: 14px;
}
.change-pwd-err {
  padding: 10px 14px; background: #fed7d7; color: #742a2a; border-radius: 4px; margin-bottom: 14px;
}
.audit-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.audit-header h2 { margin: 0; font-size: 20px; }

.audit-filter {
  display: flex; flex-wrap: wrap; align-items: end; gap: 10px;
  padding: 12px; background: #f7fafc; border: 1px solid #e2e8f0;
  border-radius: 6px; margin-bottom: 14px;
}
.audit-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.audit-filter input, .audit-filter select {
  padding: 5px 8px; font-size: 13px; border: 1px solid #cbd5e0; border-radius: 4px;
}

.audit-table-wrap {
  border: 1px solid #e2e8f0; border-radius: 6px; overflow: auto; background: #fff;
  max-height: 70vh;
}
.audit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.audit-table th, .audit-table td {
  padding: 7px 10px; text-align: left; border-bottom: 1px solid #edf2f7; vertical-align: top;
}
.audit-table th { position: sticky; top: 0; background: #edf2f7; font-weight: 600; color: #2d3748; }
.audit-table tbody tr:hover { background: #f7fafc; }
.audit-row-fail { background: #fff5f5; }
.audit-row-fail:hover { background: #fed7d7 !important; }
.audit-ts { white-space: nowrap; font-variant-numeric: tabular-nums; color: #4a5568; }
.audit-handle { font-weight: 500; }
.audit-action { padding: 2px 6px; background: #edf2f7; border-radius: 3px; font-size: 12px; }
.audit-action-login_success { background: #c6f6d5; color: #22543d; }
.audit-action-login_failed { background: #fed7d7; color: #742a2a; }
.audit-action-job_submit { background: #bee3f8; color: #2c5282; }
.audit-action-aux_delete_binding { background: #feebc8; color: #7b341e; }
.audit-target { background: transparent; padding: 0; font-size: 12px; word-break: break-all; }
.audit-detail-cell { max-width: 340px; }
.audit-detail {
  margin: 4px 0 0; padding: 8px; background: #1a202c; color: #e2e8f0;
  font-size: 11px; border-radius: 3px; white-space: pre-wrap; word-break: break-all;
  max-height: 220px; overflow: auto;
}

.audit-tabs {
  display: flex; gap: 4px; margin: 8px 0 14px; border-bottom: 1px solid #e2e8f0;
}
.audit-tab {
  padding: 7px 16px; font-size: 14px; color: #4a5568; text-decoration: none;
  border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0;
  position: relative; top: 1px;
}
.audit-tab:hover { color: #2b6cb0; background: #f7fafc; }
.audit-tab.active {
  color: #2b6cb0; font-weight: 600; background: #fff;
  border-color: #e2e8f0; border-bottom: 1px solid #fff;
}
.audit-pager { display: flex; align-items: center; gap: 10px; margin-top: 14px; justify-content: center; }
.btn.ghost.disabled { opacity: .35; cursor: default; pointer-events: none; }

/* 交付块 — 客户可直接复制粘贴 */
.delivery-block {
  margin: 14px 0;
  background: #f7faf7; border: 1px solid #c8e6c9; border-radius: 6px;
  padding: 12px 14px;
}
.delivery-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.delivery-title { font-weight: 600; color: #2e7d32; font-size: 14px; }
.delivery-hint { color: #2e7d32; font-size: 13px; font-weight: 500; }
.delivery-text {
  width: 100%; min-height: 180px; max-height: 360px;
  padding: 10px 12px;
  font-family: "Cascadia Code", "Source Code Pro", "Consolas", monospace;
  font-size: 13px; line-height: 1.7;
  background: #fff; color: #222;
  border: 1px solid #d0e0d0; border-radius: 4px;
  resize: vertical; white-space: pre-wrap; word-break: break-all;
}
.delivery-text:focus { outline: 2px solid #66bb6a; outline-offset: -2px; }

.template-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin: 0 0 12px;
  background: #f8f9fb; border: 1px solid #e1e4e8; border-radius: 4px;
  font-size: 13px;
}
.template-bar select {
  padding: 4px 8px; min-width: 220px;
  border: 1px solid #cbd5e1; border-radius: 4px; background: #fff;
}
.template-bar .btn-icon {
  padding: 4px 10px; cursor: pointer;
  border: 1px solid #cbd5e1; border-radius: 4px; background: #fff;
}
.template-bar .btn-icon:hover { background: #eef2f7; }
.template-bar .btn-icon:disabled { opacity: 0.4; cursor: not-allowed; }

/* B 模式：网格 */
.grid-panel { display: flex; flex-direction: column; gap: 8px; }
.grid-toolbar { display: flex; gap: 8px; align-items: center; }
.grid-toolbar .muted { margin-left: auto; font-size: 12px; }
.grid-container { border: 1px solid #d0d6df; border-radius: 4px; min-height: 200px; }
.hint { font-size: 12px; padding: 4px 0; }

/* 提交区 */
.form-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn {
  padding: 8px 16px;
  border: 1px solid #d0d6df;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.btn:hover { background: #f5f7fa; }
.btn.primary {
  background: #1a4d8f;
  color: #fff;
  border-color: #1a4d8f;
}
.btn.primary:hover { background: #2a5da0; }
.btn.primary:disabled { background: #99a; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 0; color: #666; }

.muted { color: #888; }
.muted.small { font-size: 12px; }

/* 任务状态条 */
.job-status {
  margin-top: 16px;
  padding: 10px 14px;
  background: #f3f5f7;
  border-radius: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.job-status.running { background: #f0f9ff; }
.job-status.succeeded { background: #f0fff0; }
.job-status.failed { background: #fff0f0; }
.job-status.timeout { background: #fff8e0; }
.job-badge {
  padding: 2px 10px;
  border-radius: 3px;
  background: #888;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
}
.job-status.queued .job-badge { background: #888; }
.job-status.running .job-badge { background: #08f; }
.job-status.succeeded .job-badge { background: #0a0; }
.job-status.failed .job-badge { background: #c00; }
.job-status code {
  background: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 12px;
}

/* 输出面板 */
.output-header {
  padding: 8px 14px;
  background: #1a2230;
  color: #ccc;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  border-bottom: 1px solid #2a3340;
}
.output-header .muted { color: #777; }
.output-header .btn-icon { color: #888; margin-left: auto; }
.output-header .btn-icon:hover { background: #2a3340; color: #fff; }
.output-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px;
  font-family: 'Cascadia Code', 'Consolas', 'Menlo', monospace;
  font-size: 12.5px;
  line-height: 1.5;
}
.out-line { display: flex; gap: 10px; padding: 1px 0; }
.out-seq { color: #555; min-width: 36px; text-align: right; }
.out-type { color: #888; min-width: 64px; text-transform: uppercase; font-size: 10px; padding-top: 1px; }
.out-text { flex: 1; white-space: pre-wrap; word-break: break-all; }
.out-line.stdout .out-text { color: #d4d4d4; }
.out-line.stderr .out-text { color: #ff8888; }
.out-line.error .out-text { color: #ff5555; font-weight: 600; }
.out-line.error .out-type { color: #ff5555; }
.out-line.status .out-text { color: #88ddff; }
.out-line.status .out-type { color: #88ddff; }
.out-line.progress .out-text { color: #ffdd88; }
.out-line.progress .out-type { color: #ffdd88; }
.out-line.mfa_needed .out-text { color: #ff0; font-weight: 700; }
.out-line.mfa_needed .out-type { color: #ff0; }
.out-line.info { opacity: 0.7; font-style: italic; }
.out-line.info .out-text { color: #88aaff; }

/* 输出面板的多任务 chip 栏 */
.output-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 14px;
  background: #14202b;
  border-bottom: 1px solid #2a3340;
  overflow-x: auto;
  flex-wrap: nowrap;
  min-height: 34px;
  align-items: center;
}
.output-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  font-size: 11.5px;
  border-radius: 12px;
  background: #1f2c3a;
  color: #aab;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  border: 1px solid transparent;
  transition: background 0.12s, color 0.12s;
}
.output-tab:hover { background: #2a3a4d; color: #fff; }
.output-tab.active { background: #08f; color: #fff; border-color: #4ab; }
.output-tab .tab-id { background: rgba(0,0,0,0.25); color: inherit; padding: 0 4px; font-size: 10.5px; border-radius: 2px; }
.output-tab .tab-icon { font-weight: 700; }
.output-tab.status-queued .tab-icon { color: #888; }
.output-tab.status-running .tab-icon { color: #ffdd88; }
.output-tab.status-succeeded .tab-icon { color: #6f6; }
.output-tab.status-failed .tab-icon { color: #f66; }
.output-tab.status-timeout .tab-icon { color: #fb6; }
.output-tab.status-cancelled .tab-icon { color: #888; }
.output-tab.active.status-succeeded { background: #0a6; border-color: #6f6; }
.output-tab.active.status-failed { background: #c33; border-color: #f66; }
.output-tab.active.status-running { background: #c80; border-color: #ffdd88; }
.tab-mfa { color: #ff0; font-weight: 700; }
.output-tabs-empty { color: #555; font-size: 12px; font-style: italic; padding: 0 4px; }
.output-clear { margin-left: auto; }

/* 铃铛 */
[x-cloak] { display: none !important; }
.bell { position: relative; }
.bell-icon {
  background: transparent; border: 0; color: #ddd;
  font-size: 18px; cursor: pointer; position: relative;
  padding: 4px 8px;
}
.bell-icon:hover { color: #fff; }
.bell-dot {
  position: absolute; top: 0; right: -2px;
  background: #c00; color: #fff;
  font-size: 10px; line-height: 1; padding: 2px 5px;
  border-radius: 8px; min-width: 16px; text-align: center;
  font-weight: 700;
}
.bell-dropdown {
  position: absolute; top: 110%; right: 0;
  width: 360px; max-height: 480px; overflow: hidden;
  background: #fff; color: #222;
  border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  z-index: 1000;
}
.bell-header {
  padding: 10px 14px;
  display: flex; gap: 8px; align-items: center;
  background: #f5f7fa; border-bottom: 1px solid #e1e4e8;
  font-weight: 600;
}
.bell-header .btn-icon { margin-left: auto; color: #666; font-size: 12px; }
.bell-list { flex: 1; overflow-y: auto; }
.bell-item {
  padding: 10px 14px; border-bottom: 1px solid #f0f2f5; cursor: pointer;
  font-size: 13px;
}
.bell-item:hover { background: #f5f7fa; }
.bell-item.unread { background: #f0f7ff; }
.bell-item.unread .bell-title::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  background: #4080ff; border-radius: 50%; margin-right: 6px;
  vertical-align: middle;
}
.bell-title { font-weight: 600; color: #222; margin-bottom: 4px; }
.bell-body { color: #555; font-size: 12px; white-space: pre-wrap; max-height: 60px; overflow: hidden; }
.bell-time { margin-top: 4px; }
.bell-empty { padding: 30px; text-align: center; color: #888; font-size: 13px; }

/* MFA 提示框 */
.mfa-prompt {
  margin-top: 16px;
  padding: 14px 18px;
  background: #fffbea;
  border: 2px solid #d4a017;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.mfa-prompt strong { color: #8a5a00; font-size: 15px; }
.mfa-prompt input {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 18px;
  letter-spacing: 4px;
  width: 140px;
  padding: 8px 10px;
  border: 1px solid #d0d6df;
  border-radius: 4px;
  text-align: center;
}
