/* ============================================================
   qwen2API 企业网关 - 管理台样式
   纯原生 CSS，无任何外部依赖。用 CSS 变量管理主题色。
   深色现代风格：渐变紫蓝 accent + 卡片 + 圆角 + 毛玻璃。
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
  /* 背景层次 */
  --bg-0: #0a0b14;          /* 最底层背景 */
  --bg-1: #11131f;          /* 内容区背景 */
  --bg-2: #171a29;          /* 卡片背景 */
  --bg-3: #1f2333;          /* 高亮/输入框背景 */
  --bg-hover: #252a3d;

  /* 文字 */
  --fg: #e8eaf2;
  --fg-dim: #a3a8bd;
  --fg-faint: #6b7088;

  /* 边框 */
  --border: #262b3d;
  --border-soft: #1d2130;

  /* 强调色（渐变紫蓝） */
  --accent: #7c5cff;
  --accent-2: #00c2ff;
  --accent-grad: linear-gradient(135deg, #7c5cff 0%, #00c2ff 100%);
  --accent-soft: rgba(124, 92, 255, 0.15);

  /* 状态色 */
  --green: #2ec27e;
  --green-soft: rgba(46, 194, 126, 0.15);
  --orange: #ff9f43;
  --orange-soft: rgba(255, 159, 67, 0.15);
  --red: #ff5a6a;
  --red-soft: rgba(255, 90, 106, 0.15);
  --blue: #3b9dff;
  --blue-soft: rgba(59, 157, 255, 0.15);

  /* 尺寸 */
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 248px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);

  --font: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

/* ---------- 基础重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(0, 194, 255, 0.10), transparent 55%),
    var(--bg-0);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3046; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #353c57; }

/* ============================================================
   布局：侧边栏 + 内容区
   ============================================================ */
.layout { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(17, 19, 31, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
}
.brand-logo { display: flex; }
.brand-text strong { font-size: 17px; letter-spacing: 0.3px; }
.brand-text small { display: block; color: var(--fg-faint); font-size: 11px; }

.nav { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--fg-dim);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--fg); }
.nav-item.active {
  background: var(--accent-soft);
  color: #fff;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-grad);
}
.nav-ico { font-size: 17px; width: 22px; text-align: center; }

.sidebar-foot {
  margin-top: auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--fg-faint);
  border-top: 1px solid var(--border-soft);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-faint); }
.dot.ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.bad { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------- 内容区 ---------- */
.view {
  flex: 1;
  min-width: 0;
  padding: 30px 36px 60px;
  background: var(--bg-1);
}

/* ---------- 移动端顶栏 / 遮罩（桌面隐藏） ---------- */
.mobile-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(17, 19, 31, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 60;
}
.mobile-title { font-weight: 700; font-size: 16px; }
.icon-btn {
  background: transparent; border: none; color: var(--fg);
  display: flex; padding: 6px; border-radius: 8px;
}
.icon-btn:hover { background: var(--bg-hover); }
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
}

/* ============================================================
   通用组件
   ============================================================ */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}
.page-head h1 { font-size: 23px; font-weight: 700; }
.page-head p { color: var(--fg-dim); font-size: 13px; margin-top: 4px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 卡片 */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.card-title {
  font-size: 15px; font-weight: 600;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.card-title .sub { color: var(--fg-faint); font-weight: 400; font-size: 12px; }

/* 统计卡片网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 90px; height: 90px;
  background: var(--accent-grad);
  opacity: 0.08;
  border-radius: 50%;
  transform: translate(35%, -35%);
}
.stat .label { color: var(--fg-dim); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.stat .num { font-size: 28px; font-weight: 700; margin-top: 8px; line-height: 1.1; }
.stat .num small { font-size: 15px; color: var(--fg-faint); font-weight: 500; }
.stat .foot { color: var(--fg-faint); font-size: 11.5px; margin-top: 6px; }
.stat .ico { font-size: 16px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--fg);
  font-size: 13.5px;
  transition: transform 0.08s, background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: #333a52; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent-grad);
  border: none;
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { color: var(--red); border-color: rgba(255,90,106,0.3); background: var(--red-soft); }
.btn-danger:hover { background: rgba(255,90,106,0.25); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }

/* 表单元素 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--fg-dim); margin-bottom: 6px; }
.field .hint { color: var(--fg-faint); font-size: 11.5px; margin-top: 5px; }
.input, .select, .textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  padding: 10px 12px;
  font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 120px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 160px; }

/* 提示框 */
.notice {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 16px;
  display: flex; gap: 10px;
}
.notice-warn { background: var(--orange-soft); border: 1px solid rgba(255,159,67,0.3); color: #ffd9a8; }
.notice .ico { flex-shrink: 0; }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bg-3);
  color: var(--fg-dim);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { color: var(--green); background: var(--green-soft); }
.badge-orange { color: var(--orange); background: var(--orange-soft); }
.badge-red { color: var(--red); background: var(--red-soft); }
.badge-blue { color: var(--blue); background: var(--blue-soft); }
.badge-gray { color: var(--fg-dim); background: rgba(255,255,255,0.06); }

/* 空 / 加载状态 */
.empty, .loading {
  text-align: center;
  color: var(--fg-faint);
  padding: 50px 20px;
  font-size: 13.5px;
}
.empty .big { font-size: 36px; display: block; margin-bottom: 12px; opacity: 0.7; }

.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 接口池列表 */
.api-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.api-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.method {
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
  flex-shrink: 0;
}
.method.get { color: var(--green); background: var(--green-soft); }
.method.post { color: var(--blue); background: var(--blue-soft); }
.api-row .path { font-family: var(--mono); font-size: 12px; color: var(--fg); }
.api-row .tag { margin-left: auto; font-size: 11px; color: var(--fg-faint); }

/* ============================================================
   接口测试（聊天）
   ============================================================ */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 460px; }
.chat-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}
.chat-toolbar .select { width: auto; min-width: 220px; }
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fg-dim); cursor: pointer; user-select: none; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { background: transparent; border: none; color: var(--fg-dim); padding: 7px 13px; font-size: 12.5px; }
.seg button.on { background: var(--accent-grad); color: #fff; }

.chat-body {
  flex: 1; overflow-y: auto;
  padding: 22px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-bottom: none; border-top: none;
  display: flex; flex-direction: column; gap: 16px;
}
.msg { display: flex; gap: 10px; max-width: 82%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.assistant { align-self: flex-start; }
.msg .avatar {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.msg.user .avatar { background: var(--accent-grad); }
.msg.assistant .avatar { background: var(--bg-3); border: 1px solid var(--border); }
.bubble {
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.user .bubble { background: var(--accent-soft); border: 1px solid rgba(124,92,255,0.3); border-top-right-radius: 4px; }
.msg.assistant .bubble { background: var(--bg-2); border: 1px solid var(--border); border-top-left-radius: 4px; }
.bubble.error { background: var(--red-soft); border-color: rgba(255,90,106,0.3); color: #ffc4ca; }
.bubble img { max-width: 100%; border-radius: 10px; margin: 6px 0; display: block; }

/* 思考过程折叠 */
.reasoning { margin-bottom: 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.reasoning summary {
  cursor: pointer; padding: 7px 11px;
  background: var(--bg-3); color: var(--fg-dim); font-size: 12.5px;
  list-style: none;
}
.reasoning summary::-webkit-details-marker { display: none; }
.reasoning .reasoning-body {
  padding: 10px 12px; font-size: 12.5px; color: var(--fg-dim);
  white-space: pre-wrap; line-height: 1.6; background: rgba(0,0,0,0.18);
}

.chat-input-bar {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}
.chat-input-bar .textarea { min-height: 44px; max-height: 160px; font-family: var(--font); font-size: 14px; }

/* 打字光标 */
.cursor::after { content: "▋"; animation: blink 1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   图片生成
   ============================================================ */
.img-controls { display: flex; flex-direction: column; gap: 16px; }
.ratio-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.ratio-opt, .count-opt {
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-3);
  color: var(--fg-dim); font-size: 13px; transition: all 0.15s;
}
.ratio-opt small { display: block; font-size: 10.5px; color: var(--fg-faint); }
.ratio-opt.on, .count-opt.on { border-color: var(--accent); color: #fff; background: var(--accent-soft); }
.ratio-opt.on small { color: var(--accent-2); }

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.img-card {
  position: relative; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  background: var(--bg-2); aspect-ratio: 1;
}
.img-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 55%);
  opacity: 0; transition: opacity 0.2s;
  display: flex; align-items: flex-end; gap: 8px; padding: 12px;
}
.img-card:hover .img-overlay { opacity: 1; }

/* 影片生成结果 */
.video-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  margin-top: 20px;
}
.video-card { display: flex; flex-direction: column; gap: 8px; }
.video-card video {
  width: 100%; display: block;
  border-radius: var(--radius);
  background: #000; border: 1px solid var(--border);
}
.video-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 账号筛选 + 分页 */
.acc-filter { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.acc-filter .input { flex: 1; min-width: 200px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 12px; flex-wrap: wrap; }
.pager-info { color: var(--fg-dim); font-size: 13px; }
.pager-btns { display: flex; gap: 8px; }

/* ============================================================
   toast 通知
   ============================================================ */
.toasts {
  position: fixed; top: 18px; right: 18px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 999; max-width: 360px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  animation: toast-in 0.25s ease;
  border-left: 3px solid var(--fg-faint);
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
.toast .t-ico { font-size: 16px; }
.toast.hide { animation: toast-out 0.25s ease forwards; }
@keyframes toast-in { from { transform: translateX(120%); opacity: 0; } }
@keyframes toast-out { to { transform: translateX(120%); opacity: 0; } }

/* 代码块 / curl 示例 */
.code {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: #c8d0e8;
  overflow-x: auto;
  white-space: pre;
}
.code + .code { margin-top: 12px; }
.example-block h4 { font-size: 13px; color: var(--fg-dim); margin: 16px 0 6px; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--fg-dim); }
.kv .v { font-family: var(--mono); font-size: 12.5px; }

/* 能力标签 */
.cap-tags { display: inline-flex; gap: 4px; margin-left: 8px; }
.cap { font-size: 10px; padding: 1px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-2); }

/* ============================================================
   响应式：移动端收合侧边栏
   ============================================================ */
@media (max-width: 860px) {
  .mobile-bar { display: flex; }
  .layout { flex-direction: column; }
  .sidebar {
    position: fixed; left: 0; top: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .overlay { display: block; }
  .view { padding: 20px 16px 50px; }
  .chat-wrap { height: calc(100vh - 200px); }
  .msg { max-width: 95%; }
  .page-head { margin-bottom: 18px; }
}

/* 接口測試：回應耗時資訊 */
.msg-timing {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted, #8a8f98);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0.85;
}

/* 錯誤盒（圖片/影片生成失敗原因） */
.err-box {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.35);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

/* 設定欄位說明文字 */
.field-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted, #8a8f98);
  line-height: 1.5;
}

/* ===== 数据统计页 ===== */
/* 趋势图 */
.chart-wrap {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 6px;
}
.chart-svg {
  display: block;
  width: 100%;
  height: 180px;
}
.chart-svg circle { cursor: pointer; }
.chart-svg circle:hover { fill: var(--accent); fill-opacity: 0.9; }
.chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: var(--fg-dim);
}
/* 按模型 / 按接口 两栏 */
.stats-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stats-two-col .card { margin: 0; }
@media (max-width: 820px) {
  .stats-two-col { grid-template-columns: 1fr; }
}

/* ===== 媒体任务画廊（图片/影片共用）===== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.media-task {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.media-task.queued { border-left: 3px solid #8a8f98; }
.media-task.running { border-left: 3px solid #ffa726; }
.media-task.done { border-left: 3px solid #4caf50; }
.media-task.failed { border-left: 3px solid #ef5350; }
.task-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-dim);
}
.task-time { margin-left: auto; }
.task-meta { color: var(--fg-dim); }
.task-media { display: flex; flex-direction: column; gap: 8px; }
.media-cell {
  background: var(--bg-1);
  border-radius: 8px;
  overflow: hidden;
}
.media-cell img, .media-cell video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
}
.media-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
}
.tag-local { color: #4caf50; }
.tag-remote { color: #ffa726; }
.task-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  color: var(--fg-dim);
  font-size: 13px;
}
.task-err {
  padding: 10px;
  background: rgba(239, 83, 80, 0.08);
  border: 1px solid rgba(239, 83, 80, 0.2);
  color: #ef9a9a;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}
.task-prompt {
  font-size: 13px;
  color: var(--fg);
  line-height: 1.5;
  max-height: 4.5em;
  overflow: hidden;
  text-overflow: ellipsis;
}
